Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library: (Read 4017 times)
LK
Newbies
*
Offline



Posts: 3
Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Oct 5th, 2015 at 12:41am
 
I get this strange error that stumped me, any help would be greatly appreciated:

Build Core Paths: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega2561 -o "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561/Repetier2.
elf" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Repetier2.
cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Commands.c
pp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Communicat
ion.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Eeprom.cpp
.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Extruder.c
pp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\gcode.cpp.
o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\HAL.cpp.o"
"C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\HeaterMsg.
cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\HeaterSim.
cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\motion.cpp
.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Printer.cp
p.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\RemoteBed.
cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\SDCard.cpp
.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\SdFat.cpp.
o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\ui.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\SoftwareSe
rial\SoftwareSerial.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\SPI\SPI.cp
p.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\VM_DBG\VM_
mem_check.c.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\VM_DBG\VM_
DBG.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561/core.a" "-LC:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561" -lm
core.a(HardwareSerial0.cpp.o)*:In function `__vector_25'
core.a(HardwareSerial0.cpp.o)*:In function `__vector_25'
collect2.exe*:error: ld returned 1 exit status
Error creating .elf
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10630
United Kingdom
Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Reply #1 - Oct 5th, 2015 at 1:04am
 
Hi,

The debugger is a serial debugger. By default it uses the main serial port.

This usually means you are working with a custom board that has redefined the main serial port code.

As an alternative, you might find that the SoftwareSerial option works on 1 or two spare digital pins. Please see the "debugging with different ports and pins" documentation for more info.
Back to top
 
WWW  
IP Logged
 
LK
Newbies
*
Offline



Posts: 3
Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Reply #2 - Oct 5th, 2015 at 4:35am
 
Thanks for the quick response. And yes, I am using a custom board based on atmega2561. However, only RX1/TX1 are used for Hardware Serial which should leave RX/TX available.
I will play with remote port settings, any ideas you may have along these lines please toss them my way. I would love to be able to use a real debugger...
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10630
United Kingdom
Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Reply #3 - Oct 5th, 2015 at 3:15pm
 
Can you use this code in your sketch?

Serial.begin()
Serial.println()
Serial.read()

If so when you press F12 what class and code file does it take you to.

The debugging with different ports and pins might be your only option. If so then you will set SoftwareSerial in the RemoteTransport property and your chosen rx/tx pins in RemoteRX and RemoteTx. This will automatically attempt to use SoftwareSerial for debug when connected via FtDI or equiv.

You can see if SoftwareSerial works with your board by adding the SoftwareSerial library to your sketch and uploading in Release mode. The library usage is described here https://www.arduino.cc/en/Reference/SoftwareSerial
Back to top
 
WWW  
IP Logged
 
LK
Newbies
*
Offline



Posts: 3
Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Reply #4 - Oct 5th, 2015 at 3:32pm
 
I use both actually. SoftwareSerial is used for Repetier Host to communicate with my board. And HardwareSerial1 is used to communicate with yet another custom board. Used to be SPI but I wanted to simplify things. So if I understand this, I will need to setup another serial port for debugging, correct? Would an FTDI cable hooked up to some IO pins work? What do I need to do on the board, open a SoftwareSerial connection using those new IO pins?  Alternatively, is there a way for me to use a JTAGICE3 or MKII programmer for debugging?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10630
United Kingdom
Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Reply #5 - Oct 5th, 2015 at 3:49pm
 
Hi, You just need to set the properties I have mentioned below along with 1/2 io pins and an ftdi type connection as described below.

Did you read the documentation page I linked below?

If you have a hardware programmer and are obviously expert I suggest installing As7 and using the Arduino converter to create a cpp project. Then you can use hardware debug in atmel studio. You don't need Visual Micro or the Arduino Ide after that.
Back to top
« Last Edit: Oct 5th, 2015 at 3:51pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print