Hi all.
I initially reported and described the issue in the teensy platform repo: Blink Example setup/loop not working as part of larger project (for Teensy 3.1) · Issue #70 · platformio/platform-teensy · GitHub
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 (platform-teensy/Blink.cpp at o_c-platform · chlirre/platform-teensy · GitHub) but a blinky with the addition that library is compiled in (O_C-HemisphereSuite/Main.cpp at blink-loop · chlirre/O_C-HemisphereSuite · GitHub) 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 (O_C-HemisphereSuite/software/src at blink-loop · chlirre/O_C-HemisphereSuite · GitHub) 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? (Hacking the Teensy V3.1 for SWD Debugging | MCU on Eclipse). 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 ornament & crime 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 Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog.
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.