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.

PROCESSOR-SDK-AM62X: AM62X Boot flow process

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62, UNIFLASH

Tool/software:

Hello Team,

MCAL Package: MCAL_SitaraMPU_09.01.00

SDK Package: mcu_plus_sdk_am62x_09_01_00_39

Can you please let us know complete boot flow process?.. and can you please share the steps to flash the SBL for both UART and OSPI mode.

Pls let us know the start address of the Application image the SBL points to by default.

BR,

Shubham

  • Hi,

    Thanks for your reply.

    we have gone through the flash document and try to flash the Application using different sbl images for SK-AM62. below error messages reported for each image flash:

    For default_sbl_ospi_linux_hs_fs.cfg 



    and for default_sbl_ospi_hs_fs.cfg



    We are using GP type device.
    Our requirement is to perform standalone Application execution for this we expect that the SBL from TI should give control to the start address of our Application and the execution of the Application should happen.

    Could you please provide your feedback on this on how to fix it?

    BR,
    Shubham
  • Hello,

    For default_sbl_ospi_linux_hs_fs.cfg

    The error is available in the logs "File not found!!!". This means you have not built all the images mentioned in the config file. Please do so then you should not see the error.

    and for default_sbl_ospi_hs_fs.cfg

    There is only SBL_OSPI_LINUX in the SDK & so the corresponding config file "default_sbl_ospi_linux_hs_fs.cfg".

    If you are using GP device, you would need to use the "default_sbl_ospi_linux.cfg"

  • Hi,

    Thanks for your inputs.

    We tried to flash "default_sbl_ospi_linux.cfg" and below error message is reported:

    When we tried to build "hsm.appimage", "linux.appimage" and "u-boot.img" as needed by "default_sbl_ospi_linux.cfg", below error message is reported:

    Could you please let us know the steps to build required elf or share the elf?

    BR,

    Shubham

  • Hi, please install the Processor SDK in a Linux OS to get the ATF, OPTEE, A53 SPL binaries required for building Linux Appimage. For now, PFA the built images

    1538.images.zip

  • Hi,

    Thanks for your inputs.

    We are able to flash the image "default_sbl_ospi_linux.cfg" successfully after renaming the shared images as hsm.appimage.hs_fs --> hsm.appimage and linux.appimage.hs_fs --> linux.appimage.

    after changing the EVM Boot mode to OSPI NOR Boot mode, expected output as per software-dl.ti.com/.../GETTING_STARTED_FLASH.html:

    but we are not able to see any Application output on UART terminal.

    Could you please let us know if we are missing something?

    BR,

    Shubham

  • Hi,

    We are able to flash the image "default_sbl_ospi_linux.cfg" successfully after renaming the shared images as hsm.appimage.hs_fs --> hsm.appimage and linux.appimage.hs_fs --> linux.appimage.

    Can you please share these flashing logs to verify if the correct images are flashed?

    Thanks!

  • Hi,

    Please find logs of sbl image flash:

    {code}

    Microsoft Windows [Version 10.0.17763.1823]
    (c) 2018 Microsoft Corporation. All rights reserved.

    C:\ti\mcu_plus_sdk_am62x_09_01_00_39\tools\boot>python uart_uniflash.py -p COM10 --cfg=sbl_prebuilt/am62x-sk/default_sbl_ospi_linux.cfg

    Parsing config file ...
    Parsing config file ... SUCCESS. Found 10 command(s) !!!

    Executing command 1 of 10 ...
    Found flash writer ... sending sbl_prebuilt/am62x-sk/sbl_uart_uniflash_stage1.release.tiimage
    Sent flashwriter sbl_prebuilt/am62x-sk/sbl_uart_uniflash_stage1.release.tiimage of size 245665 bytes in 23.95s.

    Executing command 2 of 10 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 123480bytes [00:13, 10719.01Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 123481bytes [00:13, 10719.01Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 123482bytes [00:14, 10719.01Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 123483bytes [00:14, 10719.01Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 123484bytes [00:14, 10719.01 Sent ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage of size 122772 bytes in 14.88s.
    [STATUS] SUCCESS !!!

    Executing command 3 of 10 ...
    Command arguments : --operation=flash-phy-tuning-data
    Sent flash phy tuning data in 2.99s.
    [STATUS] SUCCESS !!!

    Executing command 4 of 10 ...
    Command arguments : --file=sbl_prebuilt/am62x-sk/sbl_ospi_linux_stage1.release.tiimage --operation=flash --flash-offset=0x0
    Sent sbl_prebuilt/am62x-sk/sbl_ospi_linux_stage1.release.tiimage of size 287009 bytes in 29.84s.
    [STATUS] SUCCESS !!!

    Executing command 5 of 10 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_ospi_linux_multistage/sbl_ospi_linux_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_ospi_linux_stage2.release.appimage --operation=flash --flash-offset=0x80000
    Sent ../../examples/drivers/boot/sbl_ospi_linux_multistage/sbl_ospi_linux_stage2/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_ospi_linux_stage2.release.appimage of size 136864 bytes in 15.73s.
    [STATUS] SUCCESS !!!

    Executing command 6 of 10 ...
    Command arguments : --file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62x-sk/m4fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage --operation=flash --flash-offset=0x100000
    Sent ../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62x-sk/m4fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage of size 51852 bytes in 7.76s.
    [STATUS] SUCCESS !!!

    Executing command 7 of 10 ...
    Command arguments : --file=../../tools/boot/HSMAppimageGen/board/am62x-sk/hsm.appimage --operation=flash --flash-offset=0x800000
    Sent ../../tools/boot/HSMAppimageGen/board/am62x-sk/hsm.appimage of size 9646 bytes in 3.84s.
    [STATUS] SUCCESS !!!

    Executing command 8 of 10 ...
    Command arguments : --file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62x-sk/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage --operation=flash --flash-offset=0xA00000
    Sent ../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am62x-sk/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage of size 141788 bytes in 16.21s.
    [STATUS] SUCCESS !!!

    Executing command 9 of 10 ...
    Command arguments : --file=../../tools/boot/linuxAppimageGen/board/am62x-sk/linux.appimage --operation=flash --flash-offset=0xC00000
    Sent ../../tools/boot/linuxAppimageGen/board/am62x-sk/linux.appimage of size 927275 bytes in 89.83s.
    [STATUS] SUCCESS !!!

    Executing command 10 of 10 ...
    Command arguments : --file=../../tools/boot/linuxAppimageGen/board/am62x-sk/u-boot.img --operation=flash --flash-offset=0x280000
    Sent ../../tools/boot/linuxAppimageGen/board/am62x-sk/u-boot.img of size 970443 bytes in 93.87s.
    [STATUS] SUCCESS !!!

    All commands from config file are executed !!!

    C:\ti\mcu_plus_sdk_am62x_09_01_00_39\tools\boot>

    {code}

    BR,

    Shubham

  • Hello,

    The flashing looks good. Can you please share all the images? I will try them once on my side & see if they are working.

    Thanks!

  • Hi,

    Please let me know which all images you want me to share?

    BR,

    Shubham

  • Please let me know which all images you want me to share?

    Please share all the files from Command 4 to 10.

    Btw, are you not seeing any logs at all? I think you should be getting logs at least from the SBL_OSPI_LINUX_STAGE1 image.

  • Hi,

    PFA images mcu_plus_sdk_am62x_09_01_00_39.zip.

    mcu_plus_sdk_am62x_09_01_00_39.zip

    We are getting complete logs as mentioned in the above comment.

    BR,

    Shubham

  • Btw, are you not seeing any logs at all? I think you should be getting logs at least from the SBL_OSPI_LINUX_STAGE1 image.

    I meant the boot logs on switching the bootmode to OSPI. If you do not see any boot logs at all, can you please confirm the exact bootmode pins configuration you are using for OSPI boot?

  • Hi,

    On switching the Bootmode to OSPI.. we are getting below logs (Character 'C' and Device type id related information) on UART terminal:

    We have configured the bootmode pins for OSPI boot as per https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_00_00_14/exports/docs/api_guide_am62x/GETTING_STARTED_FLASH.html as given below:

    BR,

    Shubham

  • On switching the Bootmode to OSPI.. we are getting below logs (Character 'C' and Device type id related information) on UART terminal:

    This is not possible. If you are getting C characters then the bootmode is UART.

    Can you share the actual picture of your board showing the bootmode pins?

  • Hi,

    Sorry for the misunderstanding as we were getting C characters in UART Bootmode.

    On switching the Bootmode to OSPI.. we are getting below logs:

    Bootmode pins setting is as below image:

    BR,

    Shubham

  • On switching the Bootmode to OSPI.. we are getting below logs:

    Thanks for the clarification.

    This boot failure is expected since the HSM, Linux Appimages I shared previously were meant for HSFS device but you are using GP one. PFA the ZIP containing the HSM, Linux GP Appimages.

    6082.images.zip

    Once these are flashed correctly, you should not see the boot failure.

  • Hi,

    Thanks for your inputs.

    Below is the observations after flashing with updated shared images:

    1. Console for UART Flashing:

    2. Console for DM R5:

    3. Console for MCU M4:

    Can you also confirm the shared logs are expected output?

    Could you please let us know what are all the modifications needed to load our Application with TI SBL to test reset functionality?

    BR,

    Shubham 

  • Can you also confirm the shared logs are expected output?

    Yes, those are expected logs.

    Could you please let us know what are all the modifications needed to load our Application with TI SBL to test reset functionality?

    Replace the image path for a core in the flash config (.cfg) file with your respective application image.

  • Hi,

    Thanks for the confirmation.

    We try to flash SBL image with TI "Hello World App example" and we were able to achieve expected output.

    Could you please let us know how we can integrate our Application (elf or bin format) with Trace32 debugger.

    BR,

    Shubham

  • Could you please let us know how we can integrate our Application (elf or bin format) with Trace32 debugger.

    We don't have the support for Lauterbach. There is guide available for running examples using CCS.

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_00_00_14/exports/docs/api_guide_am62x/CCS_LAUNCH_PAGE.html

  • Hi,

    Can you please let us know how to convert elf/bin to appimage?

    BR,

    Shubham

  • Can you please let us know how to convert elf/bin to appimage?

    Please build any example in the MCU+ SDK for the exact steps to convert ELF to Appimage like shown below:

    ❯ make -C ./examples/hello_world/am62x-sk/r5fss0-0_freertos/ti-arm-clang/ scrub all
    ...
    Boot image: am62x:r5fss0-0:freertos:ti-arm-clang /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/examples/hello_world/am62x-sk/r5fss0-0_freertos/ti-arm-clang/hello_world.release.appimage ...
    chmod a+x /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/tools/boot/xipGen/xipGen.out
    /home/p-shivhare/ti/sysconfig_1.18.0/nodejs/node /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/tools/boot/out2rprc/elf2rprc.js hello_world.release.out >> temp_stdout_release.txt
    cp hello_world.release.rprc hello_world.release.rprc_tmp
    rm -f hello_world.release.rprc
    /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/tools/boot/xipGen/xipGen.out -i hello_world.release.rprc_tmp -o hello_world.release.rprc -x hello_world.release.rprc_xip --flash-start-addr 0x60000000 -v > temp_stdout_release.txt
    /home/p-shivhare/ti/sysconfig_1.18.0/nodejs/node /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/tools/boot/multicoreImageGen/multicoreImageGen.js --devID 55 --out hello_world.release.appimage hello_world.release.rprc@4  >> temp_stdout_release.txt
    /home/p-shivhare/ti/sysconfig_1.18.0/nodejs/node /home/p-shivhare/ti/mcu_plus_sdk/am62x/09_01_00_39/tools/boot/multicoreImageGen/multicoreImageGen.js --devID 55 --out hello_world.release.appimage_xip hello_world.release.rprc_xip@4  >> temp_stdout_release.txt
    ...

  • Hi,

    Can you please let us know how we can convert our Application elf/bin format to appimage?

    can you please let us know what is --devID 55 mean in the above comment and from which path we need to run the command?

    BR,

    Shubham

  • Can you please let us know how we can convert our Application elf/bin format to appimage?

    Please evaluate the build logs of any example in the SDK as I suggested in my previous response. The conversion procedure involves the followings:

    1) Converting ELF file to RPRC using `elf2rprc.js` tool.

    2) Converting RPRC to Appimage using `multicoreImageGen.js` tool.

    Regards,

    Prashant

  • Hi,

    Thanks for your inputs.

    Now we are able to build App Image of our Application and below message is reported after flashing the Application with TI SBL image:

    Could you please let us know the start address and vector address for the Application to be aligned with the TI SBL?.. Below is the memory mapping for the Application we are using:

    MEMORY
    {
    EXCTABLE (RX) : origin = 0x00000000 , length = 0x01000
    RESET (RX) : origin = 0x00001000 , length = 0x01000
    FLASH (RX) : origin = 0x50000000 , length = 0x100000
    RAM (RWX) : origin = 0x50100000 , length = 0x100000
    }

    Could you please provide your feedback on this?

    BR,

    Shubham

  • Hi, can you clarify certain things about your application like the core it is for, which SDK it is coming from, etc?

    Thanks!

  • Hi,

    It is a customize Application, not an example from MCAL SDK.. Here we integrated TI's MCAL with EB Autosar BSW Project, Configured it using EB Tresos Studio.

    The Application is for Basic CAN Communication with one Tx and one Rx message, using CR5 Core.

    Please let me know if you need any other information.

    BR,

    Shubham

  • The Application is for Basic CAN Communication with one Tx and one Rx message, using CR5 Core.

    If this is a CR5 application then you have flashed it at the wrong offset 0x100000. The SBL expects a M4F appimage at this offset. You would have to replace the default CR5 appimage with your application appimage.

  • Hi,

    Same error observed after flashing SBL image for CR5 Core:

    Below are the modifications done in default_sbl_ospi_linux.cfg:

    1. removed M4F appimage section.

    2. updated CR5 appimage with our Application appimage with --flash-offset=0xA00000.

    Could you please let us know the start address and vector address for the Application to be aligned with the TI SBL for CR5 Core?.. Below is the memory mapping for the Application we are using:

    MEMORY
    {
    EXCTABLE (RX) : origin = 0x00000000 , length = 0x01000
    RESET (RX) : origin = 0x00001000 , length = 0x01000
    FLASH (RX) : origin = 0x50000000 , length = 0x100000
    RAM (RWX) : origin = 0x50100000 , length = 0x100000
    }

    BR,

    Shubham

  • Below are the modifications done in default_sbl_ospi_linux.cfg:

    Please flash every image except the default CR5 appimage which should be replaced with yours. If you are doing everything right then you should not see failure at SBL Stage1.

    There will be failure at SBL Stage2 but that is expected since any WKUP R5F application needs to be integrated with the DM which I believe you haven't done for your application. For this, please create a separate thread so that it can be assigned to the right expert.

    Thanks!

  • Hi,

    Below is the output after flashing the SBL image with all default images except CR5 appimage from our Application:

    Could you please confirm if it is expected output?

    Could you please let us know the steps involved to integrate WKUP CR5 with the DM?

    BR,

    Shubham

  • Could you please confirm if it is expected output?

    Yes, now it is.

    Could you please let us know the steps involved to integrate WKUP CR5 with the DM?

    Please see the following guide:

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_00_00_14/exports/docs/api_guide_am62x/DEVELOP_AND_DEBUG_DMR5.html

    You may also go through any WKUP R5F application to understand the integration & flow.

    For any other further queries, please create a new thread stating the SDK or tools which is used to develop your application. This helps direct the query to the right expert.

  • Hi,

    Thanks for your support.

    I will create a new thread for the steps involved to integrate WKUP CR5 with the DM.

    BR,

    Shubham