7 years, 5 months ago.

External SRAM

Is mbed using the external SRAM for the stack ? I have ported the ebi test program from the CMSIS code and get some side effects. The ebi bank 0 seems to be initialized by the mbed code. The test is working, but some function calls to printf are scrambled.

Question relating to:

The NuMaker Platform is an Internet of Things (IoT) application focused platform specially developed by Nuvoton. It supports ARM mbed OS 5.0 as well as Arduino interface, and is ideal …

2 Answers

7 years, 5 months ago.

Hi, NuMaker-PFM-NUC472 is equipped with 1MB external SRAM (0x60000000-0x600FFFFF). On mbed, it has arranged for some global/static variables/buffers and heap, and cannot be directly used for test program. The correct use of it is through heap allocation/deallocation (malloc/free in C and new/delete in C++) calls.

Accepted Answer
7 years, 5 months ago.

Looks like the external SRAM is for the heap and internal SRAM for stack and other data but there are a few object files that place data on the external SRAM too

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_NUVOTON/TARGET_NUC472/device/TOOLCHAIN_ARM_STD/NUC472.sct#L13

Yes, besides for heap, the external SRAM is also used for some global variables/buffers. It is because 64KB internal SRAM is insufficient for e.g. network application.

posted by cc li 21 Nov 2016