Page 1 of 1

Flashing nRF51 firmware

Posted: Fri Sep 25, 2015 3:44 pm
by khalil
Hi,
I'm trying to flash nRF51 firmware with Crazy radio PA with Eclipse in VM6.
i got this msg when I click "flash" :
======================================================================================================================
17:19:36 **** Build of configuration Default for project crazyflie2-nrf-firmware ****
make flash
openocd -d2 -f interface/stlink-v2.cfg -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
-c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
-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:111: recipe for target 'flash' failed
make: *** [flash] Error 1

17:19:36 Build Finished (took 136ms)

==========================================================================================================

Can any one help me please!
Thanks

Re: Flashing nRF51 firmware

Posted: Tue Oct 13, 2015 9:40 am
by arnaud
Hi,

To flash with Crazyradio you need to use the bootloader. You can launch it with "make cload" and then set your Crazyflie in bootloader mode by pressing the on/off switch until the LED flashes.

Re: Flashing nRF51 firmware

Posted: Tue Oct 13, 2015 9:49 am
by khalil
Hi,
ok i'll try it.
thanks!

Re: Flashing nRF51 firmware

Posted: Tue Oct 13, 2015 10:53 am
by khalil
I think you are talking about how to flash STM32 but I need to flash the NRF not the STM32

Re: Flashing nRF51 firmware

Posted: Tue Oct 13, 2015 11:53 am
by arnaud
The NRF has the cload make target but unfortunately it is not configured by default in eclipse. You can add it by clicking the button add target with the name "cload BLE=0".

Otherwise go in the console and:

Code: Select all

bitcraze@bitcraze-vm:~$ cd projects/crazyflie2-nrf-firmware/
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make cload BLE=0
As a side note if you want to compile with bluetooth support you can launch from the console:

Code: Select all

bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ sudo apt-get install curl
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ tools/build/download_deps
You can then remote the BLE=0 from the make targets.

Re: Flashing nRF51 firmware

Posted: Tue Oct 13, 2015 1:03 pm
by khalil
it works !
thanks a lot :)