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
Hot Topic (More than 8 Replies) Teensy 3 debugging problem (Read 10958 times)
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Teensy 3 debugging problem
May 13th, 2014 at 6:01am
Print Post  
Subj

Hello!
I can't debug when I compile for teensy 3.0, teensy hangs on startup and nothing appears on debug window Sad
I bought debugging license but can't use it!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #1 - May 13th, 2014 at 12:10pm
Print Post  
Hi Ev,

We do provide the free trial and ask that people use it to ensure the debugger works for them (see the note above the buy option). So if anyone else reads this post please use the trial you can still use the forum even if you are not a customer.

As concerns the crash where exactly have you placed the breakpoint? Please keep in mind that the debugger just uses normal serial so a crash can only be related to where the serial/breakpoint message is produced. You can not put a breakpoint in global code that initializes before the Teensy core has initialized.

Please state where you have placed a breakpoint and also what debugger settings you are using (or default)?

Thanks

  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #2 - May 18th, 2014 at 5:07am
Print Post  
Tim@Visual Micro wrote on May 13th, 2014 at 12:10pm:
We do provide the free trial and ask that people use it to ensure the debugger works

I know it, but trial has expired many time ago Sad

Tim@Visual Micro wrote on May 13th, 2014 at 12:10pm:
As concerns the crash where exactly have you placed the breakpoint?

I's no matter where to place the breakpoint in programs body, teensy hangs on start.

Tim@Visual Micro wrote on May 13th, 2014 at 12:10pm:
Please state where you have placed a breakpoint and also what debugger settings you are using (or default)?

I use default debugger settings

When I test debug on simply programs like "Hello world!" and ect, I have good results and debugger works fine.
But when I try to use debugger on real project when use SPI, Onewire, HardwareSerial, LCD libs, I'v got hanging Teensy.
Embarrassed
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #3 - May 18th, 2014 at 3:22pm
Print Post  
Hi,

Behind the scenes, the debugger uses simple serial statements so we can easily see what it is doing.

Please switch on "tools>options>visual micro>compiler>show build folder". After compiling and uploading the builder folder will appear in the output window. 

Please zip the build folder and email to info[at]visualmicro.com. Please also zip and email the files in the "\visual micro" folder below the sketch folder

Thanks
  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #4 - May 18th, 2014 at 3:34pm
Print Post  
Tim@Visual Micro wrote on May 18th, 2014 at 3:22pm:
Please switch on "tools>options>visual micro>compiler>show build folder". After compiling and uploading the builder folder will appear in the output window. 


I do it, but folder did not shows  Sad
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #5 - May 18th, 2014 at 3:40pm
Print Post  
Maybe the "Micro Trace" output window is selected because the debugger attempted to run? 

Please drop the list down and select "Micro Build" then you will see the build output and the path file:///....
  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #6 - May 19th, 2014 at 9:40am
Print Post  
Tim@Visual Micro wrote on May 18th, 2014 at 3:22pm:
Please zip the build folder and email to info[at]visualmicro.com. Please also zip and email the files in the "\visual micro" folder below the sketch folder


Ok, I sent it, to your e-mail
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #7 - May 19th, 2014 at 10:58am
Print Post  
Thanks for sending the files

This is a very simple example so it is strange you have a problem. There is only one text breakpoint at the start of the loop() and the serial for the debugger is initialized at 115200 at the start of the setup(). So it's really simple Arduino code that is crashing.

Questions

Does the crash happen if your #debug constant is defined and if not defined?

If your #debug constant is defined do you see any of your debug messages? If you do not see any messages then please try this

Move your own debug code to initialize immediately after the void setup() { like this ....

Code
Select All
void setup()
{
#ifdef debug
Serial.begin(115200);
while (!Serial) {}
Serial.println(F("\nTerminal ready..."));
#endif

SERIAL485.begin(9600);
SERIAL485.transmitterEnable(2);

 



After moving your code to the start of the setup() then "debug>start without debugging" to upload. Does your code produce the same crash that Visual Micro produced?

Thanks
  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #8 - May 19th, 2014 at 11:16am
Print Post  
Thanks for fast reply! 
1. The crash happens when #debug const. defined and when undefined too.
2. Yes I see my debug messages.
3. I moved code, start without debugging, and all works fine! But when I compiled with debug - teensy hangs!  Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #9 - May 19th, 2014 at 12:19pm
Print Post  
Hi,

When you compile and upload with both VM and your own debug, at what point does the teensy crash? Do you see any of your own debug messages at all?

Thanks
  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #10 - May 19th, 2014 at 12:24pm
Print Post  
I don't see any message from my debug or MicroDebug.
I think "teensy" crash, on start, because I did not found any activity on pins.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #11 - May 19th, 2014 at 12:31pm
Print Post  
Okay, in the last release a user asked that we disable debug if not connected to the pc. So we added a 2 second delay instead of waiting for the Serial to be available. 

The delay that Visual Micro applies might need to be increased and I can tell you how to do that but first let us try/test to prove this as the case....

We didn't test this delay with teensy3 at 48mhz which is what you are using. Please try a debug upload at 96mhz and see if the crash is solved.

Thank you
  
Back to top
IP Logged
 
EvgeniK45
Junior Member
**
Offline


Posts: 15
Location: Russian Federation
Joined: Jan 20th, 2013
Re: Teensy 3 debugging problem
Reply #12 - May 19th, 2014 at 12:40pm
Print Post  
96/48/24Mhz - The same result - crash  Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 debugging problem
Reply #13 - Jun 14th, 2014 at 9:32pm
Print Post  
Hi,

Sorry for the delay. 

Can you please switch on tools>options>visual micro>compiler>verbose then run a debug upload and and email the contents of the "micro build" output to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint