Skip to content

Commit 960ecca

Browse files
committed
Add "nano.specs" for ARM linker
1 parent b23a8a7 commit 960ecca

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

platformio/builder/scripts/basearm.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545

4646
LINKFLAGS=[
4747
"-Os",
48-
"-Wl,--gc-sections",
48+
"-Wl,--gc-sections,--relax",
4949
"-mthumb",
50-
"-mcpu=${BOARD_OPTIONS['build']['cpu']}"
50+
"-mcpu=${BOARD_OPTIONS['build']['cpu']}",
51+
"--specs=nano.specs"
5152
],
5253

5354
LIBS=["c", "gcc", "m"],

platformio/builder/scripts/baseavr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
LINKFLAGS=[
4545
"-Os",
4646
"-mmcu=$BOARD_MCU",
47-
"-Wl,--gc-sections"
47+
"-Wl,--gc-sections,--relax"
4848
],
4949

5050
LIBS=["m"],

platformio/builder/scripts/teensy.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "baseavr.py")))
1717
elif env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy3":
1818
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
19+
env.Append(
20+
LINKFLAGS=["-Wl,--defsym=__rtc_localtime=$UNIX_TIME"]
21+
)
1922

2023
env.Append(
2124
CPPDEFINES=[
@@ -26,14 +29,7 @@
2629
CXXFLAGS=[
2730
"-std=gnu++0x",
2831
"-felide-constructors"
29-
],
30-
31-
LINKFLAGS=[
32-
"-Wl,--gc-sections,--relax,--defsym=__rtc_localtime=$UNIX_TIME",
33-
"--specs=nano.specs"
34-
],
35-
36-
LIBS=["m"]
32+
]
3733
)
3834

3935
if isfile(env.subst(join(

0 commit comments

Comments
 (0)