Forums

Skip to content

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

[Solved]sgpp-lite-arm-eabi-bin upgrade?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

[Solved]sgpp-lite-arm-eabi-bin upgrade?

  • Quote

Post by Tefrem34 » Fri Aug 02, 2019 4:20 am

Hello.

I use qmk to flash keyboards, and one of the boards that I got uses an arm chip. The current arm-none-eabi-gcc is at 4.8.3, which will not work. The version I need is >=7.3 or =8.3 and I can not find any source that links me to the source code for it. The last one is from 2014.
Is there someone that can help me out with getting the newest version of the arm-none-eabi-gcc?

I would greatly appreciate it.

Thank you kindly
Last edited by Tefrem34 on Thu Aug 08, 2019 3:36 pm, edited 1 time in total.
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Fri Aug 02, 2019 5:51 am

I was able to find that the https://github.com/gnu-mcu-eclipse/arm-none-eabi-gcc/ is the only place that I could find a source for arm-eabi-gcc. However, I had previously tried to install eclipse with that extension and I could not get it to install because of conflicts. What led me to the eclipse version was that Ubuntu uses the most recent version that I needed and one of the posts linked to the git linked above. My questions now are, can I install that without using eclipse, or am I going to have to install it and try to add the arm-none-eabi-gcc, and if I do that will the rest of my system be able to use it natively?

Thanks.
Top
Phoenix591
Guru
Guru
Posts: 504
Joined: Mon Sep 17, 2007 3:52 am

  • Quote

Post by Phoenix591 » Fri Aug 02, 2019 1:03 pm

Let me introduce crossdev.

You should probably be able to setup a crossdev overlay:
create an empty custom repository, call it crossdev. Crossdev will use this overlay to store it's ebuilds that it copies from the main portage tree, but in a category to match the requested tuple, eg cross-arm-none-eabi/gcc.

Run crossdev -t arm-none-eabi which will build a full cross toolchain (binutils, gcc, and newlib in this case) in /usr/arm-none-eabi and they'll be automatically added to the path etc. Portage will manage updating them as necessary, with all the usual useflags (eg, to enable thread support for newlib, to package.use add cross-arm-none-eabi/newlib threads)
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Fri Aug 02, 2019 8:36 pm

Thank you for the explanation. Very helpful.
I am sure I will have more questions later on. :)
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Fri Aug 02, 2019 9:44 pm

Well I am not doing something correctly.
I have the crossdev stuff setup, at least to as far as I can tell, and when I used the command "arm-none-eabi-emerge -uva --keep-going @system"
Portage shows "sys-apps/busybox-1.31.0" and then that fails to install.
Did I miss a configuration file or something? This is all a bit confusing for me.
Thanks
Top
Phoenix591
Guru
Guru
Posts: 504
Joined: Mon Sep 17, 2007 3:52 am

  • Quote

Post by Phoenix591 » Fri Aug 02, 2019 10:16 pm

I'm not an embedded guy, but doesn't the none in arm-none-eabi mean no kernel? crossdev seems to think so, it didn't pull in kernel headers. Is busybox supposed to be able to run without a kernel, I tested it out and it seems to want a kernel header (byteswap.h)?

Code: Select all

In file included from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:164:11: fatal error: byteswap.h: No such file or directory
  164 | # include <byteswap.h>
      |           ^~~~~~~~~
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sat Aug 03, 2019 4:58 am

I have no idea what the "none" means. It is just one of the dependencies that I need for building arm firmware.
I also do not know why it would build busybox. For some reason, I think that it is not pulling in the package that I need "sgpp-lite-arm-eabi-bin". I wonder if that is what I need to use instead of "arm-none-eabi-gcc".
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sat Aug 03, 2019 5:02 am

I just tried "crossdev --stable -t sgpp-lite-arm-eabi-bin" and got

Code: Select all

!!! WARNING - Cannot auto-configure CHOST sgpp-lite-arm-eabi-bin;
!!! You should edit /usr/sgpp-lite-arm-eabi-bin/etc/portage/make.conf /usr/sgpp-lite-arm-eabi-bin/etc/portage/profile/make.defaults /usr/sgpp-lite-arm-eabi-bin/etc/portage/profile/use.force
!!! by hand to complete your configuration.
!!!  No ARCH is known for this target.
!!!  No LIBC is known for this target.
!!!  No KERNEL is known for this target.
 * Log: /var/log/portage/cross-sgpp-lite-arm-eabi-bin-binutils.log
 * Emerging cross-binutils ...

 * error: binutils failed :(
I do not know what configs that it would need. I have yet to have gained that level of knowledge.
Thanks
Top
Phoenix591
Guru
Guru
Posts: 504
Joined: Mon Sep 17, 2007 3:52 am

  • Quote

Post by Phoenix591 » Sat Aug 03, 2019 8:07 am

Tefrem34 wrote:I have no idea what the "none" means. It is just one of the dependencies that I need for building arm firmware.
I also do not know why it would build busybox. For some reason, I think that it is not pulling in the package that I need "sgpp-lite-arm-eabi-bin". I wonder if that is what I need to use instead of "arm-none-eabi-gcc".
It didnt. You asked it to build buildbox by asking it to emerge system. The initial crossdev command gave you gcc newlib and binutils, what else do you need to build firmware?
Tefrem34 wrote:I just tried "crossdev --stable -t sgpp-lite-arm-eabi-bin" and got
I do not know what configs that it would need. I have yet to have gained that level of knowledge.
Thanks
Thats because you put in nonsense. sgpp-lite-arm-eabi-bin is a specific prebuilt toolchain (a different version of what we just built with crossdev), the s from sgpp refers to it being done by the sorcery group, the g++-lite refers to it being the gcc toolchain (but lite somehow) the bin just refers to it being a prebuilt binary
If you want to try to find their latest version, this is their website. I couldn't find a download link easily and I suspect you'll have to register.
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sat Aug 03, 2019 6:32 pm

Thank you for the response.
You asked it to build buildbox by asking it to emerge system
I used the command that the wiki said to use. What should I use that would be correct?

What I find confusing is that there are other programs that have the same name. So I do not know that just using the arm-none-eabi-gcc is going to build the tool chain that qmk needs in order to build the firmware for my keyboard.

I came across that website as well when I was trying to find more info on that package. However, I think the source that I need is no longer supported by the Sourcery CodeBench. So I wonder where the Ubuntu distros get the newest version from.

Thanks.
Top
Phoenix591
Guru
Guru
Posts: 504
Joined: Mon Sep 17, 2007 3:52 am

  • Quote

Post by Phoenix591 » Sat Aug 03, 2019 9:35 pm

Just try building your firmware and see what happens. What I've been trying to get at is that the one crossdev -t arm-none-eabi we did should likely be all you need.

Alternatively, the Linaro project also produces free specially targeted arm toolchains (with some patches the one built with crossdev won't have).
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sun Aug 04, 2019 7:30 am

crossdev -t arm-none-eabi

Code: Select all

 * crossdev version:      20190712
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         arm-none-eabi
 * Stage:                 3 (C compiler & libc)
 * USE=multilib:          yes
 * ABIs:                  default

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * libc:                  newlib-[latest]

 * CROSSDEV_OVERLAY:      /usr/crossdev-overlay
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
                                                                                                                                                             
 * leaving sys-devel/binutils in /usr/crossdev-overlay
 * leaving sys-devel/gcc in /usr/crossdev-overlay
 * leaving sys-libs/newlib in /usr/crossdev-overlay
 * leaving sys-devel/gdb in /usr/crossdev-overlay
 * enabling thin-manifests due to /var/lib/layman/cynede
                                                                                                                                                             
 * Log: /var/log/portage/cross-arm-none-eabi-binutils.log
 * Emerging cross-binutils ...                                                                                                                         [ ok ]
 * Log: /var/log/portage/cross-arm-none-eabi-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                       [ ok ]
 * Log: /var/log/portage/cross-arm-none-eabi-newlib.log
 * Emerging cross-newlib ...
It looks like it all built properly, is there a command that I am missing? When I try to build the firmware I am still getting the same error.
It is complaining about

Code: Select all

 | 
 | /opt/sgpp-lite-arm-eabi-bin-2014.05.28/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/thumb2/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
 | sbrkr.c:(.text+0x12): undefined reference to `_sbrk'
 | collect2: error: ld returned 1 exit status
 | 
make[1]: *** [tmk_core/rules.mk:300: .build/hadron_ver3_TellNoLies.elf] Error 1
If you look at the location string, you can see that it is still using the arm-none-eabi 4.8.3 . If I did it properly, wouldn't it say the new version?

Thank you for the link. I will see if that will work.
Top
Phoenix591
Guru
Guru
Posts: 504
Joined: Mon Sep 17, 2007 3:52 am

  • Quote

Post by Phoenix591 » Sun Aug 04, 2019 9:07 am

Tefrem34 wrote: It looks like it all built properly, is there a command that I am missing? When I try to build the firmware I am still getting the same error.
It is complaining about

Code: Select all

 | 
 | /opt/sgpp-lite-arm-eabi-bin-2014.05.28/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/thumb2/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
 | sbrkr.c:(.text+0x12): undefined reference to `_sbrk'
 | collect2: error: ld returned 1 exit status
 | 
make[1]: *** [tmk_core/rules.mk:300: .build/hadron_ver3_TellNoLies.elf] Error 1
If you look at the location string, you can see that it is still using the arm-none-eabi 4.8.3 . If I did it properly, wouldn't it say the new version?

Thank you for the link. I will see if that will work.
It using the wrong gcc has nothing to do with the crossdev toolchain. Either uninstall the old spgpp gcc or take it out of your PATH or adjust your path so that the new one is in front.
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sun Aug 04, 2019 9:30 pm

Thank you. What happened was I thought that I had uninstalled the old version, but I had not "y" before I ran the command again. So now I have a new error. So I went back to the qmk discord to see what the issue is now. So will have to see if what is going on now and if it has anything to do with the arm-none-eabi-gcc now.
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Sun Aug 04, 2019 9:52 pm

Lol. This has been fun.
Now the error has to do with arm-none-eabi being to new.

Code: Select all

gcc-config --list-profiles
 [1] arm-none-eabi-9.1.0 *

 [2] arm-unknown-linux-gnueabi-7.3.0
 [3] arm-unknown-linux-gnueabi-8.2.0
 [4] arm-unknown-linux-gnueabi-8.3.0 *
 [5] arm-unknown-linux-gnueabi-9.1.0

 [6] avr-4.9.4
 [7] avr-7.3.0 *
 [8] avr-9.1.0

 [9] x86_64-pc-linux-gnu-7.3.0
 [10] x86_64-pc-linux-gnu-8.2.0
 [11] x86_64-pc-linux-gnu-8.3.0 *
It is now 9.1.0 which I guess is broken too. Figures. Is there a way that I can make it use version 8.3.0?
I uninstalled the 9.1.0 gcc version and reran crossdev -t arm-none-eabi , but it is still building the 9.1.0 version.
Thanks.
Top
Tefrem34
Guru
Guru
User avatar
Posts: 400
Joined: Sun Sep 14, 2014 2:27 am
Location: USA, California

  • Quote

Post by Tefrem34 » Thu Aug 08, 2019 3:35 pm

I figured it out.
I just needed to add --stable to the command and now it is building it with the 8.3.0-r1 which I need.

Thank you for the help!! :)
Top
Post Reply

16 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