Running U-Boot Print


As explained in Installing U-Boot to the STM32H753i-EVAL, you have to install U-Boot to the STM32H753i-EVAL in order to run Linux (uClinux) on the STM32H753i-EVAL board. U-Boot runs as the primary firmware on each power-on / reset.

U-Boot is probably the most popular firmware monitor for Linux. It is developed and maintained by DENX Software Engineering ( If you need detailed information on any aspects of U‑Boot operation, DENX publishes extensive U‑Boot user documentation at their web site.

As soon as the STM32H753i-EVAL board is powered on or reset, the STM32H753i-EVAL proceeds to boot the U- Boot firmware from the internal Flash printing the following output to the serial console:

U-Boot 2019.04- (Aug 09 2023 - 10:31:06 +0000)

Model: STMicroelectronics STM32H753i-EVAL board
DRAM: 32 MiB
Flash: 2 MiB
Loading Environment from MMC... OK
In: serial@40011000
Out: serial@40011000
Err: serial@40011000
Net: eth0: ethernet@40028000
Hit any key to stop autoboot: 0
STM32H7-EVAL U-Boot >

If you hit any key on the serial console before the number of seconds defined by the U-Boot bootdelay variable has elapsed, you will enter the U-Boot interactive command monitor. From the command monitor you can run U‑Boot commands to examine memory, load an image from Ethernet, boot Linux from a loaded image or perform any other action supported by U-Boot.

U-Boot makes use of the so-called environment variables to define various aspects of the target functionality. On the STM32H753i-EVAL board, the U-Boot environment is stored in the is stored at offset 512k in the SD card and is persistent across power or reset cycles. Parameters defined by the U-Boot environment variables include: target IP address, target MAC address, location in RAM where a Linux bootable image will be loaded, and many others.

To manipulate the U-Boot environment the following commands are used:

  • printenv <var> - print the value of the variable <var>. Without arguments, prints all environment variables:
  • STM32H7-EVAL U-Boot > printenv ipaddr
    STM32H7-EVAL U-Boot >

  • setenv <var><val> - set the variable <var> to the value <val>:
  • STM32H7-EVAL U-Boot > setenv image my.rootfs.uImage
    STM32H7-EVAL U-Boot >

  • saveenv - save the up-to-date U-Boot environment, possibly updated using setenv commands, into the SD Card. Running saveenv makes sure that any updates you have made to the U-Boot environment are persistent across power cycles and resets.
  • STM32H7-EVAL U-Boot > saveenv
    Saving Environment to MMC... Writing to MMC(0)... OK
    STM32H7-EVAL U-Boot >