Skip to content

Commit 5c1378c

Browse files
joerchanrlubos
authored andcommitted
[nrf fromtree] platform: nordic_nrf: Convert nrf9160 SoC to nrf91 series
Convert the nrf9160 SoC support to be generic for nrf91 series. Keep the preload.cmake SoC specific in ordec to set the correct SoC definition. Change-Id: I225634e15b827d5eeef9f47a12329f74e0774eeb Signed-off-by: Joakim Andersson <[email protected]> (cherry picked from commit 4eea4ca)
1 parent 03429c3 commit 5c1378c

File tree

16 files changed

+25
-24
lines changed

16 files changed

+25
-24
lines changed

platform/ext/target/nordic_nrf/common/core/nrfx_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070

7171
#if defined(NRF5340_XXAA_APPLICATION)
7272
#include <nrfx_config_nrf5340_application.h>
73-
#elif defined(NRF9160_XXAA)
74-
#include <nrfx_config_nrf9160.h>
73+
#elif defined(NRF91_SERIES)
74+
#include <nrfx_config_nrf91.h>
7575
#else
7676
#error "Unknown device."
7777
#endif

platform/ext/target/nordic_nrf/common/nrf9160/CMakeLists.txt renamed to platform/ext/target/nordic_nrf/common/nrf91/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ add_subdirectory(../core nrf_common)
1616
# Specify the location of platform specific build dependencies.
1717
target_sources(tfm_s
1818
PRIVATE
19-
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf9160.c>
19+
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf91.c>
2020
)
2121

2222
if(NS)
2323
target_sources(tfm_ns
2424
PRIVATE
25-
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf9160.c>
25+
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf91.c>
2626
)
2727
endif()
2828

2929
if(BL2)
3030
target_sources(bl2
3131
PRIVATE
32-
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf9160.c>
32+
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf91.c>
3333
)
3434
endif()
3535

@@ -42,7 +42,7 @@ target_include_directories(platform_s
4242

4343
target_sources(platform_s
4444
PRIVATE
45-
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf9160.c
45+
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf91.c
4646
)
4747

4848
target_compile_definitions(platform_s
@@ -62,7 +62,7 @@ target_include_directories(platform_ns
6262

6363
target_sources(platform_ns
6464
PRIVATE
65-
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf9160.c
65+
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf91.c
6666
)
6767

6868
target_compile_definitions(platform_ns
@@ -81,7 +81,7 @@ if(BL2)
8181

8282
target_sources(platform_bl2
8383
PRIVATE
84-
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf9160.c
84+
${HAL_NORDIC_PATH}/nrfx/mdk/system_nrf91.c
8585
)
8686

8787
target_compile_definitions(platform_bl2

platform/ext/target/nordic_nrf/common/nrf9160/config.cmake renamed to platform/ext/target/nordic_nrf/common/nrf91/config.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
include(${PLATFORM_PATH}/common/core/config.cmake)
1010

1111
set(SECURE_UART1 ON CACHE BOOL "Enable secure UART1")
12+
# Use nrf9160 until test target name in PSA arch test repository has been updated to nrf91
1213
set(PSA_API_TEST_TARGET "nrf9160" CACHE STRING "PSA API test target")
1314
set(NRF_NS_STORAGE OFF CACHE BOOL "Enable non-secure storage partition")
1415
set(BL2 ON CACHE BOOL "Whether to build BL2")

platform/ext/target/nordic_nrf/common/nrf9160/gcc/startup_nrf9160.c renamed to platform/ext/target/nordic_nrf/common/nrf91/gcc/startup_nrf91.c

File renamed without changes.

platform/ext/target/nordic_nrf/common/nrf9160/mmio_defs.h renamed to platform/ext/target/nordic_nrf/common/nrf91/mmio_defs.h

File renamed without changes.

platform/ext/target/nordic_nrf/common/nrf9160/nrfx_config_nrf9160.h renamed to platform/ext/target/nordic_nrf/common/nrf91/nrfx_config_nrf91.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
* POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131

32-
#ifndef NRFX_CONFIG_NRF9160_H__
33-
#define NRFX_CONFIG_NRF9160_H__
32+
#ifndef NRFX_CONFIG_NRF91_H__
33+
#define NRFX_CONFIG_NRF91_H__
3434

3535
#ifndef NRFX_CONFIG_H__
3636
#error "This file should not be included directly. Include nrfx_config.h instead."
@@ -1643,4 +1643,4 @@
16431643

16441644
// </h>
16451645

1646-
#endif // NRFX_CONFIG_NRF9160_H__
1646+
#endif // NRFX_CONFIG_NRF91_H__

platform/ext/target/nordic_nrf/common/nrf9160/partition/flash_layout.h renamed to platform/ext/target/nordic_nrf/common/nrf91/partition/flash_layout.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef __FLASH_LAYOUT_H__
1919
#define __FLASH_LAYOUT_H__
2020

21-
/* Flash layout on NRF9160 with BL2:
21+
/* Flash layout on nRF91 with BL2:
2222
*
2323
* 0x0000_0000 BL2 - MCUBoot (64 KB)
2424
* 0x0001_0000 Primary image area (448 KB):
@@ -33,7 +33,7 @@
3333
* 0x000f_8000 Non-secure storage, used when built with NRF_NS_STORAGE=ON,
3434
* otherwise unused (32 KB)
3535
*
36-
* Flash layout on NRF9160 without BL2:
36+
* Flash layout on nRF91 without BL2:
3737
*
3838
* 0x0000_0000 Primary image area (960 KB):
3939
* 0x0000_0000 Secure image primary (480 KB)
@@ -97,7 +97,7 @@
9797
#define FLASH_AREA_2_SIZE (FLASH_S_PARTITION_SIZE + \
9898
FLASH_NS_PARTITION_SIZE)
9999
/* Not used, only the Non-swapping firmware upgrade operation
100-
* is supported on NRF9160.
100+
* is supported on nRF91.
101101
*/
102102
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_2_ID + 1)
103103
#define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_2_OFFSET + FLASH_AREA_2_SIZE)
@@ -124,7 +124,7 @@
124124
#define FLASH_AREA_3_OFFSET (FLASH_AREA_2_OFFSET + FLASH_AREA_2_SIZE)
125125
#define FLASH_AREA_3_SIZE (FLASH_NS_PARTITION_SIZE)
126126
/* Not used, only the Non-swapping firmware upgrade operation
127-
* is supported on NRF9160.
127+
* is supported on nRF91.
128128
*/
129129
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_3_ID + 1)
130130
#define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_3_OFFSET + FLASH_AREA_3_SIZE)
@@ -137,7 +137,7 @@
137137
#endif /* MCUBOOT_IMAGE_NUMBER */
138138

139139
/* Not used, only the Non-swapping firmware upgrade operation
140-
* is supported on nRF9160. The maximum number of status entries
140+
* is supported on nRF91. The maximum number of status entries
141141
* supported by the bootloader.
142142
*/
143143
#define MCUBOOT_STATUS_MAX_ENTRIES (0)

platform/ext/target/nordic_nrf/common/nrf9160/partition/region_defs.h renamed to platform/ext/target/nordic_nrf/common/nrf91/partition/region_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define PSA_INITIAL_ATTEST_TOKEN_MAX_SIZE (0x250)
4444

4545
/*
46-
* SPU flash region granularity is 32 KB on nRF9160. Alignment
46+
* SPU flash region granularity is 32 KB on nRF91. Alignment
4747
* of partitions is defined in accordance with this constraint.
4848
*/
4949
#ifdef NRF_NS_SECONDARY

platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.c renamed to platform/ext/target/nordic_nrf/common/nrf91/target_cfg.c

File renamed without changes.

platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.h renamed to platform/ext/target/nordic_nrf/common/nrf91/target_cfg.h

File renamed without changes.

0 commit comments

Comments
 (0)