Go to Post ...the future of FIRST is very bright with all the great students and mentors coming out of the program, staying involved, and contributing their ideas and energy. - Jason Morrella [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 10-02-2011, 14:45
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
Universal C++ Project - C++ programming for Linux, and more

While WindRiver provides an excellent programming environment, it is not suitable for everyone. The Universal C++ Project (UCPP) aims to provide development tools that allow programmers in different environments, such as Linux, Mac OSX, Eclipse, command line, and others. At the same time, we intend to remain compatible with WindRiver projects, allowing WindRiver and UCPP users to collaborate on projects.

Project Pages and Downloads:
FIRST Forge project: http://firstforge.wpi.edu/sf/projects/ucpp
Releases (zip files): 0.1+git20110208
Source code via git: https://github.com/nikitakit/ucpp

Instructions for installing and using UCPP are in the readme file accompanying the source code.


Platforms currently supported:

Linux with WindRiver files
-- Compile C++ code on Linux with a WindRiver installation (ideal for dual-boot systems with WindRiver installed on the Windows drive). There is a command line interface for generating Linux makefiles for a C++ project and runs WindRiver gcc under wine in order to compile the project.

Linux without WindRiver files
-- Same as above, except that the compiler, VxWorks, and WPIlib are automatically downloaded from the Internet

Windows using the MSYSgit command line
-- Still requires WindRiver to be installed, but if you prefer to use another IDE or text editor you can now compile and deploy code from the command line.


Platforms coming soon...

Windows/Cygwin command-line interface (this should be possible with just a minor bit of tweaking)
MacOS X port of the Linux environment
Cross-platform Eclipse IDE plugin (about half done)
Explorer/Nautilus(/Finder?) right click build and deploy options

Project Members:
nikitakit
byteit101
andreboos

Special thanks to:
AustinSchuh
__________________
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
  #2   Spotlight this post!  
Unread 10-02-2011, 19:39
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Universal C++ Project - C++ programming for Linux, and more

Interesting, I'll be looking forward to this next year when we program in C++. (That is if we do)
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #3   Spotlight this post!  
Unread 11-02-2011, 09:26
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Universal C++ Project - C++ programming for Linux, and more

I'll definitely try this out tomorrow--cool stuff.
  #4   Spotlight this post!  
Unread 11-02-2011, 10:33
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Universal C++ Project - C++ programming for Linux, and more

Is there support for reading the target console output without NetConsole?
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
  #5   Spotlight this post!  
Unread 11-02-2011, 13:23
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: Universal C++ Project - C++ programming for Linux, and more

Quote:
Originally Posted by davidalln View Post
Is there support for reading the target console output without NetConsole?
Code:
socat UDP4-RECV:6666 STDOUT
  #6   Spotlight this post!  
Unread 12-02-2011, 11:54
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Universal C++ Project - C++ programming for Linux, and more

While playing around with it, the compiling appears to be working great. However, I am having a small problem with the Makefile in the root directory of the project. Using the default configuration, I get the following error when attempting to run make (I get the same output when running make deploy):

Code:
cd PPC603gnu && exec make -f Makefile_linux "Makefile" 
make[1]: Entering directory `/home/wiredcats/code/Wiredcats2011/PPC603gnu'
make[1]: *** No rule to make target `Makefile'.  Stop.
make[1]: Leaving directory `/home/wiredcats/code/Wiredcats2011/PPC603gnu'
make: *** [Makefile] Error 2
My quick hack replaced the Makefile with this:

Code:
#UCPP makefile

# For the default target, use the WindRiver makefile
all: force
        cd PPC603gnu && exec $(MAKE) -f Makefile_linux

# TODO: insert targets that download gcc and WPIlib

# For all other targets, use the WindRiver makefile
deploy: force
        cd PPC603gnu && exec $(MAKE) -f Makefile_linux deploy 

force: ;
Everything works as expected in terms of building/deploying (or at least, it appears it does. I haven't tested it on a cRIO yet). But of course, it isn't ideal as it only lets me use the "deploy" target. I'm not too proficient in make, so I'm not positive as to how to fix it myself.

I'm running Ubuntu 10.04 with GNU Make 3.81 if it helps. I'm about to head to the shop, so I'll keep you posted on whether or not it successfully deploys and runs.
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
  #7   Spotlight this post!  
Unread 12-02-2011, 12:51
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: Universal C++ Project - C++ programming for Linux, and more

My best guess at what is happening is that "Makefile" is a default target of sorts, and it gets matched by the wildcards. For some reason, I don't have any problems on my machine. Maybe it's because I have a WindRiver makefile so the "Makefile" target is skipped instead of giving an error.

I think I've finally figured out how to fix it:

Code:
#UCPP makefile

# Default target
all: force
    cd PPC603gnu && exec $(MAKE) -f Makefile_linux

# Don't do anything for the "Makefile" target
Makefile: ;

%: force
    cd PPC603gnu && exec $(MAKE) -f Makefile_linux "$*"

force: ;
  #8   Spotlight this post!  
Unread 12-02-2011, 13:34
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Universal C++ Project - C++ programming for Linux, and more

Quote:
Originally Posted by nikitakit View Post
I think I've finally figured out how to fix it:
That fix worked great (once I redid the tab spaces)! I have successfully loaded code from Ubuntu to the cRIO. Thanks for the great tool, I'll be using it here on out
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
  #9   Spotlight this post!  
Unread 12-02-2011, 13:56
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: Universal C++ Project - C++ programming for Linux, and more

Quote:
Originally Posted by davidalln View Post
That fix worked great (once I redid the tab spaces)! I have successfully loaded code from Ubuntu to the cRIO. Thanks for the great tool, I'll be using it here on out
Great! I'm going to commit those changes and maybe make a quick patch-up release.
  #10   Spotlight this post!  
Unread 12-02-2011, 14:23
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Universal C++ Project - C++ programming for Linux, and more

Ah, just one more problem...

I keep all of my tasks in a separate folder in my root directory named Tasks. It looks like by default, UCPP is only looking for files in the root directory to add to the Makefile. Is there a way to add those files in the folder?


I solved my own problem. I created a file named .ucppdirs in my root directory of the code, then edited ucpp_gen_makefile.py as such:

Code:
# Find all the C++ files in the current directory

file_names = []

d = file(".ucppdirs", "r")
dirs = d.read()
d.close

for direc in dirs.split():
    for filename in os.listdir(direc):
        if filename[-4:]==".cpp":
	    file_names.append(direc + filename[:-4])
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.

Last edited by davidalln : 12-02-2011 at 15:38. Reason: problem solved!
  #11   Spotlight this post!  
Unread 14-02-2011, 22:47
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Universal C++ Project - C++ programming for Linux, and more

I managed to try this out today, and it worked flawlessly. Thanks guys!
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 13:32.

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