I recently installed
Ubuntu 18.04, Linux foobar-VirtualBox 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux on a VM. I want to cross-compile applications for Cortex-M4F CPUs with hard floating points, and therefore I have installed the package
15:6.3.1+svn253039-1build1 as well as
libnewlib-arme-none-eabi at version
There is a linker error due to a conflict between my object files using hard floats and the libraries using soft floats. Some research indicates that this is a known Ubuntu 18.04 (Bionic Beaver) issue:
Note that I do provide the correct compiler and linker flags, and this project correctly builds with the Windows cross-toolchain from GNU ARM Embedded. I think it'd be pointless to paste the complete error here. If someone thinks it'd be required I'd be glad to edit this question.
What I already tried
From my basic understanding, I have two solutions to get a functional GCC ARM toolchain:
gcc-arm-none-eabito return to a working version
gcc-arm-none-eabiand install instead
gcc-arm-embeddedfrom the team GCC ARM embedded's PPA (Install gcc-arm-embedded from the PPA)
Downgrading gcc-arm-none-eabi, but to what?
In order to downgrade
gcc-arm-none-eabi I have to find a previous version in my package manager. I first updated the package list with
sudo apt update, then I typed:
sudo apt show gcc-arm-none-eabi
Maintainer: Ubuntu Developers
Original-Maintainer: Agustin Henze
Installed-Size: 307 MB
Depends: libc6 (>= 2.15), libgcc1 (>= 1:3.0), libgmp10, libisl15 (>= 0.15), libmpc3, libmpfr6 (>= 3.1.3), libstdc++6 (>= 5), zlib1g (>= 1:1.1.4), binutils-arm-none-eabi
Download-Size: 24.3 MB
APT-Sources: http://ch.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Description: GCC cross compiler for ARM Cortex-A/R/M processors
Bare metal compiler for embedded ARM chips using Cortex-M, Cortex-R and
This package is based on the GNU ARM toolchain provided by ARM.
There, I don't see any previous version. I think they should be listed here, but I don't see it. I can't downgrade if I can't provide the exact previous version I want to downgrade to.
Using gcc-arm-embedded instead of gcc-arm-none-eabi
I followed the instructions given in the link above, which led me to these commands:
sudo apt remove gcc-arm-none-eabi sudo apt-add-repository ppa:team-gcc-arm-embedded/ppa sudo apt update
[...] Ign:4 http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Err:6 http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu bionic Release
404 Not Found [IP: 220.127.116.11 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
sudo apt-install gcc-arm-embedded
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-arm-embedded
Basically it seems I have issues accessing the PPA. I tried the
--allow-unauthenticated, but it didn't change the commands output.
Is there a way to make one of those two solutions work, or is there another way to get a functional GCC toolchain on Ubuntu 18.04 to build hard-float application for the Cortex-M4F CPU?
(I've recently posted a Stack Overflow question on this issue, as at this time I thought it was a toolchain issue not so related with the Unix world. If I get an answer here I'll close it and redirect to this Q/A)