Can anyone point me to a good “Getting Started” resource for Windriver C/C++ FRC programming? We have our physical control system completed, device’s IP’ed, but are stuck on compiling, downloading, setting the Team Number in the IDE workspace preferences etc… The FRC manual was not complete and trails off on page 84.
If someone even has a simple step-by-step 1,2,3 text file for getting a project going I would appreciate it. I am starting to get stressed out, due to lack of progress, I had hoped to be driving today… Also, if anyone knows of sample source for setting up I/O, reading joysticks, that would be appreciated as well.
Thank you, thank you, thank you!
-Michael George
Mentor - Team #1711
Traverse City, MI
Compiling: Project->build project
This will create a .out file and place it in the project folder under another folder (mine is PPC603gnu) under debug (e.g. \visiondemo\PPC603gnu\visiondemo\debug\visiondemo.out
- Set up connection:
a) Target-> New Connection->Select: Wind River VxWorks Target Server Connection.
b) set the target location to the 10.xx.yy.2; Kernel image: select file and browse to c:\windriver\WPILib\vxWorks
c) click finished
If you are connected to the cRIO (either through the DS or directly), windriver should connect (in the remote systems window, you should see your new connection).
-
Window->Preferences: On left menu of preferences, click FIRST Download Preferences; enter team number and navigate to the .out file you want to download (note: you will need to change this file each time you want to upload a different file–with a different name–to the cRIO).
-
FIRST->Download
-
Reboot the cRIO and use the DS toggle to enable/disable programs
I know this is in a document somewhere…but I cannot remember where.
NOTE: Thanks to others on CD, I found out that if you right click on your VxWorks connection in the remote systems window, go to Target Tool->target console, select okay (I haven’t played with the settngs), you will get a console window with any printing commands.
NOTE: be sure to update the cRIO with the latest firmware (version 7) from: http://first.wpi.edu/FRC/frcupdates.html
Hope this helps!
A later version of that guide came with the latest Wind River V1.2 update.
Look for it on your PC at C:\WindRiver\docs\extensions\FRC
The Guide will grow and improve with each new update.
Chapter 3 of the control system manual will be your friend for getting the team number and updates applied.
http://www.usfirst.org/uploadedFiles/3-FRC%20Control%20System-Component-Datasheets-Rev-0-5a.pdf
The userguide is a very limited help unfortunately, our programming team sat down today and wrote a good portion of our autonomous code with the camera. You will find that this:
http://www.virtualroadside.com/WPILib/annotated.html
Will be your friend as well as the individual source files. We worked almost exclusively off of them.
While I am encouraging teams to use C++ as it has more features for debugging (the NI guys will argue with me about that but I have yet to see a real example) you will at this point need to have a solid understanding of classes, inheritance, and types, especially what an enum is.
There are also a lot of FIRST examples under File->New->Example->VxWorks Downloadable Kernel Module Sample Project
Not none of this will work right until you have applied the WPILib, NI, and DS updates.