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
Normal Topic APM 3.0 (Simple Print statement) - Funny behaviour! (Read 9124 times)
Shyam B
Junior Member
**
Offline


Posts: 18
Location: Netherlands
Joined: Aug 3rd, 2012
APM 3.0 (Simple Print statement) - Funny behaviour!
Jul 26th, 2013 at 9:19am
Print Post  
Hi,

I downloaded Visual Micro and running APM v3.0 on Visual Studio. It compiles and runs all seems good. My settings are:

Visual Studio 2010 on Windows 7
Arducopter v3.0 (from github) for APM 2.5


--
Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
Binary sketch size: 234746 bytes (91% of a 258048 byte maximum) (35.75 secs)
Uploading to I/O board using 'COM13'
Done uploading

---
Problem:
----

I am not new to programming arduino's, however the problem is unique with this version.

Putting a simple print statement "Hey" in the loop() 
cliSerial->print("Hey, ");
 
Initialising APM... statement is from the setup() function. The following output shows that writing a simple print restrats the board everytime??

Running Serial Monitor: Brings up the following output:

Quote:
Hey, Hey, Hey,Hey,Hey,Hey?3!

?

Initialising APM...

Heyey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,,Hey,Hey, Hey, Hey, Hey      &Hey, Hey, Hey Hey

Initialising APM...


-----------
I am not sure the above is the problem with RAM, Visual Micro settings or APM code, all I know this did not happen with other versions (of APM) ! Any comments/ help is appreciated.

Thanks,
Shyam
« Last Edit: Jul 26th, 2013 at 9:23am by Shyam B »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM 3.0 (Simple Print statement) - Funny behaviour!
Reply #1 - Jul 26th, 2013 at 2:13pm
Print Post  
Hi Shyam,

I am concerned about the amount of memory usage. Is that right? Normally Arducopter only takes about 40-50%.

I suspect that something else in the program is taking all the memory and causing the mcu to crash. Interesting to see that there is some serial corruption, we don;t normally see that.

What baud rate are you using? What is the compiled program size when using the apm arduino ide?

  
Back to top
WWW  
IP Logged
 
Shyam B
Junior Member
**
Offline


Posts: 18
Location: Netherlands
Joined: Aug 3rd, 2012
Re: APM 3.0 (Simple Print statement) - Funny behaviour!
Reply #2 - Jul 26th, 2013 at 5:07pm
Print Post  
Hi,

From what I could see, here is the information you asked for:
--
Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
Binary sketch size: 234746 bytes (91% of a 258048 byte maximum) (35.75 secs)
Uploading to I/O board using 'COM13'
Done uploading
----
As I understand ATMega2560 processor to be 256KB of code size, hex file is taking up 91% of it. At runtime, hoever, I also used program memory Printf_P(...) command but the same story applied. I am quite sure it may not be the mcu crash as there are a million lines of code in Arducopter and mine was only one line  Embarrassed

I am using standard baud rate of 115200 bps. 

Request: : Is it possible for you to try that on Arducopter 3.0 release from github. Just a printf command in loop() should do for now..
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM 3.0 (Simple Print statement) - Funny behaviour!
Reply #3 - Jul 26th, 2013 at 5:13pm
Print Post  
Hi Shyam,

Sorry I was not clear. We need to see the memory size when compiled using the recommended Arducopter Ide not in Visual Studio

Thanks
  
Back to top
WWW  
IP Logged
 
Shyam B
Junior Member
**
Offline


Posts: 18
Location: Netherlands
Joined: Aug 3rd, 2012
Re: APM 3.0 (Simple Print statement) - Funny behaviour!
Reply #4 - Jul 26th, 2013 at 5:27pm
Print Post  
Hi,

I followed the steps in VM website for the setup for Arducopter HAL version. It compiled and uploaded.

How are we supposed to use the Arducopter IDE with VMware. Do you mean to say to download the modified version of Arduino (arducopter) and give its reference in Visual Studio->Option->Path?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM 3.0 (Simple Print statement) - Funny behaviour!
Reply #5 - Jul 26th, 2013 at 5:29pm
Print Post  
I mean download the modified ide and use it to compile. Do not use VM for this test.

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