[Openec] pdata access
Paul Fox
pgf at laptop.org
Sun Nov 14 17:46:28 EST 2010
frieder wrote:
> Hi Paul,
>
> I've just seen that pdata access was enabled
> and "P2 = 0xf4;" was set in
> unsigned char early_startup(void)
>
> For SDCC this is likely not needed
> (see section 4.1.1 "pdata access by SFR" and
> _XPAGE .)
yes, i saw that, and in the lib startup source.
>
> For Keil you should maybe recheck that within
> startup.a51 the "PDATASTART EQU" is set
> appropriately. (setting it in early_startup()
> might be too early/too late/overwritten
> causing initialized pdata variables to have
> unexpected values)
we're not using their complete startup suite -- perhaps
it would have it we were, but pdata access didn't work in
the previous incarnation of our EC code, nor in the current
version, until i added that P2 assignment.
>
> I assume you use pdata with SDCC successfully?
yes.
paul
=---------------------
paul fox, pgf at laptop.org
More information about the Openec
mailing list