Skip to main content
ANaga.2
Associate III
June 2, 2020
Question

Integrating sbsfu to STM32L452CEUX using sbsfu package from STM32L432KCUx

  • June 2, 2020
  • 3 replies
  • 1323 views

Hi,

I have a question with linker descriptions. I am using the sbsfu example projects of STM32L432KCUx with my user application which runs on STM32L452CEUX. This user application had the attached different linker description.

I modified the linker descriptions for SECorebin and SBSFU projects.

Could anyone let me know if the modifications are correct and inline with the linker description of user application.

    This topic has been closed for replies.

    3 replies

    Jocelyn RICARD
    ST Employee
    June 16, 2020

    Hello,

    I could see no change on SBSFU and SECoreBin files except alignment to 4 instead of 8. Not sure to catch the reason for that.

    Regarding your application's linker file, please use the same base address as in the original example.

    Here your application is linked at the beginning of the flash which will not work for sure.

    The application is launched by the SBSFU, SBSFU occupies the beginning of the flash.

    Application is located in SLOT 0.

    In orginal linker file you can see:

    __ICFEDIT_intvec_start__ = __ICFEDIT_region_SLOT_0_start__ + 0x200;

    APPLI_region_ROM_start  = __ICFEDIT_region_SLOT_0_start__ + VECTOR_SIZE + 0x200;

    It is not mandatory to reuse the same definitions, but at least use the same addresses.

    Best regards

    Jocelyn

    ANaga.2
    ANaga.2Author
    Associate III
    June 17, 2020

    Hi Jocelyn,

    Thanks for your support. Yes I have modified the files accordingly and could compile my application which is integrated to SBSFU and SECoreBin projects.

    I am facing new problem now !!. When I try to debug the SBSFU project on my controller (STM32L452CEUX). After the execution of function SFU_BOOT_ForceReboot();, I keep getting the below errors. Could you please let me know what could be the problem. Is it because of the memory mapping changes I made? I am really not sure.

    Erasing memory corresponding to segment 0:

    Erasing internal memory sector 0

    Erasing memory corresponding to segment 1:

    Erasing internal memory sectors [0 10]

    Erasing memory corresponding to segment 2:

    Erasing internal memory sector 11

    Erasing memory corresponding to segment 3:

    Erasing internal memory sectors [12 28]

    File segment @0x08000204 is not 8-bytes aligned. It will be aligned to @0x08000200

    Download in Progress:

    File download complete

    Time elapsed during download operation: 00:00:04.376

    Verifying ...

    Download verified successfully 

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Target is not responding, retrying...

    Error! Failed to read target status 

    Debugger connection lost.

    Shutting down...

    Thanks,

    Ankush

    Jocelyn RICARD
    ST Employee
    June 17, 2020

    Hello Ankush,

    did you deactivate the protections in app_sfu.h ?

    Also, what is your environment ? Is it CubeIDE?

    Best regards

    Jocelyn

    ANaga.2
    ANaga.2Author
    Associate III
    June 17, 2020

    Hallo Jocelyn,

    Yes. I disabled RDP and WRP protections in the app_sfu.h and I am using CubeIDE :)

    Thanks,

    Ankush

    Jocelyn RICARD
    ST Employee
    June 17, 2020

    Hello Ankush,

    please disable ALL protections when debugging.

    For instance, watchdog, DAP will lead to problems.

    Best regards

    Jocelyn