AM263P4: Not able to load binary in HS-SE device

Part Number: AM263P4
Other Parts Discussed in Thread: UNIFLASH

Hi,

My device is HS-SE device LP, I am trying verify the secure boot flow.

So initially i wanted to load the SBL_null and app image into flash using uniflash,

So first I choose LP and flash erase. But it says

Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). 

I also tried to launch in CCS via load_sbl script in Scripting Console by giving .bin and .out as same as sbl_null. But it also failed by saying regarding emulation

I tried changing boot modes too. But hasn't effected anything.

How can I resolve this issue?

Geetha K

  • You need to use UART boot mode only, the send sbl_uart_uniflash.hs.tiimage, then send sbl_null.hs.tiimage next. JTAG is disabled by deafult, thus you are recieving the JTAG error.

  • Hi Nilabh,

    You need to use UART boot mode only, the send sbl_uart_uniflash.hs.tiimage, then send sbl_null.hs.tiimage next.

    I am able to send the sbl_uart_uniflash but not sbl_null image, the sbl_null image is not transferring, I checked the requirements from requirements.txt, they are present but few of them are not available, so i installed updated packages:

    bcrypt: 4.3.0(recommended: 4.2.1)

    cryptography: 42.0.2(recommended: >=41.0.0)

    paramiko: 3.5.1(recommended: 2.9.3)

    pyelftools: 0.32(recommended: >=0.31)

    Please find the images, 

    the path for sbl_uart_uniflash and sbl_null image in the default_sbl_null.cfg are from sbl_prebuilt.When it is from the prebuilt location, the transfer is initiated but was not completed

    .

    But when I change the path to both sbl_uart_uniflash or sbl_null for my custom software, it says error in the default_sbl_null.cfg file as depicted.

    Thanks and Regards

    Geetha K

  • Check the path properly, seems like a issue with forward and backward slash,

    You need to use backward slash in the path (/)

  • Hi Nilabh,

    As per your suggestion, I have flashed sbl_null successfully. It was running correctly, I verified in UART terminal in CCS after every POR, it is running

    But when I try to load another SBL software, by giving --operation=erase/flash in default_sbl_null, it it not loading/working. Even sbl_uart_uniflash could not be loaded.

    I have verified:

    1. loading of sbl_uart_uniflash,

    2. erase operation for sbl

    3. loading of another sbl

    .

    It displays as per the above picture,for every case

    How do I resolve this issue? Why did it get success only for 1st time?

    Geetha

  • Geetha, the flash writer you are using is the problem, for HSSE device, you need to use sbl_uart_uniflash.release.hs.tiimage

    you are using the non secure flash writer image.

  • Hi Nilabh,

    I was doing test cases with sbl_uart_uniflash.release.hs.tiimage and sbl_uart_uniflash.release.tiimage as it was not working,

    I was using sbl_uart_uniflash.release.hs.tiimage to flash the images

    And there was an issue in the hardware, that was the problem and it is resolved now

    Thanks

  • Glad to know that Geetha, 

  • Hi Nilabh,

    I was trying to have debug access 

    As it was given, there are 2 ways to do that

    1. Changing DEBUG_TIFS=no and DEBUG_OPTIONS=PUBLIC_ENABLE

    I have flashed both sbl_ospi and app(hello world) and I successfully launched and connect the target, But I don't seem to have break point in neither sbl or app code, I even tried by inserting a infinite loop in sbl, the result was same(could not place a breakpoint)

    2. Using Debug_authentication example:(DEBUG_TIFS=yes)

    I have followed the steps as given in the TIFS_MCU_11, I am able to get until UID and then firewalls are not opened and declared as failed

    Could you look into this?

    Thank you

  • 1. Changing DEBUG_TIFS=no and DEBUG_OPTIONS=PUBLIC_ENABLE

    I have flashed both sbl_ospi and app(hello world) and I successfully launched and connect the target, But I don't seem to have break point in neither sbl or app code, I even tried by inserting a infinite loop in sbl, the result was same(could not place a breakpoint)

    I am able to do it. Please note that you need to build a debug binary for breakpoints to work properly, as well as ensure that the correct symbols are loaded when the core is halted.

    2. Using Debug_authentication example:(DEBUG_TIFS=yes)

    I have followed the steps as given in the TIFS_MCU_11, I am able to get until UID and then firewalls are not opened and declared as failed

    Are you trying to open R5F debug, then do not put DEBUG_TIFS as yes, do note that TIFS debug needs to be enabled by SBL certificates.

  • Hi Nilabh,

    Are you trying to open R5F debug, then do not put DEBUG_TIFS as yes, do note that TIFS debug needs to be enabled by SBL certificates.

    For SBL, I put DEBUG_TIFS=no and DEBUG_OPTIONS=PUBLIC_ENABLE and checked, and I did not change any options for tifs_debug_authentication example

    I got the same result as above. Is there any option I need to change here?

  • What about the keys are you using the same keys for sigining?

  • I am using same keys for sbl and tifs for signing

  • I tried it today, I was able to pass the JTAG debug certificate challenge. I am assuming you might have missed some steps,

    Can you once again retry and let me know the exact steps you have followed?

  • Hi Nilabh, 

    Below are the steps I followed:

    1. Building debug_authentication example with default values in devconfig.mak

    2. Build OSPI_mcelf image with RoT keys

    3. Build uart_uniflash image with RoT keys

    4. Flash the above 3 images while giving their path in mcelf_ospi.cfg file via UART boot mode

    5. Change to OSPI mode and reset, prints UID in terminal

    6. By copying the UID and generating certificate (I have just gave RoT key and dev_uid as inputs)

    7. Open Tera term, Setting COM port & baudrate and Transfer the above generated certificate via XMODEM 

    And I get input as below image:

    Could you please verify these steps?

    Thanks and Regards

    Geetha K

  • Hi Geetha,

    Let me get back on this by early next week, as I will be OOO for this week.