Skip to content

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

@ndoo

Description

@ndoo

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 STM32Tools@2.3.1 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions