Adding the Teensy 3.1 board to the PteroDAQ data acquisition system only took a day of effort (see PteroDAQ supports Teensy 3.1), extending that support to the Teensy LC, took only a couple of hours, since it just meant adding another board description to boards.py and merging the KL25Z and Teensy 3.1 code that was already written.
The Teensy LC board I ordered from the PJRC store) has been shipped, but probably won’t arrive until Monday, so I’ve not been able to test the code yet.
I looked at the size of the different implementations of the firmware for PteroDAQ with the current implementations:
The MBED USB stack used for the FRDM KL25Z board seems to bloat the code there enormously, but even the Teensy code seems a bit bloated compared to the Arduino code (which is already much more bloated than really needed).
If the Teensy LC code works (and I see no reason it shouldn’t, after tiny amounts of debugging to remove any bugs that the compiler hasn’t already caught), I’ll probably look into using the Teensyduino setup for programming the FRDM KL25Z board also. If I can get that to work, I’ll probably give up on the MBED toolchain entirely—their software is way too deeply layered with way too many dependencies. It looks like it was developed by computer scientists who drank too much of the “layered abstraction” kool-aid.
The biggest problem with the Teensyduino environment for developing for the FRDM KL25Z is that they’ve not set up any of the macros for the KL25Z, which is almost (but not quite) identical to the KL26Z that they have set up. I do have a FRDM KL26Z board, though, so maybe I should develop for that. The difficult parts will be
- Setting up macros that allow different compilation for FRDM KL26Z and Teensy LC, even though both are using KL26Z processors. I can probably handle that with a new entry in the boards.txt file.
- Setting up the download using the MBED downloader on the FRDM KL26Z board rather than the Teensy loader. I’m not sure that the Arduino environment provides any way to set up a download as “create a bin format file and write to fake flash drive”. Even just getting the bin file created and put in an easy-to-find place may be difficult without manual intervention.
Since the Teensyduino development is supported by the sale of Teensy boards, it is unlikely that Teesyduino will ever be officially extended to support the boards sold by Freescale.