Go to Post Pretty robots, who cares? Quality robots are another matter. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-01-2005, 14:06
WilsonDJ00 WilsonDJ00 is offline
Registered User
#1094
 
Join Date: Jan 2005
Location: St. Peter's, MO
Posts: 1
WilsonDJ00 is an unknown quantity at this point
Default Code and printf

Using MPLAB 6.6 and MCC18 2.4; default code FrcCode2005v2.4
I made 2 changes to the project to run using the simulator:
1. I removed macro definition _USE_CMU_CAMERA
2. I added macro definition _SIMULATOR

I get the following warnings:
user_routines.c:183:Warning [2066] type qualifier mismatch in assignment
user_routines.c:266:Warning [2066] type qualifier mismatch in assignment

Both are printf statements:
-----
Serial_Driver_Initialize();
printf("IFI 2005 User Processor Initialized ...\r"); /* Optional - Print initialization message. */
-----
/* Add your own code here. (a printf will not be displayed when connected to the breaker panel unless a Y cable is used) */

printf("Port1 Y %3d, X %3d, Fire %d, Top %d\r",(int)p1_y,(int)p1_x,(int)p1_sw_trig,(int)p1_ sw_top); /* printf EXAMPLE */
-----

1. How do I fix the warning?
2. How do I output "Hello World" (or anything) to the output window?
The only output I receive when I run the program is:
UART-W0006: Receive file has no data or failed to attach when UART receive mode Enabled.
UART-W0006: Receive file has no data or failed to attach when UART receive mode Enabled.
UART-W0006: Receive file has no data or failed to attach when UART receive mode Enabled.

Thanks,
David
  #2   Spotlight this post!  
Unread 22-01-2005, 16:14
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: Default Code and printf

The warnings can be safely ignored. If you look at the readme that came with that code, it tells you to use a compiler flag to supress them. Just ignore them, or go look at the readme
  #3   Spotlight this post!  
Unread 22-01-2005, 16:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,907
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Default Code and printf

Using the MPLAB simulator you won't be able to do printf's. There's no process setup to complete the serial connection required. The printf's will only work from the EDU or FRC.

As Brian said, the note about this warning is in the Readme.txt file in the FrcCode2005v2.4 folder.
You can use:
-nw=2066
to suppress the printf warnings.

In MPLAB go to Project -> Build Options... -> Project
then the MPLAB C18 tab
click the checkbox for "Use alternate settings"
and add it to the line underneath, e.g.,
-D_FRC_BOARD -nw=2066
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-01-2005 at 16:47.
Closed Thread


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
2005 default code won't compile Robby Programming 22 04-02-2005 18:21
New Serial Port Driver Kevin Watson Programming 16 09-01-2005 01:56
What Features Should the Default Code REALLY include? Joe Johnson Programming 30 29-04-2004 22:39
Need help with my code jaywion Programming 9 20-03-2004 11:32
Strange IR sensor movement with default tracker code wun Programming 5 19-03-2004 10:51


All times are GMT -5. The time now is 13:18.

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