Repository navigation
Description
I'm not entirely sure that this is a bug, but without changing it, I conducted a series of observations and experiments.
Also not entirely sure what is causing the crash, but initially decided to write to this community.
I have been using the arduino-cli and Arduino_Core_STM32 combination for a long time.
Some time ago the arduino-cli was updated, but there were no problems.
I usually use Arduino IDE version 1.8.19 and update the stm32 and esp32 cores through the board manager.
I could not install the stm32 core using Arduino IDE version 1.8.19

Updated the core via arduino-cli by entering the command
arduino-cli core install STMicroelectronics:stm32
The stm32 core has been updated to version 2.8.0 and when loading the firmware onto the board
arduino-cli upload -b STMicroelectronics:stm32:GenF4:pnum=BLACKPILL_F411CE,upload_method=swdMethod -i C:\Users\name\AppData\Local\Temp\arduino\sketches\28137305E41AD2AD2370E09B77B89274\test.ino.bin
got this error
Failed programming: recipe not found 'program.pattern'
Used library Version Path
Wire 1.0.0 C:\Users\name\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.8.0\libraries\Wire
Adafruit Unified Sensor 1.1.14 C:\Users\name\Documents\Arduino\libraries\Adafruit_Unified_Sensor
Adafruit BNO055 1.6.3 C:\Users\name\Documents\Arduino\libraries\Adafruit_BNO055
Adafruit BusIO 1.16.0 C:\Users\name\Documents\Arduino\libraries\Adafruit_BusIO
Bolder Flight Systems Eigen 3.0.2 C:\Users\name\Documents\Arduino\libraries\Eigen
Bolder Flight Systems WMM 1.1.0 C:\Users\name\Documents\Arduino\libraries\wmm
Bolder Flight Systems Unit Conversions 5.0.0 C:\Users\name\Documents\Arduino\libraries\units-main
SrcWrapper 1.0.1 C:\Users\name\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.8.0\libraries\SrcWrapper
SPI 1.1.0 C:\Users\name\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.8.0\libraries\SPI
Used platform Version Path
STMicroelectronics:stm32 2.8.0 C:\Users\name\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.8.0
PS C:\Users\name\OneDrive\Documents\PlatformIO\Projects\esp32_two_buttons> arduino-cli upload -b STMicroelectronics:stm32:GenF4:pnum=BLACKPILL_F411CE,upload_method=swdMethod -i C:\Users\name\AppData\Local\Temp\arduino\sketches\28137305E41AD2AD2370E09B77B89274\test.ino.bin
Failed programming: recipe not found 'program.pattern'
and in arduino IDE log
Tool STM32_SVD is not available for your operating system.
java.lang.RuntimeException: java.lang.Exception: Tool STM32_SVD is not available for your operating system.
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:179)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Tool STM32_SVD is not available for your operating system.
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:84)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
... 1 more
Tool name : STM32_SVD 1.15.1
sys : all cc.arduino.contributions.packages.HostDependentDownloadableContribution@e22d00
seems to have no downloadable contributions for your operating system, but it is installed in
C:\Users\name\AppData\Local\Arduino15\packages\STMicroelectronics\tools\STM32_SVD\1.15.1
I rolled back to version 2.7.1 - everything works fine on it.
I'm not sure if I can repeat the error on other PCs, but version 2.8.0 doesn't work for me.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fpistm commentedon Jul 1, 2024
Could you be more precise on your setup?
Arduino ide version? arduino-cli version? Host OS? ....
brightproject commentedon Jul 1, 2024
Yes, sure!
Windows 10 pro, 22H2
Arduino-cli 1.0.1
Arduino IDE 1.8.19
BennehBoy commentedon Jul 2, 2024
Same issue.
Arch Linux (currently patched)
Arduino-cli 0.35.3 (Arch package not yet updated to 1.0.1)
Arduino IDE 2.3.2
EDIT - although I can upload fine from the IDE, just arduino-cli throwing the program.pattern issue.
fpistm commentedon Jul 2, 2024
@BennehBoy seems strange with arduino ide2. It works fine on Linux. Which target you used?
BennehBoy commentedon Jul 2, 2024
Updated my comment, IDE works fine. arduino-cli fails.
sketch.yaml:
default_fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103CB,usb=CDCgen,xserial=generic,xserial=generic
SuppaTenko commentedon Jul 2, 2024
I second this issue. Saw recipe not found 'program.pattern' error in logs today. Didn't bother about it for some reason.
Now when i try to flash my MCU via STLink first i get read ECONNRESET in arduino logs.
And when i retry - i get
No connection established
Compilation error: No connection established
And arduino-cli.exe process is dead.
When i only compile my code without flashing or when i export binaries - it works just fine.
My OS is Win10x64 build 17763
Arduino IDE is 2.3.2
Rolled back stm32 core to 2.7.1, and it works good, so it's something with this update...
fpistm commentedon Jul 2, 2024
@BennehBoy , @SuppaTenko
So you get the issue only to flash the board?
Can you share your command line please?
BennehBoy commentedon Jul 2, 2024
SuppaTenko commentedon Jul 2, 2024
Hold up, let me update it back to 2.8.0...
**
upd. Yeah, my error is still there.
It goes straight to read ECONNRESET, so i can't see my command line in arduino log. Verbose logging for both compilation and upload is active, and i also activated all warnings.
...
Sketch uses 60980 bytes (11%) of program storage space. Maximum is 524288 bytes.
Global variables use 20272 bytes (15%) of dynamic memory, leaving 110800 bytes for local variables. Maximum is 131072 bytes.
read ECONNRESET
Please tell me how to check my command line the right way if I'm misunderstanding something.
fpistm commentedon Jul 2, 2024
@BennehBoy Could you test with arduino-cli 1.0.1. There is a lot a breaking change and probably linked...
BennehBoy commentedon Jul 2, 2024
Will do as soon as there's a package update available for Arch - it's been flagged out of date since 1.0.1 got released.
BennehBoy commentedon Jul 2, 2024
I've manually built arduino-cli 1.0.1 and re-tested:
fpistm commentedon Jul 2, 2024
@brightproject
Install under Arduino 1.8.19 is now ok. Legacy Arduino IDE doesn't support the host value "all". I've updated the json to provide all supported host value: stm32duino/BoardManagerFiles@0e3e525
Anyway, other issues appears, some variables values defined in the platform.txt are not expanded. I guess, I will not support the legacy Arduino IDE 1.8.x. Supporting new features and specifications from Arduino is not compatible with it.
About the upload issue, I found the root cause, since
programmer.defaultis defined the cli try to use it and does not fallback to upload feature like it is done by the Arudino IDE 2.x.Will try to find a fix, for testing simply remove the line in the menu of your board in boards.txt which set the
programmer.defaultBennehBoy commentedon Jul 2, 2024
Confirmed working, thanks.
SuppaTenko commentedon Jul 3, 2024
Oh! Caught it!

And after I retry uploading i get ECONNRESET again. Just like yesterday.

fpistm commentedon Jul 3, 2024
@SuppaTenko issue is identified and a workaround exist see my comment: #2415 (comment)
Fix will come soon.
fix(programmer): properly define programmer interface
fix(programmer): properly define programmer interface
fix(programmer): remove stlink programmer
fix(programmer): remove stlink programmer