Skip to content

STM32CubeProgrammer not found under macOS #1214

@MaJerle

Description

@MaJerle

Please make you search through our existing issues (both open and closed)

It may help to look at these instructions in Preview mode. Please visit the correct repo to file an issue. If this is an issue with

Please read our documentation as well. You have a lot of control over how Cortex-Debug works. Besides the top level README.md, we have the following

https://github.com/Marus/cortex-debug/wiki
https://github.com/Marus/cortex-debug/wiki/Cortex-Debug-Under-the-hood
https://github.com/Marus/cortex-debug/blob/master/debug_attributes.md

Finally, make sure all your external tools are configured properly and working. We print all the commands in the Debug Console. Most of the bug reports are from Linux users with improperly installed GNU tools. If you can't run those tools, neither can we.

Thank you for helping reduce the number of issues which is becoming overwhelming as most of them are not issues at all. You can delete all the above text and start filing the issue

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

  1. Move from working Windows to macOS. The launch variables for server, and stm32cubeprogrammer shall be omitted.
  2. Install the STM32CubeCLT
  3. Install the cortex-debug
  4. The STM32CubeProgrammer wont be found.

Expected behavior

STM32CubeProgrammer to be found automatically.

Screenshots

Image

The path being looked at:
/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin

The actual path where I have the CubeProgrammer CLI tools:
/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Resources/bin/

Environment (please complete the following information):

  • Cortex-Debug Version (this extension) [e.g. 0.2.3] - latest preview
  • OS: [e.g. Linux Ubuntu 18.04 LTS, Windows 11, etc.] . macOS 26.4.1 M5
  • GDB Version: [e.g. 1.11.1] - stlink server from the STM32CubeCLT
  • Compiler Toolchain Version: [e.g. arn-none-eabi V 11.1] GCC v15

Please include launch.json

This is the exact launch that works under Windows.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Microcontroller - ST-Link",
            "cwd": "${workspaceFolder}",
            "type": "cortex-debug",
            "executable": "${command:cmake.launchTargetPath}",
            "request": "launch",                //Use "attach" to connect to target w/o elf download
            "servertype": "stlink",
            "device": "STM32G0B1",            //MCU used, ex. "STM32H735IG"
            "interface": "swd",
            "serialNumber": "",
            //"serialNumber": "0024002C3331510733323639", //Set ST-Link ID if you use multiple at the same time
            //"serialNumber": "0028001F3756501620303658", //Set ST-Link ID if you use multiple at the same time
            "runToEntryPoint": "main",
            "svdFile": "../../svd/STM32G0C1.svd",
            "v1": false,
            "showDevDebugOutput": "both",

            /* Will get automatically detected if STM32CubeIDE is installed to default directory
               or it can be manually provided if necessary.. */
            //"serverpath": "/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Resources/bin/STM32_Programmer_CLI",
            //"armToolchainPath": "c:\\ST\\STM32CubeIDE_1.7.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346\\tools\\bin",
            //"stm32cubeprogrammer": "/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Resources/bin/",

            /* If you use external loader, add additional arguments */
            //"serverArgs": ["--extload", "path/to/ext/loader.stldr"],
        }
    ]
}

Note: We are unlikely to look at the issue if you do not supply this

Paste launch.json contents here

Attach text from Debug Console

Please enable debug output in your launch.json ("showDevDebugOutput": "raw"). It this is too large, please attach it as a file

Paste Debug Console contents here

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions