Skip to content

Commit 8e3a748

Browse files
more alterations
1 parent 3348fda commit 8e3a748

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/zephyr_shell/1_installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before working through this Learning Path, complete [Build Zephyr projects with
2424

2525
The two examples in this Learning Path have additional requirements:
2626

27-
- MQTT shell example: Docker Desktop, Docker Engine, or another Docker-compatible runtime on your host computer. The board communicates with a Mosquitto broker running in a container.
27+
- MQTT shell example: Docker Desktop, Docker Engine, or another Docker-compatible runtime on your host computer, if you're not installing Mosquitto on host. The board communicates with a Mosquitto broker running in a container.
2828
- UART shell example: A USB cable to connect the development board to your host computer. The board exposes a shell prompt over the USB serial interface.
2929

3030
## Hardware requirements

content/learning-paths/embedded-and-microcontrollers/zephyr_shell/2_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In this Learning Path, you'll work with two transports:
3535

3636
### MQTT backend
3737

38-
Enable the MQTT backend with `CONFIG_SHELL_BACKEND_MQTT=y`. The MQTT backend routes shell commands and responses over MQTT topics. The board subscribes to `<device_id>/sh/rx` for inbound commands and publishes responses to `<device_id>/sh/tx`. The backend connects automatically once the board has an IPv4 address, and is IPv4-only.
38+
Enable the MQTT backend with `CONFIG_SHELL_BACKEND_MQTT=y`. The MQTT backend routes shell commands and responses over MQTT topics. The board subscribes to `<device_id>/sh/rx` for inbound commands and publishes responses to `<device_id>/sh/tx`. The backend connects automatically when the board has an IPv4 address. The backend is IPv4-only.
3939

4040
### UART backend
4141

content/learning-paths/embedded-and-microcontrollers/zephyr_shell/3_mqtt_shell.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To create an application project in Workbench for Zephyr:
4848

4949
### Configure the application
5050

51-
The `hello_world` sample provides a working `CMakeLists.txt`, `prj.conf`, and `src/main.c`. Leave `CMakeLists.txt` unchanged, and replace `prj.conf` and `src/main.c` with the following contents.
51+
The `hello_world` sample provides a working `CMakeLists.txt`, `prj.conf`, and `src/main.c`. Leave `CMakeLists.txt` unchanged, and replace `prj.conf` and `src/main.c`.
5252

5353
Replace the contents of `prj.conf` with the following text:
5454

@@ -80,7 +80,7 @@ CONFIG_NET_BUF_RX_COUNT=32
8080

8181
Replace `192.168.1.233` with the IP address of the host running Mosquitto, as seen from the board's Ethernet network.
8282

83-
The values under "Resource tuning" keep the shell footprint small on Cortex-M and allow the network stack and MQTT client to operate reliably.
83+
The values under `# Resource tuning` keep the shell footprint small on Cortex-M and allow the network stack and MQTT client to operate reliably.
8484

8585
#### Use a static IPv4 address
8686

@@ -90,7 +90,7 @@ DHCP is convenient, but it's not required. To use a static address, remove:
9090
CONFIG_NET_DHCPV4=y
9191
```
9292

93-
Then add values that match your network:
93+
Then, add values that match your network:
9494

9595
```text
9696
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.50"
@@ -117,7 +117,7 @@ int main(void)
117117
118118
In the **Workbench for Zephyr** panel, select your project and build configuration. Select **Build**, then select **Flash**.
119119
120-
The FRDM-MCXN947 uses NXP LinkServer as the debug runner. If LinkServer isn't installed, follow the Workbench for Zephyr prompt to install or configure it.
120+
The FRDM-MCXN947 uses NXP LinkServer as the debug runner. If LinkServer isn't installed, follow the `Workbench for Zephyr` prompt to install or configure it.
121121
122122
## Create the Mosquitto Docker Compose project
123123
@@ -372,7 +372,7 @@ Threads:
372372
stack size 320, unused 256, usage 64 / 320 (20 %)
373373
```
374374

375-
The `*` next to `shell_mqtt` marks the running thread, which is the shell that just executed the command. Note that responses larger than the MQTT buffer are split across multiple publishes. `mosquitto_sub -v` reassembles them sequentially under the `1a2b3c/sh/tx` topic prefix.
375+
The `*` next to `shell_mqtt` marks the running thread, which is the shell that executed the command. Note that responses larger than the MQTT buffer are split across multiple publishes. `mosquitto_sub -v` reassembles them sequentially under the `1a2b3c/sh/tx` topic prefix.
376376

377377
Example output for `net iface` on the FRDM-MCXN947, truncated to the IPv4 section:
378378

@@ -392,7 +392,6 @@ IPv4 gateway : 192.168.1.1
392392
DHCPv4 state : bound
393393
DHCPv4 server : 192.168.1.1
394394
```
395-
396395
Example output for `net ping 192.168.1.1` (board pinging its gateway):
397396

398397
```output
@@ -402,7 +401,7 @@ Example output for `net ping 192.168.1.1` (board pinging its gateway):
402401
28 bytes from 192.168.1.1 to 192.168.1.41: icmp_seq=3 ttl=64 time=0 ms
403402
```
404403

405-
Replace `192.168.1.1` with the gateway address shown by `net iface`. The board sends three ICMP echo requests by default.
404+
To run `net ping`, replace `192.168.1.1` with the gateway address shown by `net iface`. The board sends three ICMP echo requests by default.
406405

407406
{{% notice Note %}}
408407
The MQTT shell backend executes a command after it receives a newline character. The `printf 'kernel version\n' | ... mosquitto_pub -s` form sends the command with the required newline.

content/learning-paths/embedded-and-microcontrollers/zephyr_shell/4_uart_shell.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ kernel uptime
157157
kernel thread list
158158
```
159159

160+
The output is similar to:
161+
160162
![Zephyr UART shell terminal output showing the kernel version, kernel uptime, and kernel thread list commands and their responses at the uart:~$ prompt#center](images/uart_shell_output.webp "Zephyr UART shell command output")
161163

162164
The `*` next to `shell_uart` in the thread list marks the currently running thread, which is the shell that executed the command.

content/learning-paths/embedded-and-microcontrollers/zephyr_shell/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ learning_objectives:
1515
prerequisites:
1616
- Basic familiarity with embedded C programming
1717
- Visual Studio Code with the Workbench for Zephyr extension installed and configured
18-
- Docker Desktop, Docker Engine, or another Docker-compatible runtime installed on your host computer (for the MQTT shell example only)
18+
- Docker Desktop, Docker Engine, or another Docker-compatible runtime installed on your host computer (for the MQTT shell example, if you're not installing Mosquitto on host)
1919
- A Zephyr-supported Arm Cortex-M board (for example, NXP FRDM-MCXN947)
2020

2121
author:

0 commit comments

Comments
 (0)