[SOLVED] Error when building the firmware

Discussions about all things Bitcraze
Post Reply
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

[SOLVED] Error when building the firmware

Post by sAz »

Hi everyone,

when I try to compile the new version of the firmware I get the following error:

Code: Select all

../src/drivers/src/ws2812_cf2.c: In function 'ws2812DmaIsr':
../src/drivers/src/ws2812_cf2.c:221:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/drivers/src/ws2812_cf2.c: At top level:
cc1: error: unrecognized command line option '-Wno-stringop-overread' [-Werror]
cc1: all warnings being treated as errors
I got this issue after pulling the latest firmware version (yesterday).

I have already installed the compiler again according to this page (ubuntu 18.04). I have updated the firmware and made sure that the submodules are initialized and followed the new instructions for compiling the new version in this page, but it didnt work for me.

Does someone else have the same issue? Any ideas on how to solve this problem?

Thanks!
Last edited by sAz on Fri May 13, 2022 9:05 am, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Error when building the firmware

Post by kimberly »

Hi!

Could you check which version of the compiler you have? You can type the following in the terminal.

Code: Select all

arm-none-eabi-gcc --version
Here internally we mostly work with Ubuntu 20.04 so these errors are difficult to catch except for a VM. And in our CI on github we primarily only test on Ubuntu 20.04.

I would also heavily advise you to look at the Toolbelt framework, of which we just have written a blogpost for. This enable you to compile it within a container that has ubuntu 20.04 on there and everything already setup, without changing anything on your native install.
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Re: Error when building the firmware

Post by sAz »

Inserting the command

Code: Select all

arm-none-eabi-gcc --version
results in the following output

Code: Select all

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q3-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
Copyright (C) 2017 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.
I will also have a look at the blog post then
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Error when building the firmware

Post by kimberly »

Yes it seems that the gcc-arm-embedded package is not updating the compiler to the latest version. Either you can try to update it as Ubuntu 20.04 instructions perhaps?

For future references, we will at one point drop support for 18.04, so it if you need to stay on that version than the toolbelt or the virtual machine is an option.
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Re: Error when building the firmware

Post by sAz »

I have installed the toolbelt and it seems to work well now. Can I compile the custom app layer with it?
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Error when building the firmware

Post by kristoffer »

Hi!

Currently there is actually no (simple) way to build an app from the toolbelt. However I just added a solution in https://github.com/bitcraze/crazyflie-firmware/pull/979 (hopefully soon merged)

You use it in a similar way as "tb make", but add the path to the app first.

The basic use case would be (still from the root of the tree)

Code: Select all

tb make_app examples/app_hello_world
You can append arguments for make, so to clean you would do

Code: Select all

tb make_app examples/app_hello_world clean
Note that the app must be located in the firmware source tree.
Post Reply