kubernetespleb
New member
Howdy folks,
tl;dr: What is the best approach to be able to view the debug/printf[1] statements when working with the Teensy 4.0?
I've been investigating adding a new usb interface to the teensy 4. However, I'm not very familiar with how to debug in this embedded environment. Namely, if my program crashes I want to see the stack info, and ideally be able to view debug print statements.
So, a lot of questions:
- How do folks tend to do this?
- Is the answer a serial monitor that I plug into hardware serial? If so, what product should I buy?
- Are there any instructions/schematics/examples for doing this with the teensy 4?
- Is there some other way to have the program dump the stack trace to [external] storage?
- Do other debugging approaches exist? My initial searching led me to "JTAG debugger", but I'm not too familiar and it seems like a separate use case.
Apologies for the multitude of questions, I'm confident in being able to move forward so long as I can see what my code gets to and what fails . Many thanks!
~kp
[1] https://github.com/PaulStoffregen/cores/blob/master/teensy4/debug/printf.h
tl;dr: What is the best approach to be able to view the debug/printf[1] statements when working with the Teensy 4.0?
I've been investigating adding a new usb interface to the teensy 4. However, I'm not very familiar with how to debug in this embedded environment. Namely, if my program crashes I want to see the stack info, and ideally be able to view debug print statements.
So, a lot of questions:
- How do folks tend to do this?
- Is the answer a serial monitor that I plug into hardware serial? If so, what product should I buy?
- Are there any instructions/schematics/examples for doing this with the teensy 4?
- Is there some other way to have the program dump the stack trace to [external] storage?
- Do other debugging approaches exist? My initial searching led me to "JTAG debugger", but I'm not too familiar and it seems like a separate use case.
Apologies for the multitude of questions, I'm confident in being able to move forward so long as I can see what my code gets to and what fails . Many thanks!
~kp
[1] https://github.com/PaulStoffregen/cores/blob/master/teensy4/debug/printf.h