Brussels / 4 & 5 February 2023

schedule

Semihosting U-Boot

Look, ma, no serial!


Semihosting provides console, filesystem access, and other functions over a debug interface, such as JTAG. This is especially useful when traditional bootstrap interfaces such as serial, USB, or Ethernet are not available in hardware. This talk will discuss implementing improved semihosting support in U-Boot; semihosting's strengths, weaknesses, and how to work around them; and how to semihost U-Boot with OpenOCD on your next board bringup.

Semihosting has long been used to provide host services for embedded ARM systems, especially microcontrollers. However, its use on Linux-capable systems has been much patchier. Vendor-supported recovery modes often use JTAG, but seldom make use of the features provided by semihosting. U-Boot has supported loading files using semihosting on ARM Virtual Express platforms since 2014, but lacked serial support and integration with standard commands. In release 2022.07, such support has been added, motivated by use on QorIQ platforms.

NXP QorIQ platforms require a valid configuration programmed into the boot source in order to boot. Although there is a fallback configuration, it does not support traditional firmware loading interfaces such as USB or Ethernet. By using U-Boot semihosted over JTAG with OpenOCD, a recovery image can be loaded which is sufficient to complete device programming. The same binaries can be used to boot from eMMC as well as JTAG, simplifying configuration. Because semihosting is standard across ARM platforms which support JTAG debugging, similar strategies can be reused whenever JTAG is the most convenient communication method.

The target audience of this talk includes users of ARM or RISC-V platforms with JTAG Boot; users of U-Boot, OpenOCD, and QEMU; and developers of other bootloaders who are interested in adding semihosting support.

Speakers

Photo of Sean Anderson Sean Anderson

Attachments

Links