Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
I've had difficulties running STM32CubeProgrammer on the Mac. No matter what I tried, dealing with Java runtime versions and Mac Gatekeeper settings, I couldn't make it work (well it launched but quit immediately), even on an older Mac with Sierra.
Since I don't have access to either a Windows or Linux box, I managed to update the CMM2 firmware on the Mac running a Virtual Machine with Windows, using the process described here:
All the software described in this how-to is free to download and use. It works with the latest version of MacOS (Catalina 10.15.6 as of this writing).
- Download and install VirtualBox ( https://www.virtualbox.org/wiki/Downloads ) - Download a Windows 10 Disc image ( https://www.microsoft.com/en-gb/software-download/windows10ISO ) - Use the disc image to create a Windows VM with VirtualBox ( https://www.computerworld.com/article/2825616/no-hassle-way-to-install-windows-10-with-virtualbox.html ) - Install the VirtualBox Oracle VM VirtualBox Extension Pack ( https://www.virtualbox.org/wiki/Downloads ), not sure if it's necessary but it has additional USB driver support. - Install Oracle JDK (Java SE) on Windows in the VM ( https://www.oracle.com/java/technologies/javase-downloads.html ) - Install STM32CubeProgrammer on Windows in the VM ( https://www.st.com/en/development-tools/stm32cubeprog.html ) - Follow the usual instructions to put the CMM2 in firmware update mode and connect the Maximite to the Mac with the A to A USB Cable - In the VirtualBox app, access in the Mac menu bar the menu item Devices -> USB and select the Maximite (it says something about DFU mode) to make sure it's recognized by Windows - You can then proceed to install the firmware with STM32CubeProgrammer as described in the Maximite manual. Edited 2020-09-13 18:38 by Frank_Drebin
Paul Woolverton Newbie Joined: 04/08/2020 Location: United StatesPosts: 4
Posted: 09:42pm 04 Oct 2020
Copy link to clipboard
Print this post
I'm having the same problem getting the STM32CubeProgrammer to run. Has any solution (other than doing it via Windows or Linux) emerged?
Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 377
Posted: 10:21pm 04 Oct 2020
Copy link to clipboard
Print this post
There is a command line interface version included in the install that shouldn't require Java. I had success with the command line version under Windows, I haven't tried it on Mac OS but I did confirm it's presence in the install package.
Here is an example of using the virtual COM port connection:
I can tell you that under Windows (DOS) the CMM2 USB-A connection enumerates as USB1 no matter what port it's plugged into. The serial connection enumerates as COMX and you need to find the port after connecting the device for the first time. I assume Mac OS will be quite similar.
Update: I almost forgot, if you connect your CMM2 and use the "List" option the CLI program will show you all the available devices (ports) which should help you sort out what to use as "Port"
STM32_Programmer_CLI -L
Please let us know if you get this sorted out and working on Mac OS. It's on my list of "stuff to do" but hasn't moved up the list because I have a PC already set-up to flash the CMM2 Edited 2020-10-05 09:02 by Sasquatch-Carl
Paul Woolverton Newbie Joined: 04/08/2020 Location: United StatesPosts: 4
Posted: 12:51am 05 Oct 2020
Copy link to clipboard
Print this post
Thanks for the tip! I got the app to launch via the Mac's Terminal command line. Next step will be figuring out the rest to make the firmware update. This is all new territory for me.
More info: I opened the package contents and drilled down to the app, then did the right/control-click to do "open with" and opened it with Terminal (though that appears to be the default). It asked if Java could access my Downloads directory (I said "yes") and then the app launched. Edited 2020-10-05 10:54 by Paul Woolverton
Paul Woolverton Newbie Joined: 04/08/2020 Location: United StatesPosts: 4
Posted: 01:06am 05 Oct 2020
Copy link to clipboard
Print this post
Or I spoke too quickly - it loaded a Java thing to do the install of the app. I went through the installation, found the app in my Applications folder, and it wasn't able to run.
I'll keep playing with it and see what happens.
Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 377
Posted: 01:29am 05 Oct 2020
Copy link to clipboard
Print this post
That's disappointing to hear, on windows the CLI app doesn't do any kind of graphics or anything. Just plain text in the DOS command window. I wonder why the CLI version needs Java on the MAC?
You are trying to run the "STM32_Programmer_CLI" version from the terminal window right??? Not the Stm32CubeProgrammer, it's a completely separate application from the main one that has the ST icon.
I could never get the "regular" version to run on my Mac either even though it's running a newer version of the OS. It's something peculiar to the version of Java that STM32CubeProgrammer needs. I had hopes that the CLI version might work.
The irony is that the full StmCube32IDE works flawlessly on my MAC but it only seems to support the STLink interface for programming devices. Edited 2020-10-05 11:35 by Sasquatch-Carl
Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 377
Posted: 02:48am 05 Oct 2020
Copy link to clipboard
Print this post
Ok, Just got the STM32_Programmer_CLI to work on my MAC with no Java issues. I am able to use both the USB A-A and the virtual serial (console) connection. The serial console connection does work but it is sooooooo slooooooow.
I am running on MACOS High Sierra 10.13.6
I will supply the terminal command lines for my MAC here as an example. Your paths to the app and your .bin files may be different
/Applications/STMicroelectronics/STM32Cube/STM32CubeProgramme/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI -c Port=USB1 -W "/Volumes/STORE N GO/MaxiMite/CMaxiMite2/CMM2_Betav5.05.06b18/CMM2V5.05.06b18.bin" 0x08000000 -v
The full command for virtual serial port programming on my MAC is:
/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI -c Port=/dev/tty.usbmodemFA141 P=NONE -W "/Volumes/STORE N GO/MaxiMite/CMaxiMite2/CMM2_Betav5.05.06b18/CMM2V5.05.06b18.bin" 0x08000000 -v
For serial connection you will likely need to connect your CMM2 and use the -l option to see what your serial port designation is and substitute the Port=yourdevice switch.
Hope this helps! I hope you can get your MAC working. Edited 2020-10-05 12:49 by Sasquatch-Carl
Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 377
Posted: 03:55am 05 Oct 2020
Copy link to clipboard
Print this post
Here is a sample output from the STM32_Programmer_CLI I don't think it uses any Java at all it's just a straight "Unix Executable"
USB speed : Full Speed (12MBit/s) Manuf. ID : STMicroelectronics Product ID : DFU in FS Mode SN : 100364500000 FW version : 0x011a Device ID : 0x0450 Device name : STM32H7xx Flash size : 2 MBytes (default) Device type : MCU Device CPU : Cortex-M7
Paul Woolverton Newbie Joined: 04/08/2020 Location: United StatesPosts: 4
Posted: 06:17am 05 Oct 2020
Copy link to clipboard
Print this post
Turns out I was trying to run STM32CubeProgrammer via the Terminal option. The Finder and Spotlight search functions weren't showing STM32_Programmer_CLI anywhere.
Just now dove deep into the package contents. After opening a half-dozen or so folders, found the CLI program. I'll try it tomorrow night.
On a related note, there's a typo page 9 of the Colour Maximite 2 User Manual regarding terminal access from Mac:
screen/dev/tty.usbmodem12345 115200
should be
screen /dev/tty.usbmodem12345 115200
[missing space after screen]. Will allow for direct copy/pasting for newbies not familiar with terminal syntax.
Thanks Sasquatch for your nice and detailed how-to, it deserves a spot in the manual in my view since trying to make the Java UI work on Mac is doomed to fail for 99% of users.