Downloading & Debugging to STM32H via IAR Embedded Workbench

I am attempting to download a demo of FreeRTOS to an STM32 board, the Nucleo-H743ZI2, using the IAR Embedded Workbench (Arm 9.32.2). I’m working through the demo located here: /

I imported the project \FreeRTOS\FreeRTOS\Demo\CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR\ into IAR, and I was able to build the project successfully (The M4 core project). The instructions at the link above indicate that I should select the ST-LINK driver for debugging, and the associated settings. When I attempt to

Select “Download->Download Active Project” from the “Project” menu to program the Cortex-M4 core.

I get an error in IAR:

Fatal Error: ST-Link, no MCU device found
Session aborted!

My Windows Device Manager does indicate that it finds a STMicroelectronics STLink Virtual COM Port successfully.

Is there some way to test that the device is present? Are there settings that I am missing?



Have you tried the following command:

Debugger > ST-Link > Reset > connect during reset

and then attempt to download again.

Yes, that is the setting that I have.

Under the settings Debugger → ST-LINK → Setup → Reset, none of the options allowed me to connect to the target.

Also, under Debugger → ST-LINK → Communication → Log communication: I enabled the log and attempted to download. It doesn’t provide much, just one exception.

mar 20/10:45:27.943 DEBUG2 : STLinkOpen
mar 20/10:45:34.478 DEBUG2 : ********** ‘Controlled’ exception (1) caught in DbBeginSession
mar 20/10:45:34.708 DEBUG2 : Shutdown

Try updating the ST-Link firmware -

It seems that I was incorrect when I was trying to get a suitable demo of FreeRTOS for my board. My board is a Nucleo-H743ZI2. I was trying to get the closest demo (there isn’t a demo for exactly that board), and I picked the CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR. The wrinkle here is that my board is a single core, but that demo expects a dual core - an M4 and an M7. So there wasn’t anything wrong with the toolchain. When I was getting the error that I couldn’t connect to the target, it was specifically that I couldn’t connect to the M4 core on the target. I could connect to the M7 core on the target just fine.

Ah, that explains. You can use this project for this board - FreeRTOS/FreeRTOS/Demo/CORTEX_MPU_M7_NUCLEO_H743ZI2_GCC_IAR_Keil at main · FreeRTOS/FreeRTOS · GitHub