This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] [参考译文] 【常见问题解答】AUDIO-AM275-EVM:MCELF 多核映像将启动与 SBL 结合

Guru**** 2535150 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1567153/faq-audio-am275-evm-mcelf-multicore-image-combine-boot-up-with-sbl

部件号:AUDIO-AM275-EVM
Thread 中讨论的其他器件:SYSCONFIG、UNIFLASH

工具/软件:

背景

当前 SDK 支持将多个内核的引导映像以 mcelf 格式组合成一个映像。 本 指南 介绍了如何组合多核映像。 另一个 指南 说明了如何解析多核映像并在启动时加载该映像。 为了更轻松地运行多个组合映像、此常见问题解答提供了一个演示、将 r5f0-0 和 dsp0-0 的两个 Hello World 演示映像组合到一个映像中、并使用 ospi SBL 启动启动启动。

此演示使用 SDK 版本 11.00.00.16 进行了测试、但您可以在未来的任何版本中重现此问题。

问题

1.使用 SysConfig 配置 examples/drivers/boot/sbl_ospi/am275x-evm/wkup-R5fss0-0_freertos/ti-arm-clang 演示。 删除其他引导加载程序、仅保留一个引导加载程序。

2.重新编译此演示并生成要在 wakeup/dm R5 上运行的所需 sbl_ospi.debug.hs_fs.tiimage 和 SBL 映像。

3、构建两个“您好世界“演示。 一个用于 R5F0_0、一个用于 dsp0_0。 生成两个所需的可执行文件:

am275x/examples/hello_world/am275x-evm/r5fss0-0_freertos/ti-arm-clang/hello_world.debug.out

am275x/examples/hello_world/am275x-evm/c75ss0-0_freertos/ti-c7000/hello_world.debug.out

4.使用以下命令生成 mcelf 文件。 此命令将生成 hello_world_test_multiple.mcelf 文件。

python3 /home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/tools/boot/multicoreELFImageGen/genimage.py \
--core-img=1:/home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/examples/hello_world/am275x-evm/r5fss0-0_freertos/ti-arm-clang/hello_world.debug.out \
--core-img=5:/home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/examples/hello_world/am275x-evm/c75ss0-0_freertos/ti-c7000/hello_world.debug.out  \
--output=hello_world_test_multicore.mcelf --xip=0x60100000:0x60200000  --sw_version=0x0B000011

5.使用以下命令对 mcelf 文件签名、因为所有的 am275 芯片都是 hs-fs。 这将生成 hello_world_test_more.mcelf.hs_fs 文件。

python3 /home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/tools/boot/signing/appimage_x509_cert_gen.py --bin hello_world_test_multicore.mcelf --authtype 0  --loadaddr 84000000 --key /home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/tools/boot/signing/app_degenerateKey.pem --output hello_world_test_multicore.mcelf.hs_fs --keyversion 1.5

6.将引导映像(SBL 映像和多核 mcelf 映像刷写到 ospi 中)。 以下是基准配置:

# First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files
--flash-writer=/home/ht/audio/avb/sbl_uart_uniflash.release.hs_fs.tiimage

# --operation=erase --flash-offset=0x0 --erase-size=0x1800000

# 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=/home/ht/ti/AM275-AWE-SDK_11.00.00.17/mcu_plus_sdk/am275x/examples/drivers/boot/sbl_ospi/am275x-evm/wkup-r5fss0-0_freertos/ti-arm-clang/sbl_ospi.debug.hs_fs.tiimage --operation=flash --flash-offset=0x0

# When sending application image, make sure to flash at offset 0x400000 (default) or to whatever offset your bootloader is configured for
--file=/home/ht/ti/AM275-AWE-SDK_11.00.00.17/hello_world_test_multicore.mcelf.hs_fs --operation=flash --flash-offset=0x400000

7.作为 ospi SBL 引导启动。

测试结果

wakeup/dm R5 日志:

Sciserver Testapp Built On: Aug 19 2025 14:48:31                                    
Sciserver Version: v2023.11.0.0REL.MCUSDK.MM.NN.PP.bb                               
RM_PM_HAL Version: vMM.NN.PP                                                        
Starting Sciserver..... PASSED                                                      
                                                                                    
Starting OSPI Bootloader ...                                                        
                                                                                    
SYSFW Firmware Version 11.0.7--v11.00.07 (Fancy Rat)                                
SYSFW Firmware revision 0xb
SYSFW ABI revision 4.0

[BOOTLOADER_PROFILE] Boot Media       : FLASH 
[BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz 
[BOOTLOADER_PROFILE] Boot Image Size  : 183 KB 
[BOOTLOADER_PROFILE] Cores present    : 
[BOOTLOADER PROFILE] TIFS init                        :        764us 
[BOOTLOADER PROFILE] System_init                      :       5652us 
[BOOTLOADER PROFILE] Board_init                       :          5us 
[BOOTLOADER PROFILE] FreeRtosTask Create              :        262us 
[BOOTLOADER PROFILE] Drivers_open                     :        138us 
[BOOTLOADER PROFILE] Board_driversOpen                :          1us 
[BOOTLOADER PROFILE] sciServer_init                   :      15268us 
[BOOTLOADER PROFILE] SBL Drivers_open                 :    3175606us 
[BOOTLOADER PROFILE] SBL Board_driversOpen            :       3908us 
[BOOTLOADER PROFILE] Sciclient Get Version            :      10159us 
[BOOTLOADER PROFILE] DSP 0 Image Load                 :      15901us 
[BOOTLOADER PROFILE] R5FSS0_0 Image Load              :          0us 
[BOOTLOADER_PROFILE] SBL Total Time Taken             :    3227671us 

主 R5 日志:

Hello World!                                                                        
            

dsp0_0 日志:

Hello World!                                                                        
            

备份:

mcelf 引导中的 SBL 主要函数: