Log in

View Full Version : UCPP: cross-platform C++ toolchain


nikitakit
08-01-2013, 00:39
The Universal C++ toolchain (UCPP) has been updated for the 2013 competition!

UCPP allows command-line building/deploying of C++ code on Linux and Windows. It does not require a WindRiver installation.

UCPP projects are fully compatible with WindRiver projects, making it easy for WindRiver and UCPP users to work on the same codebase.

Git repository: https://github.com/nikitakit/ucpp
Previous thread: http://www.chiefdelphi.com/forums/showthread.php?t=91428 (now closed, so I created this one)

Linux installation:

Install dependencies: wine, wput, python2, (and optionally git)
Clone the git repository or download the zip archive
Add "ucpp/ucpp" to the system PATH
Run "ucpp setup -t xxx" (replace xxx with your team number)


Windows installation

Install Python 2.7: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
Install Git for Windows: http://git-scm.com/download/win
Launch the "Git Bash" command prompt
Clone the git repository, add ucpp/ucpp to the system PATH, and run "ucpp setup"
git clone git://github.com/nikitakit/ucpp.git
echo 'export PATH="$PATH:~/ucpp/ucpp"' >> ~/.bashrc
source ~/.bashrc
ucpp setup -t xxx # replace xxx with your team number



The Windows setup script will download WPILib and a compiler package if it detects that WindRiver is not installed.

Setting up a project

cd into your project folder. Sample code can be found in "~/.ucpp/demo"
Run "ucpp init". This only needs to be done once per project.


Building and Deploying to the robot

Run "ucpp configure" This only needs to be done when a C++ file is added or removed from the folder.
Run "make". This compiles the code.
Run "make deploy". This pushes code to the cRIO via FTP.


Additional help
See the README (https://github.com/nikitakit/ucpp/blob/master/README), run "ucpp help", or post a question here.

I can make modifications for UCPP to run on Mac or using Cygwin if people need them.

Contributors
andreboos
anidev
AustinSchuh
byteit101
correnos
nikitakit
ozzloy
rbmj

Greg McCoy
11-01-2013, 11:27
Great work! Thanks! :]

wadehas
31-01-2013, 04:12
Thanks for the great work... We got this working on Ubuntu 12.10, and now able to set a Jenkins server to build our projects and branches daily and whenever something is checked into our subversion server... :-)

AntiSleep
01-02-2013, 16:05
I cloned and installed the tools, but seem to be missing some files. When I attempt to make a sample project I get:

"...cannot find '/home/mike/.ucpp/gccdist/WindRiver/gnu/3.4.4-vxworks-6.3/x86-win32/bin/ccppc.exe'..."

And sure enough, the 'gnu' directory is missing from my install. Is there something I missed about using this tool, or is there a place I can get the necessary compiler files?

Can't wait to try this out though.

-Thanks

AntiSleep
01-02-2013, 17:16
Think I sorted out the problem after reading through ucpp-setup. My first installation failed to download the support files since curl wasn't installed. After I installed and re-ran, the setup script thought everything was already installed because the directory was present - even if it was mostly empty.

Using the gccdist link in the setup file I think has gotten me everything I need. If all else fails I can just rm the whole .ucpp directory and re-run ucpp setup.

I guess the lesson for future generations is, if you have a problem during setup, make sure and delete the '.ucpp' directory before retrying.