Page 1 of 1

Downloading firmware

Posted: Mon Dec 02, 2019 7:17 pm
by RyanMco
Hi guys, I have bought new flowdeck and with new crazyflie drone, I want to set up firmware on my crazyflie and load to its chip, I have Ubunto system on my computer, what I did is:
I entered to this site https://www.bitcraze.io/docs/crazyflie- ... tructions/ and downloaded by this command : git clone --recursive https://github.co ... rmware.git now I seen in my computer document called crazyflie_firmware, I entered to cd /crazyflie_firmware in my terminal and then for doing flash and build to my crazyflie I used debugger and in my terminal cd /crazyflie_firmware I did this:
make clean
make
and then I couldn't do build there's error in downloading firmware, the error is appearing while doing "make" which means at build there's error .. so what should I do in order to success to download the updated firmware and to succeed in flashing it to my crazyflie's chip by debugger kit? (debugger itself is working for me because on another drone it works fine .. )


In brief, what steps please should I do in order to download update bitcraze firmware of drone and to succeed in building/flashing it?

thanks!

Im not using VM, and I get this bug:

Code: Select all

.//src/modules/src/outlierFilter.c:107:40: error: initializer element is not constant
 static const int32_t lhMinWindowTime = -2 * lhTicksPerFrame;
                                        ^
.//src/modules/src/outlierFilter.c:108:40: error: initializer element is not constant
 static const int32_t lhMaxWindowTime = 5 * lhTicksPerFrame;
                                        ^
.//src/modules/src/outlierFilter.c:109:48: error: initializer element is not constant
 static const int32_t lhBadSampleWindowChange = -lhTicksPerFrame;
                                                ^
.//src/modules/src/outlierFilter.c:110:49: error: initializer element is not constant
 static const int32_t lhGoodSampleWindowChange = lhTicksPerFrame / 2;
                                                 ^~~~~~~~~~~~~~~
tools/make/targets.mk:26: recipe for target 'outlierFilter.o' failed
Makefile:350: recipe for target 'build' failed
make[1]: *** [outlierFilter.o] Error 1
make: *** [build] Error 2

Re: Downloading firmware

Posted: Tue Dec 03, 2019 8:42 am
by arnaud
It seems that you are hitting this bug: https://github.com/bitcraze/bitcraze-vm/issues/46. The github issue contains the commands to write in the current VM until we make a new one.

Re: Downloading firmware

Posted: Tue Dec 03, 2019 4:50 pm
by RyanMco
OMG! just two days for downloading fimrware and didn't succeed.
Arnoud, I'm not using VM at all and still the same BUG! what should I do? I must find a solution for succeeding in building .. any help?!

Re: Downloading firmware

Posted: Wed Dec 04, 2019 8:21 am
by arnaud
The error looks the same so the problem should be the same.

The problem in the VM is that the VM uses GCC6 and not GCC7.

You can find your version of GCC with "arm-none-eabi-gcc --version"

Code: Select all

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You need to download and install arm embedded gcc version 8 (2019-q3). Note that GCC version 9 is currently not working either due to another bug.

Re: Downloading firmware

Posted: Thu Dec 05, 2019 9:43 am
by RyanMco
How can I download it in Ubunto? what commands to type if you're familiar with?
I dont want to download as idiot and mess all files up!

Re: Downloading firmware

Posted: Thu Dec 05, 2019 10:06 am
by arnaud
How did you install the current compiler and what version is it?

Re: Downloading firmware

Posted: Sun Dec 08, 2019 12:38 pm
by RyanMco
I downloaded eclipse .. so compiler is just downloaded with eclipse

I dont think that I have GCC compiler but in Ubuntu it's already built from Ubuntu itself..

Re: Downloading firmware

Posted: Mon Dec 09, 2019 1:21 pm
by arnaud
No, the compiler do not come with eclipse unless you have installed a special embedded distribution of eclipse.

One way to find out for sure is to type the command "which arm-none-eabi-gcc". If it returns something in "/usr/bin/..." you have installed the compiler with apt-get and you need to remove it with "apt-get remove gcc-arm-none-eabi".

Otherwise, if it is in your home folder, you need at least to remove it from your PATH variable. It should have been added either in "~/.bashrc" or "~/.profile".

Now that the old version is removed, you can download and install the new version. A version a bit cleaner that what is explained in the VM ticket would be:

Code: Select all

cd ~
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2?revision=c34d758a-be0c-476e-a2de-af8c6e16a8a2?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,8-2019-q3-update -O gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2
mkdir -p ~/opt/gcc-arm-none-eabi
cd ~/opt/gcc-arm-none-eabi
tar --strip-components=1 -xf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2
cat >> ~/.profile << EOF
export PATH=$PATH:$HOME/opt/gcc-arm-none-eabi/bin
EOF
This series of commands will:
- download arm embedded GCC 8
- Decompress it in a folder in your home-folder
- Add it to the path in your .profile.

After running these command, log-out and log-in again (for example by restarting the computer) and now "which arm-none-eabi-gcc" should output "$HOME/opt/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" and "arm-none-eabi-gcc --version" should have the same output as my previous message.

Re: Downloading firmware

Posted: Mon Dec 09, 2019 5:43 pm
by RyanMco
THANKS ALOT!
WORKS FINE NOW