Running U-Boot Print


Each STM32F4 System-On-Module (SOM) comes pre-loaded with U-Boot. U-Boot runs as the primary firmware from the STM32F4 internal Flash on each power-on / reset. U-Boot performs initial initialization and configuration of the system and then acts as a bootloader for Linux.

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

On the STM32F4 microcontrollers, U-Boot runs directly from the internal on-chip Flash. Volatile data (stack, variables, dynamic pool) are maintained in the internal SRAM. External RAM is not used unless you explicitly call a U-Boot command with an argument pointing to a memory location in SDRAM. Please note however that Linux runs from external SDRAM so when you proceed to boot Linux, SDRAM is actively in use.

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

U-Boot 2010.03-cortexm-2.0.0 (May 5 2016 - 20:31:28)

CPU  : STM32F4 (Cortex-M4)
Freqs: SYSCLK=180MHz,HCLK=180MHz,PCLK1=45MHz,PCLK2=90MHz
Board: STM-SOM Rev Rev 2.A, www.emcraft.com
DRAM:  32 MB
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   STM32_MAC
Hit any key to stop autoboot:  0
STM32F4X9-SOM>

If you hit any key on the serial console before the amount of time (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.

Use the help command to print out the list of the enabled U-Boot commands:

STM32F4X9-SOM> help
? - alias for 'help'
...
tftpboot- boot image via network using TFTP protocol
version - print monitor version
STM32F4X9-SOM>

As mentioned above, the DENX website publishes detailed documentation describing use of various U-Boot commands. The application notes available on the Emcraft web site describe how to use U-Boot commands to perform specific actions on the STM32F4 system-on-module.