Skip to content

Commit

Permalink
Merge branch 'release/v4.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Apr 6, 2023
2 parents 2064757 + b2d608e commit da3eeb1
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 30 deletions.
20 changes: 16 additions & 4 deletions builder/frameworks/_bare_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-mthumb",
"-nostdlib",
"-fsingle-precision-constant"
"-nostdlib"
],

CXXFLAGS=[
Expand All @@ -56,8 +55,7 @@
"-Os",
"-Wl,--gc-sections,--relax",
"-mthumb",
"-Wl,--defsym=__rtc_localtime=$UNIX_TIME",
"-fsingle-precision-constant"
"-Wl,--defsym=__rtc_localtime=$UNIX_TIME"
],

LIBS=["m", "stdc++"]
Expand Down Expand Up @@ -91,3 +89,17 @@
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
]
)

if env.BoardConfig().get("build.core", "") != "teensy4":
env.Append(
ASFLAGS=[
"-mno-unaligned-access",
],
CCFLAGS=[
"-mno-unaligned-access",
"-fsingle-precision-constant"
],
LINKFLAGS=[
"-fsingle-precision-constant"
]
)
3 changes: 1 addition & 2 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@
"-fdata-sections",
"-mthumb",
"-mcpu=%s" % env.BoardConfig().get("build.cpu"),
"-nostdlib",
"-fsingle-precision-constant"
"-nostdlib"
],

CXXFLAGS=[
Expand Down
3 changes: 1 addition & 2 deletions examples/arduino-blink/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
2 changes: 1 addition & 1 deletion examples/arduino-blink/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ platform = teensy
framework = arduino
board = teensy2

[env:teensy 2pp]
[env:teensy2pp]
platform = teensy
framework = arduino
board = teensy2pp
Expand Down
3 changes: 1 addition & 2 deletions examples/arduino-hid-usb-mouse/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
3 changes: 1 addition & 2 deletions examples/arduino-internal-libs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
3 changes: 1 addition & 2 deletions examples/mbed-blink/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
3 changes: 1 addition & 2 deletions examples/mbed-dsp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
3 changes: 1 addition & 2 deletions examples/mbed-events/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
2 changes: 1 addition & 1 deletion examples/mbed-events/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:teensy31 events]
[env:teensy31]
platform = teensy
framework = mbed
board = teensy31
3 changes: 1 addition & 2 deletions examples/mbed-serial/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.pioenvs
.piolibdeps
.pio
12 changes: 9 additions & 3 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-teensy.git"
},
"version": "4.17.0",
"version": "4.18.0",
"frameworks": {
"arduino": {
"package": "framework-arduinoteensy",
Expand All @@ -43,16 +43,22 @@
"optionalVersions": [">=1.60301.0,<1.80000.0"]
},
"toolchain-gccarmnoneeabi": {
"type": "toolchain",
"optional": true,
"owner": "platformio",
"version": "~1.80201.0"
},
"toolchain-gccarmnoneeabi-teensy": {
"type": "toolchain",
"optional": false,
"owner": "platformio",
"version": "~1.50401.0"
"version": "~1.110301.0"
},
"framework-arduinoteensy": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.157.0"
"version": "~1.158.0"
},
"framework-mbed": {
"type": "framework",
Expand Down
12 changes: 7 additions & 5 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ def configure_default_packages(self, variables, targets):
del self.packages[del_toolchain]

frameworks = variables.get("pioframework", [])
if "mbed" in frameworks:
self.packages["toolchain-gccarmnoneeabi"][
"version"] = ">=1.60301.0,<1.80000.0"
elif "zephyr" in frameworks:
if "arduino" in frameworks:
self.packages.pop("toolchain-gccarmnoneeabi", None)
else:
self.packages["toolchain-gccarmnoneeabi"]["optional"] = False
self.packages.pop("toolchain-gccarmnoneeabi-teensy", None)

if "zephyr" in frameworks:
for p in self.packages:
if p in ("tool-cmake", "tool-dtc", "tool-ninja"):
self.packages[p]["optional"] = False
if not IS_WINDOWS:
self.packages["tool-gperf"]["optional"] = False
self.packages["toolchain-gccarmnoneeabi"]["version"] = "~1.80201.0"
elif "arduino" in frameworks and board_config.get("build.core", "") == "teensy4":
self.packages["tool-teensy"]["optional"] = False

Expand Down

0 comments on commit da3eeb1

Please sign in to comment.