Skip to content

Commit 7cb5ce1

Browse files
committed
Merge branch 'release/v4.16.0'
2 parents 80a6d48 + b5fd773 commit 7cb5ce1

34 files changed

Lines changed: 97 additions & 687 deletions

.github/workflows/examples.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
os: [ubuntu-18.04, windows-latest, macos-latest]
11-
python-version: [3.7]
10+
os: [ubuntu-latest, windows-latest, macos-latest]
1211
example:
1312
- "examples/arduino-blink"
1413
- "examples/arduino-hid-usb-mouse"
@@ -20,18 +19,17 @@ jobs:
2019
- "examples/zephyr-synchronization"
2120
runs-on: ${{ matrix.os }}
2221
steps:
23-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2423
with:
2524
submodules: "recursive"
26-
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v1
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
2827
with:
29-
python-version: ${{ matrix.python-version }}
28+
python-version: "3.9"
3029
- name: Install dependencies
3130
run: |
32-
python -m pip install --upgrade pip
3331
pip install -U https://github.com/platformio/platformio/archive/develop.zip
34-
platformio platform install file://.
32+
pio pkg install --global --platform symlink://.
3533
- name: Build examples
3634
run: |
37-
platformio run -d ${{ matrix.example }}
35+
pio run -d ${{ matrix.example }}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Teensy: development platform for [PlatformIO](http://platformio.org)
1+
# Teensy: development platform for [PlatformIO](https://platformio.org)
22

33
[![Build Status](https://github.com/platformio/platform-teensy/workflows/Examples/badge.svg)](https://github.com/platformio/platform-teensy/actions)
44

55
Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard USB cable and a PC or Macintosh with a USB port.
66

7-
* [Home](http://platformio.org/platforms/teensy) (home page in PlatformIO Platform Registry)
8-
* [Documentation](http://docs.platformio.org/page/platforms/teensy.html) (advanced usage, packages, boards, frameworks, etc.)
7+
* [Home](https://registry.platformio.org/platforms/platformio/teensy) (home page in the PlatformIO Registry)
8+
* [Documentation](https://docs.platformio.org/page/platforms/teensy.html) (advanced usage, packages, boards, frameworks, etc.)
99

1010
# Usage
1111

12-
1. [Install PlatformIO](http://platformio.org)
13-
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:
12+
1. [Install PlatformIO](https://platformio.org)
13+
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:
1414

1515
## Stable version
1616

@@ -32,4 +32,4 @@ board = ...
3232

3333
# Configuration
3434

35-
Please navigate to [documentation](http://docs.platformio.org/page/platforms/teensy.html).
35+
Please navigate to [documentation](https://docs.platformio.org/page/platforms/teensy.html).

builder/frameworks/_bare_arm.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
env = DefaultEnvironment()
2222

2323
env.Append(
24-
ASFLAGS=["-x", "assembler-with-cpp"],
24+
ASFLAGS=[
25+
"-mthumb",
26+
],
27+
ASPPFLAGS=[
28+
"-x", "assembler-with-cpp",
29+
],
2530

2631
CCFLAGS=[
2732
"-Os", # optimize for size
@@ -60,11 +65,14 @@
6065

6166
if env.BoardConfig().id_ in ("teensy35", "teensy36"):
6267
env.Append(
68+
ASFLAGS=[
69+
"-mfloat-abi=hard",
70+
"-mfpu=fpv4-sp-d16"
71+
],
6372
CCFLAGS=[
6473
"-mfloat-abi=hard",
6574
"-mfpu=fpv4-sp-d16"
6675
],
67-
6876
LINKFLAGS=[
6977
"-mfloat-abi=hard",
7078
"-mfpu=fpv4-sp-d16"
@@ -73,13 +81,13 @@
7381

7482
if "BOARD" in env:
7583
env.Append(
84+
ASFLAGS=[
85+
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
86+
],
7687
CCFLAGS=[
7788
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
7889
],
7990
LINKFLAGS=[
8091
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
8192
]
8293
)
83-
84-
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
85-
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

builder/frameworks/_bare_avr.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@
2020

2121
env = DefaultEnvironment()
2222

23-
env.Append(
24-
ASFLAGS=["-x", "assembler-with-cpp"],
23+
machine_flags = [
24+
"-mmcu=$BOARD_MCU"
25+
]
2526

26-
CCFLAGS=[
27+
env.Append(
28+
ASFLAGS=machine_flags,
29+
ASPPFLAGS=[
30+
"-x", "assembler-with-cpp",
31+
],
32+
CCFLAGS=machine_flags + [
2733
"-Os", # optimize for size
2834
"-Wall", # show warnings
2935
"-ffunction-sections", # place each function in its own section
3036
"-fdata-sections",
31-
"-mmcu=$BOARD_MCU"
3237
],
3338

3439
CXXFLAGS=[
@@ -42,14 +47,10 @@
4247
"LAYOUT_US_ENGLISH"
4348
],
4449

45-
LINKFLAGS=[
50+
LINKFLAGS=machine_flags + [
4651
"-Os",
4752
"-Wl,--gc-sections,--relax",
48-
"-mmcu=$BOARD_MCU"
4953
],
5054

5155
LIBS=["m"]
5256
)
53-
54-
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
55-
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])

builder/frameworks/arduino.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@
8888

8989
if "BOARD" in env and BUILD_CORE == "teensy":
9090
env.Append(
91-
ASFLAGS=["-x", "assembler-with-cpp"],
91+
ASFLAGS=[
92+
"-mmcu=$BOARD_MCU"
93+
],
94+
ASPPFLAGS=[
95+
"-x", "assembler-with-cpp",
96+
],
9297

9398
CCFLAGS=[
9499
"-Os", # optimize for size
@@ -125,7 +130,13 @@
125130
)
126131

127132
env.Append(
128-
ASFLAGS=["-x", "assembler-with-cpp"],
133+
ASFLAGS=[
134+
"-mthumb",
135+
"-mcpu=%s" % env.BoardConfig().get("build.cpu"),
136+
],
137+
ASPPFLAGS=[
138+
"-x", "assembler-with-cpp",
139+
],
129140

130141
CCFLAGS=[
131142
"-Wall", # show warnings
@@ -179,11 +190,14 @@
179190
env.Append(CXXFLAGS=["-fno-threadsafe-statics"])
180191

181192
env.Append(
193+
ASFLAGS=[
194+
"-mfloat-abi=hard",
195+
"-mfpu=fpv%s-d16" % fpv_version
196+
],
182197
CCFLAGS=[
183198
"-mfloat-abi=hard",
184199
"-mfpu=fpv%s-d16" % fpv_version
185200
],
186-
187201
LINKFLAGS=[
188202
"-mfloat-abi=hard",
189203
"-mfpu=fpv%s-d16" % fpv_version
@@ -286,20 +300,18 @@
286300

287301
if cpu.startswith(("cortex-m4", "cortex-m0")):
288302
env.Append(
303+
ASFLAGS=[
304+
"-mno-unaligned-access",
305+
],
289306
CCFLAGS=[
290307
"-mno-unaligned-access",
291308
"-fsingle-precision-constant"
292309
],
293-
294310
LINKFLAGS=[
295311
"-fsingle-precision-constant"
296312
]
297313
)
298314

299-
env.Append(
300-
ASFLAGS=env.get("CCFLAGS", [])[:]
301-
)
302-
303315
# Teensy 2.x Core
304316
if BUILD_CORE == "teensy":
305317
env.Append(CPPPATH=[join(FRAMEWORK_DIR, "cores")])

examples/arduino-blink/.travis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

examples/arduino-blink/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to build PlatformIO based project
22
=====================================
33

4-
1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
4+
1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html)
55
2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip)
66
3. Extract ZIP archive
77
4. Run these commands:

examples/arduino-blink/platformio.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
; Library options: dependencies, extra library storages
66
;
77
; Please visit documentation for the other options and examples
8-
; http://docs.platformio.org/page/projectconf.html
8+
; https://docs.platformio.org/page/projectconf.html
99

1010
[env:teensy2]
1111
platform = teensy
@@ -45,9 +45,9 @@ board = teensy36
4545
[env:teensy40]
4646
platform = teensy
4747
framework = arduino
48-
board = teensy40
48+
board = teensy40
4949

5050
[env:teensy41]
5151
platform = teensy
5252
framework = arduino
53-
board = teensy41
53+
board = teensy41

examples/arduino-hid-usb-mouse/.travis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

examples/arduino-hid-usb-mouse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to build PlatformIO based project
22
=====================================
33

4-
1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
4+
1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html)
55
2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip)
66
3. Extract ZIP archive
77
4. Run these commands:

0 commit comments

Comments
 (0)