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.

AWR2944: How to debug SBL_qspi in CCS 11.1

Part Number: AWR2944

Hi expert,

We want to debug SBL_qspi in CCS, but when we downloading SBL to device, it could not stopped at main entry. We did the test as these steps.

1. Flash awr2944_ccsdebug.appimage using python tools as MCU sdk user guide. MCU sdk is mmwave_mcuplus_sdk_04_02_00_02.

2. Switch boot mode to function mode(001) and load C:\ti\mmwave_mcuplus_sdk_04_02_00_02\mcu_plus_sdk_awr294x_08_01_01_06\examples\drivers\boot\sbl_qspi\awr294x-evm\r5fss0-0_nortos\ti-arm-clang\sbl_qspi.debug.out.

R5 is running and could not stop at main entry.

Suspend R5, it was abort at

Please kindly share experience on how to debug SBL on AWR2944 with the latest SDK and CCS tool?

Thank you.

Allen

  • Hi Allen,

    1. In <MCU_SDK_PATH>\examples\drivers\boot\sbl_qspi\awr294x-evm\r5fss0-0_nortos\main.c in main(), add "loop_forever();" in the very beginning. Note that this function is already defined in the file.

    2. Recompile the SBL in debug profile and flash it.

    3. Connect to the R5 core with CCS.

    4. Use the load symbols option (not the load program option) and load the symbols for the SBL image ( <MCU_SDK_PATH>\examples\drivers\boot\sbl_qspi\awr294x-evm\r5fss0-0_nortos\ti-arm-clang\sbl_qspi.debug.out)

    5. You should see the PC pointing to the while loop in the loop_forever function.

    6.  Add the variable "loop" to CCS expression window. You will see that its value is 1. Set its value to 0 through the expression window.

    7. You can now single step out of the loop_forever function, put breakpoints, etc.

    Regards,

    Aayush

  • Hi Aayush,

    Thank you for the quick support. 

    May i know why we need loop forever here? Is it because CCS could not find main symbol?

    Regards,

    Allen

  • Hi Allen,

    When the device is powered on in QSPI boot mode, it will immediately start executing the ROM bootloader->SBL->Application. By the time you connect with CCS, the device will likely be done running the SBL and would have switched over to the application image. In this case, even within the application image, the core would likely not be at the beginning of main. CCS will show wherever it is at the time the core was connected to and paused.

    As per my experience, the CCS entry symbol only comes into picture when the program is loaded through CCS, like in the case of CCS debug mode.

    Regards,

    Aayush