View Single Post
  #2   Spotlight this post!  
Unread 23-01-2008, 21:29
sfs sfs is offline
Registered User
AKA: Steve Siirila
FRC #2220 (Blue Twilight)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Eagan, MN
Posts: 20
sfs is an unknown quantity at this point
Re: printf or PrintToScreen?

Quote:
Originally Posted by BradAMiller View Post
PrintToScreen just calls printf inside, so I'd have to look to see what the problems might be. I'm not sure why competition projects might behave differently, although the startup is a little different. I'll try to take a look and see what I can find.

Just so I know what to look for, are you saying you can't see output from printf functions at all or just during the first few seconds of operation?

Also, can you try writing a quick competition program with easyC and putting in some printing? easyC uses the same library but since it generates all the build files it might eliminate some things to look for.
The team that suggested we use WPILib has used it both years they have been in the competition (the last two). They claimed that printf will NOT work at all when using WPILib, and that PrintToScreen needed a short 1sec delay put in prior to the first call to it. We have not seen either behavior.

Our experience so far has shown both printf and PrintToScreen work fine and are able to print strings to the IFI loader output screen, provided we only have a main() function. When using the competition mode style functions, we cannot get ANY output at all to come out, ever. We have the WPI library first in the library order. We are using #define _FRC_BOARD on the first line of main.c and have no other .c files currently. For build options, we suppress COD file generation (to allow longer paths), use large code model, and have specified an include path of C:\mcc18\h and library path of C:\mcc18\lib and the remainder of the options are default MPLAB. Again, the only other 5 files in our test project are the two header files, two libraries, and linker script from the WPILib 2k6 directory.

Our team will try writing a comparable easyC program tomorrow night when we meet to see how it compares in behavior to using WPIlib.

Thanks for your assistance with this!