2023-09-04 04:06 AM
Hi ST Support Team,
We used the ST-provided SBSFU solution for firmware upgrade purpose.
As per our needs, SBSFU/TFM-Boot and SBSFU/TFM-Loader successfully jump to own created application[ThredX OS based].
Below are the steps I used when integrating my own application with SBSFU.
Outcome:
LOG:
[INF] signature OK
[INF] Bootloader chain load address offset: 0x1a000
[INF] Jumping to the first image slot.
Result: My own thread X OS-based Application does not work after upgrading firmware through SBSFU_boot and SBSFU_loader.
Observation: Using CubeMX, I generated Bare metal code[own application] through cubeMX and integrated with SBSFU. Therefore, it is able to jump from SBSFU_boot to Application [Without OS], however,
the same operation I performed with a ThreadX OS-based application didn't work.
Please review the above step I have performed for own application[Thread X based application] integration purposes and let me know if I missed anything.
Thanks
Hiren Rameshbhai Thumar
+91-9426570128
2023-09-26 09:56 AM
Hello @HirenThumar2702,
One thing you didn't do is to copy the system*.c file that define the SAU regions.
But if it works with bare os application is should work also with ThreadX.
Now did you check interrupts were working fine in bare OS application.
Are both applications configured the same way ?
Only way to know is to find exactly where it fails.
This can take time...
Best regards
Jocelyn
2023-10-16 11:45 PM
Hi Jocelyn,
Thanks For your message.
1. Yes I have checked " TZ_SAU_Setup();" function is called from "SystemInit" and it is available in system_stm32u5xx_s.c
2. Without OS based own application ( bare OS application) is working but ThreadX OS-based application is not working
3. Yes for both applications (TheadX OS and without OS ), i am using the same configuration of SBSFU-BOOT and the same linker folder used.
4. When I attempted to debug a threadx OS-based application, I observed that the SBSFU-bootloader successfully jumped to a secure region but did not jump from a secure region to a nonsecure region. it is going in hard fault
last instruction call Flow Secure region main.c -> void NonSecure_Init(void) -> NonSecure_ResetHandler(); -> Hard Fault
When I checked NonSecure_ResetHandler, it got a null value, indicating that a hard fault would occur, but when I read the entire memory, there were available of non-secure region reset handler address
non-secure reset handler address, however it receives a null value during execution
can you provide me information on which file I need to copy from SBSFU_Appli(Example provided by ST) and change in my own application?
Thanks
Hiren R. Thumar