[U-Boot-Users] printf question

Rune Torgersen runet at innovsys.com
Wed Mar 24 19:17:19 CET 2004


Broken toolchain sounds correct....
I have the exact same problem in Microsoft Visual Studio 6... :)


> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de] 
> Sent: Wednesday, March 24, 2004 11:55
> To: Rune Torgersen
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] printf question 
> 
> 
> In message 
> <DCEAAC0833DD314AB0B58112AD99B93B06DA9D at ismail.innsys.innovsys
> .com> you wrote:
> > This usually works even on cranky compilers:
> > 
> > unsigned char x = 0xC2;
> > printf("this is the problem %02X\n", (unsigned int)x);
> 
> But we agree that the conversion "unsigned char" ==>  
> "unsigned  int" must result in exactly the same result, no 
> matter if done implicitely or by explicit cast?
> 
> If this doesn't work it means that the  toolchain  is  broken 
>  and/or misconfigured. Maybe there is no valid prototype for 
> printf() active, etc.,  but this should be visible when 
> compiling with warnings turned on.
> 
> 
> Wolfgang Denk
> 
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: 
> wd at denx.de God runs electromagnetics by wave theory on  
> Monday,  Wednesday,  and Friday,  and the Devil runs them by 
> quantum theory on Tuesday, Thurs-
> day, and Saturday.                                   -- William Bragg
> 




More information about the U-Boot mailing list