Swan Tool Chain on Mac

Trying to follow the SWAN quick start to set up the Arduino Tool Chain, Blinky compiles fine but will not upload. I have the STLINK-V3MINI but the “SetupSTM32CubeProgrammer-2.8.0.app” will not install. When I open it (even after allowing it to open in Mac security and privacy setting), I get no indication of it being installed. In Arduino Tool menu, selecting Upload Method STM32CubeProgrammer (SWD) results in this error, since the CubeProgrammer is not installed?:
“An error occurred while uploading the sketch
STM32CubeProgrammer not found (STM32_Programmer_CLI).
Please install it or add ‘/bin’ to your PATH environment:

Aborting!”

Hi @JimM,

Yeah, I’ve been there. This tool is notoriously difficult to install (at least on macOS).

Can you elaborate on this? Do you see “STM32CubeIDE” in your Applications folder?

Hello @RobLauer ,
I uninstalled STM32CubeIDE and reinstalled it (and it shows up in the Mac Application Folder). STMCubeIDE starts up from LaunchPad OK.
The install wizards are not starting upon double clicking either “SetupSTM32CubeProgrammer-2.8.0.app” or “SetupSTM32CubeMX-6.3.0”. :frowning_face:
I am digging through ST install documentation but to no avail thus far. Any guidance is greatly appreciated!

I was looking at the wrong app - do you have an “STMicroelectronics” folder in your Applications directory? And in there can you drill down to the STM32Cube directory to open the STM32CubeProgrammer app (it’s a few levels deep)?

Just curious to know if the apps were even installed or not.

Hi @RobLauer,
I left the default install locations when installing the STM32CubeIDE. However, there is no “STMicroelectronics” folder in my Applications Directory.

In my …/Users/jimmeckstroth folder there is a folder “STM32Cube” and a folder “STM32CubeIDE” (“STM32CubeIDE”
only has a “workspace_1.7.0” folder within from when I launched the IDE).
The “STM32Cube” folder contains a folder “Repository” which contains the folder "STM32Cube_FW_L4_V1.17.0. Digging deeper I find no MX or PROG app.

BTW, In the first instance, I would like to use the Arduino IDE for the SWAN, or perhaps VS Code.

Ok, so it sounds like your STM32CubeProgrammer install didn’t really do anything at all. The only thing I can think of is to try it again and see if the definition of insanity holds true. Curious, are you on an M1 Mac or Intel?

BTW - even VS Code + Arduino extension uses Arduino IDE behind the scenes :slight_smile:

@RobLauer,
I am on an Intel I9 (8-core, 64GB) Mac running Big Sur. (Although the new M1pro or M1max based Macs look interesting!)

To use only the Arduino IDE to program SWAN, do you know if the STM32CubeProgrammer should install even without STM32CubeIDE being installed?

I think I’m starting to confuse myself :slight_smile:.

You downloaded and installed STM32CubeIDE and STM32Programmer separately, correct? And Cube installer worked, but Programmer didn’t?

I wonder if this is the issue…take a look at our setup instructions re: manual firmware updates and read the STM32Programmer section carefully for macOS.

@RobLauer,
Yes, installed STM32CubeIDE, then tried unsuccessfully to install STM32Programmer (the install wizard never starts). STM32CubeIDE runs. (Arduino compiles fine but aborts with STM32Programmer missing).

@RobLauer, Your guidance this time was excellent! I used the CLI method to install the Cube Programmer and now Arduino IDE successfully programs the SWAN via the STLINK-V3Mini on my Mac!

From the Notecard Manual DFU documentation (for others perhaps): Using your terminal app of choice, navigate to the extracted directory and launch the installer in CLI mode. For example:

./SetupSTM32CubeProgrammer-2.8.0.app/Contents/MacOs/SetupSTM32CubeProgrammer-2_8_0_macos

My results (killed at first due to security settings):

1 Like

Hi @RobLauer,

Perhaps enhance the SWAN quick start guide with the additional information on installing the STM32CubeProgrammer on MacOS via the CLI command method?

Good point! Glad to hear it resolved the problem.

For what it’s worth, I had the same problem and this resolved it. All about those CLI commands.

Thanks!
Brecky

1 Like