abcminiuser / lufa

LUFA - the Lightweight USB Framework for AVRs.
http://www.lufa-lib.org
1.03k stars 321 forks source link

fix build failure with teensy-ee targets #166

Closed khimaros closed 4 years ago

khimaros commented 4 years ago

Fixes https://github.com/abcminiuser/lufa/issues/164

Without patch:

$ cd Demos/Device/LowLevel/BulkVendor/
$ make clean
$ make MCU=at90usb1286 teensy-ee
<...>
 [OBJCPY]  : Extracting HEX file data from "BulkVendor.elf"
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature BulkVendor.elf BulkVendor.hex
 [OBJCPY]  : Converting "BulkVendor.hex" to a binary file "InputEEData.bin"
avr-objcopy -I ihex -O binary BulkVendor.hex ../../../../LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/InputEEData.bin
 [MAKE]    : Making EEPROM loader application for "BulkVendor.hex"
make -s -C ../../../../LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/ MCU=at90usb1286 clean teensy
 [RM]      : Removing object files of "HID_EEPROM_Loader"
 [RM]      : Removing dependency files of "HID_EEPROM_Loader"
 [RM]      : Removing output files of "HID_EEPROM_Loader"
make[1]: *** No rule to make target 'obj/InputEEData.o', needed by 'HID_EEPROM_Loader.elf'.  Stop.
make: *** [../../../../LUFA/Build/DMBS/DMBS/hid.mk:55: teensy-ee] Error 2

With patch:

$ cd Demos/Device/LowLevel/BulkVendor/
$ make clean
$ make MCU=at90usb1286 teensy-ee
 [OBJCPY]  : Converting "BulkVendor.hex" to a binary file "InputEEData.bin"
avr-objcopy -I ihex -O binary BulkVendor.hex ../../../../LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/InputEEData.bin
 [MAKE]    : Making EEPROM loader application for "BulkVendor.hex"
make -s -C ../../../../LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/ MCU=at90usb1286 clean teensy
 [RM]      : Removing object files of "HID_EEPROM_Loader"
 [RM]      : Removing dependency files of "HID_EEPROM_Loader"
 [RM]      : Removing output files of "HID_EEPROM_Loader"
 [GCC]     : Compiling C file "HID_EEPROM_Loader.c"
 [OBJCPY]  : Converting "obj/HID_EEPROM_Loader.o" to a object file "obj/InputEEData.o"
 [LNK]     : Linking object files into "HID_EEPROM_Loader.elf"
 [OBJCPY]  : Extracting HEX file data from "HID_EEPROM_Loader.elf"
 [HID]     : Programming FLASH with teensy_loader_cli using "HID_EEPROM_Loader.hex"
Teensy Loader, Command Line, Version 2.1
Read "HID_EEPROM_Loader.hex": 3338 bytes, 2.6% usage
khimaros commented 4 years ago

The CI failure seems to be unrelated and identical to https://cloud.drone.io/abcminiuser/lufa/29/2/3

abcminiuser commented 4 years ago

Thanks for looking at this. It's actually an issue in the upstream DMBS project, which I import into LUFA here. It's also trying to embed the application binary rather than the EEPROM data for the Teensy target, which is doubly embarrassing.

I've fixed both in https://github.com/abcminiuser/dmbs/commit/3f76496f8d12c3e7d52e15b8d958d8fd0faf68a8 and imported it here in https://github.com/abcminiuser/lufa/commit/305ca461acf37a5a2237afe7d2ce552ce25075a5 .

The CI build failure was a dumb mistake, corrected in https://github.com/abcminiuser/lufa/commit/ca40bc7a6cca203678f122c95c0ab7a775f8497a .

Please-reopen if it's still failing for you, but I see it generating and attempting to program the EEPROM loader application when testing the updated code locally.