This is the software for the BCU/2, which is a small board to control operation of two development boards, e.g. on your desk, or in a board farm (https://github.com/geertu/pcb-bcu2).
- USB host connectivity, providing three virtual serial ports:
- Interactive control channel (just type "help"),
- Serial console channel A,
- Serial console channel B.
- Power control (two channels),
- Voltage/current/power monitor (two channels),
- Serial console (two channels),
- Opto-isolator output control (six channels),
- RGB status LED control (two channels),
- GPIO expansion control (two channels),
- I2C expansion,
- Test mode exercising all outputs.
- Environment in non-volatile memory (currently hardcoded),
- Triggers for RGB status LEDs,
- Better power monitoring,
- ...
- Mix of material licensed under MIT, PJRC, LGPL-2.1+, and GPL-2.0 licenses.
Instructions below copied verbatim from "Blink for Teensy3 - Custom, simple Makefile starting point" (https://github.com/rjeschke/teensy3-blink)
When I started with Teensy3 development myself, I quickly noticed that the Arduino sketch editor is maybe nice for small projects, but misses the power of a real IDE. As I am using Eclipse heavily for C and C++ development it was quite natural to be able to develop for Teensy3 using Eclipse. There are existing solutions out there, that give you makefiles, but I did not want to include the whole vanilla Teensy3 core for nothing or for small changes.
That's why I came up with this solution here. Basically you can just copy the
Makefile
, create a C/C++ file in the src
folder and start developing.
(Instructions on how to import the project into Eclipse are given below).
- Linux
- Possibly MacOS
- Download and install the Arduino Software
- Download and install Teensyduino
- Export an environment variable called
ARDUINO_HOME
that points to your Arduino Software installation - Connect your Teensy3.1+
- Run
make upload
Caveats: Arduino libraries are currently not supported, compiling using multiple threads can initially fail because of the recursive nature.
build
,all
builds the.hex
file without uploadingcore
only builds the Teensy3 corehex
builds the.hex
fileeep
builds the.eep
fileupload
builds and uploads to the Teensyclean
cleans non-core objectscoreclean
cleans core objects and librarydepsclean
cleans autogenerated dependency filesdistclean
cleans everythingsymbols
creates$(OUT_PATH)/eclipse_cdt_symbols.xml
from definitions inside theMakefile
for importing into Eclipse CDT
Feel free to mess around with the Makefile
, most likely you will only need to
modify the first few lines that contain the M_*
variables.
M_PROJECT
: the project name and the name of the resulting.hex
fileM_CPU_CLOCK
: your CPU clock in HzM_USB_TYPE
: the USB typeM_LAYOUT
: keyboard layoutM_ARDUINO_VERSION
: Arduino software versionM_TEENSYDUINO_VERSION
: Teensyduino versionM_TEENSY_VERSION
: 3.0, 3.1 or 3.2M_OPT_N_WARN
: debugging, warning and optimization switchesM_REPLACE_CORE
: Define and set to 1 when you have a fully custom coreM_AUTO_DEPENDENCIES
: Undefine to disable automatical dependency scanning
You can create a folder called teensy3
in your project's root for replacing/modifying
Teensy3 core files. Just copy the file(s) you want to modify from your Teensy3
installation (ARDUINO_HOME/hardware/teensy/avr/cores/teensy3
) into teensy3
and start editing. The build process creates a folder called teensy3.copy
that
contains the vanilla core files and your modified ones.
This way you can have custom USB devices or similar changes on a per-project base without having to mess around with your Teensyduino installation.
Using M_REPLACE_CORE
allows you to only use the core files in your source tree.
This is useful if you want to replace the whole core.
- Download/install Eclipse (if not already done)
- You either need the C++ edition or the CDT installed
- File->New->C++ Project: Makefile Project->Empty Project, Toolchain: Linux GCC
- Deselect Use default location and select this folder as the Location
- Run
make symbols
on the command line - Project Properties->C/C++ General->Paths and Symbols, Import Settings...: look inside the
bin
folder for the XML
(c) 2015, René 'Neotec/Neet' Jeschke, https://github.com/rjeschke/teensy3-blink