You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation/python: Fix tutorial for running Python
After apache/nuttx-apps#2982, there is no
need to mount the modules and manually set the required environment
variables: they are all set by the new Python wrapper application.
Signed-off-by: Tiago Medicci Serrano <[email protected]>
Copy file name to clipboardExpand all lines: Documentation/applications/interpreters/python/index.rst
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@ How Does it Work?
18
18
19
19
1. Python for NuttX target initially the ``rv-virt`` (RISC-V QEMU) board.
20
20
2. Python modules are stored in `pyc <https://docs.python.org/3/glossary.html#term-bytecode>`_ (byte-code format) and are loaded from a ROMFS image at startup.
21
-
3. Environment variables like ``PYTHONHOME`` and ``PYTHON_BASIC_REPL`` need to be set accordingly.
21
+
3. The Python wrapper application on NuttX mounts the ROMFS partition which contains the Python modules and sets the required environment variables (``PYTHONHOME`` and ``PYTHON_BASIC_REPL``) automatically.
22
22
23
-
Building Python NuttX
24
-
=====================
23
+
Building Python on NuttX
24
+
========================
25
25
26
26
Use the ``rv-virt:python`` config to build Python for NuttX. Note that the CMake scripts don't work for this configuration. For now, please use the makefile build instead:
27
27
@@ -66,10 +66,6 @@ Then, run RISC-V QEMU with the following command:
66
66
telnetd [4:100]
67
67
68
68
NuttShell (NSH) NuttX-10.4.0
69
-
nsh> python_mount_modules
70
-
Mounting ROMFS filesystem at target=/usr/local/lib/ with source=/dev/ram1
71
-
nsh> export PYTHONHOME /usr/local
72
-
nsh> export PYTHON_BASIC_REPL 1
73
69
nsh> python
74
70
Python 3.13.0 (main, Dec 4 2024, 17:00:42) [GCC 13.2.0] on nuttx
75
71
Type "help", "copyright", "credits" or "license" for more information.
0 commit comments