View Full Version : How do I load the default code?
HarryScheiner
05-02-2009, 18:39
Hi, I'm trying to set up Wind River with the default code to get at least something on the flash memory of the cRIO. I've set up a project with the SimpleTemplate, but from what I can see, the project only includes .h files, and MyRobot.cpp. Shouldn't there be .cpp files for each .h file? I can see no declarations for any of the functions in the .h files anywhere in the project, and I searched for ".cpp" in the WindRiver directory and could not find anything. However, I downloaded the source code (WPILibRC0.1718SourceCode.zip) from http://first.wpi.edu/FRC/frcupdates.html , but I can't figure out what directory it has to go in in order for this to work.
Any help would be greatly appreciated. Thank you.
EDIT: I forgot to mention, the default code from the cRIO imaging tool works fine, but it does not stay in memory after a reboot.
wt200999
05-02-2009, 21:58
There are no .cpp files because they are pre-compiled. Just build the default template, and download it to your robot. The file to load is found under preferences->first downloader
HarryScheiner
05-02-2009, 22:24
I tried that, but when I load the code the robot does not move.
byteit101
06-02-2009, 17:52
did you go to File>New>Example:vxWorks Download... :Next:FRC Simple Robot Template:Finish?
also make sure you enable the robot
Edit: enable by the switch you attach on the side of the DS
HarryScheiner,
1)Did you make sure to Undeploy (Under the same FIRST menu bar entry as Download) before downloading the SimpleTemplate?
2)After downloading, did you reset the robot?
3)Have you connected the cRIO's serial port to your PC via a null-modem connection? Is VxWorks throwing up any error messages to the console as it boots?
HarryScheiner
09-02-2009, 17:40
HarryScheiner,
1)Did you make sure to Undeploy (Under the same FIRST menu bar entry as Download) before downloading the SimpleTemplate?
2)After downloading, did you reset the robot?
3)Have you connected the cRIO's serial port to your PC via a null-modem connection? Is VxWorks throwing up any error messages to the console as it boots?
1) Yes
2) Yes
3) Could you explain this? I'm not sure I understand.
3) Could you explain this? I'm not sure I understand.
What I mean is, have you done the following:
-Flipped the DIP switch on the cRIO that says "Console"
-Connected the 9-pin serial port on the cRIO to your computer (either a serial or USB port, depending on what you have available) with a null-modem cable
-Opened a terminal in Workbench (from the menubar Window -> Show view -> Terminal) or connected via some other program like HyperTerminal or PuTTY. Regardless of what you use, the settings should be:
connection type - serial
9600 baud,
8 data bits,
1 stop bit,
no parity,
no flow control
-Watched the cRIO's boot messages on the terminal to see if it's outputting any errors
HarryScheiner
11-02-2009, 11:52
Thank you. I managed to get it working, it turned out to be the simple mistake of not having the latest cRIO Imaging Tool. Guess I glanced over that one when I was updating :o
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.