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) Debug APM 3.x build issue (byte/hardware serial) (Read 9135 times)
Dennis
Junior Member
**
Offline


Posts: 12
Joined: Jan 7th, 2013
Debug APM 3.x build issue (byte/hardware serial)
Apr 12th, 2014 at 4:26pm
Print Post  
I downloaded the current version of Visual Micro last week and followed all the instructions and have it working great except:
I have the same issue as Clayton reply#4 June 17th 2013 (Other Hardware /APM3.0 discussion post)  when trying to debug the APM 3.x.x code (copter, plane or rover) I.E.

Compiling debug version of 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
ArduCopter.pde:In file included from
VM_DBG.h:206: error: ISO C++ forbids declaration of 'HardwareSerial' with no type
VM_DBG.h:206: error: expected ';' before '*' token
VM_DBG.h:207: error: 'HardwareSerial' has not been declared
VM_DBG.h:208: error: 'HardwareSerial' has not been declared
VM_DBG.h:284: error: 'byte' has not been declared


Has the 'byte' issue been resolved or did I somehow get an older download?
Some in the the APM community are anxiously awaiting a resolution.  I am a wiki editor for that group and am trying to write up a clear set of complete instructions for using Visual Micro with the APM.  It is great to be able to edit and build the APM in the VS VM IDE but a major reason to use Visual Micro is the debug feature.
Can we get this working with APM 3.x so you may get a few more debugger orders?
Oh,  I also posted in the Other hardware / APM3.0 Discussion post, then read the posting instructions - which said to create a new post. So, this is that. Sorry for the duplication

Dennis
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #1 - Apr 12th, 2014 at 4:41pm
Print Post  
Hi Dennis,

Thanks for your post. The apm project kept changing and I ran out of time to keep up with where and what to download for which version of which apm board Smiley

The byte error can be rectified very easily it is the HardwareSerial error that requires some time to be invested. Can you please confirm that normal Arduino Serial.print() and Serial.println() work with the apm core you are using?

If Serial,Serial1,etc. are not available then does softwareSerial work on a couple of digital pins. If SoftwareSerial does not work or takes too much memory then can you supply an alternative Arduino print() object which is what Viual Micro uses for the debugger.

Finally how much free memory is available after you build the apm project?

The help of your community will make a big difference to finding a solution

Thanks

  
Back to top
WWW  
IP Logged
 
Dennis
Junior Member
**
Offline


Posts: 12
Joined: Jan 7th, 2013
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #2 - Apr 12th, 2014 at 4:47pm
Print Post  
Thanks for the reply.   
I did an APM search and found the answer after I posted - sorry. 

Re Serial.print("test");   Adding the line in the setup() does not build 
'Serial' was not declared in this scope
 
Re memory: ArduCopter will not build without removing some of the newer features (Camera, mount, etc.) but does build with features most folks will need.)

I will investigate your other requests and try to get back to you. My guess is that APM has replaced all of the serial stuff with their own clases. 

May be a week or so as I am about to travel.

Dennis
« Last Edit: Apr 12th, 2014 at 4:59pm by Dennis »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #3 - Apr 12th, 2014 at 4:52pm
Print Post  
No probs, what answer did you find? Thanks
  
Back to top
WWW  
IP Logged
 
Dennis
Junior Member
**
Offline


Posts: 12
Joined: Jan 7th, 2013
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #4 - Apr 12th, 2014 at 5:03pm
Print Post  
No "answers" just the posts about debugging APM 3.0 may not be possible (or reasonably done)  I updated my last post with some answers to your questions.
No, Serial.print() does not work.
Memory is OK if you remove some APM features.

Dennis
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #5 - Apr 14th, 2014 at 12:03pm
Print Post  
Hi Dennis,

I like your instructions on the apm dev site thanks.

1)
It might be worth pointing out that users need Visual Studio Pro (not the free express version). If your users do not have VS Pro then Atmel Studio is based on VS 2010 and Atmel is the company that makes the Arduino Cpu so the tool is good.

2)
Un-tick "Tools>Visual Micro>Automatic Debugging" and then F5 will upload saving need to press CTRL

Note

Thanks again, we can consider a printf system for the debugger in the future that will work with the special APM serial output, but data types might be difficult to handle. If there is a printf that can be forced to print ascii only then it's an easier job.
  
Back to top
WWW  
IP Logged
 
Dennis
Junior Member
**
Offline


Posts: 12
Joined: Jan 7th, 2013
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #6 - Apr 14th, 2014 at 4:16pm
Print Post  
Tim, Thanks for the info.

I included your tips in the Ardupilot web site here:

http://dev.ardupilot.com/wiki/building-ardupilot-apm-with-visual-studio-visual-m...

As to working on the debugger for the newer APM code releases, my guess is that there would not be enough people to make it worth your time. Most of the developers use other tools.

As to Atmel studio. I have it for some special boot loader functions but never considered using it for  APM. Would it use the same  APM / boards.txt file to add the APM boards?

If that will work, It would be great to add that as an option to my page - Build and Upload using Visual Studio or Atmel Studio.  
  
Back to top
 
IP Logged
 
Dennis
Junior Member
**
Offline


Posts: 12
Joined: Jan 7th, 2013
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #7 - Apr 14th, 2014 at 4:31pm
Print Post  
Oh My !   never mind my questions.
I opened up Atmel Studio and everything was there for Visual Micro and the APM boards.  It built and up loaded without changing anything.

And it is free.   I will let the APM editors know and include in my page.  Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #8 - Apr 14th, 2014 at 4:37pm
Print Post  
Great, thanks
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug APM 3.x build issue (byte/hardware serial)
Reply #9 - Apr 14th, 2014 at 4:39pm
Print Post  
ps: Good feature in VS and not in Atmel yet.

"Project>Show all arduino" files. This toggles all the libs into the ide, does not affect compile but sure makes exploring and working with libraries easier.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint