Teensy Call Stack

Status
Not open for further replies.

TeeVil

Member
I'm struggling to get TeensyDebug running.
(see https://forum.pjrc.com/threads/67867-VisualTeensy-TeensyDebug-and-Audio if you're interested. The title says "VisualTeensy" but I'm actually back to Teensyduino, just to reduce the unknowns. Still can't get it to work.)

So, as a work-around - would it be possible to send the current call-stack info out via Serial, e.g. when my app receives a certain point of interest? i.e.: can my app read the call-stack somehow?
 
I looked into this a little bit more.
I read the stack pointer using __get_MSP() in .\hardware\teensy\avr\cores\teensy4\cmsis_gcc.h . I think it works, the values looked believable :)

But then you have to interpret the stack to extract the function call return addresses, looks like. I didn't go too far with this but it looks like quite a job. The easiest might be to re-use some gdb code...?

But unfortunately I don't have time to do this at the moment so I'll have to leave it here :(
 
Status
Not open for further replies.
Back
Top