Crazyflie Firmware Programming Tools

Firmware/software/electronics/mechanics
Post Reply
warbi99
Beginner
Posts: 3
Joined: Tue Jul 01, 2014 5:52 am

Crazyflie Firmware Programming Tools

Post by warbi99 »

Hi everyone, i'm noob in Crazyflie...

I want to check source code about overall control structure which is basically implemented in Crazyfile.
Thanks to helps of this forum and Wiki, i've installed Bitcraze VM 0.5.

but i don't know what is source code among many of files in Bitcraze VM, and What programming tools in VM should i use to modify that source code and compile into bin file. Is Eclipse the programming software i should use to program Firmware in VM?

I just have experience about AVR programming... So, It would be really helpful if you tell me details of programming method. Of course i looked through Wiki Bitcrazy VM page, but i don't have any idea what should i do...

Thanks guys.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie Firmware Programming Tools

Post by tobias »

Yes, we really need a guide for this... I'll try to give a very quick introduction.

The easiest is to launch eclipse which isn't that different then AVR studio. In the lower left you will see the build targets, they "should" be pretty self explanatory.
- Start by building the firmware with "Make radio-bootloader build" which builds the firmware.
- To flash the the build firmware run the make target "Flash via Radio".
- The Crazyradio need to be plugged in and forwarded to the VM.
- Now turn on the Crazyflie and it will flash it.

That's about it. Now you can start playing with the code. You can't brick the bootloader with bad firmware so don't worry about that. You can allays re-flash it.
warbi99
Beginner
Posts: 3
Joined: Tue Jul 01, 2014 5:52 am

Re: Crazyflie Firmware Programming Tools

Post by warbi99 »

tobias wrote:Yes, we really need a guide for this... I'll try to give a very quick introduction.

The easiest is to launch eclipse which isn't that different then AVR studio. In the lower left you will see the build targets, they "should" be pretty self explanatory.
- Start by building the firmware with "Make radio-bootloader build" which builds the firmware.
- To flash the the build firmware run the make target "Flash via Radio".
- The Crazyradio need to be plugged in and forwarded to the VM.
- Now turn on the Crazyflie and it will flash it.

That's about it. Now you can start playing with the code. You can't brick the bootloader with bad firmware so don't worry about that. You can allays re-flash it.
tobias, I Really thanks for your reply. ^^

Could you answer to one more question?
on the Package Explorer of Eclipse, i see various directories and files. Then where is the highest level source code?
(I think there must be so called "main" function somewhere, but i can't find it)

Thank you!!!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie Firmware Programming Tools

Post by tobias »

The "main.c" is in the "init" folder. That doesn't do much though and you would like to look in "system.c" instead. You can quickly open resources by pressing "ctrl - shift - r".
Post Reply