increasing .bss section in linker file with code block from external flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 1:04 AM
Hi
The FrontendHeap is very small and i have "unused" external flash.
So my intension was to increase the .bss secction in linkerscript with a memory block in the linker file,
which causes a hard fault.
I'm new in ARM linker file and have no clue about linking more than one memory block to one
secction, especally the bss secction.
I'm not sure, which way i have to take in the linker file, so i try the following (short form) which based on a
article. im not sure about the pattern bss# and the start and end flags.
Pleas see the extract from linker file, which caused the error by linking in STM32 IDE.
I'm thankful for every hint, how to make the bss secction larger by a additional memory block.
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 2:33 AM
Hello @Rainer_ ,
So from what I understand you want to increase the bss section by allocating some memory from the external flash because you have some extra external flash?
The bss section contains uninitialized data that must be zeroed out at runtime, which requires RAM, not flash.
In your linker script, what is "NAME_FROM_MEMORY_TABLE" that you put your bss into?
This is the only difference between both bss section so that must be what is causing the issue.
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 3:01 AM
Hi and thank you for the answer.
The NAME_FROM_MEMORY_TABLE is an alias, this is in the head of the linker file the memory block:
MEMORY
{
...NAME_FROM_MEMORY_TABLE (xrw) : ORIGIN = 0xC00BFC00, LENGTH = 263k
...
}
Is it generally possible to enlarge the bss section with a secound memory block?
LG
Rainer_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 5:48 AM
FLASH?? Surely this needs to go into RAM like SDRAM
External Flash would be considered RO / Read Only, and perhaps be usable as the source of data to copy elsewhere.
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
‎2025-05-12 4:34 AM
Hello @Rainer_ ,
Is it generally possible to enlarge the bss section with a secound memory block?
You could create 2 bss section (bss1 and bss2) and assign each bss to a different RAM block.
Regards,
Software engineer at ST (TouchGFX)
