[Buildroot] Building packages for Cortex M4

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Dec 10 22:10:55 UTC 2021


Hello Andrey,

On Thu, 9 Dec 2021 18:02:27 +0100
Andrey Nechypurenko <andreynech at gmail.com> wrote:

> In the meantime, I came up with the following solution and wondered what
> would you say about it. First, I made host package which downloads and
> installs M4 toolchain from ARM site (inspired by
> https://gist.github.com/titouanc/ea0685d9cd8592deb1c49d48e33b3eee )
> 
> Config.in.host:
> 
> ################################################################################
> #
> # gcc-arm-none-eabi
> #
> ################################################################################

We already have a package for an ARM toolchain, in
package/arm-gnu-a-toolchain/. However, we have found that this
toolchain is targeted at Cortex-A, and while in theory it should work
for Cortex-M as well, the Cortex-M examples from ST (at least) expect
some libraries that are not in the Cortex-A toolchain provided by ARM,
but only the Cortex-M.

This is why in
https://github.com/bootlin/buildroot/commit/8635d412292eec7bb90bfabcba25a8c238aa2f93
we switch to the Cortex-M/Cortex-R toolchain for this package. But this
isn't directly suitable for upstream. More work is needed here.

> Except for a couple of small errors in the CMakeLists.txt which need yet to be
> fixed, it looks like this solution would work for me.
> 
> What do you think about it?

Yes, that looks, except for the toolchain package, where we probably
want to re-use what already exists :)

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list