Skip to content

Commit 2babb38

Browse files
authored
Merge branch 'main' into fix-nrf-1447
2 parents a2ac414 + c7ceba7 commit 2babb38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+598
-121
lines changed

boards/native/nrf_bsim/doc/nrf52_bsim.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,33 @@ Run them with ``-help`` for more information.
171171
You can find more information about how to run BabbleSim simulations in
172172
`this BabbleSim example <https://babblesim.github.io/example_2g4.html>`_.
173173

174+
Running an application using the console
175+
========================================
176+
177+
Some applications require the use of a console to interact with the user.
178+
These applications typically enable :kconfig:option:`CONFIG_CONSOLE_SUBSYS` and :kconfig:option:`CONFIG_CONSOLE_GETCHAR`.
179+
The UART console is disabled by default for BabbleSim boards, to enable it simply add the snippet :ref:`snippet-uart-console`.
180+
181+
.. code-block:: console
182+
183+
west build -S serial-console [...]
184+
185+
To view the output and interact with the application the user needs to connect a terminal to this pseudoterminal.
186+
187+
.. code-block:: console
188+
189+
# Automatically attach to the terminal
190+
./build/zephyr/zephyr.exe --uart<uart_id>_pty_attach
191+
# Use a custom command to attach to the terminal, for example 'xterm -e screen %s &'
192+
./build/zephyr/zephyr.exe --uart<uart_id>_attach_cmd=<cmd>
193+
# Use a custom way to connect to the pseudoterminal
194+
./build/zephyr/zephyr.exe --uart<uart_id>_pty --uart_pty_wait
195+
minicom -D /dev/pts/<pts_id>
196+
197+
The command line option ``--uart_list`` prints out the mapping between ``uart_id`` and the UART peripherals.
198+
The overlay files describes which UART peripheral is being used as the console output.
199+
200+
For more details about attaching to the UART output, refer to the output of the ``-help`` option of the executable.
174201

175202
C library choice
176203
****************

boards/native/nrf_bsim/doc/nrf54l15bsim.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ This boards include models of some of the nRF54L15 SOC peripherals:
4040
* AAR (Accelerated Address Resolver)
4141
* CCM (AES CCM mode encryption)
4242
* CLOCK (Clock control)
43+
* CRACEN (Crypto Accelerator Engine)
4344
* DPPI (Distributed Programmable Peripheral Interconnect)
4445
* ECB (AES electronic codebook mode encryption)
4546
* EGU (Event Generator Unit)
@@ -49,7 +50,6 @@ This boards include models of some of the nRF54L15 SOC peripherals:
4950
* PPIB (PPI Bridge)
5051
* RADIO
5152
* RRAMC (Resistive RAM Controller)
52-
* RTC (Real Time Counter)
5353
* TEMP (Temperature sensor)
5454
* TIMER
5555
* UARTE (UART with Easy DMA)

boards/native/nrf_bsim/irq_handler.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *),
278278
*/
279279
void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
280280
{
281+
if (irq >= NHW_INTCTRL_MAX_INTLINES) {
282+
bs_trace_error_time_line("Attempted to configure not existent interrupt %u\n",
283+
irq);
284+
return;
285+
}
281286
hw_irq_ctrl_prio_set(CONFIG_NATIVE_SIMULATOR_MCU_N, irq, prio);
282287
}
283288

boards/native/nrf_bsim/nrf52_bsim.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
chosen {
3737
zephyr,ieee802154 = &ieee802154;
3838
zephyr,flash = &flash0;
39+
zephyr,console = &uart0;
3940
/* UART used by the BT controller UART HCI driver by default: */
4041
zephyr,bt-c2h-uart = &uart1;
4142
};

boards/native/nrf_bsim/nrf52_bsim_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33

44
CONFIG_CONSOLE=y
55
CONFIG_NO_OPTIMIZATIONS=y
6-
CONFIG_LOG_BACKEND_UART=n

boards/native/nrf_bsim/nrf5340bsim_nrf5340_cpuapp.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
};
4040

4141
chosen {
42+
zephyr,console = &uart0;
4243
zephyr,entropy = &rng_hci;
4344
zephyr,flash = &flash0;
4445
zephyr,bt-hci = &bt_hci_ipc0;

boards/native/nrf_bsim/nrf54l15bsim_nrf54l15_cpuapp.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
compatible = "bsim,nrf54l15-bsim-nrf54l15-cpuapp", "bsim,nrf54";
1616

1717
chosen {
18+
zephyr,console = &uart20;
1819
zephyr,entropy = &rng;
1920
zephyr,bt-c2h-uart = &uart20;
2021
zephyr,flash-controller = &rram_controller;

boards/nordic/nrf54l09pdk/Kconfig.defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ config BT_CTLR
99
config ROM_START_OFFSET
1010
default 0x800 if BOOTLOADER_MCUBOOT
1111

12-
config SOC_NRF54LX_SKIP_CLOCK_CONFIG
13-
default y
14-
1512
config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
1613
default y
1714

boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
status = "okay";
2828
};
2929

30+
&hfpll {
31+
/* For now use 64 MHz clock for CPU and fast peripherals. */
32+
clock-frequency = <DT_FREQ_M(64)>;
33+
};
34+
3035
&lfxo {
3136
load-capacitors = "internal";
3237
load-capacitance-femtofarad = <15500>;

boards/nordic/nrf54l20pdk/Kconfig.defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ if BOARD_NRF54L20PDK_NRF54L20_CPUAPP
66
config ROM_START_OFFSET
77
default 0x800 if BOOTLOADER_MCUBOOT
88

9-
config SOC_NRF54LX_SKIP_CLOCK_CONFIG
10-
default y
11-
129
config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
1310
default y
1411

0 commit comments

Comments
 (0)