gcc question
Kathy Quinlan
kat-free at kaqelectronics.dyndns.org
Thu Feb 24 07:27:43 GMT 2005
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
More information about the freebsd-hackers
mailing list