cancel
Showing results for 
Search instead for 
Did you mean: 

Linker script: what are the differences between XXX_FLASH.id and XXX_RAM.id?

GPHIL.1
Associate II

Hello,

Can you tell me the differences between two files linker script

STM32... FLASH.id and STM32...RAM.id

Regards,

 

 

 

4 REPLIES 4
TDK
Guru

FLASH puts the program in FLASH. RAM puts it in RAM. Since you want your program to stay in memory after power is lost, you typically want the FLASH file.

I don't really understand why they include the RAM linker script at all. It's not very useful.

 

If you feel a post has answered your question, please click "Accept as Solution".

It could be useful for quick tests or benchmarks like system performance or power consumption.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thanks for response,

I use the flash.id to declare a backupsram section

like

MEMORY

{

RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K

FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x08000000 and actual length is 2048K */

DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K

RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K

RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K

ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K

BKPRAM (rw) : ORIGIN = 0x38800000, LENGTH = 4k

}

 

 

.save_data (NOLOAD) :

{

. = ALIGN(4);

. = ABSOLUTE(0x38800000);

. = ALIGN(4);

} >BKPRAM

 

It's LD (Lima Delta) not id

The RAM version would be to produce an object that's delivered / loaded directly into ram and executed in place, rather the where the core is in FLASH, and unpacks / initializes RAM at each startup.

Which STM32, the MPU or MCU variants?

 

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