Yann Gautier | a250e12 | 2023-06-14 09:18:19 +0200 | [diff] [blame] | 1 | STM32 MPUs |
| 2 | ========== |
| 3 | |
| 4 | STM32 MPUs are microprocessors designed by STMicroelectronics |
| 5 | based on Arm Cortex-A. This page presents the common configuration of STM32 |
| 6 | MPUs, more details and dedicated configuration can be found in each STM32 MPU |
Yann Gautier | e6ecc3c | 2023-03-17 14:02:12 +0100 | [diff] [blame] | 7 | page (:ref:`STM32MP1` or :ref:`STM32MP2`) |
Yann Gautier | a250e12 | 2023-06-14 09:18:19 +0200 | [diff] [blame] | 8 | |
| 9 | Design |
| 10 | ------ |
| 11 | The STM32 MPU resets in the ROM code of the Cortex-A. |
| 12 | The primary boot core (core 0) executes the boot sequence while |
| 13 | secondary boot core (core 1) is kept in a holding pen loop. |
| 14 | The ROM code boot sequence loads the TF-A binary image from boot device |
| 15 | to embedded SRAM. |
| 16 | |
| 17 | The TF-A image must be properly formatted with a STM32 header structure |
| 18 | for ROM code is able to load this image. |
| 19 | Tool stm32image can be used to prepend this header to the generated TF-A binary. |
| 20 | |
| 21 | Boot |
| 22 | ~~~~ |
| 23 | Only BL2 (with STM32 header) is loaded by ROM code. The other binaries are |
| 24 | inside the FIP binary: BL31 (for Aarch64 platforms), BL32 (OP-TEE), U-Boot |
| 25 | and their respective device tree blobs. |
| 26 | |
| 27 | Boot sequence |
| 28 | ~~~~~~~~~~~~~ |
| 29 | |
| 30 | ROM code -> BL2 (compiled with RESET_TO_BL2) -> OP-TEE -> BL33 (U-Boot) |
| 31 | |
| 32 | Build Instructions |
| 33 | ------------------ |
| 34 | Boot media(s) supported by BL2 must be specified in the build command. |
| 35 | Available storage medias are: |
| 36 | |
| 37 | - ``STM32MP_SDMMC`` |
| 38 | - ``STM32MP_EMMC`` |
| 39 | - ``STM32MP_RAW_NAND`` |
| 40 | - ``STM32MP_SPI_NAND`` |
| 41 | - ``STM32MP_SPI_NOR`` |
| 42 | |
| 43 | Serial boot devices: |
| 44 | |
| 45 | - ``STM32MP_UART_PROGRAMMER`` |
| 46 | - ``STM32MP_USB_PROGRAMMER`` |
| 47 | |
Yann Gautier | bf5c5f1 | 2024-03-19 10:40:12 +0100 | [diff] [blame^] | 48 | Only one storage or serial device should be selected in the build command line, |
| 49 | to save space and not overflow SYSRAM size, or else the platform won't build or boot. |
Yann Gautier | a250e12 | 2023-06-14 09:18:19 +0200 | [diff] [blame] | 50 | |
| 51 | Other configuration flags: |
| 52 | |
| 53 | - | ``DTB_FILE_NAME``: to precise board device-tree blob to be used. |
| 54 | | Default: stm32mp157c-ev1.dtb |
| 55 | - | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP, |
| 56 | | default location (end of the first 128MB) is used when absent |
| 57 | - | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup. |
| 58 | | Default: 0 (disabled) |
| 59 | - | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2). |
| 60 | | Default: 0 (disabled) |
| 61 | - | ``STM32MP_UART_BAUDRATE``: to select UART baud rate. |
| 62 | | Default: 115200 |
| 63 | |
| 64 | |
| 65 | Populate SD-card |
| 66 | ---------------- |
| 67 | |
| 68 | Boot with FIP |
| 69 | ~~~~~~~~~~~~~ |
| 70 | The SD-card has to be formatted with GPT. |
| 71 | It should contain at least those partitions: |
| 72 | |
| 73 | - fsbl: to copy the tf-a-stm32mp157c-ev1.stm32 binary (BL2) |
| 74 | - fip (GUID 19d5df83-11b0-457b-be2c-7559c13142a5): which contains the FIP binary |
| 75 | |
| 76 | Usually, two copies of fsbl are used (fsbl1 and fsbl2) instead of one partition fsbl. |
| 77 | |
| 78 | -------------- |
| 79 | |
Yann Gautier | bf5c5f1 | 2024-03-19 10:40:12 +0100 | [diff] [blame^] | 80 | *Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved* |