This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Locating segments in HDATA by default

Okay, I think this should be an easy one!

I have a program/data partition at 0x20000. I also have internal SRAM from 0-0x1300.

Without the 'Use internal SRAM' box checked, I get this config:

   XDATA (X:0x20000-X:0x2FFFF)
   HDATA (X:0x20000-X:0x2FFFF)
My data segments are all located past 0x20000 where they belong with this config but I can't access the internal SRAM!

When I check that box, this config results:

   XDATA (X:0x0-X:0x13FF)
   HDATA (X:0x0-X:0x13FF, X:0x20000-X:0x2FFFF)
.. and I get a whole bunch of L107: ADDRESS SPACE OVERFLOW errors because the LX51 seems to be trying to jam them all into XDATA instead of utilizing HDATA.

After checking out KB1647 (http://www.keil.com/support/docs/1647.htm), I also tried adding this to manually move them all to HDATA:

   SEGMENTS (?XD?* (X:0x20000))
.. but that just results in a whole bunch of L108: SEGMENT IN LOCATING CONTROL CANNOT BE ALLOCATED errors.

Any ideas on what I've missed?

0