Part Number: AM62P
Other Parts Discussed in Thread: UNIFLASH
Hi,
I am working on AM62P MCU domain.
In mcu flashing cfg from mcu+sdk i have seen two files default_sbl_ospi_linux_hs_fs.cfg and default_sbl_emmc_linux_hs_fs.cfg.
In ospi config
# First point to sbl_uart_uniflash_stage1 binary, which initialises DDR and receives sbl_uart_uniflash_stage2 binary
--flash-writer=sbl_prebuilt/am62px-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage# Points to sbl_uart_uniflash_stage2 binary, which function's as a server to flash one or more files
# Please note this binary is copied to DDR by sbl_uart_uniflash_stage1 and not written to any boot media like flash or eMMC
--file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62px-sk/wkup-r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0# Program the OSPI PHY tuning attack vector
--operation=flash-phy-tuning-data# Now send one or more files to flash or flashverify as needed. The order of sending files does not matter
# When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0
--file=sbl_prebuilt/am62px-sk/sbl_ospi_linux_stage1.release.hs_fs.tiimage --operation=flash --flash-offset=0x0# 2nd stage bootloader with DM is flashed at 0x80000 or to whatever offset your bootloader is configured for
--file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage.hs_fs --operation=flash --flash-offset=0x80000# When sending application image, make sure to flash at offset 0x100000 (default) or to whatever offset your bootloader is configured for
--file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage.hs_fs --operation=flash --flash-offset=0x800000# HSM image is flashed at 0x800000 or to whatever offset your bootloader is configured for
--file=HSMAppimageGen/board/am62px-sk/hsm.appimage.hs_fs --operation=flash --flash-offset=0x240000# Linux image is flashed at 0xC00000 or to whatever offset your bootloader is configured for
--file=linuxAppimageGen/board/am62px-sk/linux.appimage.hs_fs --operation=flash --flash-offset=0x1200000# u-boot.img is flashed at 0x280000
--file=linuxAppimageGen/board/am62px-sk/u-boot.img --operation=flash --flash-offset=0x280000
In emmc cfg
# First point to sbl_uart_uniflash_stage1 binary, which initialises DDR and receives sbl_uart_uniflash_stage2 binary
--flash-writer=sbl_prebuilt/am62px-sk/sbl_uart_uniflash_stage1.release.hs_fs.tiimage# Points to sbl_uart_uniflash_stage2 binary, which function's as a server to flash one or more files to eMMC
# Please note this binary is copied to DDR by sbl_uart_uniflash_stage1 and not written to any boot media like flash or eMMC
--file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62px-sk/wkup-r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage.hs_fs --operation=flash --flash-offset=0x0# Now send one or more files to flash or flashverify as needed. The order of sending files does not matter
# When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0 of eMMC
--file=sbl_prebuilt/am62px-sk/sbl_emmc_linux_stage1.release.hs_fs.tiimage --operation=flash-emmc --flash-offset=0x0# 2nd stage bootloader is flashed at 0x80000 or to whatever offset your bootloader is configured for
--file=../../examples/drivers/boot/sbl_emmc_linux_multistage/sbl_emmc_linux_stage2/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/sbl_emmc_linux_stage2.release.appimage.hs_fs --operation=flash-emmc --flash-offset=0x80000# HSM image is flashed at 0x240000 or to whatever offset your bootloader is configured for
--file=HSMAppimageGen/board/am62px-sk/hsm.appimage.hs_fs --operation=flash-emmc --flash-offset=0x240000# When sending application image, make sure to flash at offset 0x800000 (default) or to whatever offset your bootloader is configured for
--file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage.hs_fs --operation=flash-emmc --flash-offset=0x800000# Linux image is flashed at 0x1200000 or to whatever offset your bootloader is configured for
--file=linuxAppimageGen/board/am62px-sk/linux.appimage.hs_fs --operation=flash-emmc --flash-offset=0x1200000# u-boot.img is flashed at 0x280000
--file=linuxAppimageGen/board/am62px-sk/u-boot.img --operation=flash-emmc --flash-offset=0x280000
While comparing the two configurations, I noticed a difference in the image flashed at the Stage-2 bootloader offset (0x80000)
ospi config -
2nd stage bootloader with DM is flashed at 0x80000 or to whatever offset your bootloader is configured for
--file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage.hs_fs --operation=flash --flash-offset=0x80000
emmc config
# 2nd stage bootloader is flashed at 0x80000 or to whatever offset your bootloader is configured for
--file=../../examples/drivers/boot/sbl_emmc_linux_multistage/sbl_emmc_linux_stage2/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/sbl_emmc_linux_stage2.release.appimage.hs_fs --operation=flash-emmc --flash-offset=0x80000
My understanding is that the image at offset 0x80000 is intended to be the Stage-2 bootloader. However, in the OSPI configuration, the file being flashed is the ipc_rpmsg_echo_linux application, whereas in the eMMC configuration it is explicitly the sbl_emmc_linux_stage2 image.
This has led to some confusion regarding the boot flow:
- Is the image flashed at
0x80000in the OSPI configuration actually acting as the Stage-2 bootloader? - Does the Stage-2 bootloader also contain the DM firmware, or are they separate components?
- Why is an RPMsg example being flashed at the Stage-2 bootloader offset in the OSPI configuration, while the eMMC configuration uses a dedicated
sbl_emmc_linux_stage2image? - Is the comment "2nd stage bootloader with DM" in the OSPI configuration accurate, or is the RPMsg application simply being used as the WKUP-R5 firmware?
Could someone please clarify the intended boot flow and the role of the image placed at offset 0x80000 in both cases?
