cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-G431 + Arduino IDE: "long options not supported due to getopt from FreeBSD usage"

MikeG9
Associate

Split from How to program and debug the STM32 using the Arduino IDE.


Hi,

I am new to this forum having just bought a Nucleo STM32G431 which I want to program using Arduino 2.3.4 on MAC OS 11.7.11. On trying to upload the simple blink example I get the error:

Warning: long options not supported due to getopt from FreeBSD usage.
getopt: illegal option -- a
Terminating...
Failed uploading: uploading error: exit status 1

Having read around this a little it seems that MACOS is using a BSD version of getopt which doesn't support long options. I believe the problem is in the Arduino core for STM32 MCU based boards (I have version 2.12.0 installed). 

 

Do you know of a workaround for this? Do I need to install the GNU version of getopt and is this safe? I am not a MACOS expert. Where would I find that?

 

1 ACCEPTED SOLUTION

Accepted Solutions
MikeG9
Associate

Thanks UnderGnd. I will try to install GNU getopt.

 I reported it here 'How to program and debug the STM32 using the Arduino IDE' as it was an Arduino post.

View solution in original post

3 REPLIES 3
UnderGnd
ST Employee

Hi @MikeG9 

This is a know issue:

https://github.com/stm32duino/Arduino_Tools/issues/112

It is not easy to managed, will try to find the best way to solve this but BSD getopt is very limited (no long option and space management).

You can install the GNU getopt to solve your problem, it is safe.

https://github.com/stm32duino
Andrew Neil
Super User

Welcome to the forum.

Arduino is not really the focus of this forum - you'd be better asking on Arduino's own forum:
https://forum.arduino.cc/c/development-tools/ide-2-x/93

Or, specific to STM32Duino: https://www.stm32duino.com/

 

The main focus here is STM32CubeIDE - which is supported for Mac: 

https://www.st.com/en/development-tools/stm32cubeide.html

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
MikeG9
Associate

Thanks UnderGnd. I will try to install GNU getopt.

 I reported it here 'How to program and debug the STM32 using the Arduino IDE' as it was an Arduino post.