Skip to main content
Associate
June 18, 2026
Solved

SBSFU by MCUBoot on STM32U585 unable to load firmware with Minicom

  • June 18, 2026
  • 4 replies
  • 114 views

Hello,

I’m using the SBSFU by MCUboot implementation from the STM32CubeU5 Project (here).

It works well on the target board (U585) and I succeeded at uploading a new firmware through Teraterm, as per the documentation :

 

 

But our teams cannot all have access to a PC with Windows, and as such I attempted to make an upload with Minicom on Linux (Ubuntu) instead, which did not work (I added the “Bytes” logging before the “Abort from user” message) :

 

 

I saw much discussions about a similar problem on the legacy SBSFU 2.4 / 2.7 (this one or this one for example), but none for the one using MCUboot. I’ve still tried most of the solutions proposed there, but to no avail.

 

I’ve tried fiddling around the code to see why the Ymodem protocol was failing through Minicom, but haven’t found much actionable information up to now.

Has anyone encountered this problem and may know how to patch it or work around it ?

I’ll continue to investigate on my end and document my eventual findings here.

 

Thanks in advance,

 

Best regards,

Gautier MELOT.

Best answer by Jocelyn RICARD

Hello Gautier,

Thank you for your feedback.

That’s another way to address the issue indeed, even better I guess :)

Now I found this minicom topic was already addressed in the SBSFU of L5 in an internal ticket.

So, I merge the changes I found on U5 and checked this was working fine on ubuntu

I share here the 2 files impacted. I made the change in the loader project.

For non secure application project (when using dual slot), changes are very similar.

All changes contain a comment with MINICOM.

This version also work on windows teratem by the way.

Best regards

Jocelyn

4 replies

Jocelyn RICARD
ST Employee
June 23, 2026

Hello ​@Gautier MELOT ,

I remember there has been some updates to support minicom in the X-CUBE-SBSFU package.

You can download this package and look for sfu_com_loader.c 

You will find some specific implementation under MINICOM_YMODEM flag.

The implementation in the SBSFU of U5 is very similar as the one from X-CUBE-SBSFU.

You can find the function ReceivePacket in both. I guess integrating minicom specific code into your ymodem implementation will solve the issue.

I could see 2 important differences: minicom does not support the sending of “\b.” to the terminal, and reception is done byte per byte… 

Best regards

Jocelyn

Associate
June 24, 2026

Hello,

 

I see, I’ll have a look.

I’ll admit, I’ve taken the opposite approach by writing my own ymodem sender in lieue of Unix’ sb.

It seems it is indeed the “\b” that is the issue, as sb interprets it as NAK and re-sends the header packet whereas the board is waiting for the following packets as it has already registered the header.

So I’ve written a little program that handles the ymodem protocol and ignore the “\b” while doing mostly the same as sb and used it in minicom inplace of it, and it works fine.

 

Best regards,

Gautier.

Jocelyn RICARD
Jocelyn RICARDBest answer
ST Employee
June 24, 2026

Hello Gautier,

Thank you for your feedback.

That’s another way to address the issue indeed, even better I guess :)

Now I found this minicom topic was already addressed in the SBSFU of L5 in an internal ticket.

So, I merge the changes I found on U5 and checked this was working fine on ubuntu

I share here the 2 files impacted. I made the change in the loader project.

For non secure application project (when using dual slot), changes are very similar.

All changes contain a comment with MINICOM.

This version also work on windows teratem by the way.

Best regards

Jocelyn

Billy OWEN
ST Employee
June 23, 2026

Hi ​@Gautier MELOT 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy