into the 'ram' memory region. MEMORY { rom (rx) : ORIGIN = 0, LENGTH = 256K ram (!rx) : org = 0x40000000, l = 4M } Once you define a memory region, you can direct the linker to place specific output sections into that memory region by using the '>REGION' output section attribute. For example, if you have a memory region named 'mem', you would use '>mem' in the output section definition. *Note Output Section Region::. If no address was specified for the output section, the linker will set the address to the next available address within the memory region. If the combined output sections directed to a memory region are too large for the region, the linker will issue an error message. It is possible to access the origin and length of a memory in an expression via the 'ORIGIN(MEMORY)' and 'LENGTH(MEMORY)' functions: _fstack = ORIGIN(ram) + LENGTH(ram) - 4;