Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed programming: recipe not found 'program.pattern' in v.2.8.0 #2415

Closed
brightproject opened this issue Jul 1, 2024 · 16 comments · Fixed by #2417
Closed

Failed programming: recipe not found 'program.pattern' in v.2.8.0 #2415

brightproject opened this issue Jul 1, 2024 · 16 comments · Fixed by #2417
Labels
arduino compatibility bug 🐛 Something isn't working
Milestone

Comments

@brightproject
Copy link

brightproject commented Jul 1, 2024

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
stm32_core_update_error

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.

@fpistm
Copy link
Member

fpistm commented Jul 1, 2024

Could you be more precise on your setup?
Arduino ide version? arduino-cli version? Host OS? ....

@brightproject
Copy link
Author

Could you be more precise on your setup?
Arduino ide version? arduino-cli version? Host OS? ....

Yes, sure!
Windows 10 pro, 22H2
Arduino-cli 1.0.1
Arduino IDE 1.8.19

@BennehBoy
Copy link
Contributor

BennehBoy commented 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
Copy link
Member

fpistm commented Jul 2, 2024

@BennehBoy seems strange with arduino ide2. It works fine on Linux. Which target you used?

@BennehBoy
Copy link
Contributor

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
Copy link

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
Copy link
Member

fpistm commented Jul 2, 2024

@BennehBoy , @SuppaTenko
So you get the issue only to flash the board?
Can you share your command line please?

@BennehBoy
Copy link
Contributor

arduino-cli upload
Failed programming: recipe not found 'program.pattern'

@SuppaTenko
Copy link

SuppaTenko commented 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
Copy link
Member

fpistm commented Jul 2, 2024

@BennehBoy Could you test with arduino-cli 1.0.1. There is a lot a breaking change and probably linked...

@BennehBoy
Copy link
Contributor

@BennehBoy Could you test with arduino-cli 1.0.1. There is a lot a breaking change and probably linked...

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
Copy link
Contributor

I've manually built arduino-cli 1.0.1 and re-tested:

arduino-cli compile
Sketch uses 48532 bytes (37%) of program storage space. Maximum is 131072 bytes.
Global variables use 6108 bytes (29%) of dynamic memory, leaving 14372 bytes for local variables. Maximum is 20480 bytes.

Used library                                     Version Path
SPI                                              1.1.0   /home/bennehboy/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.0/libraries/SPI
Adafruit GFX Library                             1.11.9  /home/bennehboy/Arduino/libraries/Adafruit_GFX_Library
Adafruit BusIO                                   1.16.1  /home/bennehboy/Arduino/libraries/Adafruit_BusIO
Wire                                             1.0.0   /home/bennehboy/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.0/libraries/Wire
Adafruit SSD1331 OLED Driver Library for Arduino 1.2.2   /home/bennehboy/Arduino/libraries/Adafruit_SSD1331_OLED_Driver_Library_for_Arduino
SrcWrapper                                       1.0.1   /home/bennehboy/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.0/libraries/SrcWrapper
USBDevice                                        1.0.0   /home/bennehboy/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.0/libraries/USBDevice

Used platform            Version Path
STMicroelectronics:stm32 2.8.0   /home/bennehboy/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.0


arduino-cli upload
Failed programming: recipe not found 'program.pattern'


arduino-cli version
arduino-cli  Version: 1.0.1-arch Commit: 590e73bf0412a30780298415180ee085e8d27a07 Date:

@fpistm
Copy link
Member

fpistm commented 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.default is 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.default

@BennehBoy
Copy link
Contributor

About the upload issue, I found the root cause, since programmer.default is 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.default

Confirmed working, thanks.

@SuppaTenko
Copy link

SuppaTenko commented Jul 3, 2024

Oh! Caught it!
image

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

@fpistm
Copy link
Member

fpistm commented Jul 3, 2024

@SuppaTenko issue is identified and a workaround exist see my comment: #2415 (comment)

Fix will come soon.

@fpistm fpistm added the bug 🐛 Something isn't working label Jul 4, 2024
@fpistm fpistm added this to To do in STM32 core based on ST HAL via automation Jul 4, 2024
@fpistm fpistm added this to the 2.9.0 milestone Jul 4, 2024
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Jul 4, 2024
Fixes stm32duino#2415

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Jul 4, 2024
Fixes stm32duino#2415

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Jul 4, 2024
as it is not relevant and avoid upload using arduino-cli.

Fixes stm32duino#2415

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm closed this as completed in f9a35fd Jul 4, 2024
STM32 core based on ST HAL automation moved this from To do to Done Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arduino compatibility bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

4 participants