stm32f1/bootloader.ld

21 lines
840 B
Plaintext

/* linker script for application running on STM32F103x8 micro-controller
* the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
*/
/* Define memory regions. */
MEMORY
{
rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
/* only provide application end if you want to force a flash size
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
PROVIDE(__application_end = __application_beginning + 248K);
PROVIDE(__flash_end = __application_beginning + 248K);
*/
/* include rest of the definitions for the STM32F1 family */
INCLUDE libopencm3_stm32f1.ld