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?

Parents Reply Children
  • Dallas's 5250.

    I was hoping that wouldn't matter, since a) it seems like the solution should generalize and b) we can't really talk about the chip's inner workings anyway (sigh).

    Regardless, if there are any other bits of info that might seem helpful, please don't hesitate to ask!

  • Here's what you need to do.

    1. In Options for Target...Setup the memory in the target window the way you kind-of want. Just get it close.

    2. Click on the LX51 Locate tab.

    3. Copy the stuff in the C classes list.

    4. Paste this stuff into the User Classes section.

    5. Un-check the Uses Memory Layout from Target Dialog checkbox.

    6. Modify the classes as you need.

    When configurations get sophisticated there's nothing like manually controlling where everything goes. Hope this helps.

    Jon

  • Heh, that does help as it doesn't seem like the stock dialog boxes are going to drop everything into place.

    The main problem, though, is that I'm not even sure of the customizations I need to apply!

    - My classes seem correct. As I pasted in my original post, above, I have a small XDATA class and a larger HDATA class (it can't be addressed as XDATA since it's out of XDATA's standard 16 bit range).

    - My segments do not seem correct and herein is the real trouble! They are all apparently being located off of that small XDATA class. Because it's so small this is a Bad Thing, and I'm not sure how to correct it.. as I mentioned, explicitly locating them doesn't seem to work.

    Any more thoughts are most welcome!