Arduino_Tools icon indicating copy to clipboard operation
Arduino_Tools copied to clipboard

stm32CubeProg.sh `getopt: illegal option -- a` on macOS Apple Silicon, Sequoia 15.6, internal BSD getopt

Open ndoo opened this issue 1 month ago • 15 comments

STM32Tools 2.4.0 that shipped with STM32Duino Arduino core 2.12.0.

macOS 15.6 24G84 Using built-in macOS BSD getopt.

Describe the bug getopt: illegal option -- a when using DFU upload. Board STM32U0 -> Generic U073C8Tx. Upload method: "STM32CubeProgrammer (DFU)".

To Reproduce Steps to reproduce the behavior:

  1. Compile (success)
  2. Upload
  3. Fails due to getopt error.

Expected behavior Successful upload (it was working on [email protected] that shipped with STM32Duino Arduino core 2.11.0).

Screenshots Sorry, unable to provide

Desktop (please complete the following information):

  • OS: macOS 15.6 24G84
  • Arduino IDE version: 2.3.6
  • STM32 core version: 2.12.0
  • Library version: N/A (fails even with empty sketch)
  • Tools menu settings if not the default: Board STM32U0 -> Generic U073C8Tx
  • Upload method: [e.g. SWD]

Hardware (please complete the following information):

  • Board Name: Generic U073C8Tx
  • Hardware Revision: Proprietary
  • Extra hardware used if any: N/A native USB

Additional context

ndoo avatar Dec 17 '25 07:12 ndoo