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] AM2634: [FAQ] How to debug TIFS-MCU for Cortex M4 on am263x/am273x ?

Part Number: AM2634

Q1. How to debug TIFS-MCU on Cortex M4 in HS-FS devices ?

Q2. How to debug TIFS-MCU on Cortex M4 in HS-SE devices ?

Q3. In HS-SE devices, is there a way to leverage the flow to open the debug for HSM M4 in development environment ?

  • How to debug TIFS-MCU on Cortex M4 in HS-FS devices ?

    Debugging TIFS-MCU in HS-FS devices is not supported by TI. TIFS-MCU is a TI deliverable where debugging capabilities for Cortex M4 cores are disabled by TIFS-MCU.

    How to debug TIFS-MCU on Cortex M4 in HS-SE devices ?

    There is only single way to debug HSM CM4 CPU in AM263x and AM273x (not considering the WIR flow of debug). The user can use HsmClient_openDbgFirewall API provided by TIFS-MCU. For more details please go through the example -
    AM263x - file:///C:/ti/tifs_am263x_08_05_00_07/docs/api_guide_am263x/html/EXAMPLES_DEBUG_AUTH_DEMO.html
    AM273x - file:///C:/ti/tifs_am273x_08_05_00_07/docs/api_guide_am273x/html/EXAMPLES_DEBUG_AUTH_DEMO.html

    In HS-SE devices, is there a way to leverage the flow to open the debug for HSM M4 in development environment ?

    Yes, you can import the example provided by the above link in the example in SBL_NULL which is also an SBL intended for development.

    There are some steps added for the same.
    IMPORTANT NOTE - Make sure to only use this for development environment. Also while going into production, the certificate can be used to open the debug in the field as well. So make sure to increase the SW Revision number (in Fuses for HSM).

    Step 1 - Generate the Certificate from the above mentioned links. Make sure the --dev_dbg_type should be set as 4

    Example - python3 <TIFS_PATH>/tools/debug_cert/debug_image_gen.py --key <MCU_PLUS_SDK_PATH>/tools/boot/signing/mcu_custMpk.pem  --swrv 1 --dev_dbg_type 4 --dev_uid 13E19143571D33CA81C90BEA688675EFDC55957BFAA6F9427C37CC465CF7CDAA8CE382A6139A1F3449100F93FC0D695B35E772E9B7EB7C769CE731EE49E9C482


    Step 2 - Use the following command to convert the certificate generated into the header file.

    Example - python3 <TIFS_PATH>/tools/bin2c/bin2c.py x509_debugcert_644.cert <MCU_PLUS_SDK_PATH>/examples/drivers/boot/sbl_null/am263x-cc/r5fss0-0_nortos/debugCert.h DEBUG_CERT

    Step 3 - Apply the following patch to your MCU_PLUS_SDK.

    2577.hsmRt_debug.patch

    This patch contains changes in SBL_NULL main file where the debug opening is requested. Make sure to add the correct debugCert.h created with correct UID.

    Post run build (IN CASE OF CORRECT Debug Certificate) :

    Post run build (IN CASE OF INCORRECT Debug Certificate) :

    Create correct debug certificate for the UID mentioned.