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 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) problems making debug work with ArduPilot (APM:Plane) (Read 28064 times)
Clayton
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2012
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #20 - Sep 15th, 2013 at 12:48am
Print Post  
I believe this example will do the trick:
~/ardupilot/libraries/AP_HAL/examples/AnalogIn

and here's the class definition of BetterStream
Code
Select All
class AP_HAL::BetterStream : public AP_HAL::Stream {
public:
    BetterStream(void) {}

    virtual void print_P(const prog_char_t *) = 0;
    virtual void println_P(const prog_char_t *) = 0;
    virtual void printf(const char *, ...)
                        __attribute__ ((format(__printf__, 2, 3))) = 0;
    /* No format checking on printf_P: can't currently support that on AVR */
    virtual void _printf_P(const prog_char *, ...) = 0;

#define printf_P(fmt, ...) _printf_P((const prog_char *)fmt, ## __VA_ARGS__)
   
    virtual void vprintf(const char *, va_list) = 0;
    virtual void vprintf_P(const prog_char *, va_list) = 0;
};

#endif // __AP_HAL_UTILITY_BETTERSTREAM_H__
 

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #21 - Sep 15th, 2013 at 2:02am
Print Post  
Thanks, I've been looking at it. There is a fair bit to do. I'm not sure how feasible it will be in terms of my available free time.

If the print() and println() statements can be made to work with pretty much what we have already then the job will be smaller.

There are other things to do because I notice that even functions such as millis() has been redefined. There is some pretty cool stuff going on but it makes it far from standard Arduino hence the work. End result would be good form vm thought!
  
Back to top
IP Logged
 
Clayton
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2012
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #22 - Sep 15th, 2013 at 6:35am
Print Post  
I definitely understand - maybe after a bit of time you'll get some bits working here and there.  Until then, I think I'm headed back to sublime text.  Cheers!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #23 - Sep 15th, 2013 at 6:07pm
Print Post  
Ok thanks.

By the way did you click the project node then click "Project>Show all arduino files". This seems to work really well with the ArduPilot project. Allows you to navigate all the libraries really easily.

I also noticed the compile is very fast after the first compile which is great for such a large project.

Intellisense and jumping through the code with F12 worked very nicely. Visual Studio really felt great with this complexity and size of Arduino project.

I just pointed my sketchfolder to the apm install folder where I had unzipped the apm "hardware" defs and it just worked!!

Cheesy
  
Back to top
IP Logged
 
lppier
Newbies
*
Offline


Posts: 1
Joined: Jan 4th, 2014
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #24 - Jan 4th, 2014 at 12:39pm
Print Post  
Hi, 

Just want to add that I'm really excited abt being able to debug Ardupilot using Visual Micro... hope that Tim works on it! Wink 
Visual Micro is great, and the price is right, will be getting it for sure.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems making debug work with ArduPilot (APM:Plane)
Reply #25 - Jan 4th, 2014 at 5:27pm
Print Post  
Hi thanks for the note(s)

Please email the compiler errors to info [at] visualmicro.com so I can remind myself of the problem.

Thanks

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint