diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 35f31d1..8b34b72 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -12,9 +12,6 @@ jobs: - "examples/arduino-blink" - "examples/arduino-hid-usb-mouse" - "examples/arduino-internal-libs" - - "examples/mbed-blink" - - "examples/mbed-dsp" - - "examples/mbed-serial" - "examples/zephyr-blink" - "examples/zephyr-synchronization" runs-on: ${{ matrix.os }} diff --git a/boards/teensy31.json b/boards/teensy31.json index 23175d1..d4b71e6 100644 --- a/boards/teensy31.json +++ b/boards/teensy31.json @@ -14,8 +14,7 @@ "svd_path": "MK20D5.svd" }, "frameworks": [ - "arduino", - "mbed" + "arduino" ], "name": "Teensy 3.1 / 3.2", "upload": { diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index 3cafc98..09c278a 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -152,7 +152,7 @@ "-fno-exceptions", "-felide-constructors", "-fno-rtti", - "-std=gnu++14", + "-std=gnu++17", "-Wno-error=narrowing", "-fpermissive" ], diff --git a/builder/frameworks/mbed.py b/builder/frameworks/mbed.py deleted file mode 100644 index 85e77bf..0000000 --- a/builder/frameworks/mbed.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2014-present PlatformIO -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -mbed - -The mbed framework The mbed SDK has been designed to provide enough -hardware abstraction to be intuitive and concise, yet powerful enough to -build complex projects. It is built on the low-level ARM CMSIS APIs, -allowing you to code down to the metal if needed. In addition to RTOS, -USB and Networking libraries, a cookbook of hundreds of reusable -peripheral and module libraries have been built on top of the SDK by -the mbed Developer Community. - -http://mbed.org/ -""" - -from os.path import join - -from SCons.Script import Import, SConscript - -Import("env") - -# https://github.com/platformio/builder-framework-mbed.git -SConscript( - join(env.PioPlatform().get_package_dir("framework-mbed"), "platformio", - "platformio-build.py")) diff --git a/builder/main.py b/builder/main.py index 9ff6490..705a2c5 100644 --- a/builder/main.py +++ b/builder/main.py @@ -14,12 +14,14 @@ import sys from platform import system -from os import makedirs +from os import makedirs, environ from os.path import isdir, isfile, join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) +from platformio.proc import exec_command + env = DefaultEnvironment() platform = env.PioPlatform() board_config = env.BoardConfig() @@ -137,12 +139,23 @@ # Disable memory calculation and print output from custom "teensy_size" tool if "arduino" in env.subst("$PIOFRAMEWORK") and build_core == "teensy4": + def teensy_check_upload_size(_, target, source, env): + print('Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"') + sysenv = environ.copy() + sysenv["PATH"] = str(env["ENV"]["PATH"]) + result = exec_command(["teensy_size", str(source[0])], env=sysenv) + if result["returncode"] != 0: + sys.stderr.write(result["err"]) + env.Exit(1) + + env.AddMethod(teensy_check_upload_size, "CheckUploadSize") env.Replace( SIZETOOL=None, SIZECHECKCMD=None, SIZEPRINTCMD="teensy_size $SOURCES", ) + # # Target: Build executable and linkable firmware # diff --git a/examples/mbed-blink/.gitignore b/examples/mbed-blink/.gitignore deleted file mode 100644 index 03f4a3c..0000000 --- a/examples/mbed-blink/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pio diff --git a/examples/mbed-blink/README.md b/examples/mbed-blink/README.md deleted file mode 100644 index 9a29774..0000000 --- a/examples/mbed-blink/README.md +++ /dev/null @@ -1,21 +0,0 @@ -How to build PlatformIO based project -===================================== - -1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) -2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip) -3. Extract ZIP archive -4. Run these commands: - -```shell -# Change directory to example -$ cd platform-teensy/examples/mbed-blink - -# Build project -$ pio run - -# Upload firmware -$ pio run --target upload - -# Clean build files -$ pio run --target clean -``` diff --git a/examples/mbed-blink/include/README b/examples/mbed-blink/include/README deleted file mode 100644 index 194dcd4..0000000 --- a/examples/mbed-blink/include/README +++ /dev/null @@ -1,39 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the usual convention is to give header files names that end with `.h'. -It is most portable to use only letters, digits, dashes, and underscores in -header file names, and at most one dot. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/examples/mbed-blink/lib/README b/examples/mbed-blink/lib/README deleted file mode 100644 index 6debab1..0000000 --- a/examples/mbed-blink/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into executable file. - -The source code of each library should be placed in a an own separate directory -("lib/your_library_name/[here are source files]"). - -For example, see a structure of the following two libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -and a contents of `src/main.c`: -``` -#include -#include - -int main (void) -{ - ... -} - -``` - -PlatformIO Library Dependency Finder will find automatically dependent -libraries scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/examples/mbed-blink/platformio.ini b/examples/mbed-blink/platformio.ini deleted file mode 100644 index e888ac2..0000000 --- a/examples/mbed-blink/platformio.ini +++ /dev/null @@ -1,13 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter, extra scripting -; Upload options: custom port, speed and extra flags -; Library options: dependencies, extra library storages -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:teensy31] -platform = teensy -framework = mbed -board = teensy31 diff --git a/examples/mbed-blink/src/main.cpp b/examples/mbed-blink/src/main.cpp deleted file mode 100644 index 8247a2e..0000000 --- a/examples/mbed-blink/src/main.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "mbed.h" - -DigitalOut myled(LED1); - -int main() { - while(1) { - myled = 1; - wait(1); - myled = 0; - wait(1); - } -} \ No newline at end of file diff --git a/examples/mbed-blink/test/README b/examples/mbed-blink/test/README deleted file mode 100644 index df5066e..0000000 --- a/examples/mbed-blink/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PIO Unit Testing and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PIO Unit Testing: -- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/examples/mbed-dsp/.gitignore b/examples/mbed-dsp/.gitignore deleted file mode 100644 index 03f4a3c..0000000 --- a/examples/mbed-dsp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pio diff --git a/examples/mbed-dsp/README.md b/examples/mbed-dsp/README.md deleted file mode 100644 index 7fb78be..0000000 --- a/examples/mbed-dsp/README.md +++ /dev/null @@ -1,21 +0,0 @@ -How to build PlatformIO based project -===================================== - -1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) -2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip) -3. Extract ZIP archive -4. Run these commands: - -```shell -# Change directory to example -$ cd platform-teensy/examples/mbed-dsp - -# Build project -$ pio run - -# Upload firmware -$ pio run --target upload - -# Clean build files -$ pio run --target clean -``` diff --git a/examples/mbed-dsp/include/README b/examples/mbed-dsp/include/README deleted file mode 100644 index 194dcd4..0000000 --- a/examples/mbed-dsp/include/README +++ /dev/null @@ -1,39 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the usual convention is to give header files names that end with `.h'. -It is most portable to use only letters, digits, dashes, and underscores in -header file names, and at most one dot. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/examples/mbed-dsp/lib/README b/examples/mbed-dsp/lib/README deleted file mode 100644 index 6debab1..0000000 --- a/examples/mbed-dsp/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into executable file. - -The source code of each library should be placed in a an own separate directory -("lib/your_library_name/[here are source files]"). - -For example, see a structure of the following two libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -and a contents of `src/main.c`: -``` -#include -#include - -int main (void) -{ - ... -} - -``` - -PlatformIO Library Dependency Finder will find automatically dependent -libraries scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/examples/mbed-dsp/platformio.ini b/examples/mbed-dsp/platformio.ini deleted file mode 100644 index e888ac2..0000000 --- a/examples/mbed-dsp/platformio.ini +++ /dev/null @@ -1,13 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter, extra scripting -; Upload options: custom port, speed and extra flags -; Library options: dependencies, extra library storages -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:teensy31] -platform = teensy -framework = mbed -board = teensy31 diff --git a/examples/mbed-dsp/src/data.cpp b/examples/mbed-dsp/src/data.cpp deleted file mode 100644 index d946b36..0000000 --- a/examples/mbed-dsp/src/data.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "arm_math.h" - -/* ---------------------------------------------------------------------- -** Test input signal contains 1000Hz + 15000 Hz -** ------------------------------------------------------------------- */ - -float32_t testInput_f32_1kHz_15kHz[320] = -{ -+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, --0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, -+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, -+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, -+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, -+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, --0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, --0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, -+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, -+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, --0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, -+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, --0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, --0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, --0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, -+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, -+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, -+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, -}; - -float32_t refOutput[320] = -{ -+0.0000000000f, -0.0010797829f, -0.0007681386f, -0.0001982932f, +0.0000644313f, +0.0020854271f, +0.0036891871f, +0.0015855941f, --0.0026280805f, -0.0075907658f, -0.0119390538f, -0.0086665968f, +0.0088981202f, +0.0430539279f, +0.0974468742f, +0.1740405600f, -+0.2681416601f, +0.3747720089f, +0.4893362230f, +0.6024154672f, +0.7058740791f, +0.7968348987f, +0.8715901940f, +0.9277881093f, -+0.9682182661f, +0.9934674267f, +1.0012052245f, +0.9925859371f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, -0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, -+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, --0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, --0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, --0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, -+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, -+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f -}; - diff --git a/examples/mbed-dsp/src/main.cpp b/examples/mbed-dsp/src/main.cpp deleted file mode 100644 index f6bdb4b..0000000 --- a/examples/mbed-dsp/src/main.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "arm_math.h" -#include "math_helper.h" -#include - -#define BLOCK_SIZE 32 -#define NUM_BLOCKS 10 - -#define TEST_LENGTH_SAMPLES (BLOCK_SIZE * NUM_BLOCKS) - -#define SNR_THRESHOLD_F32 140.0f -#define NUM_TAPS 29 - -/* ------------------------------------------------------------------- - * The input signal and reference output (computed with MATLAB) - * are defined externally in arm_fir_lpf_data.c. - * ------------------------------------------------------------------- */ -extern float32_t testInput_f32_1kHz_15kHz[TEST_LENGTH_SAMPLES]; -extern float32_t refOutput[TEST_LENGTH_SAMPLES]; - -/* ------------------------------------------------------------------- - * Declare State buffer of size (numTaps + blockSize - 1) - * ------------------------------------------------------------------- */ -static float32_t firStateF32[BLOCK_SIZE + NUM_TAPS - 1]; - -/* ---------------------------------------------------------------------- - * FIR Coefficients buffer generated using fir1() MATLAB function. - * fir1(28, 6/24) - * ------------------------------------------------------------------- */ -const float32_t firCoeffs32[NUM_TAPS] = { - -0.0018225230f, -0.0015879294f, +0.0000000000f, +0.0036977508f, +0.0080754303f, - +0.0085302217f, -0.0000000000f, -0.0173976984f, -0.0341458607f, -0.0333591565f, - +0.0000000000f, +0.0676308395f, +0.1522061835f, +0.2229246956f, +0.2504960933f, - +0.2229246956f, +0.1522061835f, +0.0676308395f, +0.0000000000f, -0.0333591565f, - -0.0341458607f, -0.0173976984f, -0.0000000000f, +0.0085302217f, +0.0080754303f, - +0.0036977508f, +0.0000000000f, -0.0015879294f, -0.0018225230f -}; - -/* ---------------------------------------------------------------------- - * FIR LPF Example - * ------------------------------------------------------------------- */ -int main(void) { - /* Call FIR init function to initialize the instance structure. */ - arm_fir_instance_f32 S; - arm_fir_init_f32(&S, NUM_TAPS, (float32_t *)&firCoeffs32[0], &firStateF32[0], BLOCK_SIZE); - - /* ---------------------------------------------------------------------- - * Call the FIR process function for every blockSize samples - * ------------------------------------------------------------------- */ - for (uint32_t i=0; i < NUM_BLOCKS; i++) { - float32_t* signal = testInput_f32_1kHz_15kHz + (i * BLOCK_SIZE); - arm_fir_f32(&S, signal, signal, BLOCK_SIZE); - } - - /* ---------------------------------------------------------------------- - * Compare the generated output against the reference output computed - * in MATLAB. - * ------------------------------------------------------------------- */ - float32_t snr = arm_snr_f32(refOutput, testInput_f32_1kHz_15kHz, TEST_LENGTH_SAMPLES); - printf("snr: %f\n\r", snr); - if (snr < SNR_THRESHOLD_F32) { - printf("Failed\n\r"); - } else { - printf("Success\n\r"); - } -} diff --git a/examples/mbed-dsp/test/README b/examples/mbed-dsp/test/README deleted file mode 100644 index df5066e..0000000 --- a/examples/mbed-dsp/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PIO Unit Testing and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PIO Unit Testing: -- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/examples/mbed-events/.gitignore b/examples/mbed-events/.gitignore deleted file mode 100644 index 03f4a3c..0000000 --- a/examples/mbed-events/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pio diff --git a/examples/mbed-events/README.md b/examples/mbed-events/README.md deleted file mode 100644 index d7c511a..0000000 --- a/examples/mbed-events/README.md +++ /dev/null @@ -1,21 +0,0 @@ -How to build PlatformIO based project -===================================== - -1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) -2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip) -3. Extract ZIP archive -4. Run these commands: - -```shell -# Change directory to example -$ cd platform-teensy/examples/mbed-events - -# Build project -$ pio run - -# Upload firmware -$ pio run --target upload - -# Clean build files -$ pio run --target clean -``` diff --git a/examples/mbed-events/include/README b/examples/mbed-events/include/README deleted file mode 100644 index 194dcd4..0000000 --- a/examples/mbed-events/include/README +++ /dev/null @@ -1,39 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the usual convention is to give header files names that end with `.h'. -It is most portable to use only letters, digits, dashes, and underscores in -header file names, and at most one dot. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/examples/mbed-events/lib/README b/examples/mbed-events/lib/README deleted file mode 100644 index 6debab1..0000000 --- a/examples/mbed-events/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into executable file. - -The source code of each library should be placed in a an own separate directory -("lib/your_library_name/[here are source files]"). - -For example, see a structure of the following two libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -and a contents of `src/main.c`: -``` -#include -#include - -int main (void) -{ - ... -} - -``` - -PlatformIO Library Dependency Finder will find automatically dependent -libraries scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/examples/mbed-events/platformio.ini b/examples/mbed-events/platformio.ini deleted file mode 100644 index e888ac2..0000000 --- a/examples/mbed-events/platformio.ini +++ /dev/null @@ -1,13 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter, extra scripting -; Upload options: custom port, speed and extra flags -; Library options: dependencies, extra library storages -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:teensy31] -platform = teensy -framework = mbed -board = teensy31 diff --git a/examples/mbed-events/src/main.cpp b/examples/mbed-events/src/main.cpp deleted file mode 100644 index 8762cd4..0000000 --- a/examples/mbed-events/src/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "mbed_events.h" -#include - -int main() { - // creates a queue with the default size - EventQueue queue; - - // events are simple callbacks - queue.call(printf, "called immediately\n"); - queue.call_in(2000, printf, "called in 2 seconds\n"); - queue.call_every(1000, printf, "called every 1 seconds\n"); - - // events are executed by the dispatch method - queue.dispatch(); -} diff --git a/examples/mbed-events/test/README b/examples/mbed-events/test/README deleted file mode 100644 index df5066e..0000000 --- a/examples/mbed-events/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PIO Unit Testing and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PIO Unit Testing: -- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/examples/mbed-serial/.gitignore b/examples/mbed-serial/.gitignore deleted file mode 100644 index 03f4a3c..0000000 --- a/examples/mbed-serial/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pio diff --git a/examples/mbed-serial/README.md b/examples/mbed-serial/README.md deleted file mode 100644 index 1a0339e..0000000 --- a/examples/mbed-serial/README.md +++ /dev/null @@ -1,21 +0,0 @@ -How to build PlatformIO based project -===================================== - -1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) -2. Download [development platform with examples](https://github.com/platformio/platform-teensy/archive/develop.zip) -3. Extract ZIP archive -4. Run these commands: - -```shell -# Change directory to example -$ cd platform-teensy/examples/mbed-serial - -# Build project -$ pio run - -# Upload firmware -$ pio run --target upload - -# Clean build files -$ pio run --target clean -``` diff --git a/examples/mbed-serial/include/README b/examples/mbed-serial/include/README deleted file mode 100644 index 194dcd4..0000000 --- a/examples/mbed-serial/include/README +++ /dev/null @@ -1,39 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the usual convention is to give header files names that end with `.h'. -It is most portable to use only letters, digits, dashes, and underscores in -header file names, and at most one dot. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/examples/mbed-serial/lib/README b/examples/mbed-serial/lib/README deleted file mode 100644 index 6debab1..0000000 --- a/examples/mbed-serial/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into executable file. - -The source code of each library should be placed in a an own separate directory -("lib/your_library_name/[here are source files]"). - -For example, see a structure of the following two libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -and a contents of `src/main.c`: -``` -#include -#include - -int main (void) -{ - ... -} - -``` - -PlatformIO Library Dependency Finder will find automatically dependent -libraries scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/examples/mbed-serial/platformio.ini b/examples/mbed-serial/platformio.ini deleted file mode 100644 index e888ac2..0000000 --- a/examples/mbed-serial/platformio.ini +++ /dev/null @@ -1,13 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter, extra scripting -; Upload options: custom port, speed and extra flags -; Library options: dependencies, extra library storages -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:teensy31] -platform = teensy -framework = mbed -board = teensy31 diff --git a/examples/mbed-serial/src/main.cpp b/examples/mbed-serial/src/main.cpp deleted file mode 100644 index 132ba17..0000000 --- a/examples/mbed-serial/src/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "mbed.h" - -Serial pc(USBTX, USBRX); // tx, rx - -int main() { - pc.printf("Hello World!\n\r"); - while(1) { - pc.putc(pc.getc() + 1); // echo input back to terminal - } -} \ No newline at end of file diff --git a/examples/mbed-serial/test/README b/examples/mbed-serial/test/README deleted file mode 100644 index df5066e..0000000 --- a/examples/mbed-serial/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PIO Unit Testing and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PIO Unit Testing: -- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/platform.json b/platform.json index f883723..c525232 100644 --- a/platform.json +++ b/platform.json @@ -19,16 +19,12 @@ "type": "git", "url": "https://github.com/platformio/platform-teensy.git" }, - "version": "4.18.0", + "version": "5.0.0", "frameworks": { "arduino": { "package": "framework-arduinoteensy", "script": "builder/frameworks/arduino.py" }, - "mbed": { - "package": "framework-mbed", - "script": "builder/frameworks/mbed.py" - }, "zephyr": { "package": "framework-zephyr", "script": "builder/frameworks/zephyr.py" @@ -58,13 +54,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.158.0" - }, - "framework-mbed": { - "type": "framework", - "optional": true, - "owner": "platformio", - "version": "~6.51506.0" + "version": "~1.159.0" }, "framework-zephyr": { "type": "framework",