How to change the linker file for STM32H743 to support using the whole 1 MB of RAM for the code execution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-12 9:58 PM
Here is the content of stm32h743xx_flash.icf:
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF;
define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x0000FFFF;
Solved! Go to Solution.
- Labels:
-
Flash
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-12 11:24 PM
You'll need to describe the multiple regions, associate each with a section, and then use the attribute directive in the compiler to direct specific use by static variable allocation. Your code in startup.s would also need to expand to handle multiple sections.
If you want to allocate dynamically you would need to implement a more complex allocator (_sbrk) to understand the multiple pools the heap can draw from initially.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-12 10:38 PM
The SRAM memories are not located as a continuous block. That's a fixed mapping, you can't change it by changing the linker file which just describes the status quo.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-12 10:46 PM
Yes, I saw that, and I didn't understand how can I use the whole RAM for executing my code.
Currently, I'm Having a problem while executing my code, I keep getting "memory allocation error" because there is no place in the RAM.
My system is very complicated and big, that needs a large size of RAM, that's why we chose STMH7 because it has 1 MB of RAM.
I need a way to instruct the complier to use a larger size of RAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-12 11:24 PM
You'll need to describe the multiple regions, associate each with a section, and then use the attribute directive in the compiler to direct specific use by static variable allocation. Your code in startup.s would also need to expand to handle multiple sections.
If you want to allocate dynamically you would need to implement a more complex allocator (_sbrk) to understand the multiple pools the heap can draw from initially.
Up vote any posts that you find helpful, it shows what's working..
