Arduino-Lufa icon indicating copy to clipboard operation
Arduino-Lufa copied to clipboard

Error compiling for sparkfun pro micro

Open COZMIKDX opened this issue 4 years ago • 5 comments

I am on Ubuntu 18.04 and using Arduino 1.8.3 since the activate.py script seems to want this version. I am trying to compile the example program. I have run activate.py and it's output was all successes.

Here is the error message: Archiving built core (caching) in: /tmp/arduino_cache_770586/core/core_SparkFun_avr_promicro_cpu_16MHzatmega32U4_4ec126580105bbcfef3f91ee9bd9669d.a USBCore.cpp.o (symbol from plugin): In function RxLEDPulse': (.text+0x0): multiple definition of __vector_11' sketch/LUFA.c.o (symbol from plugin):(.text+0x0): first defined here USBCore.cpp.o (symbol from plugin): In function RxLEDPulse': (.text+0x0): multiple definition of __vector_10' sketch/LUFA.c.o (symbol from plugin):(.text+0x0): first defined here collect2: error: ld returned 1 exit status exit status 1 Error compiling for board SparkFun Pro Micro.

COZMIKDX avatar Jun 23 '20 05:06 COZMIKDX

This seems to be related to #14, except that person is using an Arduino Leonardo. I'm starting to suspect the activate.py script doesn't hide some file properly.

I tried this on my machine with 1.8.12 using the Sparkfun Board Manager URL https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json and selecting "Sparkfun Pro Micro" as the board, and it compiled succesfully.

Could you run deactivate.py and activate.py again and post the output of activate.py here?

iFreilicht avatar Jun 27 '20 13:06 iFreilicht

Ah, I just noticed the shebang is missing in deactivate.py so because you're on linux, rather run python3 deactivate.py

iFreilicht avatar Jun 27 '20 13:06 iFreilicht

activate.py output:

Compatible Arduino IDE version 1.8.3 detected!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/CDC.cpp'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/PluggableUSB.h'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBAPI.h'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBCore.cpp'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBCore.h'!
Successfully hid file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBDesc.h'!
Successfully hid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h'!
Successfully hid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/main.cpp'!

deactivate.py output:

Compatible Arduino IDE version 1.8.3 detected!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/CDC.cpp'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/PluggableUSB.h'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBAPI.h'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBCore.cpp'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBCore.h'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBDesc.h'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h'!
Successfully unhid section in file `/home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/main.cpp'!

COZMIKDX avatar Jul 04 '20 16:07 COZMIKDX

Short tip for formatting: You can wrap all the output like so:

``` output ```

This way, it will be displayed correctly.

But this is a very strange issue.

If deactivate.py is successful, that means USBCore.cpp was fully hidden, so __vector_10 and __vector_11 can't be defined there, but still your build output shows that it tries to create USBCore.cpp.o.

Could you run the activate.py script again and check what the file /home/cosmictacocat/Programs/arduino-1.8.3/hardware/arduino/avr/cores/arduino/USBCore.cpp contains? It should have these lines at the beginning:

//=====================================
//== This section is hidden by LUFA! ==
//=====================================
#if 0

If that is indeed the case, try to compile it again and see if you have the same error.

If you still get that error, run the Arduino IDE from the command line instead of from the launcher, and check whether the correct version of the Arduino IDE is running before compiling.

iFreilicht avatar Jul 04 '20 19:07 iFreilicht

I got the same error

USBCore.cpp.o (symbol from plugin): In function `RxLEDPulse':
(.text+0x0): multiple definition of `__vector_11'
sketch/LUFA.c.o (symbol from plugin):(.text+0x0): first defined here
USBCore.cpp.o (symbol from plugin): In function `RxLEDPulse':
(.text+0x0): multiple definition of `__vector_10'
sketch/LUFA.c.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board SparkFun Pro Micro.

RayPS avatar Aug 12 '21 14:08 RayPS