Software/Neuro Studio

Bootloader Tool

Flashing a firmware image to the Neuro N6 from Neuro Studio's Bootloader dialog.

intermediate2 min read

Neuro Studio includes a tool for flashing a .bin firmware image to the Neuro N6 over USB, without the Arduino IDE. It is opened from the Bootloader button in the status bar. It implements the same DFU protocol as the Arduino core's uploader and is verified against it with recorded test vectors.

Use

  1. Choose .bin selects the image. For an application this is the _Trusted.bin produced by an Arduino build, found in the build output directory.
  2. Write to selects the target: the application, a model weights region, or a custom flash address. Targets that would overwrite the bootloader carry a warning and require confirmation.
  3. Port is left on auto-detect, or a serial port is chosen when several boards are connected.
  4. Flash enters the bootloader if the application is running, erases the target region in whole 4 KB sectors, writes the image in 4 KB chunks, verifies it and reboots. Progress and the bootloader's replies are shown in the log.

The board is not unplugged during flashing. A board already in the bootloader, after a double press of reset, is flashed without the reboot step.

Addresses

Addresses on the wire are offsets from the flash base 0x90000000. The dialog accepts either form. The application is written to 0x90100000. The region below 0x90100000 holds the FSBL and must not be overwritten; a board whose FSBL has been damaged is recovered through the STM32N6 development boot mode instead, see Uploader and Bootloader.

Protocol

The bootloader speaks a framed protocol over the CDC serial port at 115200 baud. Each packet is a start byte, a 16-bit little-endian length, the payload, an XOR checksum of the payload, and an end byte. Commands include an information request, erase, write at an offset, verify and reboot. The Dart implementation in Neuro Studio mirrors the Python implementation in the core's tools/neuro-n6-uploader, and a test file pins the framing against golden vectors captured from the Python so that the two cannot drift apart.

Relationship to the Arduino IDE

The IDE's Upload button uses the core's Python uploader, which also handles model weights and the WiFi module firmware from the build's manifest. The Neuro Studio tool flashes one image at a time and is intended for reflashing a built image, or for a board on which the IDE is not installed.