• AVR Freaks

DEE Emulation absolute address issues w/linker

Author
simucas
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2009/07/23 13:55:18
  • Location: 0
  • Status: offline
2009/07/23 14:06:58 (permalink)
0

DEE Emulation absolute address issues w/linker

I've searched the forums for a solution, I found a post on how to relocate the buffer, but nothing about this issue...

I'm using a PIC24FJ256GB110, and the pic30 v3.11 compiler.

I'm having trouble understanding how to isolate the buffer in flash.  I've modified the allocation of the buffer to be:

unsigned char emulationPages[DATA_EE_BANKS * NUM_DATA_EE_PAGES][NUMBER_OF_INSTRUCTIONS_IN_PAGE * 2]
    __attribute__ ((space(prog), address(0x29400), /*aligned(NUMBER_OF_INSTRUCTIONS_IN_PAGE * 2), */ noload));


I've left DATA_EE_BANKS, etc. at the default settings.

The problem that I'm seeing in the map file, is that the linker ends up throwing a bunch of routines above this buffer:

0x029400                  _emulationPages
0x02a400                  _InitTimer2
0x02a41c                  __T2Interrupt
...
0x02a7d2                  _InitIOPorts
...
0x02a9de                  _main
...
0x02abce                  _InitConsole

Anyone know a way to avoid this?  I'd like to have the only the buffer at the top of memory so that I can rewrite the code and still keep the eeprom data.

Thanks in advance

#1

4 Replies Related Threads

    simucas
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2009/07/23 13:55:18
    • Location: 0
    • Status: offline
    RE: DEE Emulation absolute address issues w/linker 2009/07/23 14:44:10 (permalink)
    0
    never mind... the missing clue was the linker script.  Fixed, done.  Sorry for the unecessary post...  One of those really long weeks!
    #2
    thomast
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2009/09/22 07:45:36
    • Location: 0
    • Status: offline
    RE: DEE Emulation absolute address issues w/linker 2010/02/10 06:41:38 (permalink)
    0
    Hi!
     
    I have the same problem. And, what's the solution?
    #3
    simucas
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2009/07/23 13:55:18
    • Location: 0
    • Status: offline
    RE: DEE Emulation absolute address issues w/linker 2010/02/10 07:47:54 (permalink)
    0
    Make sure that the program (xr) section (origin + length) in the linker script does not overlap the buffer memory location.
    post edited by simucas - 2010/02/10 07:57:41
    #4
    thomast
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2009/09/22 07:45:36
    • Location: 0
    • Status: offline
    RE: DEE Emulation absolute address issues w/linker 2010/02/11 01:07:16 (permalink)
    0
    Thanks a lot, it works! I tried the complicated was to place the emulation pages into a dedicated memory section. I never thought that the linker allows to place data outside defined memory sections.
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5