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.

[参考译文] SK-AM62:FreeRTOS 上的闪存引导多核 (AMP) AppImage (a53ss0-0、a53ss0-1)

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1521003/sk-am62-flash-booting-multi-core-amp-appimage-a53ss0-0-a53ss0-1-on-freertos

器件型号:SK-AM62
Thread 中讨论的其他器件:UNIFLASH

工具/软件:

大家好:

目前、我正在尝试使用 FreeRTOS 在 AM62x 的 A53 内核上实现多核 (AMP) 设置的闪存引导。 应用在 Debug Build 中成功运行时、将无法从闪存正确引导。

我遵循的步骤:

以下是我在使用 FreeRTOS 在 AM62x A53 内核上尝试闪存引导多核 (AMP) HelloWorld 应用程序时遵循的具体步骤:

  1. 构建 Core 0 应用程序
    已构建 hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64

  2. 构建 Core 1 应用程序
    已构建 hello_world_am62x-sk_a53ss0-1_freertos_gcc-aarch64

  3. 生成 AMP AppImage
    使用该 multicoreImageGen.js 工具生成组合的 AMP 应用图像:

    C:\ti\sysconfig_1.20.0\nodejs\node C:\ti\mcu_plus_sdk_am62x_10_01_00_33\tools\boot\multicoreImageGen\multicoreImageGen.js --devID 55 --out ./hello_world_multi.appimage C:\Users\0123456\workspace_v12\hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64\Debug\hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64.rprc@0 C:\Users\0123456\workspace_v12\hello_world_am62x-sk_a53ss0-1_freertos_gcc-aarch64\Debug\hello_world_am62x-sk_a53ss0-1_freertos_gcc-aarch64.rprc@1

    
    
  4. 转换为 hs_fs 格式
    使用 appimage_x509_cert_gen.py 脚本对应用映像签名:
    python C:\ti\mcu_plus_sdk_am62x_10_01_00_33\tools\boot\signing\appimage_x509_cert_gen.py --bin C:\Users\0123456\Downloads\hello_world_multi.appimage --authtype 1 --key C:\ti\mcu_plus_sdk_am62x_10_01_00_33\tools\boot\signing\rom_degenerateKey.pem --out C:\Users\0123456\Downloads\hello_world_multi.appimage.hs_fs

  5. AM62x 的闪存
    将已签名的映像刷写到器件中:
    --file=C:/Users/0123456/Downloads/hello_world_multi.appimage.hs_fs --operation=flash --flash-offset=0xC00000

    python uart_uniflash.py -p COM35 --cfg=sbl_prebuilt/am62x-sk/hello_world_sbl_ospi_hs_fs.cfg

  6. 启动设备
  7. 观察到的错误日志

    引导时、将打印以下错误信息:

    SYSFW Firmware Version 10.1.8--v10.01.08 (Fiery Fox)
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0 WARNING: Bootloader_verifyMulticoreImage:619: Failed to authenticate and copy on the go, reading the image to DDR.
    Some tests have failed!!

我遵循以下参考资料中的指导:
多核图像生成器
https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/09_00_00_19/exports/docs/api_guide_am62x/TOOLS_BOOT.html

应用映像签名
https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/09_00_00_31/exports/docs/api_guide_am64x/HSFS_MIGRATION_GUIDE.html#:~:text=between%20both%20cases.-,Appimage%20Signing,-Signing%20for%20the

刷写示例应用程序
https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/latest/exports/docs/api_guide_am62x/GETTING_STARTED_FLASH.html

CoreID
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1195478/sk-am64-need-multicoreimagegen-coreid-for-corea53


我的目标是通过闪存引导在 AMP 模式下运行简单的 HelloWorld 应用、例如 a53ss0-0 和 a53ss0-1。 是否有人成功完成此操作、或者是否可以分享正确的程序或任何提示?

任何帮助或指导都将非常感谢!

提前感谢。

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

    您好:

    转换为 hs_fs 格式

    签名命令不正确。

    请在 SDK 中构建任何示例、以了解它的实际签名方式、如下所示:

    ❯ make -C ./examples/hello_world/am62x-sk/r5fss0-0_freertos/ti-arm-clang/ scrub all | grep appimage_x509
    python3 /home/p-shivhare/ti/mcu_plus_sdk/am62x/10_01_00_33/tools/boot/signing/appimage_x509_cert_gen.py --bin hello_world.release.appimage --authtype 0  --loadaddr 84000000 --key /home/p-shivhare/ti/mcu_plus_sdk/am62x/10_01_00_33/tools/boot/signing/app_degenerateKey.pem --output hello_world.release.appimage.hs_fs --keyversion 1.5
    

    此致、

    Prashant

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

    您好:

    非常感谢您的指导。
    结果仍不符合预期。 已经有了一些改进、但我仍然没有看到 Core1 的任何日志输出。

    根据 HelloWorld 执行结果、我更新了我的设置、如下所示、情况已得到改善:
    从 HelloWorld 编译构建日志:

    python C:/ti/mcu_plus_sdk_am62x_10_01_00_33/tools/boot/signing/appimage_x509_cert_gen.py --bin C:/Users/0123456/workspace_v12/hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64/Debug/hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64.appimage --authtype 0  --loadaddr 84000000 --key C:/ti/mcu_plus_sdk_am62x_10_01_00_33/tools/boot/signing/app_degenerateKey.pem --output C:/Users/0123456/workspace_v12/hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64/Debug/hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64.appimage.hs_fs --keyversion 1.5

    来自 hs_fs 转换步骤的日志:

    python C:/ti/mcu_plus_sdk_am62x_10_01_00_33/tools/boot/signing/appimage_x509_cert_gen.py --bin C:\Users\0123456\Downloads\hello_world_multi.appimage --authtype 0  --loadaddr 84000000 --key C:/ti/mcu_plus_sdk_am62x_10_01_00_33/tools/boot/signing/app_degenerateKey.pem --output C:\Users\0123456\Downloads\hello_world_multi.appimage.hs_fs --keyversion 1.5

    我观察到的结果如下:

    单核模式下的闪存引导 HelloWorld:

    SYSFW Firmware Version 10.1.8--v10.01.08 (Fiery Fox)
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
    [BOOTLOADER_PROFILE] Boot Image Size  : 172 KB
    [BOOTLOADER_PROFILE] Cores present    :
    m4f0-0
    r5f0-0
    [BOOTLOADER PROFILE] System_init                      :       5617us
    [BOOTLOADER PROFILE] Board_init                       :          0us
    [BOOTLOADER PROFILE] Drivers_open                     :        299us
    [BOOTLOADER PROFILE] Board_driversOpen                :       1259us
    [BOOTLOADER PROFILE] Sciclient Get Version            :      10201us
    [BOOTLOADER PROFILE] App_waitForMcuPbist              :       8669us
    [BOOTLOADER PROFILE] App_waitForMcuLbist              :       7689us
    [BOOTLOADER PROFILE] App_loadImages                   :       3272us
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       4039us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      41050us
    
    Image loading done, switching to application ...
    Starting MCU-m4f and 2nd stage bootloader
    
    SYSFW Firmware Version 10.1.8--v10.01.08 (Fiery Fox)
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
    [BOOTLOADER_PROFILE] Boot Image Size  : 333 KB
    [BOOTLOADER_PROFILE] Cores present    :
    hsm-m4f0-0
    r5f0-0
    a530-0
    [BOOTLOADER PROFILE] System_init                      :       2794us
    [BOOTLOADER PROFILE] Board_init                       :          1us
    [BOOTLOADER PROFILE] Drivers_open                     :        383us
    [BOOTLOADER PROFILE] Board_driversOpen                :        136us
    [BOOTLOADER PROFILE] Sciclient Get Version            :      10264us
    [BOOTLOADER PROFILE] App_loadImages                   :       2691us
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       4501us
    [BOOTLOADER PROFILE] App_loadA53Images                :       4425us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      25198us
    
    Image loading done, switching to application ...
    Starting RTOS/Baremetal applications
    NOTICE:  BL31: v2.11.0(debug):REL.MCUSDK.K3.10.01.00.33
    NOTICE:  BL31: Built : 04:52:15, Dec 19 2024
    INFO:    GICv3 without legacy support detected.
    INFO:    ARM GICv3 driver initialized in EL3
    INFO:    Maximum SPI INTID supported: 287
    INFO:    SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
    INFO:    BL31: Initializing runtime services
    INFO:    BL31: cortex_a53: CPU workaround for erratum 855873 was applied
    INFO:    BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
    INFO:    BL31: Preparing for EL3 exit to normal world
    INFO:    Entry point address = 0x80080000
    INFO:    SPSR = 0x3c9
    Hello World! from a53_core0

    多核 (AMP) 模式下的闪存引导 HelloWorld:

    SYSFW Firmware Version 10.1.8--v10.01.08 (Fiery Fox)
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
    [BOOTLOADER_PROFILE] Boot Image Size  : 172 KB
    [BOOTLOADER_PROFILE] Cores present    :
    m4f0-0
    r5f0-0
    [BOOTLOADER PROFILE] System_init                      :       5584us
    [BOOTLOADER PROFILE] Board_init                       :          0us
    [BOOTLOADER PROFILE] Drivers_open                     :        299us
    [BOOTLOADER PROFILE] Board_driversOpen                :       1272us
    [BOOTLOADER PROFILE] Sciclient Get Version            :      10202us
    [BOOTLOADER PROFILE] App_waitForMcuPbist              :       8662us
    [BOOTLOADER PROFILE] App_waitForMcuLbist              :       7689us
    [BOOTLOADER PROFILE] App_loadImages                   :       3270us
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       4044us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      41028us
    
    Image loading done, switching to application ...
    Starting MCU-m4f and 2nd stage bootloader
    
    SYSFW Firmware Version 10.1.8--v10.01.08 (Fiery Fox)
    SYSFW Firmware revision 0xa
    SYSFW ABI revision 4.0
    
    [BOOTLOADER_PROFILE] Boot Media       : FLASH
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
    [BOOTLOADER_PROFILE] Boot Image Size  : 278 KB
    [BOOTLOADER_PROFILE] Cores present    :
    hsm-m4f0-0
    r5f0-0
    a530-0
    [BOOTLOADER PROFILE] System_init                      :       2802us
    [BOOTLOADER PROFILE] Board_init                       :          1us
    [BOOTLOADER PROFILE] Drivers_open                     :        382us
    [BOOTLOADER PROFILE] Board_driversOpen                :        138us
    [BOOTLOADER PROFILE] Sciclient Get Version            :      10237us
    [BOOTLOADER PROFILE] App_loadImages                   :       2695us
    [BOOTLOADER PROFILE] App_loadSelfcoreImage            :       4505us
    [BOOTLOADER PROFILE] App_loadA53Images                :       4437us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      25200us
    
    Image loading done, switching to application ...
    Starting RTOS/Baremetal applications
    Hello World! from a53_core0

    此外、如果可以使用 CCS 或任何其他工具(而不是通过终端操作)生成和刷写多核 appimage、那么如果您也可以分享该方法、我将不胜感激。

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

    尊敬的 Satoshi:

    您也可以在刷写 SBL NULL 后通过 CCS 加载程序、如下所述: https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/11_00_00_16/exports/docs/api_guide_am62x/AMP_FREERTOS_GUIDE.html

    如果您通过 UART UNIFLASH 进行刷写、请使用${MCU_PLUS_SDK}/examples/hello_world/am62x-sk 文件夹中提供的 hello_world_freertos-amp_sbl_uart_hs_fs.cfg、结果如下所示:

    --bootloader=sbl_prebuilt/am62x-sk/sbl_uart.release.hs_fs.tiimage
    --file=../../examples/hello_world/am62x-sk/r5fss0-0_freertos/ti-arm-clang/hello_world.release.appimage.hs_fs
    --file=../../examples/hello_world/am62x-sk/a53ss0-0_freertos/gcc-aarch64/hello_world.release.appimage.hs_fs
    --file=../../examples/hello_world/am62x-sk/a53ss0-1_freertos/gcc-aarch64/hello_world.release.appimage.hs_fs
    --file=../../examples/hello_world/am62x-sk/a53ss1-0_freertos/gcc-aarch64/hello_world.release.appimage.hs_fs
    --file=../../examples/hello_world/am62x-sk/a53ss1-1_freertos/gcc-aarch64/hello_world.release.appimage.hs_fs

    要仅刷新 A530-0 和 A530-1 图像、您可以注释行 2、5 和 6。 请注意、这会使用 UART 引导模式来引导映像。

    您能和我共享您的 hello_world_sbl_ospi_hs_fs.cfg 文件吗? 我怀疑它可能仅加载了 A530-0 映像。

    此致、

    会面。

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

    尊敬的会议:

    感谢你的帮助。

    但是、我的目标是实现  OSPI 闪存引导
    (注意:刷写 SBL NULL 后、我能够通过 CCS 加载程序。)

    我可能会误解正确的程序。
    我认为、我需要创建  AMP AppImage  用于多核执行的头文件。

    [报价 userid=“641326" url="“ url="~“~/support/processors-group/processors/f/processors-forum/1521003/sk-am62-flash-booting-multi-core-amp-appimage-a53ss0-0-a53ss0-1-on-freertos 生成 AMP AppImage
    使用该 multicoreImageGen.js 工具生成组合的 AMP 应用图像

    所以我尝试了一个更简单的方法—在的结尾 default_sbl_ospi_hs.cfg,我只是刷新了 appimage.hs_fs 从以下构建生成的文件:

    • hello_world_am62x-sk_a53ss0-0_freertos_gcc-aarch64
    • hello_world_am62x-sk_a53ss0-1_freertos_gcc-aarch64

    但结果并没有改变—我仍然只能从 Core0 获得日志输出。

    e2e.ti.com/.../hello_5F00_world_5F00_sbl_5F00_ospi_5F00_hs_5F00_fs.cfge2e.ti.com/.../hello_5F00_world_5F00_sbl_5F00_ospi_5F00_hs_5F00_fs_5F00_2.cfg

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

    对此有任何更新?

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

    尊敬的 Satoshi:

    对延迟表示歉意、我将在结束时尝试一次此操作、看看是否可以重现此问题并告知您结果。

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

    尊敬的会议:
    感谢您的答复。
    我感谢您的帮助、并将等待您的调查结果。

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

    尊敬的 Satoshi:

    我看了看时间,也不知道该怎么办了。 我认为默认 SBL 示例没有加载 a53ss0-1 内核的 rprc、而仅加载 a53ss0-0。 要加载 A530-0 内核、需要对 SBL 进行一些修改、我来检查一下相同内容并提供一些建议。

    此致、

    会面。

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

    您需要在 SBL OPSI stage-2 中为 a53ss0-1 添加另一个实例、然后将能够加载 a53ss0-1 映像、请使用以下 SBL OSPI stage-2 的补丁: e2e.ti.com/.../A53_5F00_0_5F00_1_5F00_BOOTLOADER_5F00_INSTANCE.patch 、然后使用 您之前共享的 hello_world_sbl_ospi_hs_fs_2.cfg 刷写程序。

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

    尊敬的会议:
    谢谢! 问题已解决。

    根本原因在于 R5 正在处理 A53 的内核启动。
    问题解决后、我将继续关闭此 TT。