Page 1 of 1

Having problems with crazyradio-firmware Makefile on OSX

Posted: Fri Sep 25, 2015 1:20 am
by quadboi
Hey all, I have installed SDCC and the necessary libraries (I hope so!), and I am getting problems compiling the firmware.
After updating the firmware via bootloader, I went into the firmware folder and typed in terminal "make CRPA=1". This is the error I'm getting:

Code: Select all

src/main.c:83: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
src/main.c:91: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
src/main.c:84: warning 126: unreachable code
/Developer/sdcc/bin/sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/radio.c -o bin/radio.rel
/Developer/sdcc/bin/sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/usb.c -o bin/usb.rel
/Developer/sdcc/bin/sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/usbDescriptor.c -o bin/usbDescriptor.rel
/Developer/sdcc/bin/sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/led.c -o bin/led.rel
/Developer/sdcc/bin/sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/utils.c -o bin/utils.rel
/Developer/sdcc/bin/sdcc --xram-loc 0x8000 --xram-size 2048 --model-large bin/main.rel bin/radio.rel bin/usb.rel bin/usbDescriptor.rel bin/led.rel bin/utils.rel -o bin/cradio.ihx
objcopy -I ihex bin/cradio.ihx -O binary bin/cradio.bin
make: objcopy: No such file or directory
make: *** [cradio.bin] Error 1
It looks like someone on the Git is having the same problems, but I don't see any solutions. Any help would be appreciated thanks.

Re: Having problems with crazyradio-firmware Makefile on OSX

Posted: Fri Dec 25, 2015 7:00 am
by chad
I ran into the same issue with the MacPorts install of binutils. To get around it I downloaded binutils-2.25 src from GNU Binutils and compiled it myself. Then I made the call to
objcopy manually and substituted my own objcopy build path. So in my case it was:

Code: Select all

/Users/chad/Downloads/binutils-2.25/binutils/objcopy -I ihex bin/cradio.ihx -O binary bin/cradio.bin
Then I ran

Code: Select all

make CRPA=1
again and it resulted in "Crazyradio PA build".
After that, I flashed the Crazyradio using the instructions on the wiki. Since I have python3 installed I had to use python2 (and have py27-pyusb installed) for the flash and had to adjust the paths a bit. So, inside the crazyradio-firmware directory I ran:

Code: Select all

python2 usbtools/launchBootloader.py
which put it into bootloader mode, then:

Code: Select all

python2 usbtools/nrfbootload.py flash /Users/chad/Documents/Projects/crazyflie/crazyradio-firmware/firmware/bin/cradio.bin
which was the full path to my Crazyradio firmware build.

Worked out OK! Hope this helps you as well.

Oh, BTW.. Moved this to the sub-forum "Crazyradio->Developer Discussions" since it is more apropos!

Re: Having problems with crazyradio-firmware Makefile on OSX

Posted: Tue Jan 19, 2016 7:10 am
by adjavaherian
defs, missing objcopy. I thought the docs had been updated to reflect that?