Go to Post I am a FRC Coach/Mentor I don't know the meaning of the words "days off" or "rest". At least not from January to May. - Bob Steele [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 04-09-2014, 15:30
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Has anybody been able to successfully build a GCC 4.9 toolchain for the roboRIO? I've been looking into it, but I don't have any hardware, so I was wondering if any of the beta teams had had any success as of yet.
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0
  #2   Spotlight this post!  
Unread 04-09-2014, 20:33
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

I have already successfully used 4.8.3 with it. 4.9 shouldn't be that hard.
  #3   Spotlight this post!  
Unread 04-09-2014, 23:08
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by AustinSchuh View Post
I have already successfully used 4.8.3 with it. 4.9 shouldn't be that hard.
What C library did you use? Just glibc? And where did you snag the kernel headers?
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0
  #4   Spotlight this post!  
Unread 05-09-2014, 10:49
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

I have never cross-compiled before, so I am a newbie. When you use GCC and try to compile an application for another platform like the PPC in the cRIO, do you still have access to the full C++ STL library? Also, are there some libraries like pthread available?

I have the GNU GCC compiler to cross-compile for the RasPi, but I don't know if it will compile my application, which uses pthread and libx11.

Thanks!
  #5   Spotlight this post!  
Unread 05-09-2014, 16:30
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by CodeYeti View Post
What C library did you use? Just glibc? And where did you snag the kernel headers?
I was feeling really lazy, and found a pre-built tool-chain. Compiling GCC takes a while. We will be spreading more information (and filing bug reports) as part of the beta test, and this will be part of it. I'd like to get some more experience with everything before spreading info.

One of my eventual goals is to set up Clang as well.
  #6   Spotlight this post!  
Unread 05-09-2014, 19:51
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

We are currently updating our toolchain for GCC 4.9, which will (hopefully, almost positive) be the official C++ compiler for 2015. Its not yet done (I'm actually waiting for GCC to compile on launchpad as I type this), but we are hoping to let some beta teams test it soon (week or so?).

Quote:
Originally Posted by CodeYeti View Post
What C library did you use? Just glibc? And where did you snag the kernel headers?
The C library much match the one on the roborio (which is glibc irrc. We are currently just copying them off the image). The kernel headers are normal kernel headers, which can be snagged by something like this: https://bitbucket.org/byteit101/tool....sh?at=default

Quote:
Originally Posted by yash101 View Post
I have never cross-compiled before, so I am a newbie. When you use GCC and try to compile an application for another platform like the PPC in the cRIO, do you still have access to the full C++ STL library? Also, are there some libraries like pthread available?

I have the GNU GCC compiler to cross-compile for the RasPi, but I don't know if it will compile my application, which uses pthread and libx11.

Thanks!
Depends on the platform. C++STL is anywhere that C++ compiles, but pthread is not always. Its on the RoboRIO, but not the cRIO. libx11 is not on the RoboRIO as there is no output display for X to run on.

Shameless plug: Anyone interested in maintaining arm-linux-gnueabi packages for non .deb-based linux should contact me. If the given platform already has binutils 2.24 and gcc 4.9.1, you only need to package the header files and so libs.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #7   Spotlight this post!  
Unread 08-09-2014, 19:27
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by byteit101 View Post
We are currently updating our toolchain for GCC 4.9, which will (hopefully, almost positive) be the official C++ compiler for 2015. Its not yet done (I'm actually waiting for GCC to compile on launchpad as I type this), but we are hoping to let some beta teams test it soon (week or so?).



The C library much match the one on the roborio (which is glibc irrc. We are currently just copying them off the image). The kernel headers are normal kernel headers, which can be snagged by something like this: https://bitbucket.org/byteit101/tool....sh?at=default


Depends on the platform. C++STL is anywhere that C++ compiles, but pthread is not always. Its on the RoboRIO, but not the cRIO. libx11 is not on the RoboRIO as there is no output display for X to run on.

Shameless plug: Anyone interested in maintaining arm-linux-gnueabi packages for non .deb-based linux should contact me. If the given platform already has binutils 2.24 and gcc 4.9.1, you only need to package the header files and so libs.
As I'm only an alum for a team, I have access to neither hardware nor the actual images so I didn't know what library headers I should be using. I was having a REALLY hard time getting glibc to build with a bootstrap version of GCC though, which is probably due to my relative inexperience with toolchain building. Any tips on getting building a bootstrap version of GCC that will actually build glibc?

EDIT: Also is there a preview version of wpilib i could be using?
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0

Last edited by CodeYeti : 08-09-2014 at 19:33. Reason: formatting
  #8   Spotlight this post!  
Unread 09-09-2014, 21:01
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by CodeYeti View Post
I was having a REALLY hard time getting glibc to build with a bootstrap version of GCC though, which is probably due to my relative inexperience with toolchain building. Any tips on getting building a bootstrap version of GCC that will actually build glibc?
I've built an arm-linux-gnueabi cross compiler before on Arch Linux by using the instructions here: http://www.archlinuxuser.com/2013/07...bi-gcc-on.html. Although, the packages don't build the correct version of glibc among other things. If you use another distribution, you could run the shell commands in the PKGBUILDs yourself.

Quote:
Originally Posted by CodeYeti View Post
EDIT: Also is there a preview version of wpilib i could be using?
There's a git repository for the 2015 WPILib at https://usfirst.collab.net/sf/sfmain...rojects.wpilib, but it's not publicly viewable.
  #9   Spotlight this post!  
Unread 09-09-2014, 22:00
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 333
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

You should be able to use the Linaro GCC 4.9 toolchain on a Linux box. I'm using it now for my other ARM platforms on my Linux Mint 17 box.
  #10   Spotlight this post!  
Unread 09-09-2014, 23:24
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by mathmogul View Post
I've built an arm-linux-gnueabi cross compiler before on Arch Linux by using the instructions here: http://www.archlinuxuser.com/2013/07...bi-gcc-on.html. Although, the packages don't build the correct version of glibc among other things. If you use another distribution, you could run the shell commands in the PKGBUILDs yourself.



There's a git repository for the 2015 WPILib at https://usfirst.collab.net/sf/sfmain...rojects.wpilib, but it's not publicly viewable.
What does one have to do to get access?
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0
  #11   Spotlight this post!  
Unread 10-09-2014, 01:02
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by CodeYeti View Post
What does one have to do to get access?
To get read access, I submitted an account creation request on the login page and it got approved by an administrator eventually.
  #12   Spotlight this post!  
Unread 11-09-2014, 12:05
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

I'm still planning on rolling my own toolchain, but for the information of others I just found someone building Debian/Ubuntu packages here.
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0
  #13   Spotlight this post!  
Unread 12-09-2014, 12:19
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

While this might not be exactly what you are looking for, NI has a full openembedded build system set up as well as their fork of the linux kernel on their github here: https://github.com/ni


There are a couple of other cool things on their github as well if you look around.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #14   Spotlight this post!  
Unread 14-09-2014, 00:00
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by CodeYeti View Post
I'm still planning on rolling my own toolchain, but for the information of others I just found someone building Debian/Ubuntu packages here.
wow, google let that get out fast... That is the current WPI WIP official 2015 toolchain set (for debian/ubuntu) Please note that we just are starting to release this to beta teams (like 5pm today), so bugs are expected. There are other bits not found in this repository (mainly WPILib and all the FRC-specific libraries) so you can't build robot programs with it yet if you are not an beta tester. Please don't report bugs if you aren't a beta tester, there are several broken things I know about already and its only been the first few hours. I don't need hundreds of the same bug reports...

Also if you are a beta tester and you haven't heard of this yet: we are rolling this out slowly due to the large breakage this could cause. Don't panic.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #15   Spotlight this post!  
Unread 16-09-2014, 23:36
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Excuse me for this extremely newbie question:
Just a couple days ago, I made an ARM cross compiler for my RasPi. They both are ARM based, so right away, it seems as though the RPi executables will be compatible with the cRIO. However, aren't there differences in the machine code between the different subsets of ARM? Would they prevent my executables from running?

Thanks! I'm quite new to cross-compiling. I want to have a cross compiler ready for the RoboRIO so I can push my software as soon as possible!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi