i’m new to the windriver C/C++ coding. we usually use LabVIEW but we are debating switching over one of our older show robots to a cRIO for ease and to help teach freshman about electronics and such. but i unfortunetly am not talented in C/C++ and would like to use this as an oppurtunity to learn it. so i guess my question is: Can someone point me in the right direction on how to set up Windriver and where i should look for tutorials on programming a robot using it?
P.S. I tried to post this twice already, but it somehow is getting removed. I’m not getting any message, so I’m trying one more time. My bad if I’m not supposed to be resubmitting or if it shows up several times.
No problem. The postscript was more a message to the mods in case I was being filtered for some reason, so they’d know I wasn’t trying to avoid it, just confused.
Our team has been trying to follow the “Getting Started with C” document, and have been spinning our wheels for the past week in a fruitless effort to get the first example to load and run! We got through setting up Wind River(including updates), Imaging the cRio, and setting it up for C++. We got Wind River to connect, and the sample project based on the Simple Robot template appears to build, but when we try to get it to run, nothing. Tried a debug session, but couldn’t locate the entry point “FRC_UserProgram_Startup LibraryInit”.
At this point what we could really use is someone to hold our hand getting a first application to run, but haven’t located anyone in our area (Ypsilanti MI.) who is using C++. Has anyone been able to get into the beta version of Virtual Advisor that Bill blogged about? Thought that might be a place to look, but cant find a working login.
Hate to think of going back to LabView, as that’s been a nightmare the last couple years. The kids decided that C on the old IFI controller was much easier and wanted to try it on the cRio this year. Any suggestions would be appreciated.
So by not being able to find the FRCStartuplibraryuserprogram init entry point, I’m assuming that when you select entry point and scroll to the bottom is does not list your project? If so, you need to make sure that your project is selected under the projects tab (this is still in the same dialog that you get by doing debug->open debug dialog) and that the .out file is selected under the downloads tab. You can find this by browsing to the PPC->your project (NOT the partial image)->debug->yourproject.out (not at a computer with windriver so this may not be exact file paths).
Once you have this selected you can go back to the entry point, scroll to the bottom and you should now see a .out file. Expand this leaf and a TON of options will appear, but you’ll need to find the startuplibrary one that you said before. Hope this helps
If you just want to load some code on the robot and run it then don’t worry about a debug session for now. I think most people probably do their debugging with print statements and the NetConsole anyway.
To load your compiled code to the robot do the following:
In the Windriver Workbench:
Window->Preferences->First Downloader Preferences
Enter your team number
Browse for the .out file that you created when you compiled
When you click the little arrow next to the bug symbol, click on Open Debug Dialog. Now double click on Kernel Task. This should create a new dialog that you can use to debug code on the robot. Look at the projects tab, make sure the project you want is selected, if not then add it. Check the downloads tab and make sure the .out file is there. Go to Debug Options and check Automatically attach blah blah blah. Now go the the first tab and make sure the IP to download to is correct, 10.your.team.2 i would assume. Click on entry point, browse to the bottom and expand the project leaf and find the startup library one. Now you should be good to go.
Remember that to download code for debugging, there cannot currently be code on the robot (either deployed or currently debugging), so either undeploy and restart or just restart respectively if necessary. (Again this was done out of memory so sorry if something isnt exact)
We finally just gave up on the SimpleRobot project and tried the BuiltinDefaultCode project. We got it to build and deploy and the drivers station application finally showed code running on the robot. From there we were able to figure out that the PWM cables were plugged in Backwards!