Skip to main content
Associate III
August 11, 2023
Solved

SBSFU | STM32F756ZGTx | Issue with running a port

Hello all.
I have troubles porting SBSFU onto STM32F756ZGTx.

I took 1 image sample for STM32F769I as a base. I modified:
- STM32F756ZGTx_FLASH.ld (SECoreBin)
- STM32F756ZGTx_FLASH.ld (SBSFU)
- mapping_sbsfu.ld
- mapping_fwimg.ld
- Other changes to source code under SBSFU and SECoreBin to work with target platform.

Unfortunately, it still doesn't work and I'm not able to find out why.
I connected debugger and every time programs ends up in a hard fault handler...
With SFU_MPU_PROTECT_ENABLE turned off:

JakubStandarski_0-1691773977250.png


With SFU_MPU_PROTECT_ENABLE turned on:
First debugger starts here

JakubStandarski_1-1691774398348.png

Then it fails upon calling SFU_BOOT_SystemSecurity_Config() -> SFU_COM_Init() -> setvbuf():

JakubStandarski_2-1691774490657.png

 

If necessary I can provide snippets of code. Thanks!

 

 

 

This topic has been closed for replies.
Jakub StandarskiBest answer
Associate III
August 16, 2023

Problem solved. Issue came from missing line inside SBSFU linker script. So next time I should be more focused :)

PS. It doesn't mean that tool or naming is fine. Build analyzer shouldn't show misleading information.

8 replies

RhSilicon
Lead
August 13, 2023

I don't know if it can help in your case, but I found these videos about advanced debugging:

[STM32CubeIDE Advanced Debug Features]

Complement for some models:

[Dual Core Debugging on STM32H7 with STM32CubeIDE]

Associate III
August 14, 2023

Thanks! I didn't solve the issue but did help finding this out:

JakubStandarski_0-1692030557886.png

JakubStandarski_1-1692030808159.png

 

That's the information from built in build analyzer for SBSFU.elf. I have no clue why SE_Entry_Secure_ROM_Region is that huge occupying 3729% of allocated memory.

RhSilicon
Lead
August 14, 2023

3729%

Went a little over the top :grinning_face_with_sweat:

Associate III
August 14, 2023

Just a little bit :D
I would like to know why since we are stuck on it for a long time. I saw similar thread on that forum but nobody replied to it.

RhSilicon
Lead
August 14, 2023

There are some videos about SBSFU on YouTube:

https://www.youtube.com/@stmicroelectronics/search?query=SBSFU

Associate III
August 14, 2023

Yeah, I know. But doesn't help too much. Maybe I have to watch them again and find that missing piece. I hoped that someone experienced something similar and knows how to deal with it.

Associate III
August 15, 2023

Okay, so that's weird, but I built two different sample projects:

  1. NUCLEO-L432KC (1_Image)
    JakubStandarski_0-1692097374555.png

     

  2. STM32F413H-Discovery (1_Image)
    JakubStandarski_1-1692097559303.png

Both presents same misleading information that there is some issue with memory mapping. The thing is that NUCLEO-L432KC works totally fine. Looks like it's not an issue with the build itself, but with the tool or naming used throughout linker files. Correct me if I'm wrong.

Jakub StandarskiAuthorBest answer
Associate III
August 16, 2023

Problem solved. Issue came from missing line inside SBSFU linker script. So next time I should be more focused :)

PS. It doesn't mean that tool or naming is fine. Build analyzer shouldn't show misleading information.