View Single Post
  #14   Spotlight this post!  
Unread 03-02-2014, 14:47
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,169
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: URGENT: Code not working for various reasons

Quote:
Originally Posted by carrud View Post
This being a "single-mode OS" seems to be the underlying force behind this happening. At least in some cases.
There is a fundamental misunderstanding in this thread about what "deploying" really means. The transfer is from an FTP client (Windoze) to an FTP server (the robot). The file you are transferring is NOT a fully linked executable. It is code to be dynamically linked and loaded to the VxWorks/FIRST/WPI infrastructure on the robot. So every unknown symbol in the deployed .out file must be satisfied in the text and data segments of the VxWorks/FIRST/WPI/NI code already on the robot (put there when we image the cRIO). This dynamic linking loader is a single pass algorithm, not a dual pass linker like the one we use when combining multiple objects on our development station (where the WindRiver 3.3 is running).

So how does one make sure their code will load and run (2 distinctly different issues)? Most FIRST programmers simply deploy and debug using print/log/smartconsole output. But without using the debugging interface to the robot, you will miss messages about the unresolved symbols and/or tasks getting suspended for various violations (memory access, divide by zero etc). Instead create a target server and load and run your code using the debugging tools and you will see these errors and fix them. FIRST has a tutorial that covers this procedure. NetConsole MIGHT catch them depending on how badly the errors cripple the OS on the robot.

http://wpilib.screenstepslive.com/s/...-robot-program

Many of you might think this is a lame setup. But I remind you this exactly how adding code to the Linux kernel (and many other operating systems) works. WindRiver and VxWorks are not unusual in this respect.

HTH
__________________
Fast, cheap or working - pick any two!

Last edited by wireties : 03-02-2014 at 14:58. Reason: added link to debugging tutorial