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

Cannot upload sketch on MacOS #99

Closed
miroslavpetrov opened this issue Jul 1, 2024 · 6 comments · Fixed by #100
Closed

Cannot upload sketch on MacOS #99

miroslavpetrov opened this issue Jul 1, 2024 · 6 comments · Fixed by #100
Labels
bug 🐛 Something isn't working
Milestone

Comments

@miroslavpetrov
Copy link

miroslavpetrov commented Jul 1, 2024

Describe the bug
I am also not able to upload sketches from the Arduino IDE on MacOS. I have STM32cubeprog installed and working on my Mac but thats what I get from the Arduino IDE:

Sketch uses 110728 bytes (42%) of program storage space. Maximum is 262144 bytes.
Global variables use 8648 bytes (13%) of dynamic memory, leaving 56888 bytes for local variables. Maximum is 65536 bytes.
getopt: illegal option -- o
Terminating...
Failed uploading: uploading error: exit status 1

To Reproduce
Steps to reproduce the behavior:
No matter what upload method I select - SWD, UART, DFU the output is the same.
I am only able to upload the sketch by exporting compiled binary, open sketch folder in finder and move the .bin file to STLink drive.

Expected behavior
I expect to be able to flash STM32WL using Arduino IDE

Desktop

  • OS: Mac OS Sonoma 14.5
  • Arduino IDE version: 2.3.2
  • STM32 core version: 2.8.0
  • STM32 Low Power: 1.2.5
  • STM32 LoRaWAN: 0.2.0
  • Tools menu settings if not the default: Core logs enabled, Optimize: smallest, Runtime Newlib nano, UART: Enabled(generic serial), Board part number: Lora-E5 mini
  • Upload method: SWD

Board (please complete the following information):

  • Name: Seeed Wio-E5 Mini based on STM32wle5jc
  • Hardware Revision: v1.0
@fpistm
Copy link
Member

fpistm commented Jul 1, 2024

Hi @miroslavpetrov
Thanks for the detailed description but it seems you talk about several one.
One about an issue already opened (using the workaround begin(true)).
One other about I2C not working after a wake up (and serial)?
And one about a download issue.

Moreover it is not clear which board you select in the menu, is it LoRa-E5 mini
About upload method, the drag and drop is not supported by default so which upload method failed?

Here it is for bug related to the core. Please split your issue in the correct way:
Comment about the rtc.begin(true) in the correct issue (stm32duino/STM32LoRaWAN#36)
About low power (i2c/Serial) create a new issue in the LoRaWan library.
About upload method, clean up this issue and detail exactly your setup (selected board in the menu and the upload method selected))

@fpistm fpistm added invalid This doesn't seem right waiting feedback Further information is required labels Jul 1, 2024
@miroslavpetrov
Copy link
Author

@fpistm Thanks for the quick response. I have mentioned I2C,Serial and Sleep issues at once because I think that they are linked together to the improper set of the clock source for the RTC.I will clean the issue and create new ones as you told me.

@fpistm
Copy link
Member

fpistm commented Jul 1, 2024

improper set of the clock source for the RTC.

As stated in other PR, there is no improper clock source for the RTC, As even the modem.begin() call the reset, we are not able to reproduce on our side this seems happen only with third party board and so hard to explain.

@miroslavpetrov miroslavpetrov changed the title I2C, UART and Deepsleep on STM32wle5jc(Wio-E5 mini) work only in Debug Cannot upload sketch on MacOS Jul 1, 2024
@fpistm fpistm removed invalid This doesn't seem right waiting feedback Further information is required labels Jul 1, 2024
@fpistm fpistm transferred this issue from stm32duino/Arduino_Core_STM32 Jul 1, 2024
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 1, 2024
On MacOS getopt is the BSD based one while other
using the gnu-based getopt.
Then "-o" and long options are not supported

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm
Copy link
Member

fpistm commented Jul 1, 2024

Hi @miroslavpetrov
I've found the issue.
Please, Could you try the fix provided within #99?

@miroslavpetrov
Copy link
Author

@fpistm Thank you. Now it works like a charm. I am closing the issue.

Sketch uses 128352 bytes (48%) of program storage space. Maximum is 262144 bytes.
Global variables use 8652 bytes (13%) of dynamic memory, leaving 56884 bytes for local variables. Maximum is 65536 bytes.
Selected interface: swd
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.14.0                  
      -------------------------------------------------------------------

ST-LINK SN  : 0032001B3431511837393330
ST-LINK FW  : V3J12M3
Board       : STLINK-V3MINIE
Voltage     : 3.30V
SWD freq    : 8000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x497
Revision ID : Rev Z
Device name : STM32WLxx
Flash size  : 256 KBytes
Device type : MCU
Device CPU  : Cortex-M4
BL Version  : 0xC3



Memory Programming ...
Opening and parsing file: LowPowerBasic.ino.bin
  File          : LowPowerBasic.ino.bin
  Size          : 125.71 KB 
  Address       : 0x08000000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 62]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:03.323

RUNNING Program ... 
  Address:      : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully

@fpistm fpistm reopened this Jul 2, 2024
@fpistm
Copy link
Member

fpistm commented Jul 2, 2024

Hi @miroslavpetrov
Thanks for the test. I reopen the issue as the PR is not merged. I have some other concern about BSD getopt limitation (when arguments have space) and I need to validate under windows.
Issue will be closed automatically when the PR will be merged.

@fpistm fpistm added the Bug label Jul 5, 2024
@fpistm fpistm added this to the 2.2.3 milestone Jul 5, 2024
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 8, 2024
On MacOS getopt is the BSD based one while other
using the gnu-based getopt.
Then "-o" and long options are not supported

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 15, 2024
On MacOS getopt is the BSD based one while other
using the gnu-based getopt.
Then "-o" and long options are not supported

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 15, 2024
On MacOS getopt is the BSD based one while other
using the gnu-based getopt.
Then "-o" and long options are not supported

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 15, 2024
By default, MacOS uses getopt from FreeBSD and not the GNU-based one.
Then "-o" and long options are not supported except if gnu-getopt
is installed.

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Tools that referenced this issue Jul 17, 2024
By default, MacOS uses getopt from FreeBSD and not the GNU-based one.
Then "-o" and long options are not supported except if gnu-getopt
is installed.

Fixes stm32duino#99

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm added bug 🐛 Something isn't working and removed Bug labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants