I have dug through this forum a bit, and I know that this has already been brought up a few times, but I want to write my own plea. I have been using a teensy 4.1 for a formula SAE project to create a custom ECU for an electric vehicle. It was selected because the power & capability of the teensy was comparable to that of the highest end STM32's but with a much better developer experience in thanks to better platformio/arduino integration, and the arduino framework support, and has more pins and peripherals than an ESP-32-S3. So far working with it has been pleasant when things work, and if you are writing code that is going to operate in a single super-loop, then you will probably have no issues. However, my project uses freeRTOS, which makes debugging difficult without a hardware debugger for a few reasons:
- The software GDB project: https://github.com/ftrias/TeensyDebug just does not work in multi-threaded applications, not sure why but it seems to be a fundamental limitation as noted by a few of the issues on the project page.
- Serial printing is only an effective method of debugging **when** your serial print works. The nature of having a multi-threaded application meant I had multiple issues getting my Serial print to work at all, and it was very difficult to debug the issue with my Serial print when my only window into what the code is doing is said serial print.
- sub-point on this, it takes the teensy quite a few seconds after upload for the com-port to reappear on the host PC, which means if you are trying to debug something in the early start-up, chances are you will have a hard time catching it (I found adding delays to set-up just delayed when the teensy connected to the host entirely which did not help much)
- Serial prints also are not thread-safe meaning I would need to have 1 task printing debug messages on behalf of all my other threads which means the prints will not be happening in real-time compared to the thing I would be trying to inspect
- It's quite laborious to print out everything you might ever want to inspect when normally if I was working on another platform, I would simply add watches to all the variables I was interested in then run the debugger.
- The lack of JTAG/SWD limits the usefulness of the teensy for more complex projects, which is a true shame considering how capable of a platform it is, and if you want to mod it to expose the JTAG pins, you lose the convenience factor of the teensy bootloader, and you now have to go out and buy an additional hardware debugger.