cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU | STM32F756ZGTx | Issue with running a port

Jakub Standarski
Associate III

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!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jakub Standarski
Associate III

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.

View solution in original post

8 REPLIES 8
RhSilicon
Lead

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]

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.


3729%

Went a little over the top :grinning_face_with_sweat:

Jakub Standarski
Associate III

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

There are some videos about SBSFU on YouTube:

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

Jakub Standarski
Associate III

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.

Jakub Standarski
Associate III

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 Standarski
Associate III

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.