crazyflie-firmware

Firmware/software/electronics/mechanics
Post Reply
x893
Beginner
Posts: 2
Joined: Wed Feb 06, 2013 11:10 pm

crazyflie-firmware

Post by x893 »

Hi,
i compile crazyflie-firmware under Keil (ARMCC) with O1 optimization and see:

Code: Select all

Program Size: Code=39060 RO-data=1540 RW-data=968 ZI-data=16736
[/b]
if i compile under arm-none-eabi-gcc.exe 4.6

Code: Select all

   text    data     bss     dec     hex filename
  77916     460   16344   94720   17200 cflie.elf
[/b]

What compiler you use to build firmware ?

Thanks
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: crazyflie-firmware

Post by marcus »

Hi,

We use GNU Tools for ARM Embedded Processors that can be fond here: https://launchpad.net/gcc-arm-embedded/+download
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: crazyflie-firmware

Post by arnaud »

As said Macus we are using arm-none-eabi-gcc 4.7 maintained by ARM.

For the code size it becomes a bit better with -Os (Setting DEBUG=0 in config.mk, good to use if no jtag debug is planned):

Code: Select all

   text	   data	    bss	    dec	    hex	filename
  47700	    400	  16336	  64436	   fbb4	cflie.elf
x893
Beginner
Posts: 2
Joined: Wed Feb 06, 2013 11:10 pm

Re: crazyflie-firmware

Post by x893 »

OK - i try with your recomendations

Thanks
Göran
Beginner
Posts: 3
Joined: Wed Feb 13, 2013 8:35 am

Re: crazyflie-firmware

Post by Göran »

I compiled the firmware under OSX using gcc-arm-none-eabi-4_7 (MacOSX version) from ARM.

Code: Select all

   text	   data	    bss	    dec	    hex	filename
  79596	    460	  16344	  96400	  17890	cflie.elf
I downloaded your code as an archive (rather than installing hg/Mercurial) so the version.c was messed up and i hand patched it to compile. No other problem with external library dependancies, very simple to compile!

Will you switch to the MARG/AHRS implementation for stabilisation including the magnetometer in the 10DOF version of HW? Seems pretty strait forward to drop in that code. Is the pressure sensor readings combined with the magnetometer?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: crazyflie-firmware

Post by tobias »

We have quickly been experimenting with a MARG filter but it requires the magnetometer to be calibrated since it is very offset by the motor magnet fields. Other then that it should be pretty straight forward as the Madgwick's and Mayhony's algorithms exist in MARG versions as well. However making a calibration routine is what takes time. Maybe we can make use of Fabio's work (FreeIMU).
Göran
Beginner
Posts: 3
Joined: Wed Feb 13, 2013 8:35 am

Re: crazyflie-firmware

Post by Göran »

tobias wrote:We have quickly been experimenting with a MARG filter but it requires the magnetometer to be calibrated since it is very offset by the motor magnet fields. Other then that it should be pretty straight forward as the Madgwick's and Mayhony's algorithms exist in MARG versions as well. However making a calibration routine is what takes time. Maybe we can make use of Fabio's work (FreeIMU).
R.I.P Fabio.

Im new to embedded stuff and I2c bus, how can you programmatically know if the magnetometer is onboard or not? From the schematics is looks like its connected on the MCU6050 aux port, so the readings will be delivered together with the Acc and Gyro readings?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: crazyflie-firmware

Post by tobias »

The MPU6050 can put the i2c aux in passthrough so that it looks like they are on the same bus.
eman
Beginner
Posts: 2
Joined: Fri Nov 22, 2013 2:41 am

Re: crazyflie-firmware

Post by eman »

Could you post your Crazyflie firmware code in Keil ARM for me?
Thank you.
DerShu
Beginner
Posts: 23
Joined: Thu Nov 14, 2013 3:01 pm
Location: Bavaria - Germany

Re: crazyflie-firmware

Post by DerShu »

eman wrote:Could you post your Crazyflie firmware code in Keil ARM for me?
Thank you.
I would really like to get a Keil Crazyflie project file that works with the project structure used by the Crazyflie code too!
I have been trying to get a good compile working with Keil. :oops:
Post Reply