2017-04-15 13:51:24 +02:00
|
|
|
/* linker script for application running on STM32F103x8 micro-controller
|
2018-02-18 15:28:00 +01:00
|
|
|
* the STM32F103xB has 128 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
|
2018-02-18 15:21:18 +01:00
|
|
|
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
|
2017-04-15 13:51:24 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Define memory regions. */
|
|
|
|
MEMORY
|
|
|
|
{
|
2017-08-06 09:53:46 +02:00
|
|
|
rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K
|
2017-04-15 13:51:24 +02:00
|
|
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
|
|
|
}
|
|
|
|
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
2018-02-18 15:28:00 +01:00
|
|
|
/* only provide application_end and/or flash_end if you want to force a flash size
|
2018-02-18 15:21:18 +01:00
|
|
|
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
2018-04-06 19:55:52 +02:00
|
|
|
PROVIDE(__application_end = __application_beginning + 128K - 8K);
|
|
|
|
PROVIDE(__flash_end = __application_beginning + 128K - 8K);
|
|
|
|
else
|
|
|
|
PROVIDE(__application_end = 0);
|
|
|
|
PROVIDE(__flash_end = 0);
|
2018-02-18 15:21:18 +01:00
|
|
|
*/
|
2018-04-06 19:55:52 +02:00
|
|
|
PROVIDE(__application_end = __application_beginning + 128K - 8K);
|
|
|
|
PROVIDE(__flash_end = __application_beginning + 128K - 8K);
|
2017-04-15 13:51:24 +02:00
|
|
|
|
|
|
|
/* include rest of the definitions for the STM32F1 family */
|
|
|
|
INCLUDE libopencm3_stm32f1.ld
|