Dennis Muhlestein wrote:
> Dennis Muhlestein wrote:
>> I have a little test program I've been playing with to test different 
>> variable sizes and locations.  I came across a weird situation and 
>> I'm hoping someone can help me explain it.
> I've traced this problem down to a smaller issue.
>
> It seems the declarations and initialization of the xdata are what is 
> breaking my firmware.  The following is broken:
>> xdata BYTE buf[100];
>> xdata WORD count=0;
>
I think this problem has to do with the _XPAGE sfr.

Defining _XPAGE for sfr at 0x92 seems to fix the global initialization 
problem.

I'm not entirely sure the problem is gone, but it at least fixes my 
simple test case.

For my program to work, I still have to use --xram-loc of somewhere 
around 896 to 1024 bytes (0x0400 works)

Can anyone shed some light as to why the default xram location doesn't work?
(cypress fx2lp)

-Dennis


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to