[macOS] stm32CubeProg.sh: getopt: illegal option -- o

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Post Reply
Kenjutsu
Posts: 31
Joined: Tue Apr 07, 2020 10:58 am
Answers: 2

[macOS] stm32CubeProg.sh: getopt: illegal option -- o

Post by Kenjutsu »

Hello everyone.

Today I upgraded to Arduino_Core_STM32 2.8.0 (from 2.7.1) using Arduino IDE Version: 2.3.2.

When I tried to upload to a BluePill using STM32CubeProgrammer (SWD), I get the following error:
"" sh "/Users/ZZZZ/Library/Arduino15/packages/STMicroelectronics/tools/STM32Tools/2.2.2/stm32CubeProg.sh" -i swd -f "/private/var/folders/tq/dqrghm993td49tz1pvg8psxm0000gn/T/arduino/sketches/D5AFD427BFFBF8805E002A2460D8199D/Blink.ino.bin" -o 0x0
getopt: illegal option -- o
Terminating...
Failed uploading: uploading error: exit status 1
I also tried a F411 BlackPill with the same error:
"" sh "/Users/ZZZZ/Library/Arduino15/packages/STMicroelectronics/tools/STM32Tools/2.2.2/stm32CubeProg.sh" -i swd -f "/private/var/folders/tq/dqrghm993td49tz1pvg8psxm0000gn/T/arduino/sketches/35A84DEC798681261AC7D05DB0A8B048/Blink.ino.bin" -o 0x0
getopt: illegal option -- o
Terminating...
Failed uploading: uploading error: exit status 1
And with STM32CubeProgrammer (DFU)
"" sh "/Users/ZZZZ/Library/Arduino15/packages/STMicroelectronics/tools/STM32Tools/2.2.2/stm32CubeProg.sh" -i dfu -f "/private/var/folders/tq/dqrghm993td49tz1pvg8psxm0000gn/T/arduino/sketches/35A84DEC798681261AC7D05DB0A8B048/Blink.ino.bin" -o 0x0 -v 0x0483 -p 0xdf11
getopt: illegal option -- o
Terminating...
Failed uploading: uploading error: exit status 1
Running just the following in the terminal:
sh /Users/ZZZZ/Library/Arduino15/packages/STMicroelectronics/tools/STM32Tools/2.2.2/stm32CubeProg.sh
also gives:
getopt: illegal option -- o
Terminating...
Sanity-check:
  1. uninstall 2.8.0, and re-install: same error
  2. uninstall 2.8.0 and install 2.7.1: everything working again
by fpiSTM » Fri Jul 05, 2024 7:31 am
Hi @Kenjutsu
This is already tracked. See https://github.com/stm32duino/Arduino_Tools/issues/99
A Pr exist with an updated script.
Go to full post
Pieter

macOS: 14.5 M1
Arduino: 1.8.19
Arduino IDE: 2.3.2
STM32 Core: 2.8.0
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: [macOS] stm32CubeProg.sh: getopt: illegal option -- o

Post by fpiSTM »

Hi @Kenjutsu
This is already tracked. See https://github.com/stm32duino/Arduino_Tools/issues/99
A Pr exist with an updated script.
Kenjutsu
Posts: 31
Joined: Tue Apr 07, 2020 10:58 am
Answers: 2

Re: [macOS] stm32CubeProg.sh: getopt: illegal option -- o

Post by Kenjutsu »

Thank you @fpiSTM !

That solved the problem. 8-)
Pieter

macOS: 14.5 M1
Arduino: 1.8.19
Arduino IDE: 2.3.2
STM32 Core: 2.8.0
Post Reply

Return to “IDE's”