Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Universal C++ Project - C++ programming for Linux, and more (http://www.chiefdelphi.com/forums/showthread.php?t=91428)

AustinSchuh 23-02-2011 20:43

Re: Universal C++ Project - C++ programming for Linux, and more
 
Quote:

Originally Posted by davidthefat (Post 1030285)
Ok, sounds like a stupid question, but does the debuggers and watches and breakpoints and ect work? Those are some very, very important tools that most people seem to overlook here.

On Linux?

If you have a couple days to burn, it's possible to get all the breakpoints working on Linux. I've done it. If you are willing to document it for others, I can lead you through the process (from memory). It's not trivial though.

I've also yet to use a breakpoint with FRC for the last couple years, and it hasn't slowed me down much.

This summer (after the season and when my schedule calms down), I'd like to try to tackle porting the debugger. Should involve porting gdb_server over to the cRIO. Shouldn't be _that_ hard, but having not tried it, I don't know.

linuxboy 24-02-2011 19:08

Re: Universal C++ Project - C++ programming for Linux, and more
 
Ooh, I'm excited, I can't wait to use this (I can hear my mentor groaning about me wanting to use nonstandard tools in my head). I can already imagine the insane way I'll use this when I need some quick drive code, its going to involve a VPN, ssh, and a phone with a qwerty keyboard.
Seriously though I'm excited about this because I like linux (and mac).
Oliver

byteit101 27-02-2011 15:01

Re: Universal C++ Project - C++ programming for Linux, and more
 
The first (somewhat) usable Eclipse plugin is here!
Start by installing the main Universal C++ scripts, git (if on windows), Eclipse CDT, and putting ucpp in your path. Then open the install new plugin dialog and enter http://ucpp.thecatattack.org/ as the url, and install it all.
create a new C++ project, and right click and go to Universal C++> initialize ucpp and fill in what you want (if you have not already done so from the command line)
go to window>prefs>FIRST downloader prefs (ucpp) and set team number and out file (can be changed later)


Then you can create other projects and code
(for each project)right click, and go to Universal C++> mark as Ucpp project
it should autobuild, if not, click the hammer icon


Downloading
right click project>ucpp>download
...OR ...
FIRST>Download

nikitakit 27-02-2011 19:59

Re: Universal C++ Project - C++ programming for Linux, and more
 
Just tested this out on Ubuntu 10.10, and everything compiled!

However, I had to do a bit of hacking because it turned out that the "HOME" variable was unset inside the shell scripts. Do you have any idea why this happened? (If not, I can just add "set HOME variable if unset" to the shell scripts).

Also, I think you can simplify the "Initialize ucpp" dialog. On Linux, the two drop-down options would be:
* Automatically install the compiler and latest version of WPILib
* I already have the WindRiver compiler installed (and ask for the path to the C drive in this case)
If you re-use the team number inputted in the preferences dialog, that means that you can remove the long help-text off to the side.

Other than these suggestions, I think we're ready for the next release.

AustinSchuh 28-02-2011 03:11

Re: Universal C++ Project - C++ programming for Linux, and more
 
Quote:

Originally Posted by nikitakit (Post 1032320)
Also, I think you can simplify the "Initialize ucpp" dialog...

Unless I'm missing something (entirely possible), there's an even cleaner way. Check to see if the compiler is there on build, and if it isn't, then put up a prompt asking if the user wants you to install it. This sets things up so you can literally just hit compile and it'll work out the details. Almost dummy proof. :p

nikitakit 28-02-2011 03:34

Re: Universal C++ Project - C++ programming for Linux, and more
 
Quote:

Originally Posted by AustinSchuh (Post 1032514)
Unless I'm missing something (entirely possible), there's an even cleaner way. Check to see if the compiler is there on build, and if it isn't, then put up a prompt asking if the user wants you to install it. This sets things up so you can literally just hit compile and it'll work out the details. Almost dummy proof. :p

I don't think it can work quite this easily. For example, some Linux users might choose to use a copy of WindRiver on their Windows partition instead of downloading a separate one for the Linux code. On Windows, there's the choice of shell in which to run the command-line tools (MSYSgit, Cygwin, or possibly even a copy of bash bundled with Eclipse). This makes it hard to detect automatically if things have been set up yet. Also, the Linux auto-setup script includes your WPILib-downloading code, so it has to be rerun every time there's a new WPILib update.

Still, it is a good idea to pop up a "Do you want to set up the plugin?" window anytime it tries to compile something and doesn't find the settings file or the compiler.

byteit101 28-02-2011 15:22

Re: Universal C++ Project - C++ programming for Linux, and more
 
I'll work on those ideas when I have time (or you can fork it and i'll pull :)), that dialog is deceptively simple though, I had to practically re-write how I call stuff, and parts of it only work half the time :ahh:

I also just fixed the 3 plugin issue (It showed 3 identical plugins in the site), I forgot to clean the workspace before I built


All times are GMT -5. The time now is 15:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi