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
Copy file name to clipboardExpand all lines: README.md
+98-62Lines changed: 98 additions & 62 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This project is used with a [NUCLEO-L4A6ZG](https://www.st.com/en/evaluation-too
13
13
14
14

15
15
16
-
The project is built using Zephyr RTOS v3.4.0 and Zephyr SDK >= v0.16.0. It depends on [cJSON](https://github.com/DaveGamble/cJSON). There is no other dependencies.
16
+
The project is built using Zephyr RTOS v3.7.0 and Zephyr SDK >= v0.16.0. It depends on [cJSON](https://github.com/DaveGamble/cJSON). There is no other dependencies.
17
17
18
18
To start using Mender, we recommend that you begin with the Getting started section in [the Mender documentation](https://docs.mender.io).
19
19
@@ -75,45 +75,47 @@ west flash --hex-file build/zephyr/zephyr.signed.hex
75
75
After flashing the application on the NUCLEO-L4A6ZG evaluation board and displaying logs, you should be able to see the following:
[00:00:05.141,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (262): Device configuration not available
[00:00:05.191,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (111): Authentication keys are not available
[00:01:24.195,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (187): OTA ID not available
107
-
[00:01:36.160,000] <err> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-api.c (854): [401] Unauthorized: dev auth: unauthorized
[00:00:02.126,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (242): Device configuration not available
[00:00:02.177,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (110): Authentication keys are not available
[00:04:54.037,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (182): Deployment data not available
[00:05:04.980,000] <inf> mender_stm32l4a6_zephyr_example: Mender client released network
109
109
```
110
110
111
111
Which means you now have generated authentication keys on the device. Generating is a bit long but authentication keys are stored in `storage_partition` of the MCU so it's done only the first time the device is flashed. You now have to accept your device on the mender interface. Once it is accepted on the mender interface the following will be displayed:
[00:10:13.215,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (884): Checking for deployment...
117
+
[00:10:17.791,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (892): No deployment available
118
+
[00:10:17.805,000] <inf> mender_stm32l4a6_zephyr_example: Mender client released network
117
119
```
118
120
119
121
Congratulation! Your device is connected to the mender server. Device type is `mender-stm32l4a6-zephyr-example` and the current software version is displayed.
@@ -122,7 +124,7 @@ Congratulation! Your device is connected to the mender server. Device type is `m
122
124
123
125
First retrieve [mender-artifact](https://docs.mender.io/downloads#mender-artifact) tool.
124
126
125
-
Change `VERSION.txt` file to `0.2`, rebuild and sign the firmware using the following commands. We previously used `hex` file because it is required to flash the device, but we now use `bin` file that is required for the mender-mcu-client:
127
+
Change `VERSION` file to `VERSION_MAJOR=0` and `VERSION_MINOR=2`, rebuild and sign the firmware using the following commands. We previously used `hex` file because it is required to flash the device, but we now use `bin` file that is required for the mender-mcu-client:
126
128
127
129
```
128
130
west build -b nucleo_l4a6zg path/to/mender-stm32l4a6-zephyr-example
@@ -131,55 +133,58 @@ west build -b nucleo_l4a6zg path/to/mender-stm32l4a6-zephyr-example
131
133
Then create a new artifact using the following command line:
[00:00:06.140,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (262): Device configuration not available
[00:00:18.230,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/ota/zephyr/src/mender-ota.c (146): Application has been mark valid and rollback canceled
180
-
[00:00:22.783,000] <inf> mender_stm32l4a6_zephyr_example: Deployment status is 'success'
181
-
[00:00:22.794,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (433): Checking for deployment...
182
-
[00:00:27.366,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (441): No deployment available
167
+
[00:00:02.016,000] <inf> eth_w5500: eth_w5500@0: Link up
[00:00:02.125,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/storage/zephyr/nvs/src/mender-storage.c (242): Device configuration not available
[00:00:12.851,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/platform/flash/zephyr/src/mender-flash.c (146): Application has been mark valid and rollback cancd
183
+
[00:00:17.383,000] <inf> mender_stm32l4a6_zephyr_example: Deployment status is 'success'
184
+
[00:00:17.394,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (884): Checking for deployment...
185
+
[00:00:21.935,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (892): No deployment available
186
+
[00:00:21.949,000] <inf> mender_stm32l4a6_zephyr_example: Mender client released network
187
+
183
188
```
184
189
185
190
Congratulation! You have updated the device. Mender server displays the success of the deployment.
@@ -189,6 +194,37 @@ Congratulation! You have updated the device. Mender server displays the success
189
194
In case of failure to connect and authenticate to the server the current example application performs a rollback to the previous release.
190
195
You can customize the behavior of the example application to add your own checks and perform the rollback in case the tests fail.
191
196
197
+
### Download and execute an LLEXT module
198
+
199
+
This example application supports LLEXT feature to permit loading and executing LLEXT modules using mender-mcu-client.
200
+
201
+
Compile the hello-world LLEXT sample from Zephyr as below:
202
+
203
+
```
204
+
west build -d build-llext -b nucleo_l4a6zg samples/subsys/llext/modules
205
+
```
206
+
207
+
Then create a new artifact using the following command line:
Upload the artifact `mender-module-hello-world-v1.mender` to the mender server and create a new deployment.
214
+
215
+
The device checks for the new deployment, downloads the artifact and call the `hellow_world` function of the module, which is simply displyaing `Hello, world, from an llext!` log in the console:
216
+
217
+
```
218
+
[00:00:12.987,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (884): Checking for deployment...
219
+
[00:00:17.583,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-client.c (918): Downloading deployment artifact with id '360e14aa-33d2-4f99-af7d-A
220
+
[00:00:22.177,000] <inf> mender_stm32l4a6_zephyr_example: Deployment status is 'downloading'
221
+
[00:00:27.725,000] <inf> mender: CMAKE_SOURCE_DIR/components/mender-mcu-client/core/src/mender-artifact.c (382): Artifact has valid version
0 commit comments