ld: improve flash size enforcing description
This commit is contained in:
parent
fcbabf1ea7
commit
d6990728a5
|
@ -6,12 +6,17 @@
|
||||||
/* Define memory regions. */
|
/* Define memory regions. */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 120K
|
rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 128K-8K
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
||||||
}
|
}
|
||||||
PROVIDE(__application_beginning = ORIGIN(rom));
|
PROVIDE(__application_beginning = ORIGIN(rom));
|
||||||
/* only provide application_end and/or flash_end if you want to force a flash size
|
/* only provide application_end and/or flash_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
|
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
||||||
|
PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
|
PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
|
else
|
||||||
|
PROVIDE(__application_end = 0);
|
||||||
|
PROVIDE(__flash_end = 0);
|
||||||
*/
|
*/
|
||||||
PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
|
|
|
@ -12,9 +12,14 @@ MEMORY
|
||||||
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
||||||
/* only provide application_end and/or flash_end if you want to force a flash size
|
/* only provide application_end and/or flash_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
|
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
||||||
|
PROVIDE(__application_end = __application_beginning + 128K - 8K);
|
||||||
|
PROVIDE(__flash_end = __application_beginning + 128K - 8K);
|
||||||
|
else
|
||||||
|
PROVIDE(__application_end = 0);
|
||||||
|
PROVIDE(__flash_end = 0);
|
||||||
*/
|
*/
|
||||||
PROVIDE(__application_end = __application_beginning + 120K);
|
PROVIDE(__application_end = __application_beginning + 128K - 8K);
|
||||||
PROVIDE(__flash_end = __application_beginning + 120K);
|
PROVIDE(__flash_end = __application_beginning + 128K - 8K);
|
||||||
|
|
||||||
/* include rest of the definitions for the STM32F1 family */
|
/* include rest of the definitions for the STM32F1 family */
|
||||||
INCLUDE libopencm3_stm32f1.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
Loading…
Reference in New Issue