diff --git a/cpu/cortexm_common/ldscripts/cortexm.ld b/cpu/cortexm_common/ldscripts/cortexm.ld index 1c65d9f6d508d1850d784648be982b72b44a1772..eb849a9602443daaaab9da3d19a6d31e3a0060c1 100644 --- a/cpu/cortexm_common/ldscripts/cortexm.ld +++ b/cpu/cortexm_common/ldscripts/cortexm.ld @@ -21,10 +21,11 @@ */ _rom_offset = DEFINED( _rom_offset ) ? _rom_offset : 0x0; +_fw_rom_length = _rom_length - _rom_offset; MEMORY { - rom (rx) : ORIGIN = _rom_start_addr + _rom_offset, LENGTH = _rom_length - _rom_offset + rom (rx) : ORIGIN = _rom_start_addr + _rom_offset, LENGTH = _fw_rom_length ram (w!rx) : ORIGIN = _ram_start_addr, LENGTH = _ram_length }