[SOLVED] Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post here to get support
Post Reply
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

[SOLVED] Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by phillipz »

Hi guys,

I have cloned the Crazyflie firmware repository (https://github.com/bitcraze/crazyflie-firmware.git) using:

Code: Select all

git clone --recursive https://github.com/bitcraze/crazyflie-firmware.git
and also compiled within the directory for my Crazyflie 2 quadcopter using:

Code: Select all

sudo make PLATFORM=CF2
However, I am finding that the FW build status is "MODIFIED" instead of "CLEAN" - which is what I am expecting. I have not altered any of the code and have been following the instructions located in the readme. I was wondering if anyone could tell me what might be causing this? Here is the output I am seeing:

Code: Select all

  CLEAN_VERSION
  CC    list.o
  CC    tasks.o
  CC    queue.o
  CC    timers.o
  CC    heap_4.o
  CC    port.o
  CC    stm32f4xx_adc.o
  CC    stm32f4xx_dbgmcu.o
  CC    stm32f4xx_dma.o
  CC    stm32f4xx_exti.o
  CC    stm32f4xx_flash.o
  CC    stm32f4xx_gpio.o
  CC    stm32f4xx_i2c.o
  CC    stm32f4xx_iwdg.o
  CC    stm32f4xx_rcc.o
  CC    stm32f4xx_spi.o
  CC    stm32f4xx_tim.o
  CC    stm32f4xx_usart.o
  CC    stm32f4xx_misc.o
  CC    stm32f4xx_syscfg.o
  CC    main.o
  CC    exti.o
  CC    nvic.o
  CC    motors.o
  CC    crtp.o
  CC    ledseq.o
  CC    freeRTOSdebug.o
  CC    buzzer.o
  CC    system.o
  CC    comm.o
  CC    console.o
  CC    pid.o
  CC    crtpservice.o
  CC    param.o
  CC    mem.o
  CC    log.o
  CC    worker.o
  CC    trigger.o
  CC    sitaw.o
  CC    queuemonitor.o
  CC    commander.o
  CC    attitude_pid_controller.o
  CC    sensfusion6.o
  CC    stabilizer.o
  CC    position_estimator_altitude.o
  CC    position_controller_pid.o
  CC    estimator_complementary.o
  CC    controller_pid.o
  CC    sensors_stock.o
  CC    power_distribution_stock.o
  CC    filter.o
  CC    cpuid.o
  CC    cfassert.o
  CC    eprintf.o
  CC    crc.o
  CC    num.o
  CC    debug.o
  VTMPL version.c
  CC    version.o
  CC    FreeRTOS-openocd.o
  AS    startup_stm32f40xx.o
  CC    system_stm32f4xx.o
  CC    cpal_hal.o
  CC    cpal_i2c.o
  CC    cpal_usercallback_template.o
  CC    cpal_i2c_hal_stm32f4xx.o
  CC    usb_core.o
  CC    usb_dcd_int.o
  CC    usb_dcd.o
  CC    usbd_ioreq.o
  CC    usbd_req.o
  CC    usbd_core.o
  CC    platform_cf2.o
  CC    led_f405.o
  CC    mpu6500.o
  CC    i2cdev_f405.o
  CC    ws2812_cf2.o
  CC    lps25h.o
  CC    ak8963.o
  CC    eeprom.o
  CC    maxsonar.o
  CC    piezo.o
  CC    uart_syslink.o
  CC    swd.o
  CC    uart1.o
  CC    uart2.o
  CC    watchdog.o
  CC    cppm.o
  CC    usb_bsp.o
  CC    usblink.o
  CC    usbd_desc.o
  CC    usb.o
  CC    imu_cf2.o
  CC    pm_f405.o
  CC    syslink.o
  CC    radiolink.o
  CC    ow_syslink.o
  CC    proximity.o
  CC    usec_time.o
  CC    libdw1000.o
  CC    libdw1000Spi.o
  CC    platformservice.o
  CC    sound_cf2.o
  CC    extrx.o
  CC    deck.o
  CC    deck_info.o
  CC    deck_drivers.o
  CC    deck_test.o
  CC    deck_constants.o
  CC    deck_digital.o
  CC    deck_analog.o
  CC    deck_spi.o
  CC    bigquad.o
  CC    ledring12.o
  CC    buzzdeck.o
  CC    gtgps.o
  CC    dwm1000.o
  CC    cppmdeck.o
  CC    exptest.o
  CC    configblockeeprom.o
  LD    cf2.elf
  COPY  cf2.hex
  COPY  cf2.bin
  DFUse cf2.dfu
Crazyflie 2.0 build!
Build 102:21b7c665db6e (2016.02-102) MODIFIED
Version extracted from git
Crazyloader build!
   text	   data	    bss	    dec	    hex	filename
  99784	   1664	  35948	 137396	  218b4	cf2.elf
rm version.c
I am running Ubuntu 14.04 and I have installed the ARM toolchain using:

Code: Select all

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install libnewlib-arm-none-eabi
If anyone has any ideas why the FW build is not "CLEAN" please let me know. Although I have flashed the FW to the quadcopter and it is working, I am still finding that my quadcopter can be relatively unstable and I am wondering whether this is the cause.

Thanks for any help in advance!
Last edited by phillipz on Tue Jun 21, 2016 8:36 pm, edited 1 time in total.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by chad »

Just check what file is modified by running:

Code: Select all

git status
from within the 'crazyflie-firmware' directory.

Then you can "revert" that file by running:

Code: Select all

git checkout -- filename
...where filename is the path and name of the file that's been modified according to git status.

After that, run:

Code: Select all

make clean
...well, since you first ran 'make' under sudo, you'll likely need: 'sudo make clean'.

Then run make again:

Code: Select all

make
Also, there's no reason that you need to run 'make' under sudo and, if you're building for the Crazyflie 2, you don't need the 'PLATFORM' argument to 'make' since it builds CF2 by default.

Let us know what you find!
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.
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Re: Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by phillipz »

Hi,

Thanks for the response. I tried following your advice and was able to see the file that had been modified was /vendor/cmock. I tried to discard the changes that were made however after checking the status of the repository again, the file still appears to have been modified:

Code: Select all

phillip@saturn:~/Downloads/crazyflie-firmware$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

	modified:   vendor/cmock (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
phillip@saturn:~/Downloads/crazyflie-firmware$ git checkout -- vendor/cmock/
phillip@saturn:~/Downloads/crazyflie-firmware$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

	modified:   vendor/cmock (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
phillip@saturn:~/Downloads/crazyflie-firmware$ 
If I re-clone the repository and check the status, the same file appears to have been modified. I'm slightly confused, any thoughts?
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by chad »

I have the same experience if I use:

Code: Select all

git clone --recursive https://github.com/bitcraze/crazyflie-firmware.git
On the other hand:

Code: Select all

git clone https://github.com/bitcraze/crazyflie-firmware.git
cd crazyflie-firmware/
git submodule update --init
...doesn't result in vendor/cmock being modified. It also knocks ~40MB off the repository size.

In the recursively cloned repository,

Code: Select all

git diff vendor/cmock
displays this:

Code: Select all

diff --git a/vendor/cmock b/vendor/cmock
--- a/vendor/cmock
+++ b/vendor/cmock
@@ -1 +1 @@
-Subproject commit a20b14a575de37f6d604523591776dd35f1ae4a2
+Subproject commit a20b14a575de37f6d604523591776dd35f1ae4a2-dirty
A condition which, I think, is explained here.

You can fix your repository by doing:

Code: Select all

cd crazyflie-firmware
rm -Rf vendor/cmock
git submodule update --init
Or, if you have no changes, trash your repository and clone fresh using:

Code: Select all

git clone https://github.com/bitcraze/crazyflie-firmware.git
cd crazyflie-firmware/
git submodule update --init
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.
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Re: Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by phillipz »

Hi Chad,

Thank you, that seems to have fixed my issue! Apologies if it was a silly question I'm not very experienced with GIT :)
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: [SOLVED] Crazyflie 2 Firmware Build Not "CLEAN" As Expected

Post by chad »

Awesome! Happy to hear it worked for you. No apologies necessary. Trial and error is the best way to learn. I had no idea what the problem was so I had to experiment myself.

Have fun!!
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