boards: nrf*_bsim: Convert to HW model v2

With a new board.yml file and reorganizing their
Kconfig options.

Note: the nrf5340 variants remain as their own
targets, instead of being variants of the base ones
to avoid breakage in this commit
(while not having a massime commit)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras
2024-02-15 15:12:17 +01:00
committed by Carles Cufi
parent 5821b9ec2e
commit 614611a528
50 changed files with 69 additions and 42 deletions

View File

@@ -1,31 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
config BOARD_NRF52_BSIM
bool "NRF52 simulation model"
select SOC_SERIES_BSIM_NRF52X
select SOC_COMPATIBLE_NRF52833
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
config BOARD_NRF5340BSIM_NRF5340_CPUNET
bool "Simulated NRF53 Network core"
select SOC_SERIES_BSIM_NRF53X
select SOC_COMPATIBLE_NRF5340_CPUNET
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
config BOARD_NRF5340BSIM_NRF5340_CPUAPP
bool "Simulated NRF53 Application core"
select SOC_SERIES_BSIM_NRF53X
select SOC_COMPATIBLE_NRF5340_CPUAPP
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute

View File

@@ -73,7 +73,7 @@ set_property(TARGET native_simulator APPEND PROPERTY RUNNER_LINK_LIBRARIES
target_compile_options(native_simulator INTERFACE
"-DNSI_PRIMARY_MCU_N=${CONFIG_NATIVE_SIMULATOR_PRIMARY_MCU_INDEX}")
add_subdirectory(${ZEPHYR_BASE}/boards/boards_legacy/${ARCH}/common/extra_args/
add_subdirectory(${ZEPHYR_BASE}/boards/native/common/extra_args/
${CMAKE_CURRENT_BINARY_DIR}/extra_args
)

View File

@@ -1,5 +1,40 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config BOARD_NRF52_BSIM
bool
select SOC_SERIES_BSIM_NRF52X
select SOC_COMPATIBLE_NRF52833
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
NRF52 simulation model
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
config BOARD_NRF5340BSIM_NRF5340_CPUNET
bool
select SOC_SERIES_BSIM_NRF53X
select SOC_COMPATIBLE_NRF5340_CPUNET
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
Simulated NRF53 Network core
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
config BOARD_NRF5340BSIM_NRF5340_CPUAPP
bool
select SOC_SERIES_BSIM_NRF53X
select SOC_COMPATIBLE_NRF5340_CPUAPP
select NRF_RTC_TIMER
select CLOCK_CONTROL
help
Simulated NRF53 Application core
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
if SOC_SERIES_BSIM_NRFXX
# The following file is normally parsed only for the ARM architecture, which is
@@ -8,7 +43,7 @@ if SOC_SERIES_BSIM_NRFXX
# must be read also from here.
source "soc/nordic_nrf/common/Kconfig.peripherals"
source "boards/boards_legacy/$(ARCH)/common/extra_args/Kconfig"
source "boards/native/common/extra_args/Kconfig"
endif # SOC_SERIES_BSIM_NRFXX

View File

@@ -0,0 +1,5 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config BOARD_NRF52_BSIM
select SOC_POSIX

View File

@@ -0,0 +1,5 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config BOARD_NRF5340BSIM_NRF5340_CPUAPP
select SOC_POSIX

View File

@@ -0,0 +1,5 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config BOARD_NRF5340BSIM_NRF5340_CPUNET
select SOC_POSIX

View File

@@ -0,0 +1,13 @@
boards:
- name: nrf52_bsim
vendor: Zephyr
socs:
- name: native
- name: nrf5340bsim_nrf5340_cpuapp
vendor: Zephyr
socs:
- name: native
- name: nrf5340bsim_nrf5340_cpunet
vendor: Zephyr
socs:
- name: native

View File

@@ -10,7 +10,7 @@
#include <mem.h>
#include <arm/nordic/nrf52833.dtsi>
/* We resuse the pinctrl definitions directly from the real board : */
#include <../boards/boards_legacy/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833-pinctrl.dtsi>
#include <../boards/nordic_nrf/nrf52833dk/nrf52833dk_nrf52833-pinctrl.dtsi>
/ {
model = "nrf52 bsim";

View File

@@ -1,7 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_POSIX=y
CONFIG_BOARD_NRF52_BSIM=y
CONFIG_CONSOLE=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_LOG_BACKEND_UART=n

View File

@@ -115,4 +115,4 @@
/* We re-use the IPC shared buffer definition from the real HW. But note the start address of the
* buffer won't be used.
*/
#include <../boards/board_legacy/arm/nrf5340dk_nrf5340/nrf5340_shared_sram_planning_conf.dtsi>
#include <../boards/nordic_nrf/nrf5340dk/nrf5340_shared_sram_planning_conf.dtsi>

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_POSIX=y
CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP=y
CONFIG_CONSOLE=y
CONFIG_NO_OPTIMIZATIONS=y

View File

@@ -77,4 +77,4 @@
/* We re-use the IPC shared buffer definition from the real HW. But note the start address of the
* buffer won't be used.
*/
#include <../boards/boards_legacy/arm/nrf5340dk_nrf5340/nrf5340_shared_sram_planning_conf.dtsi>
#include <../boards/nordic_nrf/nrf5340dk/nrf5340_shared_sram_planning_conf.dtsi>

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_POSIX=y
CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUNET=y
CONFIG_CONSOLE=y
CONFIG_NO_OPTIMIZATIONS=y