Having problems with crazyradio-firmware Makefile on OSX

Firmware/software/electronics
Post Reply
quadboi
Beginner
Posts: 1
Joined: Fri Sep 25, 2015 1:15 am

Having problems with crazyradio-firmware Makefile on OSX

Post 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.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Having problems with crazyradio-firmware Makefile on OSX

Post 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!
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
adjavaherian
Beginner
Posts: 26
Joined: Fri May 22, 2015 4:18 am

Re: Having problems with crazyradio-firmware Makefile on OSX

Post by adjavaherian »

defs, missing objcopy. I thought the docs had been updated to reflect that?
Post Reply