cancel
Showing results for 
Search instead for 
Did you mean: 

increasing .bss section in linker file with code block from external flash

Rainer_
Associate

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.


 

4 REPLIES 4
GaetanGodart
ST Employee

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

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_

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. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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,

Gaetan Godart
Software engineer at ST (TouchGFX)