Hello,
I'm starting up a project with a Teensy 4.1 and an ILI9341 display. Using the Arduino IDE. Have successfully done a "hello world" - the code uploads, the serial monitor works, and the display displays. Woo hoo!
I'd like to implement a stack canary - preload the end of the stack with a magic number and periodically check to see it's still there. Also check that the stack pointer is the same value every swing around the main loop.
I did this with the Arduino Nano by an external variable "SP" provided by the system. That doesn't seem to work on the Teensy. Anybody know how to access the SP and possibly other internal registers from C++? And how to view a link map?
Thanks in advance,
- jerryk
I'm starting up a project with a Teensy 4.1 and an ILI9341 display. Using the Arduino IDE. Have successfully done a "hello world" - the code uploads, the serial monitor works, and the display displays. Woo hoo!
I'd like to implement a stack canary - preload the end of the stack with a magic number and periodically check to see it's still there. Also check that the stack pointer is the same value every swing around the main loop.
I did this with the Arduino Nano by an external variable "SP" provided by the system. That doesn't seem to work on the Teensy. Anybody know how to access the SP and possibly other internal registers from C++? And how to view a link map?
Thanks in advance,
- jerryk