PlatformIO Community

Teensy 3.1 issue - firmware uploading but no indication of running

Hi all.

I initially reported and described the issue in the teensy platform repo: https://github.com/platformio/platform-teensy/issues/70

Since there doesn’t seem to be much activity there recently, I decided to try my luck here as well.
I’m quite new to the embedded world, so please forgive any obvious troubleshooting misses, but as the project compiles and uploads fine but still shows no signs of running, I feel like I am very much in the dark.

Well given that you that the Arduino Blink example works (https://github.com/chlirre/platform-teensy/blob/o_c-platform/examples/arduino-blink/src/Blink.cpp) but a blinky with the addition that library is compiled in (https://github.com/chlirre/O_C-HemisphereSuite/blob/blink-loop/software/src/Main.cpp) doesn’t work points to that library, in conjunction with your change of compiler version maybe.

Does it not compile without that compiler change?

Given the large size of the library (https://github.com/chlirre/O_C-HemisphereSuite/tree/blink-loop/software/src) it seems rather hard to directly spot the (or multiple) errors that prevent this from running.

A “shot in the dark” guess from me would be that if there are globally constructed C++ objects, there is some crash in some constructor code, or the project attempts to re-implement ISR routines like the SysTick, there is some error in that.

Is there the possibility that you’re able to solder 2 tiny wires to the Teensy to enable SWD debugging, with e.g. an STLink or JLink? (https://mcuoneclipse.com/2014/08/09/hacking-the-teensy-v3-1-for-swd-debugging/). That would bring light in that pretty quickly.

Some other advice after reading through

if you don’t have it already, you need to install the Arduino IDE as well as the Teensyduino v1.35 add-on. Note that you MUST use specific versions of these! At the time of writing, that’s Arduino IDE 1.8.1 (available from https://www.arduino.cc/en/Main/OldSoftwareReleases - just scroll down and it’s in the table) and Teensyduino v1.35 ([Mac] [Windows] [Linux]), respectively; at this point, later versions of Teensyduino (which use gcc 5.4 instead of gcc 4.8) do not work, so please don’t use them (they will cause screen corruptions). Only use Teensyduino v1.35!

At https://ornament-and-cri.me/firmware/ you can try to…

  • set the Teensy platform version to
platform = teensy@1.6.0

since that version gives you the Arduino Teensy core version 1.35 as wanted, and should also automatically fix the compiler version

  • or fix the Arduino Teensy package too, as in
platform_packages = 
   framework-arduinoteensy@1.135.0

Per https://bintray.com/platformio/tool-packages/framework-arduinoteensy#files.

Thank you @maxgerhardt for your replies.

Getting a proper debugging setup seems like the most reasonable way to go about this in general. Unfortunately, I didn’t realise that before starting my journey down this rabbit hole.
I will probably not (at least not now) solder anything to my teensy board as it is part of a $200 synth module which is working fine.

I might have a go at the platform = teensy@1.6.0 suggestion.

I will also try to get someone else in the synth community with the same hardware plus debugging possibilities to see if they can spot the problem.