2024-02-12 04:56 AM - last edited on 2024-02-12 05:46 AM by SofLit
Hello,
Can you tell me the differences between two files linker script
STM32... FLASH.id and STM32...RAM.id
Regards,
2024-02-12 05:03 AM
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.
2024-02-12 05:16 AM
It could be useful for quick tests or benchmarks like system performance or power consumption.
2024-02-12 05:22 AM
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
2024-02-12 06:15 AM
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?