Skip to content

Commit 8b9337f

Browse files
raiden00plxiaoxiang781216
authored andcommitted
Documentation: add some notes about running NuttX on Renode
add some notes about running NuttX on Renode
1 parent 73c032d commit 8b9337f

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

Documentation/guides/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ Guides
5151
platform_directories.rst
5252
port_drivers_to_stm32f7.rst
5353
semihosting.rst
54+
renode.rst

Documentation/guides/renode.rst

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
===================
2+
Run NuttX on Renode
3+
===================
4+
5+
Renode (https://renode.io/) is and open source virutal development
6+
framework dedicated for complex embedded systems.
7+
8+
This page contains notes on running some of NuttX boards on Renode.
9+
10+
ARM-v7m
11+
=======
12+
13+
Renode doesn't correctly handle ``SVC`` instruction escalation to HardFault
14+
when ``PRIMASK=1`` which crashs NuttX in the first ``up_exit()`` call.
15+
We can work around this problem by enabling BASEPRI::
16+
17+
CONFIG_ARMV7M_USEBASEPRI=y
18+
19+
stm32f4discovery
20+
================
21+
22+
``CONFIG_ARMV7M_USEBASEPRI=y`` must be set.
23+
24+
Renode doesn't support CCM memory, so we have to disable it
25+
with ``CONFIG_MM_REGIONS=1``.
26+
27+
Renode script::
28+
29+
using sysbus
30+
$name?="STM32F4_Discovery"
31+
mach create $name
32+
machine LoadPlatformDescription @platforms/boards/stm32f4_discovery-kit.repl
33+
34+
cpu PerformanceInMips 125
35+
36+
$bin?=@nuttx
37+
38+
showAnalyzer sysbus.usart2
39+
40+
macro reset
41+
"""
42+
sysbus LoadELF $bin
43+
"""
44+
45+
runMacro $reset
46+
47+
48+
Tested with ``stm32f4discovery/nsh``.
49+
50+
nucleo-l073rz
51+
=============
52+
53+
Doesn't work. No BASEPRI implementation for ``Cotex-M0`` in NuttX.
54+
55+
nrf52840-dk
56+
===========
57+
58+
Nordic UART peripheral is not supported by Renode, UARTE support
59+
is required (EasyDMA).
60+
61+
stm32f746g-disco
62+
================
63+
64+
``CONFIG_ARMV7M_USEBASEPRI=y`` and ``CONFIG_ARMV7M_BASEPRI_WAR=y`` must be set.
65+
66+
Renode script::
67+
68+
using sysbus
69+
$name?="STM32F746"
70+
mach create $name
71+
machine LoadPlatformDescription @platforms/boards/stm32f7_discovery-bb.repl
72+
73+
$bin ?= @nuttx
74+
75+
showAnalyzer usart1
76+
showAnalyzer ltdc
77+
78+
macro reset
79+
"""
80+
sysbus LoadELF $bin
81+
"""
82+
83+
runMacro $reset
84+
85+
Tested with ``stm32f746g-disco/nsh``.
86+
87+
Known issues:
88+
89+
* ``stm32f746g-disco/lvgl`` - crash due to incompatible I2C our touchscreen driver
90+
91+
nucleo-h743zi
92+
=============
93+
94+
``CONFIG_ARMV7M_USEBASEPRI=y`` must be set.
95+
96+
Renode doesn't support ``PWR_CSR1_ACTVOSRDY`` bit so we have to disable
97+
it with ``CONFIG_STM32H7_PWR_IGNORE_ACTVOSRDY=y``.
98+
99+
Renode script::
100+
101+
using sysbus
102+
mach create "nucleo_h743zi"
103+
include @platforms/boards/nucleo_h753zi.repl
104+
105+
$bin=@nuttx
106+
107+
showAnalyzer sysbus.usart3
108+
109+
macro reset
110+
"""
111+
sysbus LoadELF $bin
112+
"""
113+
114+
runMacro $reset
115+
116+
Tested wtih ``nucleo-h743zi/nsh``.

0 commit comments

Comments
 (0)