Go to Post So, if you feel your team is at a disadvantage, or the playing field isn't level.... Do something about it. - AdamHeard [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2013, 00:39
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
UCPP: cross-platform C++ toolchain

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/sh...ad.php?t=91428 (now closed, so I created this one)

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

Windows installation
  1. Install Python 2.7: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
  2. Install Git for Windows: http://git-scm.com/download/win
  3. Launch the "Git Bash" command prompt
  4. Clone the git repository, add ucpp/ucpp to the system PATH, and run "ucpp setup"
    Code:
    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
  1. cd into your project folder. Sample code can be found in "~/.ucpp/demo"
  2. Run "ucpp init". This only needs to be done once per project.

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

Additional help
See the 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

Last edited by nikitakit : 08-01-2013 at 03:36.
  #2   Spotlight this post!  
Unread 11-01-2013, 11:27
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Re: UCPP: cross-platform C++ toolchain

Great work! Thanks!
  #3   Spotlight this post!  
Unread 31-01-2013, 04:12
wadehas wadehas is offline
Registered User
FRC #1258
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Seattle
Posts: 8
wadehas is an unknown quantity at this point
Re: UCPP: cross-platform C++ toolchain

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... :-)
  #4   Spotlight this post!  
Unread 01-02-2013, 16:05
AntiSleep AntiSleep is offline
Registered User
FRC #1444
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: St. Louis
Posts: 4
AntiSleep is an unknown quantity at this point
Re: UCPP: cross-platform C++ toolchain

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
  #5   Spotlight this post!  
Unread 01-02-2013, 17:16
AntiSleep AntiSleep is offline
Registered User
FRC #1444
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: St. Louis
Posts: 4
AntiSleep is an unknown quantity at this point
Re: UCPP: cross-platform C++ toolchain

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.
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 14:05.

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