• AVR Freaks

C30 Linker: how to reserve a specific memory area?

Author
z74
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2011/04/05 11:21:39
  • Location: 0
  • Status: offline
2011/08/16 06:15:17 (permalink)
0

C30 Linker: how to reserve a specific memory area?

Hi,
 
i`m not very familar with the Linker Scripts so this may be a very basic question to you.
 
How can i prevent C30 to not use a specific area in Code Flash? For example: what do
i have to add in the .gld to reserve the space from 0x8000 to 0x9000 in a dsPIC30F ?
 
Sorry for my bad english and thank you for all answers in advance,
z74
 
#1

1 Reply Related Threads

    cawilkie
    Administrator
    • Total Posts : 1977
    • Reward points : 0
    • Joined: 2003/11/07 12:49:11
    • Status: offline
    Re:C30 Linker: how to reserve a specific memory area? 2011/08/16 08:25:25 (permalink)
    0
    No need to edit the linker script, so if you are not familiar with them and don't want to learn about them from the Assembler Linker and Utilities Guide (and I can completely understand why you wouldn't want to edit linker scripts), then you can use some of the handy features in the compiler to code it in 'C' (or assembly).


    char reserved_space[0x1000] __attribute__((space(prog),noload,address(0x8000))));


    The noload attribute will tell the linker not to actually put anything in that location.

    Regards
    Calum
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5