Error Handling¶
Note
The following intructions only apply to Ardep v1 since later versions have an On-Board Debugger (OBD) and the bootloader logs are accessible via the forwarded UART-A device.
Additionally, you can flash the bootloader and the firmware via west flash using the on board debugger.
When encountering an error, you have several options, depending on the severity of the error. Generally, it is helpful to see if your application gets started from the bootloader. See the Console Output documentation for more information about where you find the application and bootloader output.
If your application keeps running, you can just perform an update via dfu-util. See the Getting Started guide for an example.
If you application keeps hangig itself up (e.g. segfaults) and a dfu is not possible, boot into the USB DFU Bootloader Mode (ARDEP v1) and flash a new application from there.
If you can’t get into bootloader mode, you should delete the whole flash memory and flash a new bootloader and application. For this, you need to connect an external debugger on the SWD pins on the board.
To build the bootloader, you can use the following command:
west ardep build-bootloader
Then erase the flash memory of the ardep board.
Next, flash the bootloader. You can use a debugger of your choice or use the west flash command.
For an overview of the west flash command see Zephyr’s documentation on the west command, west flash -h and the board.cmake file under boards/arm/ardep for an overview of supported runners.
After flashing the bootloader, flash the application of your choice. See the Getting Started guide and the USB DFU Bootloader Mode (ARDEP v1) documentation for this.