Skip to main content
TDJ
Senior III
December 29, 2023
Solved

Secure Firmware (Re)Install by the end user on STM32U5 - how to?

  • December 29, 2023
  • 12 replies
  • 8730 views

ST undoubtedly put lots of effort in building a complete and coherent solution supporting secure firmware install (SFI), even done by contract manufacturer (CM) independent from the original equipment manufacturer (OEM). See AN5054 and AN4992.

However, how can I use this solution, or even part of it, to allow the end user to update STM32U5 firmware once a new version becomes available, preferably using firmware image downloaded from my website and stored on USB pendrive? I imagine that such image could be generated based on the actual device "license" provided (uploaded) by the end user, but it is not a must.

Are there any examples, application notes, or presentations available on this subject?

Reading firmware file from the pendrive is not a problem, but what needs to happen next is.

Please advise.

This topic has been closed for replies.
Best answer by STea

Hello @TDJ ,

To insure firmware update by end user Via USB or another media you cna refer to the Secure Boot Secure firmware Update (SBSFU) implementation based on the open source TF‑M (Trusted Firmware for Arm® Cortex®‑M) reference implementation. This solution verifies the security triad (Confidentiality,Authenticity ,Integrity ) of the OEM firmware during boot via verification encryption isolation and many other mechanisms for more details you can refer to the AN5447 and UM2851 which gives a detailed explanation of this solution and its implementation .

An example can be found for the SBSFU on the STM32U5 series on the stm32cubeU5 package or from this github link .

Hope this answers your inquiry.

BR 

12 replies

Jocelyn RICARD
ST Employee
January 10, 2024

Hi @TDJ,

if this is for evaluation, I would suggest using TFM and SBSFU provided as example in the CubeU5:

STM32Cube_FW_U5_V1.4.0\Projects\B-U585I-IOT02A\Applications\TFM\

STM32Cube_FW_U5_V1.4.0\Projects\B-U585I-IOT02A\Applications\SBSFU\

And if you want to use STM32CubeIDE, please use version 1.13.2. (The 1.14.0 has an issue when launching shell scripts containing pwd command ...)

Best regards,

Jocelyn

TDJ
TDJAuthor
Senior III
January 10, 2024

@Jocelyn RICARD I am not in evaluation mode. As quickly and effectively as possible I want to build a robust boot loader for a commercial solution. A boot loader has to meet my requirements and time to market counts a lot. For this reason I also evaluate the original Arm TF-M solution since it is and will be actively maintained, there is community supporting it and tech forum while ST, in general, currently does not seem to have enough corporate will and motivation to provide adequate maintenance of its free software. Even obvious syntax errors in HAL source code are not being immediately fixed - see here, point 1. Ofc, this is just a result of a lack of sufficient corporate-level sponsorship. By no means I blame the engineers.
ST makes great hardware, but in my view ST is a company which is yet to realize that these days great software matters just as much as great hardware.

Jocelyn RICARD
ST Employee
January 11, 2024

Hello @TDJ,

I'm sorry, I misunderstood your "time to try".

Again, TF-M is not a secure boot solution, it uses a secure boot solution based on MCUBoot.

Best regards

Jocelyn

Pavel A.
Super User
January 11, 2024

This is why we software consultants love ST so much. They keep our job security ))

 

I am looking into the original, ARM-maintained TF-M

 https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/