|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
Thanks, -Joe |
|
#2
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
https://github.com/nikitakit/ucpp Code:
Universal compiling scripts for FRC
System Requirements:
For Linux: wine, wput
For Windows: MSYSgit or Cygwin
Installation instructions:
- Add the "ucpp/ucpp" folder to your system PATH
- Run the ucpp setup script
$ ucpp setup -t <team-number>
Creating a project
$ ucpp init
Configures the current directory as an FRC C++ project
that deploys code to your team's robot.
The ucpp build system aims to be fully compatible with
development in WindRiver. You can initialize any existing
WindRiver project as a ucpp project, as well as any folder
that contains C++ files.
Building and deploying code
$ ucpp configure
Generates a Makefile for your project
For additional options, run "ucpp configure help"
$ make
Compile the project
$ make deploy
Deploy code to the robot
|
|
#3
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
-Joe |
|
#4
|
|||
|
|||
|
Re: C++ - No Code?
Note that the main version by nikitakit doesn't work for me - it calls python2 which is only python on some boxes. Ozzloy added a few commits to detect where python2 was installed and call that through a shell variable, so his fork might work better for many users. He submitted a pull request a long time ago but upstream hasn't merged them in.
I made some patches to some of the scripts as well, as I was getting syntax errors on my computers (Debian & openSUSE). I have a fork at github (https://github.com/rbmj/ucpp) that has ozzloy's changes as well as mine until upstream merges them in. I've also requested that ozzloy merge my changes into his repo. Last edited by rbmj : 12-16-2011 at 01:57 PM. |
|
#5
|
||||
|
||||
|
Re: C++ - No Code?
Quote:
|
|
#6
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
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. |
|
#7
|
|||
|
|||
|
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! |
|
#8
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
Quote:
|
|
#9
|
|||
|
|||
|
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. |
|
#10
|
||||
|
||||
|
Re: C++ - No Code?
I do. I've been busy recently, but will probably work on it some more after kickoff.
|
|
#11
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
http://hg.zombiezen.com/vxworks-gcc-patches/overview |
|
#12
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
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. |
|
#13
|
|||
|
|||
|
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. |
|
#14
|
|||
|
|||
|
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.
|
|
#15
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|