[SOLVED] Flashing Crazyflie Firmware

Post here to get support
Post Reply
ArthurA
Beginner
Posts: 14
Joined: Sat Dec 13, 2014 11:54 pm

[SOLVED] Flashing Crazyflie Firmware

Post by ArthurA »

Hey,
I got my CF 2 yesterday for christmas and I'm extremely pleased with it so far :D

I'm having a bit of a problem with flashing the latest firmware. I can build it fine, but when I try to flash it I get this:

Code: Select all

12:12:29 **** Build of configuration Default for project crazyflie-firmware ****
make cload 
../crazyflie-clients-python/bin/cfloader flash cflie.bin
Restart the CrazyFlie you want to bootload in the next  10 seconds ...
make: *** [cload] Error 255
Cannot connect the bootloader!

12:12:43 Build Finished (took 13s.730ms)
The strange thins is the

Code: Select all

../crazyflie-clients-python/bin/cfloader flash cflie.bin
line hangs for a few seconds, and then all of the rest appears with the error message...
I reset the CF while that line is running like here: https://www.youtube.com/watch?v=chWrNh73YBw, but it still doesn't work.

Anyone know why this could be?
Last edited by ArthurA on Thu Jan 15, 2015 9:12 am, edited 1 time in total.
ArthurA
Beginner
Posts: 14
Joined: Sat Dec 13, 2014 11:54 pm

Re: Flashing Crazyflie Firmware

Post by ArthurA »

Oh yes, and I'm running this in the VM rev 0.5 with all of the repos updated.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Flashing Crazyflie Firmware

Post by tobias »

We just released WM 0.6. I don't think it works in 0.5 without a lot of modifications.
ArthurA
Beginner
Posts: 14
Joined: Sat Dec 13, 2014 11:54 pm

Re: Flashing Crazyflie Firmware

Post by ArthurA »

tobias wrote:We just released WM 0.6. I don't think it works in 0.5 without a lot of modifications.
Oh I didn't know that. The reason that I haven't been using 0.6 is that I can't download it- when I click on any of the links (torrent or direct) I just get Welcome to nginx!. Is that an access problem???
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Flashing Crazyflie Firmware

Post by tobias »

Yep, definitely something wrong with the access rights. I'll send an email to Arnaud an hope he can fix it quickly.
chonchonchon
Beginner
Posts: 18
Joined: Sat Sep 20, 2014 1:47 am

Re: Flashing Crazyflie Firmware

Post by chonchonchon »

same for me : Welcome to nginx! :)
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Flashing Crazyflie Firmware

Post by marcus »

The new VM i now uploaded here. But looking at the printout in your initial post you are probably on the wrong crayflie-firmware branch, you should switch to the crazyflie2 branch if you want to build the firmware for the Crazyflie 2.0. There's a missing parameter for the cfloader script on the main branch for the Crazyflie 1.0, I've added an issue here for bootloading the CF1.
ArthurA
Beginner
Posts: 14
Joined: Sat Dec 13, 2014 11:54 pm

Re: Flashing Crazyflie Firmware

Post by ArthurA »

Just got my new crazyradio in the post (I broke my old one) and tried flashing the crazyflie with it using the vm 0.6, but it still doesn't work, even after updating the repos. Here are the errors:

Code: Select all

16:47:41 **** Build of configuration Default for project crazyflie2-stm-bootloader ****
make flash 
openocd -d2 -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cf2loader.elf" -c "verify_image cf2loader.elf" -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-05-10-23:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 2
Info : This adapter doesn't support configurable speed
Error: open failed
in procedure 'transport'
in procedure 'init'
Makefile:169: recipe for target 'flash' failed
make: *** [flash] Error 1

16:47:41 Build Finished (took 486ms)

Code: Select all

16:50:11 **** Build of configuration Default for project crazyflie2-nrf-firmware ****
make flash 
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -DNRF51  -I Include -I Include/gcc -Iinterface -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -DS110=1 -DBLE=1 -DBLE_STACK_SUPPORT_REQD -DNRF51  -Inrf51_sdk/nrf51822/Include/gcc  -Inrf51_sdk/nrf51822/Include/  -Inrf51_sdk/nrf51822/Include/ble/  -Inrf51_sdk/nrf51822/Include/ble/ble_services/  -Is110/s110_nrf51822_7.0.0_API/include -Inrf51_sdk/nrf51822/Include/app_common/  -Inrf51_sdk/nrf51822/Include/sd_common/    -c -o src/ble/ble.o src/ble/ble.c
src/ble/ble.c:19:27: fatal error: nordic_common.h: No such file or directory
 #include "nordic_common.h"
                           ^
<builtin>: recipe for target 'src/ble/ble.o' failed
compilation terminated.
make: *** [src/ble/ble.o] Error 1

16:50:12 Build Finished (took 797ms)
^^ I did click the all (no ble) option first if that makes a difference.

Any ideas?

Edit: I also can connect to the crazyflie via the client, so i have all of that configured.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Flashing Crazyflie Firmware

Post by chad »

You are trying to flash the STM32 firmware, right? And you're using the Crazyradio to flash (i.e. over-the-air)?

Inside the crazyflie-firmware directory, if I do:

Code: Select all

make clean; make
And then do:

Code: Select all

make cload
Then turn on the Crazyflie in bootloader mode (hold down power button for 3 seconds until blue light flashes) and wait a few seconds until it flashes. It seems to work ok for me. Does this work for you?

Here's some more info about OTA flashing on the wiki.
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.
ArthurA
Beginner
Posts: 14
Joined: Sat Dec 13, 2014 11:54 pm

Re: Flashing Crazyflie Firmware

Post by ArthurA »

Thanks Chad, I forgot I had to put the flie in bootloader mode *facepalm*.
Post Reply