cancel
Showing results for 
Search instead for 
Did you mean: 

Linux: CubeIDE says "No ST-Link detected", while CubeProgrammer detects Nucleo board & target MCU

daurwil
Associate II

I am trying to get the STM32CubeIDE program my board under Linux.

Context: On a Windows 11 PC at the lab, all works (build the project, program it on the board). The code was originally written on Windows. The programmer board was there before, seems to come from a Nucleo board set; the target board was custom made. My task is to add new functionality to the firmware. It would be more comfortable to me to work on my linux machine.

Problem (on linux PC):

  • STM32CubeIDE says "No ST Link detected"
  • However, STM32CubeProgrammer detects the Nucleo programmer and connects to the target MCU.

Because the CubeProgrammer detects the programmer and the target, I am confused why the IDE does not.

I made sure to refresh the S/N in the IDE "Run configuration". I used the Programmer and/or the IDE both as root and as normal user. I tried two linux computers, a gentoo (rolling, up to date) and a Mageia (version 8 and a fresh install of version 9). The IDE and Programmer are the generic linux binaries from ST.

Here is dmesg when I connect the programmer:

 

 

 

[26dec. 14:11] usb 7-2: new full-speed USB device number 35 using xhci_hcd
[  +0,165330] usb 7-2: New USB device found, idVendor=0483, idProduct=374b, bcdDevice= 1.00
[  +0,000008] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0,000004] usb 7-2: Product: STM32 STLink
[  +0,000004] usb 7-2: Manufacturer: STMicroelectronics
[  +0,000003] usb 7-2: SerialNumber: 0671FF575251717867234112
[  +2,209007] usb-storage 7-2:1.1: USB Mass Storage device detected
[  +0,000328] scsi host12: usb-storage 7-2:1.1
[  +0,005729] cdc_acm 7-2:1.2: ttyACM0: USB ACM device
[  +0,998207] scsi 12:0:0:0: Direct-Access     MBED     microcontroller  1.0  PQ: 0 ANSI: 2
[  +0,000865] sd 12:0:0:0: [sdd] 80 512-byte logical blocks: (41.0 kB/40.0 KiB)
[  +0,000146] sd 12:0:0:0: [sdd] Write Protect is off
[  +0,000004] sd 12:0:0:0: [sdd] Mode Sense: 03 00 00 00
[  +0,000143] sd 12:0:0:0: [sdd] No Caching mode page found
[  +0,000003] sd 12:0:0:0: [sdd] Assuming drive cache: write through
[  +0,011104] sd 12:0:0:0: [sdd] Attached SCSI removable disk

 

 

 

Here is a what is happening in the IDE and the programmer (in this case both running at the same time but it's the same if only one of them is running).

 

Screenshot_20231226_141542_.png

 

Configuration of the IDE. I also tried the different options under Reset behaviour.

Screenshot_20231226_142432.png

2 REPLIES 2
AScha.3
Principal III

Do not select a fixed S/N - except you know, that you need this...

AScha3_0-1703607179640.png

...it only works with THIS number then; use : not selected S/N 

AScha3_1-1703607271504.png

+ in case you use a st-link V2 , in "usb-stick" version, its probably a counterfeit /not STM product,

STM32CubeIDE checking this and refuses to work, if not genuine stm chip inside the st-link.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for the suggestion. I will get a new programmer and report the results.

The one I have looks authentic to me (a PCB version that I was told was broken from a new Nucleo-64 development board) but I cannot ensure its provenience since I did not buy it myself. I'll buy one from from official suppliers like Mouser or Digikey.