![]() |
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. |
Re: New tool for C++ Programming for old cRIOs
Huzzah and such. Thanks for filling the void.
|
Re: New tool for C++ Programming for old cRIOs
Very cool! Thanks.
|
Re: New tool for C++ Programming for old cRIOs
Thank you very much, now we can use our RioPaperWeights again...
|
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. |
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. |
Re: New tool for C++ Programming for old cRIOs
Quote:
Quote:
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! |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Quote:
|
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! |
Re: New tool for C++ Programming for old cRIOs
Quote:
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! |
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"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" |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Quote:
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. |
Re: New tool for C++ Programming for old cRIOs
i followed the steps that you provided and im still getting cc1plus.exe has stopped working and the error
mingw32-make: ***[src/robot.o] Error 1 if you have any ideas on how to fix this i would greatly appreciate it |
Re: New tool for C++ Programming for old cRIOs
Quote:
If you didn't try moving the workspace yet and re-creating the project files (make a new project entirely in the new workspace, then re-import your sources to it), I would strongly suggest trying that. If that does not work, can you provide more details about your computer system and eclipse version? |
Re: New tool for C++ Programming for old cRIOs
I moved the work space and it got rid of that error now there is a error with START_ROBOT_CLASS (SimpleRobotDemo); we noted it out and the 3 errors went away. All 3 are semantic errors for the same line.
|
Re: New tool for C++ Programming for old cRIOs
I have an Eclipse Luna with only Java support installed. So I added the C++ CDT via "Install New Software" from the luna cdt site. Then I installed the tool chain. Then I installed the Thunder cRio Tools. This all appeared to work correctly.
When I try to create a C++ project, under the shared library folder, there is no "FRC cRio Binary" option as described in the documentation. Also, the tool chain does not appear in the right hand window (at least not that I can identify...there are tool chains listed but no FRC specific name) if it is supposed to. |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Yes, JDK 1.8 is installed. I found that if I look in Windows/Preferences/C++/New Project Wizard settings, I can see FRC cRio listed as a project type and the Thunder Rio tool chain is shown. I set this project type as the default.
However, when I try to create a new C++ project, the FRC cRio project type is not offered. I have reinstalled the tool chain, the plugin, the C++ CDT with no apparent problems but I still can't create a new C++ project as described by the documentation. |
Re: New tool for C++ Programming for old cRIOs
If you're not seeing the library configuration under shared libraries, than then Eclipse is not detecting the toolchain. There is a checkbox on that dialog which causes it to show all possible configurations. Check that and it should work.
|
Re: New tool for C++ Programming for old cRIOs
On luna, the box says "show project types and chains only if supported on the platform". If this box is checked, shared library does not show up. If I uncheck this box, shared library shows up, but the FRC cRIO Binary project and thunder toolchain do not show as options.
Again, I see FRC cRIO Binary and toolchain in the preferences settings for New C++ Project Wizard. Since I started with Java only Eclipse, and added the CDT afterwards, I only installed the basic CDT components. Maybe there is something on the optional CDT components list that I need to make this work...?... |
Re: New tool for C++ Programming for old cRIOs
Good news. I found the problem. When I added the C++ CDT to my existing Eclipse Java setup, I forgot to install the FRC C++ tools plug in. Thought I had done that but turns out not. All seems to be working for now.
|
Re: New tool for C++ Programming for old cRIOs
Oddly enough, this plugin worked fine for me without the FRC C++ plugin installed. I do have the Java one though.
I had a different problem, though. At first, I had issues with make, but I set it to use the internal builder by default, and it worked fine. Moreover, the commands that it tried to run as a post-build step (the ones that make, build, and link the constructors and destructors file) failed on the first step. It seems like eclipse was not honoring the pipe characters. I suspect that there may have been an issue with me having Git's included posix tools in my path, but thought that I tried removing them and it still failed. Then, I noticed that Eclipse seemed to be putting backslashes in front of every double quote. So, I tried executing the commands one-by-one in cmd, removing the backslashes, and they worked fine. I then moved them into a batch file, and they kept working fine. I then set it so that eclipse executed the batch file as a post-build step. The batch file is here. Did anyone else have this problem? |
Re: New tool for C++ Programming for old cRIOs
Quote:
In either event, I'm glad you got it working. For anyone reading the thread and planning to install Thunder cRIO tools, please be sure you are using the CDT-capable eclipse in the first place as described on the installation Wiki page. It will save you a lot of time and frustration. |
Re: New tool for C++ Programming for old cRIOs
Quote:
Quote:
If you can elaborate on the problem with the Thunder cRIO Tools builder I can look into it. |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Quote:
They stem from the way the project is built up where Eclipse's build system tries (too) early to build the project, before the project has been fully configured internally with the toolset (which never invokes g++/gcc by those names). The error is recorded and never cleared. The toolset does attempt to clear out those errors and force an initial build when the project has completed all configuration though and in all my tests this works here (you'll see the error briefly upon creation of a new project, then it will go away as soon as the rebuild is done, about 20 seconds later on my personal and all our school machines). You should be able to select those errors in the list, right click, and delete them and they should not reappear. Also whilst I am here - we have not forgotten about the "space in workspace path" problem noted earlier in the thread. Just have not had time yet to address it. |
Re: New tool for C++ Programming for old cRIOs
My team and I were trying to use this today and when we went to download the code to the robot it said binary files not found any suggestions?
|
Re: New tool for C++ Programming for old cRIOs
Since the season is over and school has ended, we are starting to look into reviving all our old robots with the cRIO controllers. We are very happy to find your tool chain for Eclipse. Thank you very much.
In season 2015, we switched from C++ to Java but we did follow the instructions to install Eclipse with C++ so that the environment can handle both Java and C++. Now it's the real test if that works. We followed your instructions installing the tools chain, configuration the team number and all that. We created a new C++ project. Drag our Rebound Rumble code to the src folder within Eclipse. Everything seems working smoothly. However, when it comes to time for compiling the project, it gave us some trouble. It looks like Eclipse doesn't know where to find the gcc compiler: Code:
00:06:20 **** Build of configuration cRIODebug for project ReboundRumble ****Also, the code currently has lots of red X's. It seems the #include WPILib.h line couldn't be resolved. I must have missed a step to "import wpilib". I thought it's part of the tool chain install but may be not. Please advise how to fix this. Thank you very much for putting this out. |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
Re: New tool for C++ Programming for old cRIOs
Regarding the g++ not found issue, I suspect it has something to do with the Eclipse perspective. I clicked Window->Open Perspective->Other to open the perspective dialog. It showed the "C/C++ {default}" perspective. Since it said it's the default, I think I am good. In any case, just for good measure, I selected it and click OK anyway. But it didn't do anything. Still got the same g++ not found error.
|
Re: New tool for C++ Programming for old cRIOs
I'm having a major error when I go to deploy the code. I get an error stating it cannot find the .out file. I looked under the cRIODebug and it didn't create the .out when we built the code. Any suggestions.
|
Re: New tool for C++ Programming for old cRIOs
Quote:
Just a quick note to follow up on this issue. We've released a new version of the plug-ins which will resolve the "spaces in your project path" issue noted earlier in the thread. If you were encountering this issue and did not work around it, you will want to grab the update and then re-create your project by running the new project template again. Unfortunately the fix was with the project creation wizard, so recreating a project is the only easy way to fix it. To get the new version, you can just "check for updates" in eclipse, assuming you have the update site installed and enabled, which you likely will if you have the older version of the plug-in. |
Re: New tool for C++ Programming for old cRIOs
I'm seeing an error on some of our systems (Lenovo W540 running Windows 7) with the post-build step. The tclsh program is crashing when I run the build runs the following step:
' ' C:/Program Files (x86)/FRC_Toolchain/mingw/bin/mingw32-make --no-print-directory post-build powerpc-wrs-vxworks-nm "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/hooks2.so" | tclsh "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/host/resource/hutils/tcl/munch.tcl" -c ppc | sed "s/extern void\(.*\);/extern void \1 __attribute__((externally_visible));/" > "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/ctdt.c" && powerpc-wrs-vxworks-gcc -c "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/ctdt.c" -o ctdt.o -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -fmessage-length=0 -mcpu=603 -mstrict-align -mlongcall && powerpc-wrs-vxworks-g++ "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/ctdt.o" "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/hooks2.so" -o "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/hooks2.so.out" -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -fmessage-length=0 -mcpu=603 -mstrict-align -mlongcall -r -Wl,-X -static -T "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\\..\share\ldscripts\dkm.ld" && powerpc-wrs-vxworks-stripsyms.bat "C:/Users/entech/Entech2013RobotPele/hooks2/cRIODebug/hooks2.so.out" "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\\..\lib\libstdc++.a" "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\\..\lib\libsupc++.a" "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\\..\..\lib\gcc\powerpc-wrs-vxworks\4.8.2\libgcc.a" ' ' The ctdt.c file is not getting created. Has anyone else seen this? Any ideas for fixing the problem? Thanks for the great good you have done porting the old toolchain the eclipse. |
Re: New tool for C++ Programming for old cRIOs
Hello,
Quote:
I don't have any reason to believe this is your specific problem, but the vast majority of issues I have had people tell me they encountered has to do with odd additions to the PATH environment setting in Eclipse. For other readers of this thread, if you are having seemingly random issues and have installed any other Eclipse plugins (outside of the WPI FRC ones), check the PATH setting inside of Eclipse by right clicking your Thunder cRIO Tools-based project, choose Properties, expand C/C++ Build on left, then pick Build Variables. If you have any variables set, especially PATH, you may wish to try deleting them (make a copy elsewhere first!) and re-running your build. Quote:
|
Re: New tool for C++ Programming for old cRIOs
Code:
tclsh "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/host/resource/hutils/tcl/munch.tcl" -c ppc |
Re: New tool for C++ Programming for old cRIOs
Quote:
|
| All times are GMT -5. The time now is 12:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi