Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2005 15:27:37 +0800
From:      Kathy Quinlan <kat-free@kaqelectronics.dyndns.org>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: gcc question
Message-ID:  <421D81E9.809@kaqelectronics.dyndns.org>
In-Reply-To: <200502241532.50010.doconnor@gsoft.com.au>
References:  <421D584A.90203@kaqelectronics.dyndns.org> <200502241532.50010.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote:

> On Thu, 24 Feb 2005 15:00, Kathy Quinlan wrote:
> 
>>I have some code that I build for two targets, one an Atmel uC and the
>>other FreeBSD.
>>
>>What is the best way to redefine getchar and putchar (in uC they use the
>>serial port, in FreeBSD stdin stdout)
>>
>>Or would I be better #ifdef the commands and making getchar only used in
>>uC and my serial port handler in FreeBSD ??
> 
> 
> I didn't think getchar/putchar existed in the Atmel libc implementation..
> 
> I would suggest using a different function name and implement it differently 
> for either platform.
> 
> Also you'll want to be careful about the fact that the Atmel has 2 separate 
> address spaces (if it's an AVR anyway) which can cause problems because you 
> have to read from the right one.
> 

ATM it is written in codevisionAVR which is where the function is 
called, so I guess for now I will just break the AVR support;)

I am planning on moving wholey over to GCC and FreeBSD, once my final 
customer has agreed to Eagle for the EDA side, this PC will be Free of 
M$ crap and I will be wholy FreeBSD :)

Regards,

Kat.


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?421D81E9.809>