2020-08-04 12:54 PM
Hi... there
Hope all are doing well
From past few days I'm playing with SBSFU with STM32 L4 Cell-01 Discovery board
I'm using x-cube AWS default application with default settings of the linker file
In demo code, I've added SDMMC with FAT fs, which is working well
Now I need to send the sensors data to aws at some predefined interval by RTC having calling semaphore from ISR
I've created the separated thread to read the sensors data having stack size of 512
Now the problem is, due to new thread cloud_run thread calling to malloc fail Handler
to solve the issue, I've allocated 2K heap to project (default 18000 to 20000) in linker script
However that cause the APPLI_region_RAM over flow by 2048 bytes!
I need to know, how i can effectively allocate the RAM for the application region
After checking all the linker files, i got to know SRAM1 is used for the entire project
What is the best way to share the application between SRAM1 and SRAM2
Here I've attached the memory analyzer with default config
All comments and suggestions welcome
Regards,
Mahendra
Solved! Go to Solution.
2020-08-17 09:13 AM
Hello Mahendra,
to be able to use SRAM2, you need to create a region in the linker file and then to put part of your data in it.
Something like this:
define symbol __ICFEDIT_region_SRAM2_start__ = 0x10000000;
define symbol __ICFEDIT_region_SRAM2_end__ = 0x1000FFFF;
define region SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__];
place in SRAM2_region { block HEAP };
Best regards
Jocelyn
2020-08-17 09:13 AM
Hello Mahendra,
to be able to use SRAM2, you need to create a region in the linker file and then to put part of your data in it.
Something like this:
define symbol __ICFEDIT_region_SRAM2_start__ = 0x10000000;
define symbol __ICFEDIT_region_SRAM2_end__ = 0x1000FFFF;
define region SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__];
place in SRAM2_region { block HEAP };
Best regards
Jocelyn