How can I easily find how much "Ram" is used in a sketch?
How can I easily find how much "Ram" is used in a sketch?
(4 posts) (3 voices)-
Posted 5 years ago #
-
The ide console window dumps a bunch of info after the compile process. One of these messages lists the sizes of the various code sections. When compiling to RAM, the final total is all stored in ram, and thus your usage. When compiling to flash, the sections you care about are the .bss and the .data sections. The .text section is stored in flash.
Hope that helps.
Posted 5 years ago # -
<windows XP SP3>
Show me... where is the ram usage?
This is the upload text - to flash
C:\DOCUME~1\HP_ADM~1.H_A\LOCALS~1\Temp\build2541598310563497049.tmp\Instruction_Test_R4.cpp.bin :
section size addr
.data 11296 0
Total 11296Binary sketch size is reported above. Check it against a 100000 byte maximum.
Loading via dfu-util
Resetting to bootloader via DTR pulse
Searching for DFU device [1EAF:0003]...
Found it!Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=1, name="DFU Program FLASH 0x08005000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=225
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode---------------------------------------------------------------------------------
And this is the compile message ...Going to build using 'make' (ARM)
Compiling core...
Compiling any libs...
Compiling the sketch...In function 'void loop()':
running linker asynchronously...
running obj copy asynchronously...
running size asynchronously...C:\DOCUME~1\HP_ADM~1.H_A\LOCALS~1\Temp\build2541598310563497049.tmp\Instruction_Test_R5.cpp.bin :
section size addr
.data 11296 0
Total 11296Binary sketch size is reported above. Check it against a 100000 byte maximum.
Posted 5 years ago # -
Looks to me like 11k? Not sure why the arm-none-eabi-size output is different from when compiling with libmaple, i'll have perry take a peak
Posted 5 years ago #
Reply
You must log in to post.