Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Visual Studio 2017, 2019 >> Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
https://www.visualmicro.com/forums/YaBB.pl?num=1444002117

Message started by LK on Oct 5th, 2015 at 12:41am

Title: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by LK on 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.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\Communication.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.cpp.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.cpp.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\SoftwareSerial\SoftwareSerial.cpp.o" "C:\Users\Leon\AppData\Local\V.Micro\Arduino\Builds\Repetier2\3D_2561\SPI\SPI.cpp.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

Title: Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by Visual Micro on 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.

Title: Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by LK on 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...

Title: Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by Visual Micro on 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

Title: Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by LK on 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?

Title: Re: Unable to build Repetier in Debug mode, Release OK. The issue is with the arduino core library:
Post by Visual Micro on 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.

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.