Compile problem with Pro Micro 5V, 16MHz

Hi,

I have a problem compiling a sketch for the Pro Micro ATmega32U4(5V, 16MHz)

I’m using the Arduino IDE and everything was fine a few days ago.

I switched the IDE to compile and load an Arduino Nano (old bootloader). (Might have added or updated a library.)

Then switched back to Sparkfun Pro Micro, forgot to check the processor and it was set to 3V, 8MHz. The sketch compiled and loaded fine. (But didn’t work, fair enough.)

Set the processor to 5V 16Mz and compiling gives these errors:

C:\Users\<name>\AppData\Local\Temp\ccCmqaFb.ltrans0.ltrans.o: In function `HID_::SendReport(unsigned char, void const*, int) [clone .constprop.1]':

C:\Programs\Arduino\hardware\arduino\avr\libraries\HID\src/HID.cpp:91: undefined reference to `USB_Send(unsigned char, void const*, int)'

I can repeatedly switch between the 3V and 5V processors, the 3V compiles alright but the 5V doesn’t.

I can see definition(s) of USB_Send in C:\RDL\Arduino\libraries\HID-Project\src\HID-Settings.h but that gives more puzzles:

  • there’s no HID-Project in the list of installed libraries.

  • there’s no equivalent .cpp file for that .h

  • how can I see the preprocessor output to see which way it went through the conditional compilation?

W10, Ard IDE 1.8.5

The includes in the sketch are:

#include <Keyboard.h>

#include <Mouse.h>

any help appreciated.

I tried it again today and it’s alright now! :smiley: I haven’t done anything. Might have restarted the IDE. Just ^r and it compiled cleanly.