cannot add PPA for gcc-arm-embedded

Post here to get support
Post Reply
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

cannot add PPA for gcc-arm-embedded

Post by tintin »

I've just recently upgraded my development machine from Linux Mint 19.3 to LM 20. When I try to add the PPA for the team-gcc-arm-embedded cross compiler I get the following error message:

Cannot add PPA: ''This PPA does not support focal''.

Here's some info on my OS environment:

Linux cfcontrol 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

System:
Host: cfcontrol Kernel: 5.4.0-42-generic x86_64 bits: 64
Desktop: Cinnamon 4.6.6 Distro: Linux Mint 20 Ulyana

I've tried to install the gcc-arm-none-eabi toolchain from the official LM repositories, but when I try to compile the cf firmware, I get errors.

Any ideas?

Regards

Uwe
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: cannot add PPA for gcc-arm-embedded

Post by kimberly »

Hi,

Probably the ppa will not work for linux mint since this instructions are only ment for ubuntu 16.04 and 18.04.

Could you share the error message that you got from the toolchain and let us know which version of the toolchain is installed?
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

Re: cannot add PPA for gcc-arm-embedded

Post by tintin »

Hi,

sorry for the late reply.

The error message doesn't offer much more info:

ngl@cfcontrol:~$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
[sudo] password for ngl:
Cannot add PPA: ''This PPA does not support focal''.


Currently there's no other arm embedded toolchain installed. Before the Linux Mint upgrade (from LM 19.3) I was able to install the PPA and the toolchain according to your instructions on github.
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

Re: cannot add PPA for gcc-arm-embedded

Post by tintin »

Sorry, disregard my last statement. Still in weekend mode :roll: . The arm-none-eabi toolchain I installed from the official repos is as follows:

ngl@cfcontrol:~$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/9.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir='/usr/lib/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --enable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:9-2019-q4-0ubuntu1 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=rmprofile CFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' FCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' FFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' GCJFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' OBJCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' OBJCXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-Gl9kT9/gcc-arm-none-eabi-9-2019-q4=. -fstack-protector-strong' INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (15:9-2019-q4-0ubuntu1)
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

Re: cannot add PPA for gcc-arm-embedded

Post by tintin »

and here's the console output from Eclipse when I try to compile using the "make CLOAD" option:


11:47:41 **** Build of configuration Default for project crazyflie-firmware ****
make all DEBUG=0 CLOAD=1
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 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 sensors_bmi088_bmp388.o
CC sensors_mpu9250_lps25h.o
CC sensors_bmi088_spi_bmp388.o
CC diskio.o
CC ff.o
CC syscall.o
CC unicode.o
CC fatfs_sd.o
CC main.o
CC platform.o
CC platform_utils.o
CC platform_cf2.o
CC platform_stm32f4.o
CC exti.o
CC nvic.o
CC motors.o
CC led_f405.o
CC mpu6500.o
CC i2cdev_f405.o
CC ws2812_cf2.o
.//src/drivers/src/ws2812_cf2.c: In function 'ws2812DmaIsr':
.//src/drivers/src/ws2812_cf2.c:221:16: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
221 | buffer = led_dma.begin;
| ^~~~~~~
.//src/drivers/src/ws2812_cf2.c:227:16: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
227 | buffer = led_dma.end;
| ^~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [tools/make/targets.mk:27: ws2812_cf2.o] Error 1
make: *** [Makefile:365: build] Error 2
"make all DEBUG=0 CLOAD=1" terminated with exit code 2. Build might be incomplete.

11:47:54 Build Failed. 4 errors, 0 warnings. (took 13s.214ms)
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: cannot add PPA for gcc-arm-embedded

Post by kimberly »

Hi!

So I looked up the chaintool version to with gcc -v. Mine is like this:
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)


I have Ubuntu 18.04 so adding the PPA was not a problem. But I guess this is different for linux mint. Maybe you can try to install the package directly, but that seems to be already done on your system:

Code: Select all

sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi

You might need to downgrade it to version 8 since we have seen a problem with gcc9 with structs (as I can see from your error messages during compile). Please checkout this github issue: https://github.com/bitcraze/crazyflie-f ... issues/512

You can downgrade the package with:

Code: Select all

sudo apt install gcc-arm-none-eabi= 'version' 
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

Re: cannot add PPA for gcc-arm-embedded

Post by tintin »

Hi,
thanks a lot for the info on the known issues with gcc version 9 and the downgrading instructions. I'll try this asap and let you know if this solves my problem.
Regards
Tintin
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: cannot add PPA for gcc-arm-embedded

Post by kristoffer »

Hi!

I had a quick look at compiling with GCC 9 yesterday and I think the warning that causes the problem simply can be turned off, see https://github.com/bitcraze/crazyflie-f ... issues/604
We need to verify this a bit further, but hopefully we can push a fix for GCC 9 shortly
tintin
Member
Posts: 30
Joined: Sun Feb 16, 2020 2:00 pm

Re: cannot add PPA for gcc-arm-embedded

Post by tintin »

Hi Bitcraze,
sorry for this VERY late reply, but the holidays and other projects have taken their toll.

Just wanted to let you know, that now I'm able to compile the CF firmware with the current arm-none-eabi cross compiler:
gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (15:9-2019-q4-0ubuntu1)
running on Linux Mint 20, btw.

Thanks a lot for your assistance and the various fixes you've implemented. This issue thread can be closed as far as I'm concerned.

Kind regards
Tintin
Post Reply