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

How to confine code addresses

Hi all,
I'm currently working on a project which requires that part of the code is located below address 0x1000 and freezed, while other must be above 0x1000 and can be modified. Mixing up is not allowed. I used BL51 options below:

"BL51 X.obj code(?pr?*?upper_1k(1000h))"
. Most of the time it works but sometimes it just doesn't, especially when using lots of XBYTE[]. Codes just escape into the lower 1kByte memory and mess up everything.
Are there other options that I can use? I've been struggling on this for several days.

Parents
  • The syntax you posted forces ?pr?upper_1k to start at address 1000. What about all the other segment names? For example, some optimizations create code segments named ?L?COMxxx. Maybe you'll have more luck assigning everything to 1000H+, and naming just those segments intended to live below 1000.

    If the two pieces of code are separately linked, you might just use the CODE directive to restrict the memory address range when you build the 1000H and up part.

    code (0x1000 - 0x7fff)

Reply
  • The syntax you posted forces ?pr?upper_1k to start at address 1000. What about all the other segment names? For example, some optimizations create code segments named ?L?COMxxx. Maybe you'll have more luck assigning everything to 1000H+, and naming just those segments intended to live below 1000.

    If the two pieces of code are separately linked, you might just use the CODE directive to restrict the memory address range when you build the 1000H and up part.

    code (0x1000 - 0x7fff)

Children
No data