Skip to content

Commit

Permalink
Merge branch 'release/v4.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 19, 2019
2 parents d0d6a3c + 47f2217 commit 93f3d92
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
31 changes: 23 additions & 8 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,35 @@
CCFLAGS=["-g", "-Og", "-flto", "-fno-fat-lto-objects"],
LINKFLAGS=["-g", "-Og", "-flto", "-fno-fat-lto-objects", "-fuse-linker-plugin"]
)
elif "TEENSY_OPT_SMALLEST_CODE" in env['CPPDEFINES']:
env.Append(
CCFLAGS=["-Os", "--specs=nano.specs"],
LINKFLAGS=["-Os", "--specs=nano.specs"]
)
elif "TEENSY_OPT_SMALLEST_CODE_LTO" in env['CPPDEFINES']:
env.Append(
CCFLAGS=["-Os", "--specs=nano.specs", "-flto", "-fno-fat-lto-objects"],
LINKFLAGS=["-Os", "--specs=nano.specs", "-flto", "-fno-fat-lto-objects", "-fuse-linker-plugin"]
)
# TEENSY_OPT_FASTER
elif "TEENSY_OPT_FASTER" in env['CPPDEFINES']:
env.Append(
CCFLAGS=["-O2"],
LINKFLAGS=["-O2"]
)
elif "TEENSY_OPT_SMALLEST_CODE" in env['CPPDEFINES']:
env.Append(
CCFLAGS=["-Os", "--specs=nano.specs"],
LINKFLAGS=["-Os", "--specs=nano.specs"]
)
# default profiles
else:
env.Append(CCFLAGS=["-O2"], LINKFLAGS=["-O2"])

# for Teensy LC => TEENSY_OPT_SMALLEST_CODE
if env.BoardConfig().id_ == "teensylc":
env.Append(
CCFLAGS=["-Os", "--specs=nano.specs"],
LINKFLAGS=["-Os", "--specs=nano.specs"]
)
# for others => TEENSY_OPT_FASTER
else:
env.Append(
CCFLAGS=["-O2"],
LINKFLAGS=["-O2"]
)

env.Append(
ASFLAGS=env.get("CCFLAGS", [])[:]
Expand Down
4 changes: 2 additions & 2 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-teensy.git"
},
"version": "4.0.0",
"version": "4.1.0",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json"
Expand Down Expand Up @@ -46,7 +46,7 @@
"framework-mbed": {
"type": "framework",
"optional": true,
"version": "~5.51103.190202"
"version": "~5.51104.190214"
},
"tool-teensy": {
"type": "uploader",
Expand Down

0 comments on commit 93f3d92

Please sign in to comment.