2024-12-18 08:43 AM - last edited on 2024-12-18 08:45 AM by Andrew Neil
TL;DR - My setup works when I use a Windows laptop, but fails when I use a MacBook Pro (M3 Max). I am looking for help on using my MacBook Pro (M3 Max) to program my Nucleo board.
This is my first time trying to program / debug such a board. I wrote a very simple C program to turn on the green LED (LD2) on my board: https://github.com/rajesh-gopalan/stm32-nucleo-f446re/blob/main/0_led_toggle_addr.c
My focus is on the following basic hardware <> software setup (not the actual program content):
Host Device - 16-inch MacBook Pro 2023, with M3 Max processor
Board - STM32 NUCLEO-F446RE
IDE - STM32CubeIDE
Version: 1.17.0
Build: 23558_20241125_2245 (UTC)
Connectivity - USB-C (host side) to Mini-B (board side) cable
As soon as I connect the cable between the board and the MacBook, the red LED (LD1) starts blinking, maybe twice a second and the other red LED (LD3) is also blinking, but its output is very feeble. I am able to successfully build the code. But, when I run main, the IDE indicates the following error: No ST-Link detected! Please connect ST-LINK and restart the debug session.
Based on what I have been reading upon, and from recommendation in an MOOC education forum (Udemy), I took the following steps, to see if that rectifies the issue:
1. I installed HomeBrew:
$prompt> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. I updated Rosetta:
$prompt> softwareupdate --install-rosetta
Rosetta 2 was installed on my MacBook Pro (with M3 Max Apple silicon)
3. I restarted my MacBook (and accordingly my Chrome Browser)
4. I installed STM32CubeIDE for MacOS and the ST-Link driver as per instructions provided in the website: https://www.st.com/en/development-tools/stm32cubeide.html
5. I used sudo to start CubeIDE:
$prompt> sudo /Applications/STM32CubeIDE.app/Contents/MacOS/STM32CubeIDE
Though I am able to successfully build (as before), I keep getting the same error when I try to run: No ST-Link detected! Please connect ST-LINK and restart the debug session.
To ensure it is not a board / cable issue, I used a Windows laptop to successfully build and run my program, i.e. I was able to turn on the green LED (LD2) on my board. But, I am unable to replicate my success on my MacBook Pro (M3 Max). I am looking for help on using my MacBook Pro (M3 Max) to program my Nucleo board. I am resisting a potential solve of using emulation (Windows in Mac using Parallels or Fusion Pro) to overcome this issue.
I am beginning to think my host machine is not supported by STMicro: 16-inch MacBook Pro 2023 with Apple Silicon (M3 Max, based on aarm64 architecture). The STM32CubeIDE's install file name (en.st-stm32cubeide_1.17.0_23558_20241125_2245_x86_64) seems to indicate that it supports processors that use x86_64 architecture, and may not support processors that use aarm64 architecture. Additionally, based on the naming convention of the ST-Link driver, it seems to support x86_64 architecture as well.
I appreciate the support here!