Forum: Mikrocontroller und Digitale Elektronik Coocox Speicherverbrauch Ergebnisse nach Kompilation


von Choose (Gast)


Lesenswert?

Kann mir jemand sagen, wo man bei Coocox(ARM STM32)sehen kann, wieviel 
RAM die Variablen belegen und wieviel Prozent vom Programmspeicher noch 
übrig sind?


Schöne Grüße Choose

von Axelr. (Gast)


Lesenswert?

STM32F407 STM32F429
Die Frage ist auch nach drei Jahren immernoch aktuell...

Wie kann ich ermitteln (lassen), wieviel "Luft" ich noch habe?
Beim GCC stand da immer die Belegung der einzelnen Bereiche und der 
"Füllgrad" in Prozent.
Gibt es hier auch einen Script oder ein Tool, welches sich im 
LinkerSript / Makefile aufrufen lässt?

Vielen Dank
Axelr



Axelr.
DG1RTO

von Ingo L. (corrtexx)


Lesenswert?

Axelr. schrieb:
> Beim GCC stand da immer die Belegung der einzelnen Bereiche und der
> "Füllgrad" in Prozent.
Coocox nutzt normalerweise den GCC und zeigt den RAM/Flashverbauch 
naturgemäß an. Welche Version benutzt du denn? Welchen Compiler? Lass 
dir nicht alles aus der Nase ziehen

von Axelr. (Gast)


Lesenswert?

CoIDE
------
Version: 1.7.8
Build id: 20150206-3334-1557

Toolchain,
"C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2014q4\bin"
Hier liegt das alles... (°~°). Er zeigt mir schon den Speicerverbrauch 
an, soo ist's ja nicht.
Ich würde mir gern ein Bild machen, wieviel "voll" das Teil nun schon 
ist.

------------
Program Size:
      text     data      bss      dec      hex  filename
    227524     3624    89872   321020    4e5fc  speicherverbr.elf



Axelr.
DG1RTO

von Ingo L. (corrtexx)


Lesenswert?

Axelr. schrieb:
> Program Size:
>       text     data      bss      dec      hex  filename
>     227524     3624    89872   321020    4e5fc  speicherverbr.elf
Er ist schon ganz schön voll ;)

von Ulrich F. (Gast)


Lesenswert?

Axelr. schrieb:
> Ich würde mir gern ein Bild machen
Ich würde dir Tortendiagramme empfehlen...

von Pascal W. (Gast)


Lesenswert?

After compile the project, you can see this kind of result:

Program Size: text data bss dec hex filename 1284 1104 32 2420 974 
f411.elf

Data section holds initialized data that contribute to the program's 
memory image; bss is short for “Block Started by Symbol” and the section 
holds uninitialized data that contribute to the program's memory image; 
text section holds the text, or executable instructions, of a program.

The Flash size and RAM size occupied by the compiled program can be 
estimated as below.

Occupied Flash size ≈ data size + bss size + text size
Occupied RAM size ≈ data size + bss size
You can use the objdump tool to get more accurate sizes.

The content below is quoted from the ABI ARM Binary Interface standard, 
for your reference.

.bss – This section holds uninitialized data that contribute to the 
program's memory image. By definition, the system initializes the data 
with zeros when the program begins to run. The section occupies no file 
space, as indicated by the section type, SHT_NOBITS.
.comment – This section holds version control information.
.data and .data1 – These sections hold initialized data that contribute 
to the program's memory image.
.debug – This section holds information for symbolic debugging. The 
contents are unspecified. All section names with the prefix .debug are 
reserved for future use.
.dynamic – This section holds dynamic linking information and has 
attributes such as SHF_ALLOC and SHF_WRITE. The operating system and 
processor determine whether the SHF_WRITE bit is set.
.hash – This section holds a symbol hash table.
.line – This section holds line number information for symbolic 
debugging, which describes the correspondence between the source program 
and the machine code. The contents are unspecified.
.note – This section holds information in the format that is described 
in section 3.7.2.
.rodata and .rodata1 – These sections hold read-only data that typically 
contribute to a non-writable segment in the process image. See Program 
Header in subsection 3.7.1 for more information.
.shstrtab – This section holds section names.
.strtab – This section holds strings, most commonly only the strings 
that represent the names associated with symbol table entries. If a file 
has a loadable segment that includes the symbol string table, the 
section's attributes will include the SHF_ALLOC bit; otherwise, that bit 
will be off.
.symtab – This section holds a symbol table, described in section 3.5. 
If a file has a loadable segment that includes the symbol table, the 
section's attributes will include the SHF_ALLOC bit; otherwise, that bit 
will be off.
.text – This section holds the text, or executable instructions, of a 
program.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.