File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
boards/native/native_sim/doc Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -547,13 +547,23 @@ where :file:`/dev/{<ptyn>}` should be replaced with the actual PTY device.
547
547
548
548
You may also chose to automatically attach a terminal emulator to any of these UARTs.
549
549
To automatically attach one to all these UARTs, pass the command line option ``-attach_uart `` to the
550
- executable. To automatically attach one to a single UART use ``-<uart_name>_attach_uart ``
550
+ executable. To automatically attach one to a single UART use ``-<uart_name>_attach_uart ``.
551
551
The command used for attaching to the new shell can be set for all UARTs with the command line
552
552
option ``-attach_uart_cmd=<"cmd"> ``, or for each individual UART with
553
553
``-<uart_name>_attach_uart_cmd ``. Where the default command is given by
554
554
:kconfig:option: `CONFIG_UART_NATIVE_PTY_AUTOATTACH_DEFAULT_CMD `.
555
555
Note that the default command assumes both ``xterm `` and ``screen `` are installed in the system.
556
556
557
+ Note that these ``uart_cmd `` commands can be effectively any shell command including lists of
558
+ commands. Therefore it is possible to invoke any other script or program from it.
559
+ Those commands will be run right after the PTY is created.
560
+ For example, if one wanted to create a link to the newly created PTY, and have it removed when the
561
+ program ends, one could do:
562
+
563
+ .. code-block :: console
564
+
565
+ $ zephyr.exe --uart_attach_uart_cmd='ln -s %s /tmp/somename' ; rm /tmp/somename
566
+
557
567
This driver supports poll mode or async mode with :kconfig:option: `CONFIG_UART_ASYNC_API `.
558
568
Interrupt mode is not supported.
559
569
Neither runtime configuration or line control are supported.
You can’t perform that action at this time.
0 commit comments