Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   New tool for C++ Programming for old cRIOs (http://www.chiefdelphi.com/forums/showthread.php?t=133952)

heydowns 03-02-2015 23:31

New tool for C++ Programming for old cRIOs
 
If your team is like mine and has a bunch of old cRIOs laying around for prototyping use or installed on old robots to use for demonstrations and such, and you've been programming them using C++, you may have recently found yourself unable to program them anymore due to an expired WindRiver Workbench license!

Well, we've developed a relatively simple to use plug-in for Eclipse that enables teams to continue to develop programs for their old cRIOs without WindRiver Workbench. This enables cRIO development alongside current roboRIO-based development in the same IDE.

If this interests you and your team, you can get the plug-in by following the instructions on the project page over at Teamforge:
https://usfirst.collab.net/sf/projec..._crio_c_tools/

The instructions and Eclipse update site link are on the Wiki page:
https://usfirst.collab.net/sf/wiki/d.../wiki/HomePage


Thanks go to Patrick Plenefisch of WPI for bundling the toolchain that backs the plugin.

Travis Hoffman 04-02-2015 03:37

Re: New tool for C++ Programming for old cRIOs
 
Huzzah and such. Thanks for filling the void.

matan129 14-03-2015 04:12

Re: New tool for C++ Programming for old cRIOs
 
Very cool! Thanks.

teslalab2 05-04-2015 23:41

Re: New tool for C++ Programming for old cRIOs
 
Thank you very much, now we can use our RioPaperWeights again...

heydowns 06-04-2015 12:09

Re: New tool for C++ Programming for old cRIOs
 
Glad teams are finding it useful.

If you have problems with it, please feel free to reply to this thread or create a tracker on the teamforge project page (you do not need to be a member of the project to create a tracker, you only need to have an account on teamforge which anyone can create).
Please don't create new CD threads for problems as the students responsible for this project and I are not regularly monitoring CD for such.

MikLast 29-04-2015 21:22

Re: New tool for C++ Programming for old cRIOs
 
Firstly, thank you for making this. this is a big help for our team as we cant afford to buy 9000+ roboRIO's :P

Now, i am having an issue. we installed the toolchain, installed the plugin, everything is there and it works. We are trying to import last years code in so we can get that bot up and running, following the instructions we made a new project, got rid of the sample cpp, imported ours (just one file as we haven't done multithreading until this year, also didn't have a header file) and i opened up the project. go to look for it in Eclipse, nothing was there. the file is in the src directory, so we are confused on what else needs to be done to find the code, and have it show up.

heydowns 30-04-2015 11:06

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by MikLast (Post 1478722)
Firstly, thank you for making this. this is a big help for our team as we cant afford to buy 9000+ roboRIO's :P

You are welcome!

Quote:

Now, i am having an issue. we installed the toolchain, installed the plugin, everything is there and it works. We are trying to import last years code in so we can get that bot up and running, following the instructions we made a new project, got rid of the sample cpp, imported ours (just one file as we haven't done multithreading until this year, also didn't have a header file) and i opened up the project. go to look for it in Eclipse, nothing was there. the file is in the src directory, so we are confused on what else needs to be done to find the code, and have it show up.
When you say you "imported" your code, how did you do that?
If you place the files in the src directory using, say, Windows explorer or some other method, you may need to tell Eclipse to re-scan the directories for source files. You can do this by right-clicking the project and choosing "Refresh".
How I tend to import existing sources is this way: Start with a new project. Remove the sample/starter cpp file if you don't need it. Open Windows explorer and browse to the files you wish to import. Drag & Drop all cpp files into the src folder in the new project *inside Eclipse*. If it prompts you, tell it you want it to copy the files. Do the same for any headers you have, but drop them to the include folder instead.

Let me know if this doesn't get you going; leave as much detail as possible!

MikLast 30-04-2015 15:07

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by heydowns (Post 1478856)
When you say you "imported" your code, how did you do that?
If you place the files in the src directory using, say, Windows explorer or some other method, you may need to tell Eclipse to re-scan the directories for source files. You can do this by right-clicking the project and choosing "Refresh".
How I tend to import existing sources is this way: Start with a new project. Remove the sample/starter cpp file if you don't need it. Open Windows explorer and browse to the files you wish to import. Drag & Drop all cpp files into the src folder in the new project *inside Eclipse*. If it prompts you, tell it you want it to copy the files. Do the same for any headers you have, but drop them to the include folder instead.

Let me know if this doesn't get you going; leave as much detail as possible!

Theres a reason why i am not the head programmer. This worked, and theres almost no errors with the code! going to fix those errors and see if we can get it on the cRIO, thanks again for this!

heydowns 30-04-2015 15:11

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by MikLast (Post 1478972)
Theres a reason why i am not the head programmer. This worked, and theres almost no errors with the code! going to fix those errors and see if we can get it on the cRIO, thanks again for this!

Great! Hope the tools prove helpful for you and your team!

pluto7443 01-05-2015 09:14

Re: New tool for C++ Programming for old cRIOs
 
So, we tried to use this plugin, but whenever we try to build the program, there are a number of errors.
'Invoking: Thunder cRIO Tools C++ Compiler'

g++ -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -IC:\Users\TEAM 4917\workspace\boom\include -I"C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/../include/WPILib" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/robot.d" -MT"src/robot.d" -o "src/robot.o" "../src/robot.cpp"

g++: error: 4917\workspace\boom\include: No such file or directory

mingw32-make: *** [src/robot.o] Error 1

Those are the last three lines of the build log.
Any help would be appreciated, thanks!

heydowns 01-05-2015 10:06

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by pluto7443 (Post 1479196)
So, we tried to use this plugin, but whenever we try to build the program, there are a number of errors.
'Invoking: Thunder cRIO Tools C++ Compiler'

g++ -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -IC:\Users\TEAM 4917\workspace\boom\include -I"C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/../include/WPILib" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/robot.d" -MT"src/robot.d" -o "src/robot.o" "../src/robot.cpp"

g++: error: 4917\workspace\boom\include: No such file or directory

mingw32-make: *** [src/robot.o] Error 1

Those are the last three lines of the build log.
Any help would be appreciated, thanks!

Looks like there may be a bug when the user files are within a directory path which contains spaces.

I will try to fix it in the next couple of days. In the meantime, if you move your Eclipse workspace (File>Switch Workspace, choose a new directory, perhaps c:\eclipseworkspace or something) things should work just fine.

Sorry about this - we'll see if we can't get it fixed! Thanks for the details!

Alan Anderson 01-05-2015 12:00

Re: New tool for C++ Programming for old cRIOs
 
Code:

g++ -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -IC:\Users\TEAM 4917\workspace\boom\include -I"C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/../include/WPILib" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/robot.d" -MT"src/robot.d" -o "src/robot.o" "../src/robot.cpp"

g++: error: 4917\workspace\boom\include: No such file or directory

mingw32-make: *** [src/robot.o] Error 1

The first -I needs to have its path in quotes because of the space in the "TEAM 4917" directory name. It should be this instead:

Code:

g++ -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -I"C:\Users\TEAM 4917\workspace\boom\include" "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/../include/WPILib" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/robot.d" -MT"src/robot.d" -o "src/robot.o" "../src/robot.cpp"

heydowns 01-05-2015 13:01

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by Alan Anderson (Post 1479251)
The first -I needs to have its path in quotes because of the space in the "TEAM 4917" directory name. It should be this instead:

This is actually generated by the tool suite. It can be fixed by hand as you mention, but ultimately it is a bug in the tool suite. We'll get it fixed soon.

zehcorah 04-05-2015 08:41

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by heydowns (Post 1479270)
This is actually generated by the tool suite. It can be fixed by hand as you mention, but ultimately it is a bug in the tool suite. We'll get it fixed soon.

how would we be able to fix it by hand, we are on a fairly tight time constraint with this project. thank you for all the help and efforts so far :D

heydowns 04-05-2015 17:03

Re: New tool for C++ Programming for old cRIOs
 
Quote:

Originally Posted by zehcorah (Post 1479803)
how would we be able to fix it by hand, we are on a fairly tight time constraint with this project. thank you for all the help and efforts so far :D

The easiest way is to place your Eclipse workspace in a location (folder) that does not contain spaces as described in my earlier post. Go to File->Switch Workspace in Eclipse. Browse to your c:\ directory and create a new folder and select that to be your workspace. Then do everything you'd been doing before (you can even copy the project from the old workspace to this one if you want). This will work around this issue.

The other option is to edit the compiler options to fix as per Alan's suggestion. Right click the project in Project Explorer in Eclipse. Choose properties. Expand C/C++ Build in the tree at left, then choose Settings under it. In the right side of the window, expand "Thunder cRIO Tools C++ Compiler" if it is not already, then pick "Includes" under that. The first entry in the list at right under "Include Paths" should be your project's include directory. Double-Click this entry to bring up the edit box for it, then put double quotes (") both at the beginning and at the end of the text that is already there. Click "OK" all the way out, then try to build again. It should resolve the issue.
Alternatively if you do not use any header files in the include directory of your project, you can just delete that first entry instead of editing it to add the quotes.


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

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