John Robinson a7a66c2f14 add README | před 3 roky | |
---|---|---|
cores | před 3 roky | |
libraries | před 3 roky | |
.piopm | před 3 roky | |
README.md | před 3 roky | |
boards.txt | před 3 roky | |
keywords.txt | před 3 roky | |
package.json | před 3 roky | |
platform.txt | před 3 roky |
framework-arduinoteensy-cxx20
A fork of the PlatformIO ArduinoTeensy framework compatible with GCC 10 & C++20.
In order to build with this framework, you’ll need to clone a few repos.
First, clone this repository:
git clone https://github.com/thevisus/framework-arduinoteensy-cxx20.git
This framework is compatible with the GNU ARM Embedded Toolchain v10.2.1. A corresponding PlatformIO toolchain is therefore necessary:
git clone https://github.com/thevisus/toolchain-gcc-arm-embedded.git
Finally, a PlatformIO “platform” is needed to drive the build:
git clone https://github.com/thevisus/teensy-gcc10.git
Each of these needs to be installed locally via PlatformIO. The pio
command or
similar management software should be able to do this. The simplest method, on
Linux/macOS is to symlink the projects into the PlatformIO user directory:
ln -s /path/to/framework-arduinoteensy-cxx20 $HOME/.platformio/packages
ln -s /path/to/toolchain-gcc-arm-embedded $HOME/.platformio/packages
ln -s /path/to/teensy-gcc10 $HOME/.platformio/platforms
You may check the full platform’s availability using pio
:
pio platform show teensy-gcc10
In your project’s platform.ini
, adjust your environment settings similar to
the following:
[platformio]
default_envs = teensy41
[env:teensy41]
platform = teensy-gcc10
platform_packages = toolchain-gcc-arm-embedded
board = teensy41
framework = arduino
If everything is setup correctly, you may build your project per usual.
# compile
pio run
# upload
pio run --target upload
Driving the pio process via make
can be accomplished with a simple Makefile.
(NB: this version assumes make
will be invoked from within vim
; if that’s
not the case, remove the -c vim
portions.)
all:
pio -c vim run
upload:
pio -c vim run --target upload
clean:
pio -c vim run --target clean
program:
pio -c vim run --target program
uploadfs:
pio -c vim run --target uploadfs
update:
pio -c vim update
The code in cores
is up-to-date as of late 2020 from the original
https://github.com/PaulStoffregen/cores repo, combined with the libraries and
tools found in PlatformIO’s original framework-arduinoteensy. It’s a bit of a
mish-mash, but is fairly up-to-date and functional (tested and run in live
systems for several months now).
However, due to the amalgamation of repos and a variety of other reasons, the
cores
code will only be minimally updated for critical fixes, if at all.
Instead, a leaner version of the 4.1 core, intended to be built with the
dds toolchain is actively maintained at
my personal Gitea: https://git.thevis.us/visus/teensy-core-4.1
Teensyduino Core Library
http://www.pjrc.com/teensy/
Copyright (c) 2017 PJRC.COM, LLC.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
1. The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
2. If the Software is incorporated into a build system that allows
selection among a list of target devices, hen similar target
devices manufactured by PJRC.COM must be included in the list of
target devices and selectable in the same manner.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.