Cygnal 8051F310 problem with onchip XRAM

#include #include #include

Everytime I'm trying to use e.g.

unsigned char myarray[8][25];

in a (quite trivial) application I get linkage error with adress space. That's OK and working correctly.

*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?VALVE LENGTH: 007DH

so far so good. As usual I added "xdata" and recompiled. The error is gone and the app is downloaded to the processor. BUT: the processor doesn't do anything at all. (OK... apparently nothing as I can't look inside :-)

Nothing I tried helped (changing memorymodel, defining XD(0-3FFH) for the linker ...). The map file looks OK.

Up to now I like the cygnal stuff :-) This is the first time I needed xdata on such a chip and now I'm puzzled. Been using Keil for a long time and never

Right now I'm using a truncated array to store the samples so the app is doing OK now.

Anyone out there to know what I overlooked?

--
John
Reply to
John F
Loading thread data ...

Try unsigned char xdata myarray[8][25]; Take a look here:

formatting link
formatting link

2m

Reply to
2m

I am not familiar with your debugger, but if it were me, I would start single stepping from the reset location and see what it shows.

--
Thad
Reply to
Thad Smith

Did you configure the XDATA properly? Try posting at

formatting link
or Silabs

9 and note the cross post)
Reply to
Neil

Thanks. That's exactly what I did. The problem is that it compiles and links without error but doesn't work :-)

--
John
Reply to
John F

I use the demo board with the USB interface for life debugging and do not get a connection :-)

--
Johannes
You can have it:
Quick, Accurate, Inexpensive.
Pick two.
Reply to
John F

Assuming you're building using the Keil tools within uVision2:

Right-click on your target and choose "Options for target 'targetname'."

Then, under the "target" table of the dialog that pops up, ensure that you check the box next to "Use On-chip XRAM (...)" so that the linker knows to actually use the internal RAM for things that should be put into XDATA space.

That should work.

-a

Reply to
Andy Peters

I have already added XD(0-3FFH) (I tried 0x0000-0x03FF too) to the linker commandline as uV2 does. Doesn't work :-)

--
Johannes
You can have it:
Quick, Accurate, Inexpensive.
Pick two.
Reply to
John F

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.