I try to creat a custom bootloader for STM32L1 serie card and I need to put my bootloader code at the bottom of my flash memory. Then i can flash my memory properly. I know it can be specified in the linker scrip but i don't know how to do that. I declared my bootloader section like this :
.bootsection :
{
. = ALIGN(4);
KEEP(*(.bootsection)) /* Bootloader code */
. = ALIGN(4);
} >FLASH
and my memory is set like this :
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 80K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
anyone have an idea on the command ?
Here is my linker script, i tried something with a new memory section
here's my boot code , i wroted the flash program but the erase program is not written yet.