Go to Post Robotics competitions take place in the same "perfect" environment that basic physics equations take place in. :rolleyes: - Branden Ghena [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-03-2012, 14:01
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Alternative Toolchain

Hi everyone,

I'm not a huge fan of WindRiver's IDE - eclipse based IDEs are VERY slow on my machine. Plus, being on linux, I'd rather have something I can run natively (ucpp is GREAT, but it still runs the compiler through wine). The gccdist also has an ancient version of gcc.

With this in mind, I was wondering if anyone had success with compiling an alternate toolchain. I was able to compile gcc/g++ to target vxworks, but libstdc++ failed at configure.

Also, if anyone has gotten gdb to attach to a FRC robot outside of WRWB, I'd love to hear how you did it.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-03-2012, 23:24
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 72
codedr will become famous soon enoughcodedr will become famous soon enough
Re: Alternative Toolchain

What errors did you get in libc configure ?

What did your configure line look like ?
Reply With Quote
  #3   Spotlight this post!  
Unread 13-03-2012, 13:23
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternative Toolchain

I got some new patches and it compiles successfully now.

Im worried about the licensing implications of static linking with libstdc++. But i guess it will wotk: i just have to change my ISC license statement to a GPL license. If I change libstdc++ to dynamically link, can I add it to ni-rt.ini?

Gdb is the next big component to compile and get working. Anyone know what windriver does with gdb under the hood?

Ill take a look at ucpp's makefile generator and try and get everythimg to work together for a full native build.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2012, 08:07
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternative Toolchain

I compiled gdb but it seems to lack remote vxWorks debugging support (even though its --target is powerpc-wrs-vxworks). Looking through the mailing list archives I couldn't find a difinitive answer but I can guess that remote support was removed from gdb after WindRiver changed the debugging protocol they used.

I suppose I can get a copy of the source from WindRiver, as (I believe) their debugger is based on GDB and is thus GPL'd. I know there's something called tgtsvr though and I don't know what that does and what the license terms are for that program. I also don't know if it is a necessary component of the debugging toolchain or if it is only there in case one needs added features.
Reply With Quote
  #5   Spotlight this post!  
Unread 16-03-2012, 00:14
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Alternative Toolchain

FYI there is also a bunch of information (including links to pre-built gcc toolchain) available in this article on the NI website.

- Ron
Team #2607 controls mentor
__________________

FIRST Mid-Atlantic Volunteer
FRC Team #2607 Mentor
Reply With Quote
  #6   Spotlight this post!  
Unread 16-03-2012, 09:54
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternative Toolchain

I know of their binary distribution, but 1) it's ancient (gcc 3.4!?) and 2) it is a windows binary.

I think I'll ask WindRiver for their sources to vxgdb. Since it's a fork of gdb (AFAIK) they have to give sources on request. That still doesn't give me tgtsvr (which is probably proprietary), but it might at least give me the target vxworks directive.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-03-2012, 10:07
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,071
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Alternative Toolchain

Any details on how you achieved this stuff? I need to write some code this weekend and my windows box just took a dive, might be looking into doing some dev work on either a linux vm or os x.
__________________




.
Reply With Quote
  #8   Spotlight this post!  
Unread 16-03-2012, 20:16
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternative Toolchain

@Andrew: The stable and default choice for compiling FRC applications without WindRiver is the ucpp project: https://github.com/nikitakit/ucpp

ucpp works fine for most people. However, it uses the "gccdist" toolchain provided by NI internally to do all of its compilation. This gccdist has a few shortcomings. For one, it is a windows binary. ucpp gets around this by running the compiler through wine (which works fine). It's trivial to get running on linux, but it's relatively slow (I know wine on OSX is a bit of a pain in the butt, so your mileage may vary). A second is that it is based off of gcc 3.4.4. Newer versions of gcc are faster, have better optimizations, and (most importantly) have support for the new C++11 standard. A bunch of people are working on compiling their own gcc and libstdc++ in order to take advantage of this new funcitonality and have a native build. Build scripts for that can be found here: https://bitbucket.org/jmesmon/vxwork...tches/overview

I would recommend getting ucpp working on your system first (reliability trumps all). If you'd like to help with building a new toolchain, that would be awesome as well. It is very much a work in progress. I don't think anyone has tested building on a Mac either.

Last edited by rbmj : 16-03-2012 at 20:30.
Reply With Quote
  #9   Spotlight this post!  
Unread 24-03-2012, 22:14
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternative Toolchain

OK, so a quick question:

The makefile generated by WindRiver has -mno-implicit-fp. On my gcc this fails; the option is unrecognized.

I was wondering why this option is there, and if -msoft-float can be used as a replacement.
Reply With Quote
Reply


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 12:39.

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