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

Is there really no one who knows this?

Hi,
I've asked this same question a couple of times before and haven't got a single answer. I'm surprised if nobody has ever done this. So, here it is again:

I have the 8k internal RAM of the EZ-USB FX chip to use. I debug with the monitor which takes up half the RAM. I want to have every byte that remains. There are gaps in the monitor memory usage, so how do I link to use them?
Thanks,
Harri

Parents
  • If they're truly gaps in RAM, that is space used to hold data variables and not executable code then they may be reserved by the monitor and thus not to be used by the user.

    If you are sure that you can use those locations without corrupting the monitor, then use the _at_ directive to place variables at precise locations in memory. Or, just get an emulator and dispense with the monitor altogether.

    - Mark

Reply
  • If they're truly gaps in RAM, that is space used to hold data variables and not executable code then they may be reserved by the monitor and thus not to be used by the user.

    If you are sure that you can use those locations without corrupting the monitor, then use the _at_ directive to place variables at precise locations in memory. Or, just get an emulator and dispense with the monitor altogether.

    - Mark

Children
  • Thanks Mark. What I really look for is to exclude the monitor areas with some linker directives. There's a map file of the monitor in the same package the monitor hex file is from. I'd like to use this info so that I can just add variables & code and the linker takes care of the allocations.

    Is there a way to simulate eg. DON'T_USE(0x11c0-0x11df)?

    Harri

  • Is there a way to simulate eg. DON'T_USE(0x11c0-0x11df)?

    Since the monitor is separately linked (I assume) you can use the following trick:

    // Put this in your globals.c file 
    // and add to your project (g_ denotes a global var).
    const unsigned char g_dontUse[0x11DF -0x11C0] _at_ 0x11C0;
    The linker will think you have something here and will not attempt to allocate anything to this region.

    - Mark

  • WHOOPS! Don't for get the memory space qualifier like I did:

    const unsigned char xdata g_dontUse[0x11DF -0x11C0] _at_ 0x11C0;

    Sorry.

    - Mark