Go to Post devote your life to FIRST. It will pay off. - suneel112 [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 17-02-2008, 21:37
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
printf's not displaying in Terminal Window?

So we have a situation where our printf statements suddenly do not appear in the IFI Loader terminal window even though they compile within the MPLAB code. Does anyone have any "oh duh" solutions?

We do have #include <stdio.h> in both user_routines.c and user_routines_fast.c.

I'm using Kevin Watson's "serial_ports.c" code.

Thanks,
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #2   Spotlight this post!  
Unread 17-02-2008, 21:40
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: printf's not displaying in Terminal Window?

Our team has been having this trouble too... At least on a branch from our main code. Although in one case we were in disabled mode where there were no printouts. Check if you get the IFI> message when you go into program state. That should tell you whether it's the code's fault.
  #3   Spotlight this post!  
Unread 17-02-2008, 22:36
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: printf's not displaying in Terminal Window?

Well I figured out my problem. Sorry to waste the bandwidth!

In deleting Kevin's camera code from the project, I removed a #define which enabled the programming port for serial data comms (including printf). Adding the define back in fixed the problem.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #4   Spotlight this post!  
Unread 17-02-2008, 23:30
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: printf's not displaying in Terminal Window?

Yeah, I spent an hour chasing down that one, too. A macro like this has three states:
Code:
#ifdef ENABLE_SERIAL_PORT_ONE_TX
The states are "true," "false," and "the programmer forgot to define it". By using the #ifdef approach, the last two states are equivalent, so the compiler can't help you.

That's why I prefer using
Code:
#if ENABLE_SERIAL_PORT_ONE_TX
where the macro value is '1' for enabled and '0' for disabled. If the programmer doesn't #define it to one of those values, the compiler will complain, and an hour is saved!
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
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
Terminal window freezing? Alan Anderson Programming 6 04-02-2008 10:11
Terminal Window teh_pwnerer795 Programming 1 02-01-2007 00:21
Website not Displaying in IE aubinhick990 Website Design/Showcase 10 08-05-2006 17:27
Terminal Window Idaman323 Programming 0 20-02-2006 19:28
Is Terminal Window Evil? Fat Alex Programming 1 20-07-2004 10:57


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

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