Skip to content

Commit f7faf01

Browse files
committed
Merge branch 'release/v1.1.0'
2 parents f5ab8c2 + e4ce072 commit f7faf01

File tree

12 files changed

+122
-395
lines changed

12 files changed

+122
-395
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Teensy is a complete USB-based microcontroller development system, in a very sma
1212
1. [Install PlatformIO CLI](http://docs.platformio.org/en/latest/installation.html)
1313
2. Install Teensy development platform:
1414
```bash
15-
# isntall the latest stable version
15+
# install the latest stable version
1616
> platformio platform install teensy
1717

1818
# install development version

boards/teensy35.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"build": {
3+
"core": "teensy3",
4+
"cpu": "cortex-m4",
5+
"extra_flags": "-D__MK64FX512__ -DTEENSY35",
6+
"f_cpu": "120000000L",
7+
"ldscript": "mk64fx512.ld",
8+
"mcu": "mk64fx512"
9+
},
10+
"frameworks": [
11+
"arduino"
12+
],
13+
"name": "Teensy 3.5",
14+
"upload": {
15+
"maximum_ram_size": 196608,
16+
"maximum_size": 524288
17+
},
18+
"url": "https://www.pjrc.com",
19+
"vendor": "Teensy"
20+
}

boards/teensy36.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"build": {
3+
"core": "teensy3",
4+
"cpu": "cortex-m4",
5+
"extra_flags": "-D__MK66FX1M0__ -DTEENSY36",
6+
"f_cpu": "180000000L",
7+
"ldscript": "mk66fx1m0.ld",
8+
"mcu": "mk66fx1m0"
9+
},
10+
"frameworks": [
11+
"arduino"
12+
],
13+
"name": "Teensy 3.6",
14+
"upload": {
15+
"maximum_ram_size": 262144,
16+
"maximum_size": 1048576
17+
},
18+
"url": "https://www.pjrc.com",
19+
"vendor": "Teensy"
20+
}

builder/frameworks/arduino.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
continue
8484
with open(file_path, "w") as fp:
8585
fp.write(content)
86+
else:
87+
env.Prepend(LIBPATH=[join(FRAMEWORK_DIR, "cores", "teensy3")])
8688

8789
#
8890
# Target: Build Core Library
@@ -102,13 +104,7 @@
102104
join(FRAMEWORK_DIR, "variants", env.BoardConfig().get("build.variant"))
103105
))
104106

105-
envsafe = env.Clone()
106-
107-
if env.BoardConfig().get("build.core") == "teensy3":
108-
libs.append("arm_cortex%sl_math" % (
109-
"M4" if env.BoardConfig().get("build.cpu") == "cortex-m4" else "M0"))
110-
111-
libs.append(envsafe.BuildLibrary(
107+
libs.append(env.BuildLibrary(
112108
join("$BUILD_DIR", "FrameworkArduino"),
113109
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
114110
))

builder/main.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@
140140
"-fsingle-precision-constant",
141141
"--specs=nano.specs"
142142
],
143-
LIBS=["c", "gcc"],
143+
LIBS=[
144+
"c", "gcc", "arm_cortex%sl_math" %
145+
("M4" if env.BoardConfig().get(
146+
"build.cpu") == "cortex-m4" else "M0")
147+
],
144148
BUILDERS=dict(
145149
ElfToBin=Builder(
146150
action=env.VerboseAction(" ".join([
@@ -166,24 +170,31 @@
166170
)
167171
)
168172
)
173+
if env.BoardConfig().id_ in ("teensy35", "teensy36"):
174+
env.Append(
175+
LINKFLAGS=["-mfloat-abi=hard", "-mfpu=fpv4-sp-d16"],
176+
CCFLAGS=["-mfloat-abi=hard", "-mfpu=fpv4-sp-d16"]
177+
)
169178

170179
env.Append(
171180
ASFLAGS=env.get("CCFLAGS", [])[:]
172181
)
173182

174183

175-
if isfile(join(platform.get_package_dir("tool-teensy") or "",
176-
"teensy_loader_cli")):
184+
if (isfile(
185+
join(
186+
platform.get_package_dir("tool-teensy") or "",
187+
"teensy_loader_cli")) and
188+
env.BoardConfig().id_ not in ("teensy35", "teensy36")):
177189
env.Append(
178190
UPLOADER="teensy_loader_cli",
179191
UPLOADERFLAGS=[
180192
"-mmcu=$BOARD_MCU",
181193
"-w", # wait for device to apear
182194
"-s", # soft reboot if device not online
183-
"-v" # verbose output
195+
"-v" # verbose output
184196
],
185-
UPLOADHEXCMD='$UPLOADER $UPLOADERFLAGS $SOURCES'
186-
)
197+
UPLOADHEXCMD='$UPLOADER $UPLOADERFLAGS $SOURCES')
187198
else:
188199
env.Append(
189200
REBOOTER="teensy_reboot",

examples/arduino-blink/platformio.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,13 @@ board = teensy31
3131
platform = teensy
3232
framework = arduino
3333
board = teensylc
34+
35+
[env:teensy35]
36+
platform = teensy
37+
framework = arduino
38+
board = teensy35
39+
40+
[env:teensy36]
41+
platform = teensy
42+
framework = arduino
43+
board = teensy35

examples/arduino-hid-usb-mouse/platformio.ini

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,44 @@
77
; Please visit documentation for the other options and examples
88
; http://docs.platformio.org/en/stable/projectconf.html
99

10+
[env:teensy20]
11+
platform = teensy
12+
framework = arduino
13+
board = teensy20
14+
build_flags = -DUSB_SERIAL_HID
15+
16+
[env:teensy20pp]
17+
platform = teensy
18+
framework = arduino
19+
board = teensy20pp
20+
build_flags = -DUSB_SERIAL_HID
21+
22+
[env:teensy30]
23+
platform = teensy
24+
framework = arduino
25+
board = teensy30
26+
build_flags = -DUSB_SERIAL_HID
27+
1028
[env:teensy31]
1129
platform = teensy
1230
framework = arduino
1331
board = teensy31
14-
build_flags = -DTEENSY31 -UUSB_SERIAL -DUSB_SERIAL_HID
32+
build_flags = -DUSB_SERIAL_HID
33+
34+
[env:teensylc]
35+
platform = teensy
36+
framework = arduino
37+
board = teensylc
38+
build_flags = -DUSB_SERIAL_HID
39+
40+
[env:teensy35]
41+
platform = teensy
42+
framework = arduino
43+
board = teensy35
44+
build_flags = -DUSB_SERIAL_HID
45+
46+
[env:teensy36]
47+
platform = teensy
48+
framework = arduino
49+
board = teensy35
50+
build_flags = -DUSB_SERIAL_HID

examples/arduino-internal-libs/platformio.ini

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,33 @@
1111
platform = teensy
1212
framework = arduino
1313
board = teensy20
14-
build_flags = -DTEENSY20
1514

1615
[env:teensy20pp]
1716
platform = teensy
1817
framework = arduino
1918
board = teensy20pp
20-
build_flags = -DTEENSY20PP
2119

2220
[env:teensy30]
2321
platform = teensy
2422
framework = arduino
2523
board = teensy30
26-
build_flags = -DTEENSY30
2724

2825
[env:teensy31]
2926
platform = teensy
3027
framework = arduino
3128
board = teensy31
32-
build_flags = -DTEENSY31
3329

3430
[env:teensylc]
3531
platform = teensy
3632
framework = arduino
3733
board = teensylc
38-
build_flags = -DTEENSYLC
34+
35+
[env:teensy35]
36+
platform = teensy
37+
framework = arduino
38+
board = teensy35
39+
40+
[env:teensy36]
41+
platform = teensy
42+
framework = arduino
43+
board = teensy35

ldscripts/mk20dx128.ld

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

0 commit comments

Comments
 (0)