🛠 Le core Zephyr : sketches ELF chargés à chaud via llext (fin du reflash complet)

Arduino Portenta H7 · avance · Schéma : IMG-portenta-h7-avance-2-portenta-h7-zephyr-llext.svg — architecture du core Zephyr sur Portenta H7 : loader Zephyr précompilé en bas, sketch compilé en ELF chargé dynamiquement par llext au-dessus, flèche d'upload sans reset, terminal Zephyr shell affichant la commande sketch

Objectives

The ArduinoCore-zephyr core is set to replace the Mbed core on all supported devices, including the Portenta H7. The concept: a precompiled Zephyr loader remains on the board, and your sketch — compiled as a standalone ELF — is hot-loaded via llext, without a full reflash or reset. Since core release 0.90.0, the loader is automatically installed on the first upload. You will install the core, understand the loading model, and use the Zephyr shell in Debug mode to diagnose loading failures.

Hardware

Complete Code

// zephyr_blink.ino — API Arduino standard sur Zephyr RTOS
// 1. Installe "Arduino Zephyr Boards" dans le Board Manager
// 2. Choisis Portenta H7 ; le premier upload installe le loader
//    automatiquement (core >= 0.90.0, cible arduino_portenta_h7//m7)
// 3. Les uploads suivants chargent le sketch sans reset complet.
#include <Arduino.h>

void setup {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(200);
  digitalWrite(LED_BUILTIN, LOW);
  delay(800);
}
// Astuce du README : compiler en mode Debug pour obtenir le Zephyr
// shell sur la serie par defaut, puis la commande `sketch` lit les
// erreurs de chargement llext.

Expected Verification

After the first upload (loader installation), subsequent uploads are nearly instantaneous on the board side: the sketch starts without the full reflash cycle. In Debug mode, the Zephyr shell responds on the serial port, and the sketch command displays the status of the loaded ELF — the #1 diagnostic tool when nothing starts. The upstream build of the loader is done with ./extra/build.sh portentah7 (target arduino_portenta_h7//m7).

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials