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) Error compiling for board Arduino Mega ADK (Read 8862 times)
TIMZ
Newbies
*
Offline


Posts: 5
Joined: Oct 11th, 2016
Error compiling for board Arduino Mega ADK
Oct 11th, 2016 at 10:08pm
Print Post  
Please forgive me if I seem ignorant, I’m knew to this.
I have a new makergear-M2 3D printer that I need to make some changes to.

I installed  Arduino IDE version 1.5.5, Visual Studio Community 2015 and VisualMicro.

I downloaded the latest “Base Model” firmware from http://makergear.wikidot.com/m2-firmware. I compiled and uploaded it to the printer using the Arduino IDE. I did this to confirm it was good and it worked.

I then browsed and opened the project from within Visual Studio. But when I tried to compile it I received a compile error and I don’t know why.

The error was as follows;

Compiling debug version of 'Marlin' for 'Arduino Mega ADK'
 
core.a(HardwareSerial.cpp.o)*: In function __vector_25
HardwareSerial.cpp:79: multiple definition of __vector_25
MarlinSerial.cpp.o*: U:\Equipment\MakerGear M2\Mother Board\Firmware\PlayGround\M2E-Production-SnNRd-V100\Marlin\MarlinSerial.cpp:54: first defined here
ld.exe: Disabling relaxation: it will not work with multiple definitions

Error compiling for board Arduino Mega ADK
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling for board Arduino Mega ADK
Reply #1 - Oct 11th, 2016 at 10:25pm
Print Post  
Hi,

If you switch the toolbar from Debug to Release it should work okay.

The error is because the 3d firmware removes the ability to use Arduino Serial which the debugger uses in its default configuration.
  
Back to top
IP Logged
 
TIMZ
Newbies
*
Offline


Posts: 5
Joined: Oct 11th, 2016
Re: Error compiling for board Arduino Mega ADK
Reply #2 - Oct 11th, 2016 at 10:30pm
Print Post  
So, I can't use Visual Studio to debug?  Embarrassed
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling for board Arduino Mega ADK
Reply #3 - Oct 11th, 2016 at 10:37pm
Print Post  
You can probably use the alternative SoftwareSerial option on any one or two digital pins.

More info here http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Por...

You will need an ftdi adapter or usb cable such as this one. Use the 3.3v version of the cable and it works okay also more useful with other boards.

One pin for trace only debug and two pins for full break/update vars.

Alternatively you can buy an AVR hardware debugger such as ATMEL ICE and then use Visual Micro in Atmel Studio to debug the Arduino.



« Last Edit: Oct 11th, 2016 at 10:39pm by Tim@Visual Micro »  
Back to top
IP Logged
 
TIMZ
Newbies
*
Offline


Posts: 5
Joined: Oct 11th, 2016
Re: Error compiling for board Arduino Mega ADK
Reply #4 - Oct 11th, 2016 at 10:58pm
Print Post  
Oh mysterious wise master, thank you for that advise!!!.  I'm so happy now  Cheesy. I will give it my best and let you know how it works out. 

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling for board Arduino Mega ADK
Reply #5 - Oct 11th, 2016 at 11:32pm
Print Post  
Great. Interested to hear how you get on.

The SoftwareSerial option is a standard arduino library that Visual Micro uses.

So you can try it out to make sure it works by using the SoftwareSerial library and a basic example to send serial using it.

You can use loop back to the arduino to test by connecting the Rx\Tx pins you assign to softwareSerial to the tx\Rx pins of a spare hardware Serial port on the mega such as Serial2.

The software serial reference is here 
https://www.arduino.cc/en/Reference/SoftwareSerial

Then you should be able to read and write between the two ports using normal Serial to the pc for visible status messages

In essence the arduino just sends and receives data from itself but proves that your 3DPrinter isn't hogging too much.

......

Note

If you do use the debugger then make sure you switch the ThrottleEnabled in the Project Properties to False so that the Arduino runs at full speed. That's important for time critical applications and means you should put debug trace messages in fast running code otherwise it will produce more messages than your pc can handle

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling for board Arduino Mega ADK
Reply #6 - Oct 12th, 2016 at 12:27am
Print Post  
Dumb suggestion using a serial port seeing they aren't available. If they we're you could use them instead but will have to use two sets of pins instead
  
Back to top
IP Logged
 
TIMZ
Newbies
*
Offline


Posts: 5
Joined: Oct 11th, 2016
Re: Error compiling for board Arduino Mega ADK
Reply #7 - Oct 12th, 2016 at 1:12pm
Print Post  
Thanks so much for your help. I can tell I'm in water over my head. Can you tell me which two sets of pins I should use on the RAMBo 1.3 Mother Board?

View Mother Board schematics

The site with that file link is;
https://ultimachine.com/products/rambo-1-3
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error compiling for board Arduino Mega ADK
Reply #8 - Oct 12th, 2016 at 1:28pm
Print Post  
Best to ask on the appropriate forum which pins can be used for softwareSerial
  
Back to top
IP Logged
 
TIMZ
Newbies
*
Offline


Posts: 5
Joined: Oct 11th, 2016
Re: Error compiling for board Arduino Mega ADK
Reply #9 - Oct 12th, 2016 at 2:06pm
Print Post  
OK, Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint