Go to Post How are you planning to teleport balls? Or your robot? I was pretty sure that the battery couldn't supply the required power draw. - RoboChair [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-24-2010, 08:48 PM
ProgrammerMike7 ProgrammerMike7 is offline
Registered User
AKA: Mike
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 13
ProgrammerMike7 will become famous soon enoughProgrammerMike7 will become famous soon enough
Talking [WindRiver]Creating a fresh buildable project

Our team has had problems downloading our own code to the robot. All the sample code works, however when we went to create our own project, it would either not build, or not download (producing the infamous no code error). However after working on this, Andrew (basicxman) and I have come up with a solution that will create our own working project. The following are steps we took to do this and I hope it will help.

1. Make sure all updates are installed and cRIO is imaged using v19.
The updates that are needed are:
a. Labview Update
b.Driver Station Update
c.Missing File Needed
d.Workbench Update
The correct way to install the Driver Station can be found at this post: http://www.chiefdelphi.com/forums/sh...9&postcount=44

2. Open WindRiver. Go to File->New->Vxworks Downloadable Kernel Module

3. Name your project, and choose it's location. Then click next.

4. Click next if you do not want to reference any subprojects.

5. Do not change anything in the "Buid Defaults" or "Build Support" window, instead just click next.

6. In the Build Specs window, unclick the following check boxes: "PPC32diab", "PPC32gnu", and "PPC603diab". "PPC603gnu" should be the only box left checked. Click next.

7. Click next one more time and then click finish.

8. Enter the project explorer on the left-hand side of windriver. Right click on the project you just created and click "Properties".

9. Click "Build Properties" on the sidebar and select the "Build Support and Specs" tab. Under "Available and enabled build specs", make sure the only checked checkbox is "PPC603gnu".

10. Select the "Build Paths" tab. Click the "Add..." button. In the pop-up window, type (without quotations) "-I$(WIND_BASE)/target/h/WPILib". Click OK.

11. Select the "Libraries" tab. Click the "Add..." button. In the pop-up window, select the "Add full qualified library file" radio button. In the textbox, type (without quotations) "$(WIND_BASE)/target/lib/WPILib.a". Click OK.

12. Back in the properties window, click OK.

13. Now it's time to add your code. Right click the name of your project in the project explorer and click New -> File. Name your file whatever you choose but make sure it has a .cpp extension.

14. Write all your code.

15. If you include any files, check to see if it's in the WPILib Library. To do this, under your project, select Includes -> (file path ending with WPILib) and check if the file you included is there. If it is, disregard the rest of this step. If it's not, find out where this file is located. Now right-click on your project name in the project explorer. Click "Import...". Select General -> File Path -> Next, and then browse for the file. Check the files you want to include in your program. If there's a corresponding .cpp file with the .h file, import it too. Now click finish. This is an important step. Even if you specify the exact path in your program, if it's not in the WPILib library, it must be imported.

16. Make sure you are connected to the cRIO in the "Remote Systems" tab to the left side of windriver. If not, right click your robot name and click connect.

17. Click FIRST -> Undeploy from the menu bar at the very top of the window.

18. Then go to Window->Preferences and select "FIRST Downloader Preferences". Enter your team number in the format XXXX. Then click browse and navigate to your project folder. Enter the PPC603gnu folder followed by ProjectName\Debug and select the .out file. Click OK.

19. Click FIRST->Download to download the code to the cRIO. Make sure the download window does not just flash across the screen. If it does, make sure you have all the build setting and includes set properly as previously described.

20. Reboot the cRIO and run your code!

Note the first time you build your code, you may have to exit WindRiver, then reopen it and rebuild your project.

I hope this helps those of you who are having troubles creating your own projects or downloading code. Please reply if you need further assistance.

- Mike and Team 2200
__________________
Wait (-1)

Last edited by ProgrammerMike7 : 01-24-2010 at 08:59 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-25-2010, 09:01 AM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,033
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: [WindRiver]Creating a fresh buildable project

We've developed a convention that we just start all of our little code projects from the SimpleTemplate example and modify from there. Then everything is already setup correctly.

Another advantage of this is that when we're running in debug mode, everyone knows to just look for 'SimpleTemplate.out' and delete that on the remote connection, instead of trying to figure out what the name of the project that the other people are using.

However, I'm sure someone will find your instructions useful.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 01-25-2010, 02:19 PM
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: [WindRiver]Creating a fresh buildable project

Excellent write up on how to set up a project from scratch.

If I copy a project using windows explorer, how can I get that project to show up in workbench?
Brian?
__________________
Brian K
Team 1225 Robotics Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 01-25-2010, 07:36 PM
ProgrammerMike7 ProgrammerMike7 is offline
Registered User
AKA: Mike
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 13
ProgrammerMike7 will become famous soon enoughProgrammerMike7 will become famous soon enough
Talking Re: [WindRiver]Creating a fresh buildable project

Quote:
Originally Posted by SuperBK View Post
If I copy a project using windows explorer, how can I get that project to show up in workbench?
Hi, that is a good question, as I don't think there is a simple one-step way in just opening a project like you can a file. I will keep looking and let you know if I find an answer. However, I do know how to do it in a few steps.

First, create a project the same way I explained in my first post. Specifically, do steps 1 - 12 (including step 12). Now right-click on the project you just created in the project-explorer and click "Import...". Now in the pop-up window, click General -> File Path -> Next. Locate the folder the project you copied is in, and select all the .h and .cpp files from this folder. Click finish to import these files. Now continue with my initial instructions at step 15.

I hope this helps!

-Mike and Team 2200
__________________
Wait (-1)
Reply With Quote
  #5   Spotlight this post!  
Unread 01-30-2010, 06:08 AM
SteveGarward's Avatar
SteveGarward SteveGarward is offline
Red 5, standing by...
AKA: 7 years already
FRC #0111 (WildStang), FRC #3132 (Thunder Down Under)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Gurnee, IL
Posts: 173
SteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud of
Re: [WindRiver]Creating a fresh buildable project

Thanks for those detailed steps! Having used eclipse for a long time for Java development, I wanted to create a new, clean project after our sample robot code got a little out of hand after renaming files. So to have the steps for a non-Java project for an embedded system there like that really helped.

As for getting an existing (copied) project into a workspace, you can right-click in the Project Explorer, select Import..., then select to expand General, and then select Existing Projects into Workspace. Point it at the base directory of the project, and it will pick up the project file with the settings, and bring it all in to the workspace.

Hope that helps!
__________________
FRC Team 111 - WildStang (Mentor, Drive Coach)
FTC Team 7458 - Full Force! (Mentor, Coach)
FRC Team 3132 - Australia's FIRST FRC Team! (Holy crazy first year, Batman!)

Reply With Quote
  #6   Spotlight this post!  
Unread 01-30-2010, 07:33 AM
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: [WindRiver]Creating a fresh buildable project

Quote:
Originally Posted by SuperBK View Post
If I copy a project using windows explorer, how can I get that project to show up in workbench?
The solution is never use Windows explorer to manipulate Workbench projects or project files.
Use the Workbench Project Explorer instead.
Someone else has already described how to Import projects that are not already in your Workspace.

If you want to make a copy of a project that already exists in your workspace:

1) in the Project Explorer, right-click the project and select Copy in the pop-up context menu
2) in the Project Explorer, right-click in the white space and select Paste in the pop-up context menu -- this will pop up a Copy Project dialog box
3) in the Copy Project Dialog, type in the name you want for the copied project -- the default name will be "Copy of <whatever>" just like in Windows Explorer.

(You can also click on the project (to highlight it) and then use CTRL-C to copy and CTRL-V to paste)

Note that either way, the Copy Project dialog will have "Use default location" checked by default -- leave it checked.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)

Last edited by gvarndell : 01-30-2010 at 07:41 AM.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windriver - Cannot Create New Example Project Aaron S C/C++ 6 01-19-2010 09:25 PM
help:Downloading the project in windriver mahmosh C/C++ 5 01-10-2009 10:08 AM
Creating new MPLab Project Mike Programming 4 01-15-2006 02:26 PM
Buildable Bridge? archiver 2001 0 06-24-2002 01:18 AM
Fresh from the forum Ken Leung CD Forum Support 3 01-15-2002 10:22 PM


All times are GMT -5. The time now is 10:43 AM.

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