|
From: <M.v...@ca...> - 2001-09-17 07:26:02
|
CORRECTION:
I can't use the large memory model with printf. It seems to work fine with
the small model (except when I don't use --stack-after-data).
I'm now going to try putting the tx data buffer in external RAM, which
doesn't affect it at all!!
Since writing the above, I've tried a few things, with the following
results:
* putchar() works in both memory models.
* printf and printf_small works in small memory model, provided
--stack-after-data is selected;
* Neither of printf or printf_small work under large memory model, with
--xstack
* At least printf works with large memory model with --stack-after-data.
I'd really like to be able to use --xstack with my project, does this mean I
have to recompile the libs for this option? The reason for using xstack
would be to get some more stack space, is this a really good reason to use
it, or should I just stick all me variables in xdata space and be done with
it (I have 32k of external memory, so will not be running out of this any
time soon...)
Cheers,
Matthew van de Werken
Electronics Engineer
CSIRO Exploration & Mining - Gravity Group
1 Technology Court - Pullenvale - Qld - 4069
ph: (07) 3327 4685 fax: (07) 3327 4455
email: m.v...@ca...
> -----Original Message-----
> From: M.v...@ca... [mailto:M.v...@ca...]
> Sent: Monday, 17 September 2001 3:33 PM
> To: sdc...@li...
> Subject: RE: [Sdcc-user] A tale of two interrupts...
>
>
> First of all, thankyou to those who have replied to me already. I've
> narrowed down (some) of my problems, for those still willing
> to give some
> advice:
>
> I can 'putchar(c)', but I can't 'printf' - what gives? Where
> should I define
> my putchar - in main(), or in my serial.h routine which is included?
>
> Note that I'm more or less using the serial routines as
> written by Victoria
> Welch, on the okr web site, not the library routines.
>
> So, summary:
>
> putchar(c) works, definitely.
> printf("Hello, world!\n\r") does NOT work, definitely (I have
> the library
> path set correctly, I'm using the winbin version downloaded
> from okr very
> recently. If I could get sdcc to compile on my Linux box then
> I could check
> the program there....)
>
> What gives?
>
> Cheers,
> Matthew van de Werken
> Electronics Engineer
> CSIRO Exploration & Mining - Gravity Group
> 1 Technology Court - Pullenvale - Qld - 4069
> ph: (07) 3327 4685 fax: (07) 3327 4455
> email: m.v...@ca...
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdc...@li...
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
|