Update FYSETC STM32F103 ldscript and script (#18179)
This commit is contained in:
parent
419f31f371
commit
8477dbf65d
2 changed files with 11 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
|
||||||
rom (rx) : ORIGIN = 0x08010000, LENGTH = 256K - 40K - 4K
|
rom (rx) : ORIGIN = 0x08010000, LENGTH = 256K - 64K
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provide memory region aliases for common.inc */
|
/* Provide memory region aliases for common.inc */
|
|
@ -1,14 +1,21 @@
|
||||||
|
import os
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from os.path import expandvars
|
from os.path import expandvars
|
||||||
Import("env", "projenv")
|
Import("env")
|
||||||
|
|
||||||
# Relocate firmware from 0x08000000 to 0x08010000
|
# Relocate firmware from 0x08000000 to 0x08010000
|
||||||
# for define in env['CPPDEFINES']:
|
#for define in env['CPPDEFINES']:
|
||||||
# if define[0] == "VECT_TAB_ADDR":
|
# if define[0] == "VECT_TAB_ADDR":
|
||||||
# env['CPPDEFINES'].remove(define)
|
# env['CPPDEFINES'].remove(define)
|
||||||
#env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728))
|
|
||||||
#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
|
#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
|
||||||
|
|
||||||
|
#custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld")
|
||||||
|
#for i, flag in enumerate(env["LINKFLAGS"]):
|
||||||
|
# if "-Wl,-T" in flag:
|
||||||
|
# env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script
|
||||||
|
# elif flag == "-T":
|
||||||
|
# env["LINKFLAGS"][i + 1] = custom_ld_script
|
||||||
|
|
||||||
# Custom HEX from ELF
|
# Custom HEX from ELF
|
||||||
env.AddPostAction(
|
env.AddPostAction(
|
||||||
join("$BUILD_DIR","${PROGNAME}.elf"),
|
join("$BUILD_DIR","${PROGNAME}.elf"),
|
||||||
|
|
Reference in a new issue