Skip to content

Commit

Permalink
Merge branch 'release/v3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 7, 2018
2 parents 39a477c + 04837f4 commit 1d38b91
Show file tree
Hide file tree
Showing 12 changed files with 272 additions and 192 deletions.
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,27 @@ Teensy is a complete USB-based microcontroller development system, in a very sma

# Usage

1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
2. Install Teensy development platform:
```bash
# install the latest stable version
> platformio platform install teensy

# install development version
> platformio platform install https://github.com/platformio/platform-teensy.git
1. [Install PlatformIO](http://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:

## Stable version

```ini
[env:stable]
platform = teensy
board = ...
...
```

## Development version

```ini
[env:development]
platform = https://github.com/platformio/platform-teensy.git
board = ...
...
```

# Configuration

Please navigate to [documentation](http://docs.platformio.org/page/platforms/teensy.html).
25 changes: 15 additions & 10 deletions boards/teensy20.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{
"build": {
"core": "teensy",
"extra_flags": "-DARDUINO_ARCH_AVR -TEENSY2",
"f_cpu": "16000000L",
"core": "teensy",
"extra_flags": "-DARDUINO_ARCH_AVR -TEENSY2",
"f_cpu": "16000000L",
"mcu": "atmega32u4"
},
},
"frameworks": [
"arduino"
],
"name": "Teensy 2.0",
],
"name": "Teensy 2.0",
"upload": {
"maximum_ram_size": 2560,
"maximum_size": 32256
},
"url": "https://www.pjrc.com/store/teensy.html",
"maximum_ram_size": 2560,
"maximum_size": 32256,
"protocols": [
"teensy-cli",
"teensy-gui"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensy.html",
"vendor": "Teensy"
}
21 changes: 13 additions & 8 deletions boards/teensy20pp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
"build": {
"core": "teensy",
"extra_flags": "-DTEENSY2PP",
"f_cpu": "16000000L",
"f_cpu": "16000000L",
"mcu": "at90usb1286"
},
},
"frameworks": [
"arduino"
],
"name": "Teensy++ 2.0",
],
"name": "Teensy++ 2.0",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 130048
},
"url": "https://www.pjrc.com/store/teensypp.html",
"maximum_ram_size": 8192,
"maximum_size": 130048,
"protocols": [
"teensy-cli",
"teensy-gui"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensypp.html",
"vendor": "Teensy"
}
29 changes: 17 additions & 12 deletions boards/teensy30.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
{
"build": {
"core": "teensy3",
"cpu": "cortex-m4",
"extra_flags": "-D__MK20DX128__ -DTEENSY30",
"f_cpu": "48000000L",
"ldscript": "mk20dx128.ld",
"core": "teensy3",
"cpu": "cortex-m4",
"extra_flags": "-D__MK20DX128__ -DTEENSY30",
"f_cpu": "48000000L",
"ldscript": "mk20dx128.ld",
"mcu": "mk20dx128"
},
},
"frameworks": [
"arduino"
],
"name": "Teensy 3.0",
],
"name": "Teensy 3.0",
"upload": {
"maximum_ram_size": 16384,
"maximum_size": 131072
},
"url": "https://www.pjrc.com/store/teensy3.html",
"maximum_ram_size": 16384,
"maximum_size": 131072,
"protocols": [
"teensy-cli",
"teensy-gui"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensy3.html",
"vendor": "Teensy"
}
35 changes: 22 additions & 13 deletions boards/teensy31.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
{
"build": {
"core": "teensy3",
"cpu": "cortex-m4",
"extra_flags": "-D__MK20DX256__ -DTEENSY31",
"f_cpu": "72000000L",
"ldscript": "mk20dx256.ld",
"core": "teensy3",
"cpu": "cortex-m4",
"extra_flags": "-D__MK20DX256__ -DTEENSY31",
"f_cpu": "72000000L",
"ldscript": "mk20dx256.ld",
"mcu": "mk20dx256"
},
},
"debug": {
"jlink_device": "MK20DX256xxx10"
},
"frameworks": [
"arduino",
"arduino",
"mbed"
],
"name": "Teensy 3.1 / 3.2",
],
"name": "Teensy 3.1 / 3.2",
"upload": {
"maximum_ram_size": 65536,
"maximum_size": 262144
},
"url": "https://www.pjrc.com/store/teensy31.html",
"maximum_ram_size": 65536,
"maximum_size": 262144,
"protocols": [
"teensy-cli",
"teensy-gui",
"jlink"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensy31.html",
"vendor": "Teensy"
}
45 changes: 8 additions & 37 deletions boards/teensy35.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,21 @@
"can"
],
"debug": {
"tools": {
"jlink": {
"server": [
{
"arguments": [
"-singlerun",
"-if", "SWD",
"-select", "USB",
"-device", "MK64FX512xxx12",
"-port", "2331"
],
"executable": "JLinkGDBServerCL.exe",
"system": [
"windows",
"windows_amd64",
"windows_x86"
]
},
{
"arguments": [
"-singlerun",
"-if", "SWD",
"-select", "USB",
"-device", "MK64FX512xxx12",
"-port", "2331"
],
"executable": "JLinkGDBServer",
"system": [
"darwin_x86_64",
"linux_i686",
"linux_x86_64"
]
}
]
}
}
"jlink_device": "MK64FX512xxx12"
},
"frameworks": [
"arduino"
],
"name": "Teensy 3.5",
"upload": {
"maximum_ram_size": 196608,
"maximum_size": 524288
"maximum_size": 524288,
"protocols": [
"teensy-cli",
"teensy-gui",
"jlink"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensy35.html",
"vendor": "Teensy"
Expand Down
45 changes: 8 additions & 37 deletions boards/teensy36.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,21 @@
"can"
],
"debug": {
"tools": {
"jlink": {
"server": [
{
"arguments": [
"-singlerun",
"-if", "SWD",
"-select", "USB",
"-device", "MK66FX1M0xxx18",
"-port", "2331"
],
"executable": "JLinkGDBServerCL.exe",
"system": [
"windows",
"windows_amd64",
"windows_x86"
]
},
{
"arguments": [
"-singlerun",
"-if", "SWD",
"-select", "USB",
"-device", "MK66FX1M0xxx18",
"-port", "2331"
],
"executable": "JLinkGDBServer",
"system": [
"darwin_x86_64",
"linux_i686",
"linux_x86_64"
]
}
]
}
}
"jlink_device": "MK66FX1M0xxx18"
},
"frameworks": [
"arduino"
],
"name": "Teensy 3.6",
"upload": {
"maximum_ram_size": 262144,
"maximum_size": 1048576
"maximum_size": 1048576,
"protocols": [
"teensy-cli",
"teensy-gui",
"jlink"
],
"protocol": "teensy-gui"
},
"url": "https://www.pjrc.com/store/teensy36.html",
"vendor": "Teensy"
Expand Down
33 changes: 21 additions & 12 deletions boards/teensylc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{
"build": {
"core": "teensy3",
"cpu": "cortex-m0plus",
"extra_flags": "-D__MKL26Z64__ -DTEENSYLC",
"f_cpu": "48000000L",
"ldscript": "mkl26z64.ld",
"core": "teensy3",
"cpu": "cortex-m0plus",
"extra_flags": "-D__MKL26Z64__ -DTEENSYLC",
"f_cpu": "48000000L",
"ldscript": "mkl26z64.ld",
"mcu": "mkl26z64"
},
},
"debug": {
"jlink_device": "MKL26Z64xxx4"
},
"frameworks": [
"arduino"
],
"name": "Teensy LC",
],
"name": "Teensy LC",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 63488
},
"url": "http://www.pjrc.com/teensy/teensyLC.html",
"maximum_ram_size": 8192,
"maximum_size": 63488,
"protocols": [
"teensy-cli",
"teensy-gui",
"jlink"
],
"protocol": "teensy-gui"
},
"url": "http://www.pjrc.com/teensy/teensyLC.html",
"vendor": "Teensy"
}
24 changes: 18 additions & 6 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,35 @@
assert isdir(FRAMEWORK_DIR)

BUILTIN_USB_FLAGS = (
"USB_AUDIO",
"USB_SERIAL",
"USB_KEYBOARDONLY",
"USB_TOUCHSCREEN",
"USB_HID_TOUCHSCREEN",
"USB_HID",
"USB_SERIAL_HID",
"USB_DISK",
"USB_DISK_SDFLASH",
"USB_MIDI",
"USB_MIDI4",
"USB_MIDI16",
"USB_MIDI_SERIAL",
"USB_MIDI4_SERIAL",
"USB_MIDI16_SERIAL",
"USB_AUDIO",
"USB_MIDI_AUDIO_SERIAL",
"USB_MIDI16_AUDIO_SERIAL",
"USB_MTPDISK",
"USB_RAWHID",
"USB_FLIGHTSIM",
"USB_DISABLED"
"USB_FLIGHTSIM_JOYSTICK",
"USB_EVERYTHING",
"USB_DISABLED",
)
if not set(env.get("CPPDEFINES", [])) & set(BUILTIN_USB_FLAGS):
env.Append(CPPDEFINES=["USB_SERIAL"])

env.Append(
CPPDEFINES=[
("ARDUINO", 10805),
("TEENSYDUINO", FRAMEWORK_VERSION.split(".")[1])
("TEENSYDUINO", int(FRAMEWORK_VERSION.split(".")[1]))
],

CPPPATH=[
Expand All @@ -74,7 +86,7 @@
else:
math_lib = math_lib % "M0l"

env.Append(LIBS=[math_lib])
env.Prepend(LIBS=[math_lib])

# Teensy 2.x Core
if env.BoardConfig().get("build.core") == "teensy":
Expand Down
Loading

0 comments on commit 1d38b91

Please sign in to comment.