2024-07-11 11:11 PM
I can connect in STM32CubeProgrammer my BluePill but can't do that in STM32CubeIDE.
I fixed that my ST-LINK's pins were reverse in it.
The problem I get is,
Error in initializing ST-LINK device.
Reason: ST-LINK: Could not verify ST device! Abort connection.
I have downloaded STSW-LINK009 already. Can you help me?
Solved! Go to Solution.
2024-07-12 2:12 AM
1. Buy from distributor, st-link or nucleo board :
https://www.mouser.de/ProductDetail/STMicroelectronics/NUCLEO-F103RB?qs=fK8dlpkaUMs2W6dqxUbL2w%3D%3D
2. If want cheap...from Ali or so, look for comments, that show: this is original STM on board.
I have some BluePills with STM32 chip, but also 2 with CKS32 ... so read description carefully and comments.
If no comments, that say "original STM" or "works with stm32IDE " , dont buy this.
eg.
Recently i buy this :
Seems original STM chip, can debug in IDE . But at your own risk -- sometimes the chinese sellers get new parts - they dont know, and you will know, when you get it and test.
2024-07-12 12:38 AM
Hello @xSekigan and welcome to the ST Community :smiling_face_with_smiling_eyes:.
I think you are not using an original ST part but a counterfeit one. Thats why you are receiving this message.
I suggest you verify that you are using genuine parts.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-12 12:53 AM
You mean ST-LINK by ST?
Having said that, I had bought this from a local store here but never gave an error before.
Worked with STM32L010C6T6 and LoRa last month and used this one.
I have bought a new laptop tho but I was sure that I had downloaded all that needed ://
I better get a new one. Any chance port numbers collision since it's GDB server?
Thank you, glad to be here.
2024-07-12 1:07 AM - edited 2024-07-12 1:07 AM
So with your none-STM chips -- you cannot debug in IDE. (IDE checks for genuine STM cpu there...)
But you can make a program in IDE, compile, then use CubeProgrammer to flash your BluePill .
If you want debug in IDE, buy an st-link with genuine STM cpu and also the target (BluePill or any) has to be STM cpu. Check, whats on your BluePill , maybe GD or CKS 32F103C8 there .
2024-07-12 1:18 AM
I mean your STM32F103C8T6 may be not a genuine one. You have to always ensure buying genuine products.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-12 1:52 AM
2024-07-12 1:59 AM - edited 2024-07-12 1:59 AM
The easy way is to just buy it from one of our official distributers. You can find them here.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-12 2:12 AM
1. Buy from distributor, st-link or nucleo board :
https://www.mouser.de/ProductDetail/STMicroelectronics/NUCLEO-F103RB?qs=fK8dlpkaUMs2W6dqxUbL2w%3D%3D
2. If want cheap...from Ali or so, look for comments, that show: this is original STM on board.
I have some BluePills with STM32 chip, but also 2 with CKS32 ... so read description carefully and comments.
If no comments, that say "original STM" or "works with stm32IDE " , dont buy this.
eg.
Recently i buy this :
Seems original STM chip, can debug in IDE . But at your own risk -- sometimes the chinese sellers get new parts - they dont know, and you will know, when you get it and test.
2025-03-22 1:17 PM
Hi. The problem looks similar to mine. During programming, the MCU was not detected, even though in STM32CubeProgrammer ST-link was detected and recognised the connected microcontroller (STM32F103C8T6). It seems that I disabled SWD support (CubeMX->Pinout & Configuration->SYS->Debug: ‘No Debug’) and could no longer use the ST-Link debugger. To solve this, I switched the debug back to ‘Serial Wire’ in CubeIDE, compiled the project and generated a ‘HEX’ file, which I then uploaded using CubeProgrammer to the microcontroller.
How do I generate a .hex or .bin file in STM32CubeIDE 1.18.0?
Open your project in STM32CubeIDE.
Go to your project settings: Right-click on the project name in the Project Explorer (left side of the window).
Select Properties.
Navigate to the build configuration section:
In the left panel, expand the C/C++ Build section. Click on Settings.
In the main panel, go to the Tool Settings tab.
Expand the MCU Post build outputs section (located under MCU GCC Build).
Check Convert to Intel Hex file (-O ihex) to generate a .hex file.
Check the Binary file option (-O binary) to generate a .bin file.
Click Apply and Close to save the settings.
Rebuild the project: Right-click on the project in the Project Explorer. Select Build Project (or use the keyboard shortcut Ctrl+B).
When the compilation is complete, the .hex and .bin files will be placed in the folder:
‘ProjectName/Debug/’.
We then launch the STM32CubeProgrammer, in the top right corner we click on ‘Connect’, after connecting and detecting our MCU, we open a new tab ‘+’, open our file with the extension ‘.HEX’ and press ‘Download’. Press the Reset button on PCB. From now on, the MCU already has the SWD debugger enabled and you can program back through the Cube IDE.