From b1601a1ef67db4fe3f9b0c9a485390677332c758 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 28 Jan 2020 12:52:37 +0200 Subject: [PATCH 1/4] Refactor ldscript files processing --- boards/teensy30.json | 4 +++- boards/teensy31.json | 4 +++- boards/teensy35.json | 4 +++- boards/teensy36.json | 4 +++- boards/teensy40.json | 4 +++- boards/teensylc.json | 4 +++- builder/frameworks/arduino.py | 3 +++ 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/boards/teensy30.json b/boards/teensy30.json index cdd8767..ef06b13 100644 --- a/boards/teensy30.json +++ b/boards/teensy30.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "mk20dx128.ld" + }, "core": "teensy3", "cpu": "cortex-m4", "extra_flags": "-D__MK20DX128__ -DTEENSY30", "f_cpu": "48000000L", - "ldscript": "mk20dx128.ld", "mcu": "mk20dx128" }, "frameworks": [ diff --git a/boards/teensy31.json b/boards/teensy31.json index b23829d..a7a9252 100644 --- a/boards/teensy31.json +++ b/boards/teensy31.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "mk20dx256.ld" + }, "core": "teensy3", "cpu": "cortex-m4", "extra_flags": "-D__MK20DX256__ -DTEENSY31", "f_cpu": "72000000L", - "ldscript": "mk20dx256.ld", "mcu": "mk20dx256" }, "debug": { diff --git a/boards/teensy35.json b/boards/teensy35.json index f1c35de..0b85407 100644 --- a/boards/teensy35.json +++ b/boards/teensy35.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "mk64fx512.ld" + }, "core": "teensy3", "cpu": "cortex-m4", "extra_flags": "-D__MK64FX512__ -DTEENSY35", "f_cpu": "120000000L", - "ldscript": "mk64fx512.ld", "mcu": "mk64fx512" }, "connectivity": [ diff --git a/boards/teensy36.json b/boards/teensy36.json index 3f37836..171b709 100644 --- a/boards/teensy36.json +++ b/boards/teensy36.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "mk66fx1m0.ld" + }, "core": "teensy3", "cpu": "cortex-m4", "extra_flags": "-D__MK66FX1M0__ -DTEENSY36", "f_cpu": "180000000L", - "ldscript": "mk66fx1m0.ld", "mcu": "mk66fx1m0" }, "connectivity": [ diff --git a/boards/teensy40.json b/boards/teensy40.json index 2ff6e8e..975fba9 100644 --- a/boards/teensy40.json +++ b/boards/teensy40.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "imxrt1062.ld" + }, "core": "teensy4", "cpu": "cortex-m7", "extra_flags": "-D__IMXRT1062__ -DTEENSY40", "f_cpu": "600000000", - "ldscript": "imxrt1062.ld", "mcu": "imxrt1062" }, "connectivity": [ diff --git a/boards/teensylc.json b/boards/teensylc.json index 82ccf6d..b02d0b1 100644 --- a/boards/teensylc.json +++ b/boards/teensylc.json @@ -1,10 +1,12 @@ { "build": { + "arduino": { + "ldscript": "mkl26z64.ld" + }, "core": "teensy3", "cpu": "cortex-m0plus", "extra_flags": "-D__MKL26Z64__ -DTEENSYLC", "f_cpu": "48000000L", - "ldscript": "mkl26z64.ld", "mcu": "mkl26z64" }, "debug": { diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index af52657..2803545 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -162,6 +162,9 @@ LIBS=["m", "stdc++"] ) + if not env.BoardConfig().get("build.ldscript", ""): + env.Replace(LDSCRIPT_PATH=env.BoardConfig().get("build.arduino.ldscript", "")) + if env.BoardConfig().id_ in ("teensy35", "teensy36", "teensy40"): fpv_version = "4-sp" if env.BoardConfig().id_ == "teensy40": From eb19d4ec545d39678e768979a980b440126542e0 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 28 Jan 2020 12:53:11 +0200 Subject: [PATCH 2/4] Update mbed package --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 8df4c43..2f3ecd4 100644 --- a/platform.json +++ b/platform.json @@ -46,7 +46,7 @@ "framework-mbed": { "type": "framework", "optional": true, - "version": "~5.51401.0" + "version": "~6.51401.0" }, "tool-teensy": { "type": "uploader", From 3a02c3df7f9069a95fe7d6fb6d206f76fe68bfe2 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Tue, 4 Feb 2020 11:16:32 +0200 Subject: [PATCH 3/4] Fix macro in teensy2 manifest --- boards/teensy2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/teensy2.json b/boards/teensy2.json index d8a137c..32ac20f 100644 --- a/boards/teensy2.json +++ b/boards/teensy2.json @@ -1,7 +1,7 @@ { "build": { "core": "teensy", - "extra_flags": "-DARDUINO_ARCH_AVR -TEENSY2", + "extra_flags": "-DARDUINO_ARCH_AVR -DTEENSY2", "f_cpu": "16000000L", "mcu": "atmega32u4" }, From e9ec36bed2c127bb54a97a9b3d6f12623abb7ed4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Feb 2020 23:13:44 +0200 Subject: [PATCH 4/4] Bump version to 4.7.1 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 2f3ecd4..632d999 100644 --- a/platform.json +++ b/platform.json @@ -12,7 +12,7 @@ "type": "git", "url": "https://github.com/platformio/platform-teensy.git" }, - "version": "4.7.0", + "version": "4.7.1", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "http://dl.platformio.org/packages/manifest.json"