ESP32-S3 + Zephyr
Device description
Board: ESP32-S3 DevKitC
OS: Zephyr v4.2.0
Quick description:
A development board with dual-core Xtensa LX7, used here with Zephyr OS and integrated Mender MCU client for OTA updates.
Support level
-
Board supported: ESP32-S3 DevKitC
-
Zephyr OS integration tested by the user for basic build and OTA functionality.
-
Note: Crash occurs during Mender MCU client initialization when using identity callback.
Getting started
-
Zephyr project: mender-mcu-integration
-
Build steps (successful firmware build with Mender MCU integration):
west build -b esp32s3_devkitc path/to/mender-mcu-integration west espressif flash -p /dev/ttyUSB0 west espressif monitor -p /dev/ttyUSB0 -b 115200 -
MCUboot is used as the bootloader.
-
TLS certificates are integrated via
certs.cand.cer.incinclude files. -
Mender Server: self-hosted Open Source server deployed on Ubuntu (following official Mender tutorial).
-
Mender Client Kconfig settings for self-hosted server:
CONFIG_MENDER_SERVER_HOST="http://<server_ip>" CONFIG_MENDER_SERVER_TENANT_TOKEN="" # empty for on-prem server CONFIG_MENDER_NET_CA_CERTIFICATE_TAG_PRIMARY=1 CONFIG_MENDER_CLIENT_UPDATE_POLL_INTERVAL=30 CONFIG_MENDER_CLIENT_INVENTORY_REFRESH_INTERVAL=60
References
-
Official Mender MCU documentation: https://docs.mender.io/client-sdk/mcu
-
Zephyr integration example:
mender-mcu-integrationrepository -
TLS / certificates guidance: Mender MCU TLS documentation
-
Self-hosted Mender server guide: https://docs.mender.io/server/setup
Known issues
Problem description:
During initialization of Mender MCU client on ESP32-S3 with Zephyr, the device crashes after network connection, TLS setup, and when attempting to call the identity callback.
Crash log snippet:
[1970-01-01T00:00:04,673000Z] <dbg> mender_app: mender_network_connect_cb: network_connect_cb
[1970-01-01T00:00:04,673000Z] <inf> mender: Checking for deployment...
[1970-01-01T00:00:04,673000Z] <dbg> mender: mender_storage_get_provides: Provides not available
[1970-01-01T00:00:04,673000Z] <dbg> mender_app: mender_get_identity_cb: get_identity_cb
ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/lib/libc/picolibc/assert.c:27
[1970-01-01T00:00:04,746000Z] <err> os: ** FATAL EXCEPTION
[1970-01-01T00:00:04,746000Z] <err> os: ** CPU 0 EXCCAUSE 63 (zephyr exception)
[1970-01-01T00:00:04,746000Z] <err> os: ** PC 0x40378587 VADDR 0
[1970-01-01T00:00:04,746000Z] <err> os: ** PS 0x60e20
[1970-01-01T00:00:04,746000Z] <err> os: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:14 CALLINC:2)
Identity callback used:
mender_err_t mender_get_identity_cb(const mender_identity_t **identity_ptr) {
if (identity_ptr) {
*identity_ptr = &identity;
return MENDER_OK;
}
return MENDER_FAIL;
}
Steps attempted to resolve:
-
Verified
mender_get_identity_cbreturnsMENDER_OK. -
Integrated self-signed TLS certificates correctly.
-
Ensured network (Wi-Fi) is up before client initialization.
-
Tried different static identity formats.
-
Checked memory usage; NVS storage initialized correctly.
-
Confirmed server is reachable and accessible from other devices.
Observations:
-
Crash occurs immediately after
mender_get_identity_cbis called. -
The device successfully connects to Wi-Fi and gets an IP address.
-
TLS setup is completed and primary certificate is loaded.
-
MCUboot successfully loads the Zephyr application; “Hello World” message prints before crash.
Request for guidance:
-
Could this crash be due to environment initialization order (NVS, TLS, time)?
-
Are there known issues with ESP32-S3 + Zephyr + Mender MCU client regarding identity callback?
-
Any recommended workaround or example for safe initialization sequence on ESP32-S3 with self-hosted Mender server?