Skip to content

geertu/teensy3-bcu2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCU/2 - Board Control Unit Duo (Teensy 3.2)

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).

Features

  • 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.

Features still to be implemented

  • Environment in non-volatile memory (currently hardcoded),
  • Triggers for RGB status LEDs,
  • Better power monitoring,
  • ...

License

  • 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)


Another 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).

Supported platforms:

  • Linux
  • Possibly MacOS

Build instructions:

  1. Download and install the Arduino Software
  2. Download and install Teensyduino
  3. Export an environment variable called ARDUINO_HOME that points to your Arduino Software installation
  4. Connect your Teensy3.1+
  5. Run make upload

Caveats: Arduino libraries are currently not supported, compiling using multiple threads can initially fail because of the recursive nature.

Makefile targets

  • build, all builds the .hex file without uploading
  • core only builds the Teensy3 core
  • hex builds the .hex file
  • eep builds the .eep file
  • upload builds and uploads to the Teensy
  • clean cleans non-core objects
  • coreclean cleans core objects and library
  • depsclean cleans autogenerated dependency files
  • distclean cleans everything
  • symbols creates $(OUT_PATH)/eclipse_cdt_symbols.xml from definitions inside the Makefile for importing into Eclipse CDT

Makefile hacking

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 file
  • M_CPU_CLOCK: your CPU clock in Hz
  • M_USB_TYPE: the USB type
  • M_LAYOUT: keyboard layout
  • M_ARDUINO_VERSION: Arduino software version
  • M_TEENSYDUINO_VERSION: Teensyduino version
  • M_TEENSY_VERSION: 3.0, 3.1 or 3.2
  • M_OPT_N_WARN: debugging, warning and optimization switches
  • M_REPLACE_CORE: Define and set to 1 when you have a fully custom core
  • M_AUTO_DEPENDENCIES: Undefine to disable automatical dependency scanning

Overriding Teensy3 core files

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.

Usage with Eclipse

  1. Download/install Eclipse (if not already done)
  2. You either need the C++ edition or the CDT installed
  3. File->New->C++ Project: Makefile Project->Empty Project, Toolchain: Linux GCC
  4. Deselect Use default location and select this folder as the Location
  5. Run make symbols on the command line
  6. 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

About

Board Control Unit Duo (Teensy 3.2)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published