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) How could I debug with my custom arduino board? (Read 10227 times)
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
How could I debug with my custom arduino board?
Mar 3rd, 2015 at 8:06pm
Print Post  
Hi
I just start to build my own arduino board from this link http://www.instructables.com/id/How-to-make-your-own-Arduino-board/?ALLSTEPS

I use my atmel-ice to upload to my board via icsp.
My question is how can I watch value in variable of my program via debug ?
Do I need to connect serial pin2 and 3 to PC via FTDI?
Do I need to select board as Uno and specific com port to FTDI above? 

Please tech me, I'really have no idea how to do this Cry
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How could I debug with my custom arduino board?
Reply #1 - Mar 3rd, 2015 at 10:47pm
Print Post  
Hi Tikki,

Yes the easiest solution is to follow any guide about making normal Serial.println("Hello world") work in a sketch. This will involve something like FTDI connect to the hardware Serial pins of your micro-controller.

If the hardware serial is not available then you can use other digital pins and instruct the debugger to use the SoftwareSerial library following this guide http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Por...

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


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #2 - Mar 4th, 2015 at 12:16pm
Print Post  
Hi I've connect my usb2serial to my arduino board on HW serial pin and then change setting by following your guide in link above.
now that I've some kind of weird problem, In serial monitor if I set speed match to the speed in my code like 9600.
their is not thing show up in monitor window but if I set speed lower than that ex. 4800 it did send some weird character like a symptom when you set the wrong speed.
where did I go wrong?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How could I debug with my custom arduino board?
Reply #3 - Mar 4th, 2015 at 12:20pm
Print Post  
The default speed for the debugger is 115200, you can change it using the link i posted however in recent versions, if you are using your own serial.begin() visual micro should auto detect the correct speed.

Please confirm the version of Visual Micro you are using from tools>options>visual micro>version>version and verMinor

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


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #4 - Mar 4th, 2015 at 12:54pm
Print Post  
Version is 1.1502.14
Version Minor is 1

Now I change speed to 115200 result is the same only the lower speed will get something if I set to equal speed or faster not thing show up
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How could I debug with my custom arduino board?
Reply #5 - Mar 4th, 2015 at 1:23pm
Print Post  
Hi Tikki,

Can you please switch off "tools>visual micro>automatic debugging"

After doing that you are in standard Arduino mode. Any problems with serial will be caused by hardware or usb issues.

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


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #6 - Mar 4th, 2015 at 2:05pm
Print Post  
It switch off already.

I give a try on arduino pro mini, Just connect it via usb upload code and then the correct data did show up in serial monitor, 

I've change my usb2serial that come with max3243 chip instead of solo ftdi chip and change about 2 of it(luckily I have many of usb2serial) 
Could It be that the problem is come from some incorrect config file?
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #7 - Mar 4th, 2015 at 4:08pm
Print Post  
Never mind, I've try tera term app and found that result is the same, So I guess that it maybe something wrong with my code, Sorry to waste your time  Smiley
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #8 - Mar 5th, 2015 at 4:31pm
Print Post  
Hi Tim
I manage to get usb2serial working now.
I've put breakpoint in and also set condition "When breakpoint is hit".
but Expression windows show not thing, where did I go wrong?

PS. Please bear in me if my question is annoying.  I'm very new to this kind of thing also have no background in electronic engineer, Just get start at a very beginning state of learn in arduino
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How could I debug with my custom arduino board?
Reply #9 - Mar 5th, 2015 at 5:19pm
Print Post  
Great and no problem.

Did you switch automatic debugging back on again?

"Tools>visual micro>automatic debugging" needs to be ticked

Then look at the tool bar is that set to "Release" or "Debug". It needs to be set to a configuration with the word "debug" in the name.

Then upload and it should work

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


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: How could I debug with my custom arduino board?
Reply #10 - Mar 5th, 2015 at 7:53pm
Print Post  
It ticked and I also set to debug too, So I close visual studio and open it again then I don't know why but It's work now. Thank you very much for your help  Smiley
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How could I debug with my custom arduino board?
Reply #11 - Mar 5th, 2015 at 8:24pm
Print Post  
Okay great thanks for the update
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint