Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Cant get Teensy 4.1 Debugging to work (Read 858 times)
Jona
Newbies
*
Offline


Posts: 2
Joined: Apr 8th, 2024
Cant get Teensy 4.1 Debugging to work
Apr 8th, 2024 at 12:06pm
Print Post  
want to have the possibility to step through my project, so I found the [TeensyDebug][/https://github.com/ftrias/TeensyDebug] on GitHub. Everyone talking about this libary and how it’s implemented doesn’t seem to have any problems with it, however I do. For testing I used a simple blinky program and included a variable to have something to inspect. Here is my Code: 

[code c++][/
#include <TeensyDebug.h>

int num = 250;
// the setup function runs once when you press reset or power the board

void setup() {

     debug.begin(SerialUSB1);
   
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  num++;
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(num);              // wait for a second
}]

I am using the right Serial Port to debug (i tested it), the USB Dual Serial USB Type and Hardware Debug GDB Stub as the build options, just as explained in the corresponding video tutorial. However when i upoad the code and attach Debug the code obviously stops at my breakpoint (since the LED isn't blinking anymore), but the Debugger is not in a halting state (i can't step into, over etc.)

If i remove every breakpoint and sart debugging i can pause once (then usually inside of the delay function) but no matter if i continue, step over or into it just continues and i can't pause again. 

My assumption is that maybe the teensy doesn't respond back after being halted but i don't know how to fix it or get it to work properly. Thanks in advance.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2705
Joined: Feb 13th, 2019
Re: Cant get Teensy 4.1 Debugging to work
Reply #1 - Apr 8th, 2024 at 2:09pm
Print Post  
Thanks for the report.

Does changing the board option for "Optimize" to "Debug" help at all? (once changed the program will need recompiling and uploading again)

Can you enable the vMicro > Uploader > Verbose option (if not already enabled) and then use the Debug >Attach to process item to begin debugging.  After this please attach the output from the Output Window > Micro Build again as this will show us all of the debugging options.

  
Back to top
IP Logged
 
Jona
Newbies
*
Offline


Posts: 2
Joined: Apr 8th, 2024
Re: Cant get Teensy 4.1 Debugging to work
Reply #2 - Apr 8th, 2024 at 4:43pm
Print Post  
Didn't change anything. Verbose was enabled already. Output is attached
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint