Go to Post I saw a big opening in the bees section and asked if we could sit for this match and was told we were welcome to sit there. Your team made space for about 15 of my team members that came with me. - Debbie [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
  #16   Spotlight this post!  
Unread 16-12-2011, 17:36
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: C++ - No Code?

Quote:
Originally Posted by byteit101 View Post
Did not realize that, I though that was pulled a while ago. submit the pull request to nikitakit/ucpp (I just pulled ozzloy's)
Since I forked from ozzloy, my pull request went to him.

The main issue was that the parsing of the team number into an ip address in ucpp-init. Since the method used in ucpp-setup worked, I changed ucpp-init to parse its arguments in the same manner. I also cleaned up the detect python function, as in my case it was outputting the found python twice. Also there was no need to use the output of that function to set ucpp_python_bin, as the variable is globally scoped. Last I included the found python in the settings file so it could be used from other scripts.
Reply With Quote
  #17   Spotlight this post!  
Unread 26-12-2011, 23:36
runfrodorun runfrodorun is offline
Registered User
FRC #0111
 
Join Date: May 2011
Location: Schaumburg
Posts: 5
runfrodorun is an unknown quantity at this point
Re: C++ - No Code?

Hey: this may seem a bit off topic, but is there somewhere I could get information on compiling code targeting VxWorks on a ppc 603 cpu like you did without windriver? I'm running unix and I'm trying to figure out how to download code to out cRIO without a license for windriver.

I've started working on compiling my own cross tools to target the different CPU architecture, but I really don't know where to start. Any help appreciated!
Reply With Quote
  #18   Spotlight this post!  
Unread 27-12-2011, 00:35
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: C++ - No Code?

Quote:
Originally Posted by runfrodorun View Post
Hey: this may seem a bit off topic, but is there somewhere I could get information on compiling code targeting VxWorks on a ppc 603 cpu like you did without windriver? I'm running unix and I'm trying to figure out how to download code to out cRIO without a license for windriver.
As stated earlier in the thread, the ucpp project is just that. You don't even have to compile the compiler - it downloads the windows binaries and runs them through wine. Yes, it's more difficult, but it's much easier than managing all of the configuration for the build of the new compiler. And if you're a windows person, you can either run ucpp through cygwin or download the gccdist provided by NI (https://decibel.ni.com/content/docs/DOC-14237) and run it yourself. Then you grab the latest version of WPILib from FIRSTForge, edit the sample makefile in the gccdist to suit your project, change the makefile to statically link in WPILib, and off you go.

Quote:
I've started working on compiling my own cross tools to target the different CPU architecture, but I really don't know where to start. Any help appreciated!
Again, if you want a native compiler, more power to you. But the easy way out is already there. Just a few scripts away. If you want more power (I myself wouldn't completely miss a compiler with c++0x support, but I don't want to have to worry about a non-standard toolchain screwing up things at competition) feel free to compile your own compiler, just remember that it is the harder way, you may get screwed by it, and few (er?) people will be able to help you.
Reply With Quote
  #19   Spotlight this post!  
Unread 27-12-2011, 02:53
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: 802
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: C++ - No Code?

Quote:
Originally Posted by runfrodorun View Post
I've started working on compiling my own cross tools to target the different CPU architecture, but I really don't know where to start. Any help appreciated!
I already got GCC 4.5.3 compiling on Linux and targeting the cRIO. My patches and build script are here. Thanks to Ross Light for cleaning it up and getting it to run on OSX. It is unsupported, but seems to work well. This also builds my own version of libstdc++v3 that seems to work on the cRIO. It would be nice to integrate this into ucpp at some point.

http://hg.zombiezen.com/vxworks-gcc-patches/overview
Reply With Quote
  #20   Spotlight this post!  
Unread 27-12-2011, 03:10
nikitakit nikitakit is offline
Registered User
FRC #0980 (Thunderbots)
 
Join Date: Feb 2009
Rookie Year: 2009
Location: California
Posts: 9
nikitakit will become famous soon enough
Re: C++ - No Code?

Hi rbmj. Thanks for the changes to ucpp - I've pulled them in.

Right now I'm in college, away from my team, so unfortunately that means I'm somewhat out of the loop on FRC and don't have a real robot to test code on. I'm probably not the best person to be maintaining ucpp at the moment.

That said, I'm still around online, and I'm still very much interested in seeing ucpp remain usable throughout the next competition. It's really a shame for teams not to be able to program on Linux when the tools are there, and have been there for quite a while.

byteit101 - do you plan to continue working on ucpp throughout the next year? It will need some updates after kick-off for everything to work with the new versions of WPILib, etc.
Reply With Quote
  #21   Spotlight this post!  
Unread 27-12-2011, 13:48
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: C++ - No Code?

Quote:
Originally Posted by nikitakit View Post
byteit101 - do you plan to continue working on ucpp throughout the next year? It will need some updates after kick-off for everything to work with the new versions of WPILib, etc.
I do. I've been busy recently, but will probably work on it some more after kickoff.
__________________
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
Reply With Quote
  #22   Spotlight this post!  
Unread 28-12-2011, 01:08
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: C++ - No Code?

Quote:
Originally Posted by AustinSchuh View Post
I already got GCC 4.5.3 compiling on Linux and targeting the cRIO. My patches and build script are here. Thanks to Ross Light for cleaning it up and getting it to run on OSX. It is unsupported, but seems to work well. This also builds my own version of libstdc++v3 that seems to work on the cRIO. It would be nice to integrate this into ucpp at some point.

http://hg.zombiezen.com/vxworks-gcc-patches/overview
That's awesome that you have a newer version of GCC. I personally would *love* to be able to use some of the new features of C++11 (I've already gotten used to using them in my personal code, and it's kind of sad that I can't use them on FRC code), but I have reservations.

Primarily, I know that in order to pass inspection your robot must be running a certain version of the firmware. Now, I know that you could image the cRIO and then overwrite all of the libraries, but could you be disqualified for doing this? Anyone happen to know what the rules say on this? GCC 3 is so old... it seems like FIRST *should* encourage teams to innovate.

Also, at some point maybe I could modify ucpp to allow users to optionally install ucpp for their whole system. We could also look at integrating build scripts - if nothing else we could find the source for the same version of GCC that gccdist uses - this _in_theory_ should not have any issues and be fully compatible with the stock image.
Reply With Quote
  #23   Spotlight this post!  
Unread 28-12-2011, 04:24
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: 802
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: C++ - No Code?

It is fully legal. You are not replacing any librarys. You are only generating a binary that has a second version of the library symbols that have been re-named to avoid a namespace collision. There is no need to modify the firmware to get this to work. This is similar to writing your own printf and friends and using those.

If you want, it is also possible to use the old version of the standard libraries that comes with the cRIO and use the newer compiler with them. This will produce a number of warnings in the header files, but it will still work. This is the route that 971 went last year, since I hadn't gotten the symbol renaming worked out.
Reply With Quote
  #24   Spotlight this post!  
Unread 07-01-2012, 15:50
nikitakit nikitakit is offline
Registered User
FRC #0980 (Thunderbots)
 
Join Date: Feb 2009
Rookie Year: 2009
Location: California
Posts: 9
nikitakit will become famous soon enough
Re: C++ - No Code?

I've updated ucpp-setup so that it pulls in 2012 WPILib. The default robot seems to compile fine. I have no idea what the Kinect libraries are all about though.
Reply With Quote
  #25   Spotlight this post!  
Unread 07-01-2012, 16:33
newkidd-sagar newkidd-sagar is offline
Registered User
FRC #1241
 
Join Date: Jan 2010
Location: Mississauga
Posts: 13
newkidd-sagar is an unknown quantity at this point
Re: C++ - No Code?

Hey there, I was wondering if your team was able to get the FIRST menu option in the 2012 WindRiver Installation. Are there any WPILib updates online that I need to install? I also don't have any examples or templates like "SimpleRobot" etc.

Thanks for your help.
Reply With Quote
  #26   Spotlight this post!  
Unread 07-01-2012, 16:38
newkidd-sagar newkidd-sagar is offline
Registered User
FRC #1241
 
Join Date: Jan 2010
Location: Mississauga
Posts: 13
newkidd-sagar is an unknown quantity at this point
Re: C++ - No Code?

Never mind I found the update.

It is located here:

http://firstforge.wpi.edu/sf/go/pkg1109
Reply With Quote
  #27   Spotlight this post!  
Unread 07-01-2012, 19:20
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: C++ - No Code?

Quote:
Originally Posted by newkidd-sagar View Post
Hey there, I was wondering if your team was able to get the FIRST menu option in the 2012 WindRiver Installation. Are there any WPILib updates online that I need to install? I also don't have any examples or templates like "SimpleRobot" etc.

Thanks for your help.
For Workbench you need to install the updates from FIRSTForge on the WPILib project. Go to http://firstforge.wpi.edu, then select the WPILib project, and look at "File releases". The update is there. There is also documentation in the "Documents" area.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #28   Spotlight this post!  
Unread 07-01-2012, 20:10
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: C++ - No Code?

The kinect stuff should be to get kinect data from the driver station.

As far as I know, it's impossible (well not impossible, but impractical) to get the kinect to work ON robot in it's original capacity. That would require implementing a full USB Host driver on two DIO ports AFAIK, which is theoretically possible but would be extremely hard (it'd probably leave you little time to code up the actual robot drive code).

If anyone has information/knows more, please say so. But it seems like the kinect isn't all too useful, and is more of a marketing gimmick (not that I'm complaining, it's a cool sensor to play with) on Microsoft's part, as most of the autonomous code can be done via vision onboard the robot without the need for much human intervention. I'm sure someone will do something completely novel with it though, so I'll have to wait and see.
Reply With Quote
  #29   Spotlight this post!  
Unread 15-02-2012, 20:34
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: C++ - No Code?

I don't know if this is necromancy or not - still kind of new to CD.

I wanted to ask Austin Schuh how he got libstdc++ to build. I've successfully build gcc & friends using a combination of the patches and a little messing with compile flags. However, I get an error on the libstdc++-v3 configure script:

checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

And when I try and build the configured portions, I get butloads of errors, some of which appear to be related to pthreads. I also incorporated jmesmon's patches, but am still getting errors.
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:44.

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