Hi thessy,
In late July 2015 the crazyflie-firmware on the master branch was
merged to contain both firmware for Crazyflie 1 and Crazyflie 2. Now, by default, "make CLOAD" will build firmware for Crazyflie 2. You can verify this by running the "make CLOAD" target and looking at the output in the console. It will look like this:
Code: Select all
Crazyloader build!
text data bss dec hex filename
85844 1248 29856 116948 1c8d4 cf2.elf
The "
cf2.elf" in the "filename" column is the elf file for Crazyflie 2.
I think the confusion is that there is a new firmware repository for the Crazyflie 2's NRF chip. That's the one called crazyflie2-nrf-firmware. This is different than the STM32 firmware (which is the micro-controller unit of the Crazyflie).
If you run the "
make CLOAD" target it will build the STM32 firmware (for CF2 by default) but it
won't flash it for you. The "
make CLOAD" target is equivalent to running "make all DEBUG=0 CLOAD=1" on the command line. If you want to
flash the firmware you build with Eclipse, you need to run the "
Flash using radio" target which is equivalent to running "make cload" on the command line. The Crazyradio bootloader will happily flash a Crazyflie 2 binary to your Crazyflie 1 but the end result will be that the Crazyflie will restart, nothing will happen, and the blue light will remain lit. It can't run the CF2 firmware.
To fix this and build for Crazyflie 1, you simply tell the "
make CLOAD" target that you want Crazyflie 1 firmware by setting
PLATFORM=CF1 variable before running make. This is equivalent to running "make all DEBUG=0 CLOAD=1 PLATFORM=CF1" on the command line. If you already built the Crazyflie 2 firmware though,
you need to run the "clean" target to get rid of the CF2 objects or you'll get an error.
Now, if you are going to
flash using the Crazyradio in Eclipse (i.e. "
Flash using radio" target), you have to add the "
PLATFORM=CF1" to that target as well or it will look for the cf2.bin file, which will not exist since you just built cf1.bin.
So, the net takeaway here is, if you are building and flashing for Crazyflie 1 using the VM 0.6 and Eclipse,
you need to edit both the "make CLOAD" target and "Flash using radio" targets by adding "PLATFORM=CF1". Alternatively, you could just create copies of both those targets, edit the copies, and rename them to something indicative of being for Crazyflie 1.
I hope my longwinded explanations helps more than hinders!