Skip to main content

RAM usage while running/debugging from RAM

1 year ago

RAM usage while running/debugging from RAM

Posted byhwidvorakinfo0 points 3 replies
0 upvotes

Dear Dialog Semiconductor,

I am developing an application for DA14585 with this size status of the elf file:

arm-none-eabi-size --format=berkeley cagble01.elf text data bss dec hex filename 61518 572 17644 79734 13776 cagble01.elf

I am debugging the code via RAM_DA14585 debug configuration.

I do not know how many RAM is being used. I feel a danger of collision between the code running from RAM and the own code RAM consumption for data etc.

How and where can I find the current status and the memory reserve?

1 year ago

PM_Dialog

Hi hwidvorakinfo,

The DA14585 has 4 RAM cells:

  • SysRAM1 (Block 1): 0x07FC0000 to 0x07FC7FFF
  • SysRAM2 (Block 2): 0x07FC8000 to 0x07FCBFFF
  • SysRAM3 (Block 3): 0x07FCC000 to 0x07FCFFFF
  • SysRAM4(4块):0 0 x07fd7fff x07fd0000

If in da1458x_config_advanced.h file, the CFG_CUSTOM_SCATTER_FILE flag is undefined, then the system knows which blocks to retain based on the default SDK scatter file. The 4th RAM block (32KB) is always retained since it contains the ROM data. The ROM data contains the Bluetooth Stack and Boot ROM code. The application code will start from SysRAM1 where the reset handler is remapped to 0. Please check the following document for more information.

//www.xmece.com/sites/default/files/tutorial_how_to_change_the_ram_size.pdf

The Eclipse\DA14585\ prox_reporter.map shows in what addresses the function and the variable are stored. To do so, in your case you should open the map file add check in which addresses you can store your own data.

Thanks, PM_Dialog

1 year ago

hwidvorakinfo 0 points

Hello PM_Dialog,

thank you. I hoped there is an easier way than to collect data from the map file.

Petr

accepted answer!

1 year ago

PM_Dialog

Hi hwidvorakinfo,

The described procedure is the procedure you should follow. All the information you need is included in the .map file.

Thanks, PM_Dialog