Skip to content

Commit 472c5ca

Browse files
committed
Do not use the standard system startup files for SPL // Resolve #524
1 parent 5e4307d commit 472c5ca

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

builder/frameworks/spl.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,17 @@ def get_linker_script(mcu):
6262
with open(template_file) as fp:
6363
data = Template(fp.read())
6464
content = data.substitute(
65-
stack=hex(0x20000000 + ram), # 0x20000000 - start address for RAM
66-
ram=str(int(ram/1024)) + "K",
67-
flash=str(int(flash/1024)) + "K"
65+
stack=hex(0x20000000 + ram), # 0x20000000 - start address for RAM
66+
ram=str(int(ram / 1024)) + "K",
67+
flash=str(int(flash / 1024)) + "K"
6868
)
6969

7070
with open(default_ldscript, "w") as fp:
7171
fp.write(content)
7272

7373
return default_ldscript
7474

75+
7576
env.Append(
7677
CPPPATH=[
7778
join(FRAMEWORK_DIR, board.get("build.core"),
@@ -82,6 +83,9 @@ def get_linker_script(mcu):
8283
"variants", board.get("build.mcu")[0:7], "inc"),
8384
join(FRAMEWORK_DIR, board.get("build.core"), "spl",
8485
"variants", board.get("build.mcu")[0:7], "src")
86+
],
87+
LINKFLAGS=[
88+
"-nostartfiles"
8589
]
8690
)
8791

0 commit comments

Comments
 (0)