build new firmware

Post here to get support
Post Reply
jsmartins
Beginner
Posts: 9
Joined: Tue Dec 16, 2014 3:36 am

build new firmware

Post by jsmartins »

Hi,
I'm trying to change the control code of the quadricopter using C programming. After finish the changes in the firmware files how can i build a new firmware file (.bin) to download to the quadcopter? Or maybe other easiest way to do it. Sorry my lack of knowledge, I just started to work with programming.
There is some tutoria explaining step-by-step how to do these things?
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: build new firmware

Post by chad »

You have to compile it with an ARM toolchain. Getting the toolchain installed varies depending on the system you're building the Crazyflie firmware on... Are you on Linux, Mac, or Windows. Also, are you compiling for Crazyflie 1.0 or Crazyflie 2.0?
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.
jsmartins
Beginner
Posts: 9
Joined: Tue Dec 16, 2014 3:36 am

Re: build new firmware

Post by jsmartins »

I', compiling for an Crazyflie 1.0. For while I'm using the VM 0.5 (Linux) but I'm installing a real machine using Linux, and this one will be dedicated to work with the quadcopter.
Thanks.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: build new firmware

Post by chad »

You will need to download the Linux tarball for gcc-arm-none-eabi toolchain. Specifically gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2. Expand the tarball and add the absolute path of the folder 'gcc-arm-none-eabi-4_7-2013q1/bin' to your PATH environment variable. I recommend removing everything else except for the essentials (/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin) from your PATH variable and only adding the full path to gcc-arm-none-eabi-4_7-2013q1/bin in my blog post on how to build on Mac OS X. So just do

Code: Select all

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/PATH/TO/gcc-arm-none-eabi-4_7-2013q1/bin
where '/PATH/TO' is whatever folder you exploded the gcc-arm-none-eabi-4_7-2013q1 tarball into.

Then it should just be a matter of changing into the Crazyflie firmware directory (which you cloned from GitHub) and running:

Code: Select all

make
I believe this should work on Linux the same as it does on Mac OS X...
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.
Post Reply