BastilleResearch / mousejack

MouseJack device discovery and research tools
GNU General Public License v3.0
1.28k stars 254 forks source link

Error 1 when compiling #33

Open g3td0wn opened 6 years ago

g3td0wn commented 6 years ago

Getting this output: sdcc --model-large --std-c99 -c src/main.c -o bin/main.rel sdcc --model-large --std-c99 -c src/usb.c -o bin/usb.rel sdcc --model-large --std-c99 -c src/usb_desc.c -o bin/usb_desc.rel sdcc --model-large --std-c99 -c src/radio.c -o bin/radio.rel sdcc --xram-loc 0x8000 --xram-size 2048 --model-large bin/main.rel bin/usb.rel bin/usb_desc.rel bin/radio.rel -o bin/dongle.ihx make: *** [Makefile:15: dongle.bin] Error 1 What the problem could be?

darkgrue commented 5 years ago

About 9 months late to the party, but I ran into this exact problem, without a solution.

It looks like a bug in the Makefile maybe? Not really sure, I didn't try to debug it.

But you can compile it by hand without the Makefile, and it appears to go OK. Doing the below allowed me to compile and install the firmware successfully, or it appears to be successful:

git clone --depth=1 https://github.com/BastilleResearch/mousejack
cd mousejack/
git submodule init
git submodule update
cd nrf-research-firmware

# DON'T use Makefile to completion, it's broken.
make
# Makefile terminates with Error 1.
# Print the recipe that would be executed, but do not execute it:
make -n
# start with the failed command in the recipe, turn on verbose output:
sdcc --verbose --model-large --std-c99 -c src/radio.c -o bin/radio.rel
# Call assembler by hand:
sdas8051 -plosgffw bin/radio.rel bin/radio.asm
# Complete recipe with verbose turned on:
sdcc --verbose --xram-loc 0x8000 --xram-size 2048 --model-large bin/main.rel bin/usb.rel bin/usb_desc.rel bin/radio.rel -o bin/dongle.ihx
objcopy --verbose -I ihex bin/dongle.ihx -O binary bin/dongle.bin
objcopy --verbose --pad-to 26622 --gap-fill 255 -I ihex bin/dongle.ihx -O binary bin/dongle.formatted.bin
objcopy --verbose -I binary bin/dongle.formatted.bin -O ihex bin/dongle.formatted.ihx

# Install firmware on nRF24LU1+ over USB:
make install
# Install firmware on Logitech Unifying (model C-U0007):
make logitech_install