Create New RAM Segment

As it was made for the new ROM segment, a piece of the user ram memory segment is taken to create a new memory segment called myram.

Edit your LCF as shown in Listing 5.

Listing 1. Memory Segment of LCF
MEMORY
{

    exception_handlers_p0:       org = 0x40000000,   len = 0x00001000

    pseudo_rom:                  org = 0x40001000,   len = 0x00006800

    init:                        org = 0x40007800,   len = 0x00000800

    internal_ram:                org = 0x40008000,   len = 0x00070000

    myram:                       org = 0x40078000,   len = 0x00004000

    heap  :                      org = 0x4007c000,   len = 0x00002000 /* Heap start location */

    stack :                      org = 0x4007e000,   len = 0x00002000 /* Start location for 
Stack */

}