Firmware Update

Firmware/software/electronics/mechanics
ahuber1
Beginner
Posts: 15
Joined: Thu Jan 09, 2014 8:19 am

Re: Firmware Update

Post by ahuber1 »

Marry Christmas!

printenv looks like:

Code: Select all

TERM_PROGRAM=Apple_Terminal
M2=/opt/maven/bin
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/rm/yzfbkl4j7k19jxgzrxb27dbw0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.LC8ulV9Yni/Render
TERM_PROGRAM_VERSION=361.1
OLDPWD=/Users/ahuber/Documents/Projects/crazyflie/crazyflie-firmware-2015.08.1
TERM_SESSION_ID=1B4FB4E1-3C2C-4F7F-9330-9C5FF929F420
USER=ahuber
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.xYiKWDcKMr/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
PATH=/Users/ahuber/Downloads/GCC-ARM/gcc-arm-none-eabi-4_9-2014q4/bin:/Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/opt/maven/bin
PWD=/Users/ahuber/Documents/Projects/crazyflie
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home
LANG=de_DE.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
M2_HOME=/opt/maven
HOME=/Users/ahuber
SHLVL=1
LOGNAME=ahuber
DISPLAY=/private/tmp/com.apple.launchd.q6nLt6z8vo/org.macosforge.xquartz:0
SECURITYSESSIONID=186a7
PREV_PATH=/Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/opt/maven/bin
SVN_HOME=/Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin
_=/usr/bin/printenv
the command "arm-none-eabi-gcc -v" output:

Code: Select all

Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/Users/ahuber/Downloads/GCC-ARM/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/src/gcc/configure --target=arm-none-eabi --prefix=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native --libexecdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/lib --infodir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-mpfr=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-mpc=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-isl=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-cloog=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-libelf=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors) 
thessy
Beginner
Posts: 4
Joined: Mon Aug 26, 2013 6:18 am

Re: Firmware Update

Post by thessy »

chad wrote: 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!
Thanks for clarification!

Copied, renamed and added PLATFORM=CF1 in the eclipse targets. Now the "Make CLOAD" and the "Flash using radio" looks ok for me:

Code: Select all

Build gf6637ad54fe5:f6637ad54fe5 (2014.12.1-39) [1;32mCLEAN[m
CrazyLoader build!
   text	   data	    bss	    dec	    hex	filename
  75904	   1148	  26948	 104000	  19640	cflie.elf

Code: Select all

Connected to bootloader on Crazyflie Nano Quadcopter (1.0) (version=0x1)
Target info: stm32 (0xFF)
Flash pages: 128 | Page size: 1024 | Buffer pages: 10 | Start page: 10
118 KBytes of flash available for firmware image.

Flashing 1 of 1 to stm32 (fw): 77075 bytes (76 pages) ..........10..........10..........10..........10..........10..........10..........10......6
Reset in firmware mode ...
But nevertheless the same situation: only blue led is on!

I did "Update all projects" in VM 0.6, but the date of the build source looks not so good: 2014.12.1-39!?

@ahuber1: how did you "switch the to the right repository." ?
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Firmware Update

Post by chad »

thessy wrote:I did "Update all projects" in VM 0.6, but the date of the build source looks not so good: 2014.12.1-39!?

@ahuber1: how did you "switch the to the right repository." ?
Hi thessy,

If you're on the VM, the crazyflie-firmware repository clone is on the "crazyflie2" branch. You'll need to switch to master branch for the PLATFORM=CF1 to have any meaning. To that pop open a terminal window and enter the following:

Code: Select all

cd ~/projects/crazyflie-firmware
git checkout master
git pull
make clean
Then you should be able to do the build in Eclipse like before but end up with the right firmware!
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.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Firmware Update

Post by chad »

ahuber1 wrote:Marry Christmas!
Thank you, and to you too ahuber1. I went back to review your posts and I believe I've found your problem. I should have caught it earlier but I wasn't paying close enough attention to what you wrote. Shame on me! :oops:

Anyway, you are flashing your Crazyflie with the Crazyradio, right? Your problem is in your compile variables. If you want to make a firmware build that can be flashed from using the Crazyradio (i.e. Over-The-Air or, OTA) you must use CLOAD=1. Yours is set to CLOAD=0 which won't flash OTA.

So, to use the Crazyradio to flash:

Code: Select all

make PLATFORM=CF1 CLOAD=1
-or-

Code: Select all

make PLATFORM=CF1
To use a debugger to flash:

Code: Select all

make PLATFORM=CF1 CLOAD=0 DEBUG=1
The CLOAD=0 that you were using resulted in the different md5 checksum. If you use CLOAD=1 the hash will be the same as the one I posted (for the same checkout - of course) and the flashed firmware will work.

Try it out! That should solve your problem. Everything else you're doing it correct.
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.
thessy
Beginner
Posts: 4
Joined: Mon Aug 26, 2013 6:18 am

Re: Firmware Update

Post by thessy »

chad wrote: If you're on the VM, the crazyflie-firmware repository clone is on the "crazyflie2" branch. You'll need to switch to master branch for the PLATFORM=CF1 to have any meaning. To that pop open a terminal window and enter the following:

Code: Select all

cd ~/projects/crazyflie-firmware
git checkout master
git pull
make clean
Then you should be able to do the build in Eclipse like before but end up with the right firmware!
Great! CF1 is working again.

Thanks for helping.
Thomas aka thessy
ahuber1
Beginner
Posts: 15
Joined: Thu Jan 09, 2014 8:19 am

Re: Firmware Update

Post by ahuber1 »

Shame on me :lol:
I was thinking CLOAD does automatically try to flash the copter :lol:

Thanks a lot chad.
Post Reply