1# SPDX-License-Identifier: Apache-2.0
2
3if SOC_SERIES_BSIM_NRFXX
4
5config BUILD_OUTPUT_BIN
6	default n
7
8config BUILD_OUTPUT_EXE
9	# When the IPC service is used, the net core image requires the application core image, as it needs
10	# access to its IPC buffer. Without it, the executable cannot be built.
11	default y if !(BOARD_NRF5340BSIM_NRF5340_CPUNET && IPC_SERVICE && (NATIVE_SIMULATOR_EXTRA_IMAGE_PATHS = ""))
12
13config OUTPUT_PRINT_MEMORY_USAGE
14	default n
15
16config BOARD
17	default "nrf52_bsim" if BOARD_NRF52_BSIM
18	default "nrf5340bsim_nrf5340_cpunet" if BOARD_NRF5340BSIM_NRF5340_CPUNET
19	default "nrf5340bsim_nrf5340_cpuapp" if BOARD_NRF5340BSIM_NRF5340_CPUAPP
20
21config NATIVE_SIMULATOR_NUMBER_MCUS
22	default 2 if BOARD_NRF5340BSIM_NRF5340_CPUNET || BOARD_NRF5340BSIM_NRF5340_CPUAPP
23	default 1
24
25config NATIVE_SIMULATOR_MCU_N
26	default 1 if BOARD_NRF5340BSIM_NRF5340_CPUNET
27	default 0
28
29config NATIVE_SIMULATOR_AUTOSTART_MCU
30	default y if BOARD_NRF5340BSIM_NRF5340_CPUNET
31
32config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX
33	default 1 if SOC_SERIES_BSIM_NRF53X
34	default 0
35
36config SYS_CLOCK_HW_CYCLES_PER_SEC
37	default 32768
38
39config SYS_CLOCK_TICKS_PER_SEC
40	default 128 if !TICKLESS_KERNEL
41	default 32768
42
43config BT_CTLR
44	default y if BOARD_NRF52_BSIM || BOARD_NRF5340BSIM_NRF5340_CPUNET
45	depends on BT
46
47config HEAP_MEM_POOL_ADD_SIZE_BOARD
48	int
49	default 4096 if BT_HCI_IPC
50	default 4096 if NRF_802154_SER_HOST && BOARD_NRF5340BSIM_NRF5340_CPUAPP
51	default 4096 if NRF_802154_SER_RADIO && BOARD_NRF5340BSIM_NRF5340_CPUNET
52
53if BOARD_NRF5340BSIM_NRF5340_CPUAPP || BOARD_NRF5340BSIM_NRF5340_CPUNET
54
55config MBOX_NRFX_IPC
56	default MBOX
57
58endif # BOARD_NRF5340BSIM_NRF5340_CPUAPP || BOARD_NRF5340BSIM_NRF5340_CPUNET
59
60if BOARD_NRF5340BSIM_NRF5340_CPUAPP
61
62config IPC_SERVICE_BACKEND_RPMSG_SHMEM_RESET
63	default y if IPC_SERVICE_BACKEND_RPMSG
64
65choice BT_HCI_BUS_TYPE
66	default BT_HCI_IPC
67endchoice
68
69endif # BOARD_NRF5340BSIM_NRF5340_CPUAPP
70
71# The 15.4 driver Tx encryption is currently not functional with this
72# simulated board => we disable it by default. With this Openthread will normally
73# default to encrypt packets on its own.
74config NRF_802154_ENCRYPTION
75	default n
76
77if LOG
78
79# For this board we can log synchronously without any problem
80# Doing so will be nicer for debugging
81choice LOG_MODE
82	default LOG_MODE_IMMEDIATE
83endchoice
84
85endif # LOG
86
87if CONSOLE
88
89config POSIX_ARCH_CONSOLE
90	default y
91
92endif # CONSOLE
93
94endif # SOC_SERIES_BSIM_NRFXX
95