Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] Crossdev for arm-none-eabi and specifying ARM CPUs

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
jannis
Guru
Guru
Posts: 340
Joined: Sun Dec 05, 2004 4:59 pm
Location: Germany / Bavaria / Aschaffenburg

[SOLVED] Crossdev for arm-none-eabi and specifying ARM CPUs

  • Quote

Post by jannis » Thu Apr 29, 2021 7:55 pm

Since some time I'm toying around with Raspberry Pi's Pico board. The SoC has two ARM Cortex-M0+ cores and the "Getting started" document (https://datasheets.raspberrypi.org/pico ... h-pico.pdf) is pretty Ubuntu focused and thus assumes the binary toolchain. I thought I can do better with Gentoo and crossdev and emerged the toolchain for target arm-none-eabi. Generally, it's all working fine, until recently a specific program made the Pico board crash. I debugged it to being the "strcmp" function leading to an exception in the CPU. In the RaspberryPi Forums, I suspected the toolchain and this was also assumed to be the case by others: https://www.raspberrypi.org/forums/view ... 3#p1856673.
During the compilation of cross-arm-none-eabi/newlib, I can see that several variants are being built, tuned for several ARM instruction sets, including v5te and v7+fp. According to https://en.wikipedia.org/wiki/ARM_Corte ... ction_sets, the M0+ should have ARMv6-M architecture without FP.

I know very well how to tune my host compiler and Gentoo system for my specific host CPU but I'm a bit lost when it comes to tuning cross-arm-none-eabi/newlib for the Cortex-M0+ or actually making sure the toolchain doesn't emit instructions that are simply not supported by the chip, as it seems to be the case for strcmp.

I've had a look at /usr/arm-none-eabi/etc/portage/make.conf, /var/db/repos/localrepo-crossdev/cross-arm-none-eabi/newlib/newlib-4.1.0.ebuild and the "toolchain-funcs" eclass it uses but I could not find references to the v5te and v7+fp architectures being actually created.
Last edited by jannis on Thu Apr 29, 2021 9:27 pm, edited 1 time in total.
Top
jannis
Guru
Guru
Posts: 340
Joined: Sun Dec 05, 2004 4:59 pm
Location: Germany / Bavaria / Aschaffenburg

  • Quote

Post by jannis » Thu Apr 29, 2021 7:59 pm

Oh, and I've seen https://wiki.gentoo.org/wiki/ARM#Enable ... at_support as well. To me it looks like this is rather aimed at gcc instead of newlib but I will give it a try nevertheless ;)
Top
jannis
Guru
Guru
Posts: 340
Joined: Sun Dec 05, 2004 4:59 pm
Location: Germany / Bavaria / Aschaffenburg

  • Quote

Post by jannis » Thu Apr 29, 2021 8:24 pm

Re-creating the crossdev ebuilds, there is this warning that I've just read now:
!!! WARNING - Cannot auto-configure CHOST arm-none-eabi;
!!! You should edit /usr/arm-none-eabi/etc/portage/make.conf /usr/arm-none-eabi/etc/portage/profile/make.defaults /usr/arm-none-eabi/etc/portage/profile/use.force
!!! by hand to complete your configuration.
I've modified the CFLAGS and CXXFLAGS in /usr/arm-none-eabi/etc/portage/make.conf and will see how that goes. Currently compiling ;)
Top
jannis
Guru
Guru
Posts: 340
Joined: Sun Dec 05, 2004 4:59 pm
Location: Germany / Bavaria / Aschaffenburg

  • Quote

Post by jannis » Thu Apr 29, 2021 9:27 pm

Okay, I thought it wouldn't make a difference since the buildlog of cross-arm-none-eabi/newlib looked exactly the same and also the files installed also are the same (including the v5te and v7+fpu folders). But this time, the program for the Pico board compiled by the toolchain actually works :)
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic