diff --git a/cpu/cortexm_common/ldscripts/multislot.ld b/cpu/cortexm_common/ldscripts/multislot.ld deleted file mode 100644 index 22d89a7958..0000000000 --- a/cpu/cortexm_common/ldscripts/multislot.ld +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2017 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @addtogroup cpu_cortex_common - * @{ - * - * @file - * @brief Offset definitions for cortex MCUs - * - * @author Kaspar Schleiser - * - * @} - */ - -boot_offset = DEFINED( offset ) ? offset : 0x0 ; -rom_length = DEFINED( length ) ? length : rom_length ; diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index 03647d823b..0bf5dfcb0e 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -7,6 +7,21 @@ export MCUBOOT_SLOT0_SIZE = 0x8000 export MCUBOOT_SLOT1_SIZE = 0x3C000 export MCUBOOT_SLOT2_SIZE = 0x3C000 +# Set ROM and RAM lengths according to CPU model +ifneq (,$(filter nrf52832xxaa,$(CPU_MODEL))) + ROM_LEN ?= 0x80000 + RAM_LEN ?= 0x10000 +endif +ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL))) + ROM_LEN ?= 0x100000 + RAM_LEN ?= 0x40000 +endif + +ROM_START_ADDR ?= 0x00000000 +RAM_START_ADDR ?= 0x20000000 + +LINKER_SCRIPT ?= cortexm.ld + ifneq (,$(filter nrf802154,$(USEMODULE))) CFLAGS += -DGNRC_NETIF_MSG_QUEUE_SIZE=16 endif diff --git a/cpu/nrf52/ldscripts/nrf52832xxaa.ld b/cpu/nrf52/ldscripts/nrf52832xxaa.ld deleted file mode 100644 index aced7f46cd..0000000000 --- a/cpu/nrf52/ldscripts/nrf52832xxaa.ld +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2016 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @addtogroup cpu_nrf52 - * @{ - * - * @file - * @brief Memory definitions for the NRF52832XXAA - * - * @author Hauke Petersen - * - * @} - */ - -rom_length = 512K; - -INCLUDE multislot.ld - -MEMORY -{ - rom (rx) : ORIGIN = 0x00000000 + boot_offset, LENGTH = rom_length - ram (w!rx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -INCLUDE cortexm_base.ld diff --git a/cpu/nrf52/ldscripts/nrf52840xxaa.ld b/cpu/nrf52/ldscripts/nrf52840xxaa.ld deleted file mode 100644 index fe7499cb16..0000000000 --- a/cpu/nrf52/ldscripts/nrf52840xxaa.ld +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @addtogroup cpu_nrf52 - * @{ - * - * @file - * @brief Memory definitions for the NRF52840XXAA - * - * @author Hauke Petersen - * - * @} - */ - -MEMORY -{ - rom (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - ram (w!rx) : ORIGIN = 0x20000000, LENGTH = 256K -} - -INCLUDE cortexm_base.ld