Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1 (Read 554 times)
teensy_user1234
Newbies
*
Offline



Posts: 3
GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1
Aug 25th, 2021 at 12:28am
 
I can upload code via Visual Micro to my Teensy4.1 without issues but I cannot use GDB debugging. Note that, the same exact setup/script (except for COM port changes) work for Teensy4.0 for both code uploading and GDB debugging.
The moment I import #include "TeensyDebug.h" in the script and upload the code, COM ports (I’m doing dual serial) disappear for Teensy4.1. I do not see this issue on Teensy4.0 (code can be uploaded successfully regardless of whether TeensyDebug.h is included or not). To see the COM port(s) again, I can comment out TeensyDebug.h and then, upload again, at which point, I’d see the following message.

No Teensy boards were found on any USB ports of your computer.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
     The upload process has finished.

Once I press the white program mode button on my Teensy4.1, the LED would start blinking again and I’d see the COM ports again.
I thought my TeensyDebug.h was outdated but uploading the same code in Arduino IDE with #include "TeensyDebug.h" works, meaning the COM ports did not disappear and LED is blinking. So, I know TeensyDebug.h is not the issue here. No one seems to have the same issue (I’ve been looking) and I just bought these two Teensy4.1 boards and I thought everything would work perfectly like it did for Teensy4.0... Your help is greatly appreciated. I've also uploaded the text files including the verbose build outputs.
Back to top
 

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



Posts: 1070
Re: GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1
Reply #1 - Aug 25th, 2021 at 6:30pm
 
Thanks for the report, and logs and detail.

To help us understand further, can you confirm the below points:

When the COM Ports dissapear, with Debugging stopped:-
1) Do the COM Ports disappear in Device Manager on your machine? (when not showing in vMicro)
2) Also can you confirm which version of the TeensyDuino software you have installed currently?
3) Is there still a process running "arm-none-eabi-gdb.exe"?
4) Also check how many processes are running with the name "teensy_ports.exe"

Back to top
 
 
IP Logged
 
teensy_user1234
Newbies
*
Offline



Posts: 3
Re: GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1
Reply #2 - Aug 26th, 2021 at 7:43am
 
Hi Simon, thanks for your help first of all.

1) Yes they do disappear. Once I can't seem it in vMicro, it's gone from Device Manager as well.
2) Arduino 1.8.15. Teensy 1.54
3) No such program arm-none-eabi-gdb.exe running in task manager (I tried both 4.0 and 4.1, debug and release).
4) I saw one process with the name teensy_ports, and it is always there even when I disconnect the teensy board from my PC.

Something interesting... I accidentally uploaded Teensy4.1 compiled code to Teensy4.0 and the outcome looks "kind of" similar to my issue (COM ports disappeared and red faint LED continuously on). Re-uploading with the right hardware (4.0), or unplugging and plugging back in will fix this, meaning I'd see LED blinking as well as COM ports again. I see the same thing uploading 4.0 code on 4.1 board.

On 4.1, when the issue occurs (meaning I uploaded code with TeensyDebug.h and COM ports disappear), no LEDs are on, not even the red LED near the USB connector (this is the difference between uploading wrong compiled code and my issue). The whole board looks dead. I can press the push button and I'd hear the USB connecting/disconnecting sound along with flashes of the red LED. If I press on the button too fast for a few times, I'd see a popup from Teensy saying Automatic Mode has been disabled because the board returned to bootloader mode very quickly (attached pic). At this point, I'd see the faint red LED turning on continuously.
I almost started to think both of these 4.1 boards are somehow not working properly? But, then again, I bought them directly from PJRC, I can upload code with no issues... so I'm quite confused.
Back to top
 

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



Posts: 1070
Re: GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1
Reply #3 - Aug 26th, 2021 at 12:28pm
 
Thanks for all of the detail and observations.

I have been able to reproduce this with Teensy 1.5.4 + Arduino IDE 1.8.15, and have the same experience in the Arduino IDE (same versions).

If I change back to Teensyduino 1.5.3 + Arduino IDE 1.8.13 then it works as expected on the Teensy 4.1 board (COM Ports don't vanish etc...)

The Debugging Library hasn't been changed in a few months, so assume this must be a change in the Teensy core (more files are compiled in the newer version) which has impacted this.

Can you confirm that using Teensyduino 1.5.3 + Arduino IDE 1.8.13 work for you as expected?
(It is easiest to Install ArduinoIDE from ZIP into seperate folder, and Teensyduino into that so you can switch between in Visual Micro as needed)

Installer Links:
https://downloads.arduino.cc/arduino-1.8.13-windows.zip
https://www.pjrc.com/teensy/td_153/TeensyduinoInstall.exe
Back to top
« Last Edit: Aug 26th, 2021 at 4:23pm by Simon@Visual Micro »  
 
IP Logged
 
teensy_user1234
Newbies
*
Offline



Posts: 3
Re: GDB Debugging Works Flawlessly on Teensy4.0, but not on Teensy4.1
Reply #4 - Aug 29th, 2021 at 6:15am
 
Hi Simon,

Thank you so much for your help.
Teensyduino 1.5.3 + Arduino IDE 1.8.13 works on both 4.0 and 4.1!! Thanks again!
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print