5.1 Reserving memory

You can make memory unavailable for your code and data by using the -mreserve driver option. Alternatively, you can also use the -mram and -mrom options to do the same thing. For example -mreserve=ram@100:103 will remove the range 100-103h in data memory. You could also use -mram=default,-100-103. To reserve program memory, use for example, -mreserve=rom@1800-1fff or -mrom=default,-1800-1fff..

When reserving memory, it is removed from all of the linker classes that include that memory range, and thus this memory will not be used by any psect placed into those classes. Memory reservations will not affect any psect that has been linked to an absolute address, nor those placed relative to other psects. To move those, you must change the linker option that places them in that location.