- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a system sample program hello_world. The sram usage rate of the program after the default compilation is too high, I now want to reduce the sram usage volume. I have tried to delete some unused libraries in the library manager, but it seems to have no effect. May I ask this How to solve it
Solved! Go to Solution.
- Labels:
-
ispn:40048:1:0
-
l1:314:1:0
-
PSoC6MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Edwin ,
We can reduce the size of .heap section by increasing the size of stack.
- In your MakeFile, you will find a variable called DEFINES, in that you add the following macro definition. This makes sure you don’t have to edit the .S startup files.
2. In your linker script of CM4, under C:\Users\brvi\mtw\Hello_World\libs\TARGET_CY8CKIT-062- BLE\COMPONENT_CM4\TOOLCHAIN_GCC_ARM\ cy8c6xx7_cm4_dual.ld, you will find a variable STACK_SIZE change it to
So automatically heap size will be reduced so SRAM utilization reduces.
Thanks,
Krupashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Edwin ,
From your attached screenshot the we can see that maximum SRAM is utilized by .heap section
All unutilized memory will be automatically assigned to .heap section so SRAM utilization will be same so we are discussing with our internal team how to reduce this utilization.
Thanks,
Krupashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Edwin ,
We can reduce the size of .heap section by increasing the size of stack.
- In your MakeFile, you will find a variable called DEFINES, in that you add the following macro definition. This makes sure you don’t have to edit the .S startup files.
2. In your linker script of CM4, under C:\Users\brvi\mtw\Hello_World\libs\TARGET_CY8CKIT-062- BLE\COMPONENT_CM4\TOOLCHAIN_GCC_ARM\ cy8c6xx7_cm4_dual.ld, you will find a variable STACK_SIZE change it to
So automatically heap size will be reduced so SRAM utilization reduces.
Thanks,
Krupashankar