Closed Ogekuri closed 1 year ago
After a more deep analysis it seem caused by the "USBAPI.h" where the Serial is disabled by LUFA.
Do you think that I can try to re-enable the Serial object in the "USBAPI.h"?
There is any other workaround?
I've definitely fixed and tested on my Badusb USB (and Arduino Leonardo with SD card reader) replacing the arduino-LUFA files with the original ones from ardunio dir.
In detail I've recover the following 2 files into hardware\arduino\avr\cores\arduino-LUFA
:
hardware\arduino\avr\cores\arduino\Arduino.h
hardware\arduino\avr\cores\arduino\USBAPI.h
The fist one has the USBAPI.h include and the second one is API it'self.
The SD and the USB work's well togeder on my setup, but I don't kow it can work for other boards, so you can just close the issue.
Thanks.
Hi!, I'm trying to include SD or SdFat library on a LUFA project but I get build errors.
The project corretly build with "Arduino Leonardo" board, but fail with the "Arduino Leonardo (LUFA)" board:
In file included from C:\Program Files (x86)\Arduino\libraries\SD\src/SD.h:21:0, from C:\Users\frolando.DLC0YLZW2\Desktop\SD-1.2.4\examples\Files\Files.ino:3: C:\Program Files (x86)\Arduino\libraries\SD\src/utility/SdFatUtil.h: In function 'void SerialPrint_P(const char*)': C:\Program Files (x86)\Arduino\libraries\SD\src/utility/SdFatUtil.h:63:5: error: 'Serial' was not declared in this scope Serial.write(c); ^~~~~~
Here a project created for the tests:
I've attached both logs.
Do you have any suggestions?
Thanks!
build_log_Arduino-Leonardo.txt build_log_Arduino-Leonardo-(LUFA).txt