We’ve cut and pasted the code from the Programming Guide into Wind River. When we build the project it gets errors referencing the classes. I suspect it can’t find them from the built in library. Our communication with the Crio seems fine - download seems to work.
I’ve programmed in Visual C++ for years but am having trouble getting started in Wind River.
Does anyone know what I’m doing wrong? Help is much appreciated!
It’s easiest to start from one of the supplied Wind River templates, rather than write a program from scratch your first time out of the gate, so to speak.
There are a bunch of background connections to libraries and such, that won’t be there for a scratch project. If you’re interested in all the required setup steps you can create a project from a template, then inspect all the optional settings that have been made for you.
Thanks Mark. Do you know where the templates are? I can’t seem to find the info in the manual.
Thanks again!
This is from memory so it may be a little off. The templates are actually called examples. You can goto file-new-example and find them listed. The ones prefixed with ‘FRC’ is what you want.
The manual goes through the steps of setting up one of these examples so you might wanna glance over that:
http://first.wpi.edu/Images/CMS/First/C_CPP_Programming_Guide.pdf
Alex’s memory is pretty good.
After choosing Example, select “VxWorks Downloadable Kernel Module Sample Project” and you’ll see the list of available examples.
I’d start with the
FRC Simple Robot Template
"This program is the simplest sample program that implements the full field control and shows the use of the watchdog timer. This is an excellent starting point for your programs.
This program simply drives forward for 2 seconds in the Autonomous period and does simple arcade driving during the Operator Control period. "