Go to Post So many questions are answered when people actually read the rules. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 16-06-2015, 03:14
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
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 ****
"C:\\Program Files (x86)\\FRC_Toolchain\\mingw\\bin\\mingw32-make.exe" all 
'Building file: ../src/DashboardDataFormat.cpp'
'Invoking: Thunder cRIO Tools C++ Compiler'
powerpc-wrs-vxworks-g++ -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -IC:\Users\Michael\Projects\Frc\2015\code\ReboundRumble\include -I"C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/../include/WPILib" -O0 -g3 -Wall -c -fmessage-length=0 -mcpu=603 -mstrict-align -mlongcall -MMD -MP -MF"src/DashboardDataFormat.d" -MT"src/DashboardDataFormat.d" -o "src/DashboardDataFormat.o" "../src/DashboardDataFormat.cpp"
'powerpc-wrs-vxworks-g++' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make: *** [src/DashboardDataFormat.o] Error 1

00:06:21 Build Finished (took 145ms)
I found the gcc compiler. It's in C:\Program Files (x86)\FRC_Toolchain\mingw\bin. So how to I tell Eclipse where to find it? I went through the maze of Eclipse Preferences and can't seem to find any tool path that I can configure.
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.
__________________
Reply With Quote
  #32   Spotlight this post!  
Unread 16-06-2015, 03:43
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: New tool for C++ Programming for old cRIOs

Quote:
Originally Posted by mikets View Post
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.
I think I figured out this particular problem. At the beginning of the 2015 season, when installing the software, the instructions advised to uninstall the old NI software including WindRiver. I found the Eclipse path still pointing to ${WIND_BASE}....\WPILib. Interestingly, even WindRiver was uninstalled, the c:\WindRiver\WPILib folder still exists. I supposed that's part of the FRCUpdate so WindRiver uninstall won't touch it. In any case, I extracted the WPILib header files and dragged those into the project include folder. That seems to fix the problem. Now I just need to tell Eclipse where to find g++. The code still has lots of red X's now complaining about some pure functions have not been implemented. So I am still missing something but I am ignoring this for now. Let's fix one thing at a time.
__________________
Reply With Quote
  #33   Spotlight this post!  
Unread 16-06-2015, 03:54
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
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.
__________________
Reply With Quote
  #34   Spotlight this post!  
Unread 16-06-2015, 10:34
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 494
tomy has a spectacular aura abouttomy has a spectacular aura about
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.
Reply With Quote
  #35   Spotlight this post!  
Unread 28-07-2015, 16:12
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: New tool for C++ Programming for old cRIOs

Quote:
Originally Posted by heydowns View Post
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.

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.
Reply With Quote
  #36   Spotlight this post!  
Unread 22-08-2015, 11:07
mandrews281 mandrews281 is offline
Registered User
FRC #0281
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Greenville SC
Posts: 82
mandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to beholdmandrews281 is a splendid one to behold
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.
__________________
Michael Andrews
Team #281 Programming Mentor
Reply With Quote
  #37   Spotlight this post!  
Unread 24-08-2015, 13:30
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: New tool for C++ Programming for old cRIOs

Hello,

Quote:
Originally Posted by mandrews281 View Post
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?
Is there any additional output? The above is the command set that runs during linking, but I don't see any output from the execution of it. If you have that, it may help me point you to what is going on.

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:
Thanks for the great good you have done porting the old toolchain the eclipse.
You are welcome - I am glad you are finding it useful.
Reply With Quote
  #38   Spotlight this post!  
Unread 24-08-2015, 16:54
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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
The transition from backslashes to forward slashes after the wind_base directory looks confusing to me. Is it similarly confusing to the tcl interpreter?
Reply With Quote
  #39   Spotlight this post!  
Unread 25-08-2015, 14:20
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: New tool for C++ Programming for old cRIOs

Quote:
Originally Posted by Alan Anderson View Post
Code:
tclsh "C:\Program Files (x86)\FRC_Toolchain\mingw\powerpc-wrs-vxworks\wind_base\/host/resource/hutils/tcl/munch.tcl" -c ppc
The transition from backslashes to forward slashes after the wind_base directory looks confusing to me. Is it similarly confusing to the tcl interpreter?
It is confusing, I agree; something I can look at cleaning out in a future version. But the tcl interpreter that is invoked deals with it just fine on the many installations I have tested with.
Reply With Quote
Reply


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 12:18.

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