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.

AM263P4: Issue while loading HSMRT

Part Number: AM263P4

Hi,

I am debugging SBL_OSPI_mcelf in HS-SE device, by inserting loop_forever(). 

I am having issue while loading hsmrt image, it loops in a while loop and never returns out of it.

WhatsApp Image 2026-03-31 at 4.01.38 PM (1).jpeghWhatsApp Image 2026-03-31 at 4.01.37 PM.jpeg

However, when I directly boot in OSPI boot mode(without connecting to core), it works, application is executed.

 

  • Hi Geetha,

    The while loop indicates that the HSM ROM has not loaded the HSMRT. 

    If I understand correctly, you are not able to debug SBL OSPI MCELF, but able to free run? 

    Can you share the logs during freerun? 

    After inserting loop_forever, are you able to see the HSM binary loaded in the RAM?

    Thanks and Regards,

    Nikhil Dasan

  • Hi Nikhil,

    Below are the logs when SBL is free run.

    After inserting loop_forever, are you able to see the HSM binary loaded in the RAM?

    I have verified the RAM where HSMRt needs to be loaded, I can see the memory in the RAM upto 80KB from 0x7004200(given in linker.cmd file)

    I have observed that, the ISR function is not getting executed. hence, gHsmRtDownloadComplete stays in 0 itself

    WhatsApp Image 2026-03-31 at 4.01.37 PM.jpeg

    Thanks and Regards

  • Hi Geetha,

    What is the procedure you are following when debugging the SBL in CCS?

    Thanks and Regards,

    Nikhil Dasan

  • Hi Geetha,

    From the freerunning log, it seems the HSMRT is loaded as you are able to execute an HSM Service demo as well.

    The process is also correct, i.e. putting loop_forever to halt the flow and then step wise debug the same.

    Only this that is suspicious here is the below. Have you removed the gel file from the target configuration? Could you double-check this?

    If yes, could you move to loop forever function after HSM loading API and then check if you are still seeing it stuck at the same place?

    Thanks and Regards,

    Nikhil Dasan

  • Hi Nikhil,

    I have attached few videos, 

    1. When there is gel file included, I could hold the program by break point

    2. When there is no gel file, I am getting struck at the function and could not even place a break point

    Only this that is suspicious here is the below. Have you removed the gel file from the target configuration?

    It seems to be vice versa in my scenario.

    If yes, could you move to loop forever function after HSM loading API and then check if you are still seeing it stuck at the same place?

    I have moved the while loop below the LoadHSMRt function, I am struct at memory copying function(when gel file is included, when it is not included, I get the same as described in the 2nd attachment)

    Thanks and Regards

    Geetha

  • Hi Geetha,

    I see what is the issue here. 

    I was under the assumption that you would have flashed the SBL and application and in OSPI boot mode, as you have shown a free-running logs of the same.

    If this assumption is correct, then upon connecting the R50, i.e. "Connect Target", you shouldn't do "Load Program".

    You should do "Load Symbols" and point to the .out of SBL. 
    In this case, you should see the core at while loop upon halting. 

    Could you try this?

    Thanks and Regards,

    Nikhil Dasan