diff options
Diffstat (limited to 'platform')
12 files changed, 3 insertions, 359 deletions
diff --git a/platform/ext/platform_deprecation.rst b/platform/ext/platform_deprecation.rst index 5d7a3de987..066493cfac 100644 --- a/platform/ext/platform_deprecation.rst +++ b/platform/ext/platform_deprecation.rst @@ -60,8 +60,6 @@ release. +--------------------------------------+-----------+---------------------------+ | musca_a | v1.3.0 | N.A | +--------------------------------------+-----------+---------------------------+ -| nordic_nrf/nrf5340pdk_nrf5340_cpuapp | v1.3.0 | N.A | -+--------------------------------------+-----------+---------------------------+ -------------- diff --git a/platform/ext/target/nordic_nrf/common/core/CMakeLists.txt b/platform/ext/target/nordic_nrf/common/core/CMakeLists.txt index 17a6adf33e..db1b391688 100644 --- a/platform/ext/target/nordic_nrf/common/core/CMakeLists.txt +++ b/platform/ext/target/nordic_nrf/common/core/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) if (NOT NRF_BOARD_SELECTED) if (${TFM_PLATFORM} STREQUAL "nordic_nrf/nrf5340") - set(hint nordic_nrf/nrf5340pdk_nrf5340_cpuapp) + set(hint nordic_nrf/nrf5340dk_nrf5340_cpuapp) else() set(hint nordic_nrf/nrf9160dk_nrf9160) endif() diff --git a/platform/ext/target/nordic_nrf/common/nrf5340/partition/region_defs.h b/platform/ext/target/nordic_nrf/common/nrf5340/partition/region_defs.h index 02a58fa759..df20890c2f 100644 --- a/platform/ext/target/nordic_nrf/common/nrf5340/partition/region_defs.h +++ b/platform/ext/target/nordic_nrf/common/nrf5340/partition/region_defs.h @@ -33,11 +33,7 @@ #define NS_PSP_STACK_SIZE (0x00000140) /* Size of nRF SPU (Nordic IDAU) regions */ -#ifdef NRF5340_ENG_A -#define SPU_FLASH_REGION_SIZE (0x00008000) -#else #define SPU_FLASH_REGION_SIZE (0x00004000) -#endif #define SPU_SRAM_REGION_SIZE (0x00002000) /* This size of buffer is big enough to store an attestation @@ -46,7 +42,7 @@ #define PSA_INITIAL_ATTEST_TOKEN_MAX_SIZE (0x250) /* - * SPU flash region granularity is 32 KB on nRF5340. Alignment + * SPU flash region granularity is 16 KB on nRF5340. Alignment * of partitions is defined in accordance with this constraint. */ #ifdef BL2 diff --git a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c index 84b58878c4..8239fd5f4a 100644 --- a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c +++ b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c @@ -221,10 +221,8 @@ enum tfm_plat_err_t spu_periph_init_cfg(void) spu_peripheral_config_non_secure((uint32_t)NRF_SPIM1, false); #endif spu_peripheral_config_non_secure((uint32_t)NRF_SPIM4, false); -#ifndef NRF5340_ENG_A spu_peripheral_config_non_secure((uint32_t)NRF_SPIM2, false); spu_peripheral_config_non_secure((uint32_t)NRF_SPIM3, false); -#endif spu_peripheral_config_non_secure((uint32_t)NRF_SAADC, false); spu_peripheral_config_non_secure((uint32_t)NRF_TIMER0, false); spu_peripheral_config_non_secure((uint32_t)NRF_TIMER1, false); @@ -233,9 +231,7 @@ enum tfm_plat_err_t spu_periph_init_cfg(void) spu_peripheral_config_non_secure((uint32_t)NRF_RTC1, false); spu_peripheral_config_non_secure((uint32_t)NRF_DPPIC, false); spu_peripheral_config_non_secure((uint32_t)NRF_WDT0, false); -#ifndef NRF5340_ENG_A spu_peripheral_config_non_secure((uint32_t)NRF_WDT1, false); -#endif spu_peripheral_config_non_secure((uint32_t)NRF_COMP, false); spu_peripheral_config_non_secure((uint32_t)NRF_EGU0, false); spu_peripheral_config_non_secure((uint32_t)NRF_EGU1, false); @@ -246,9 +242,7 @@ enum tfm_plat_err_t spu_periph_init_cfg(void) spu_peripheral_config_non_secure((uint32_t)NRF_PWM0, false); spu_peripheral_config_non_secure((uint32_t)NRF_PWM1, false); spu_peripheral_config_non_secure((uint32_t)NRF_PWM2, false); -#ifndef NRF5340_ENG_A spu_peripheral_config_non_secure((uint32_t)NRF_PWM3, false); -#endif spu_peripheral_config_non_secure((uint32_t)NRF_PDM0, false); spu_peripheral_config_non_secure((uint32_t)NRF_I2S0, false); spu_peripheral_config_non_secure((uint32_t)NRF_IPC, false); @@ -256,12 +250,10 @@ enum tfm_plat_err_t spu_periph_init_cfg(void) spu_peripheral_config_non_secure((uint32_t)NRF_NFCT, false); spu_peripheral_config_non_secure((uint32_t)NRF_GPIOTE1_NS, false); spu_peripheral_config_non_secure((uint32_t)NRF_MUTEX, false); -#ifndef NRF5340_ENG_A spu_peripheral_config_non_secure((uint32_t)NRF_QDEC0, false); spu_peripheral_config_non_secure((uint32_t)NRF_QDEC1, false); spu_peripheral_config_non_secure((uint32_t)NRF_USBD, false); spu_peripheral_config_non_secure((uint32_t)NRF_USBREGULATOR, false); -#endif spu_peripheral_config_non_secure((uint32_t)NRF_NVMC, false); spu_peripheral_config_non_secure((uint32_t)NRF_P0, false); spu_peripheral_config_non_secure((uint32_t)NRF_P1, false); diff --git a/platform/ext/target/nordic_nrf/nrf5340dk_nrf5340_cpuapp/README.rst b/platform/ext/target/nordic_nrf/nrf5340dk_nrf5340_cpuapp/README.rst index e2b536dd8c..9ddd5fc3bf 100644 --- a/platform/ext/target/nordic_nrf/nrf5340dk_nrf5340_cpuapp/README.rst +++ b/platform/ext/target/nordic_nrf/nrf5340dk_nrf5340_cpuapp/README.rst @@ -20,7 +20,7 @@ Documentation The following links provide useful information about the nRF5340 nRF5340 DK website: - https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK + https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-DK Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt deleted file mode 100644 index 97a2a3f945..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2020, Nordic Semiconductor ASA. -# -# SPDX-License-Identifier: BSD-3-Clause -# -#------------------------------------------------------------------------------- - -cmake_policy(SET CMP0076 NEW) -set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) -set(NRF_BOARD_SELECTED True) - -message(DEPRECATION "${TFM_PLATFORM} has been marked for deprecation.") - -add_subdirectory(../common/nrf5340 nrf5340) - -target_include_directories(platform_region_defs - INTERFACE - ../common/nrf5340/partition -) - -target_include_directories(platform_s - PUBLIC - . - ../common/nrf5340/partition -) - -target_sources(platform_s - PRIVATE - plat_init.c -) - -target_include_directories(platform_ns - PUBLIC - . -) - -if(BL2) - target_include_directories(platform_bl2 - PUBLIC - ../common/nrf5340/partition - PRIVATE - . - ) -endif() diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/README.rst b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/README.rst deleted file mode 100644 index 64b87655a8..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/README.rst +++ /dev/null @@ -1,138 +0,0 @@ -Nordic nRF5340 -============== - -The nRF5340 preview development kit (PDK) is a single-board development kit for -the evaluation and development on the Nordic nRF5340 System-on-Chip (SoC). - -The nRF5340 is a dual-core SoC based on the Arm® Cortex®-M33 architecture, with: - -* a full-featured ARM Cortex-M33F core with DSP instructions, FPU, and - ARMv8-M Security Extension, running at up to 128 MHz, referred to as - the **Application MCU** -* a secondary ARM Cortex-M33 core, with a reduced feature set, running at - a fixed 64 MHz, referred to as the **Network MCU**. - -The nRF5340 Application MCU supports the Armv8m Security Extension. - -Documentation -------------- - -The following links provide useful information about the nRF5340 - -nRF5340 PDK website: - https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK - -Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com - - -Building TF-M on nRF5340 Application MCU ----------------------------------------- - -To build an S and NS application image for the nRF5340 Application MCU run the -following commands: - - **Note**: On OS X change ``readlink`` to ``greadlink``, available by - running ``brew install coreutils``. - -.. code:: bash - - $ mkdir build && cd build - $ cmake -DTFM_PLATFORM=nordic_nrf/nrf5340pdk_nrf5340_cpuapp \ - -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \ - ../ - $ make install - - **Note**: Currently, applications can only be built using GCC - (GNU ARM Embedded toolchain). - - **Note**: For BL2 (MCUBoot) logging output to be available, the project needs - to be built with Debug configuration (CMAKE_BUILD_TYPE=Debug). - -Flashing and debugging with Nordic nRF Segger J-Link ------------------------------------------------------ - -nRF5340 PDK is equipped with a Debug IC (Atmel ATSAM3U2C) which provides the -following functionality: - -* Segger J-Link firmware and desktop tools -* SWD debug for the nRF5340 IC -* Mass Storage device for drag-and-drop image flashing -* USB CDC ACM Serial Port bridged to the nRFx UART peripheral -* Segger RTT Console -* Segger Ozone Debugger - -To install the J-Link Software and documentation pack, follow the steps below: - -#. Download the appropriate package from the `J-Link Software and documentation pack`_ website -#. Depending on your platform, install the package or run the installer -#. When connecting a J-Link-enabled board such as an nRF5340 PDK, a - drive corresponding to a USB Mass Storage device as well as a serial port should come up - -nRF Command-Line Tools Installation -************************************* - -The nRF Command-line Tools allow you to control your nRF5340 device from the command line, -including resetting it, erasing or programming the flash memory and more. - -To install them, visit `nRF Command-Line Tools`_ and select your operating -system. - -After installing, make sure that ``nrfjprog`` is somewhere in your executable path -to be able to invoke it from anywhere. - -BL2, S, and NS application images can be flashed into nRF5340 separately or may be merged -together into a single binary. - -Flashing the nRF5340 PDK -************************ - -To program the flash with a compiled TF-M image (i.e. S, NS or both) after having -followed the instructions to install the Segger J-Link Software and the nRF -Command-Line Tools, follow the steps below: - -Generate Intel hex files from the output binary (bin) files as follows: - -.. code-block:: console - - srec_cat install/outputs/NORDIC_NRF/NRF5340PDK_NRF5340_CPUAPP/tfm_s_ns_signed.bin -binary --offset=0x10000 -o install/outputs/NORDIC_NRF/NRF5340PDK_NRF5340_CPUAPP/tfm_s_ns_signed.hex -intel - -* Connect the micro-USB cable to the nRF5340 PDK and to your computer -* Erase the flash memory in the nRF5340 IC: - -.. code-block:: console - - nrfjprog --eraseall -f nrf53 - -* Flash the BL2 and the TF-M image binaries from the sample folder of your choice: - -.. code-block:: console - - nrfjprog --program <sample folder>/install/outputs/NORDIC_NRF/NRF5340PDK_NRF5340_CPUAPP/bl2.hex -f nrf53 --sectorerase - nrfjprog --program <sample folder>/install/outputs/NORDIC_NRF/NRF5340PDK_NRF5340_CPUAPP/tfm_s_ns_signed.hex -f nrf53 --sectorerase - -* Reset and start TF-M: - -.. code-block:: console - - nrfjprog --reset -f nrf53 - - -Secure UART Console on nRF5340 PDK -********************************** - -SECURE_UART1 is enabled by default when building TF-M on nRF5340 PDK, so the secure firmware console output -is available via USART1. To route the USART1 output to one of the serial ports, wire the default USART1 TxD -and RxD (pins P0.25 and P0.26) to RxD and TxD pins on the PDK. - -Non-Secure console output is available via USART0. - - **Note**: By default USART0 and USART1 outputs are routed to separate serial ports. - -.. _nRF Command-Line Tools: https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Command-Line-Tools - -.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html - --------------- - -*Copyright (c) 2020, Arm Limited. All rights reserved.* -*Copyright (c) 2020, Nordic Semiconductor. All rights reserved.* diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/RTE_Device.h b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/RTE_Device.h deleted file mode 100644 index 5767fdcb69..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/RTE_Device.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2019 Arm Limited. All rights reserved. - * Copyright (c) 2020 Nordic Semiconductor ASA. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -#ifndef __RTE_DEVICE_H -#define __RTE_DEVICE_H - -// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART0] -// <i> Configuration settings for Driver_USART0 in component ::Drivers:USART -#define RTE_USART0 1 -// <h> Pin Selection (0xFFFFFFFF means Disconnected) -// <o> TXD -#define RTE_USART0_TXD_PIN 20 -// <o> RXD -#define RTE_USART0_RXD_PIN 22 -// <o> RTS -#define RTE_USART0_RTS_PIN 19 -// <o> CTS -#define RTE_USART0_CTS_PIN 21 -// </h> Pin Configuration -// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART0] - -// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART1] -// <i> Configuration settings for Driver_USART1 in component ::Drivers:USART -#define RTE_USART1 1 -// <h> Pin Selection (0xFFFFFFFF means Disconnected) -// <o> TXD -#define RTE_USART1_TXD_PIN 25 -// <o> RXD -#define RTE_USART1_RXD_PIN 26 -// <o> RTS -#define RTE_USART1_RTS_PIN 0xFFFFFFFF -// <o> CTS -#define RTE_USART1_CTS_PIN 0xFFFFFFFF -// </h> Pin Configuration -// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART1] - -// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART2] -// <i> Configuration settings for Driver_USART2 in component ::Drivers:USART -#define RTE_USART2 0 -// <h> Pin Selection (0xFFFFFFFF means Disconnected) -// <o> TXD -#define RTE_USART2_TXD_PIN 0xFFFFFFFF -// <o> RXD -#define RTE_USART2_RXD_PIN 0xFFFFFFFF -// <o> RTS -#define RTE_USART2_RTS_PIN 0xFFFFFFFF -// <o> CTS -#define RTE_USART2_CTS_PIN 0xFFFFFFFF -// </h> Pin Configuration -// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART2] - -// <e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART3] -// <i> Configuration settings for Driver_USART3 in component ::Drivers:USART -#define RTE_USART3 0 -// <h> Pin Selection (0xFFFFFFFF means Disconnected) -// <o> TXD -#define RTE_USART3_TXD_PIN 0xFFFFFFFF -// <o> RXD -#define RTE_USART3_RXD_PIN 0xFFFFFFFF -// <o> RTS -#define RTE_USART3_RTS_PIN 0xFFFFFFFF -// <o> CTS -#define RTE_USART3_RTS_PIN 0xFFFFFFFF -// </h> Pin Configuration -// </e> USART (Universal synchronous - asynchronous receiver transmitter) [Driver_USART3] - -// <e> FLASH (Flash Memory) [Driver_FLASH0] -// <i> Configuration settings for Driver_FLASH0 in component ::Drivers:FLASH -#define RTE_FLASH0 1 -// </e> FLASH (Flash Memory) [Driver_FLASH0] - -#endif /* __RTE_DEVICE_H */ diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/config.cmake b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/config.cmake deleted file mode 100644 index 7a0458f7f1..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/config.cmake +++ /dev/null @@ -1,10 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2020, Nordic Semiconductor ASA. -# -# SPDX-License-Identifier: BSD-3-Clause -# -#------------------------------------------------------------------------------- - -set(NRF_PATH platform/ext/target/${TFM_PLATFORM}/..) - -include(${NRF_PATH}/common/nrf5340/config.cmake) diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/nrf_board.h b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/nrf_board.h deleted file mode 100644 index e7efd128b8..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/nrf_board.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2020 Nordic Semiconductor ASA. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef NRF_BOARD_H__ -#define NRF_BOARD_H__ - -#include <hal/nrf_gpio.h> - -#define BUTTON1_PIN (23UL) -#define BUTTON1_ACTIVE_LEVEL (0UL) -#define BUTTON1_PULL (NRF_GPIO_PIN_PULLUP) -#define LED1_PIN (28UL) -#define LED1_ACTIVE_LEVEL (0UL) - -#endif // NRF_BOARD_H__ diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c deleted file mode 100644 index aae89db7eb..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/plat_init.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2019-2020, Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - * - */ - -#include "tfm_hal_platform.h" -#include "cmsis.h" -#include "uart_stdout.h" -#include "log/tfm_log.h" - -enum tfm_hal_status_t tfm_hal_platform_init(void) -{ - __enable_irq(); - stdio_init(); - - LOG_MSG("\033[1;34m[Platform] nRF5340 PDK is marked for deprecation!" - "\033[0m\r\n"); - - return TFM_HAL_SUCCESS; -} diff --git a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/preload.cmake b/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/preload.cmake deleted file mode 100644 index 8787d1c503..0000000000 --- a/platform/ext/target/nordic_nrf/nrf5340pdk_nrf5340_cpuapp/preload.cmake +++ /dev/null @@ -1,12 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2020, Nordic Semiconductor ASA. -# -# SPDX-License-Identifier: BSD-3-Clause -# -#------------------------------------------------------------------------------- - -set(NRF_PATH platform/ext/target/${TFM_PLATFORM}/..) - -include(${NRF_PATH}/common/nrf5340/preload.cmake) - -add_definitions(-DNRF5340_ENG_A)
\ No newline at end of file |