I want to debug a test project for my board the STM32F103C minimum systemboard, sometimes called the bluepill, I use linux so i downloaded the original STM32CubeIDE as .sh execute it and downloaded everything needed.

after creating a new project and ready for debugging, when debugging when I choose the debug probe I didn't see anything related to com ports or FTDI which i previuosly used in Arduino IDE, I googled the internet but couldn't find anything related to FTDI, and i am a total beginner when it comes to this STM32CubeIDE and don't know what to do, I will already get an ST-Link v2 for me so that I can debug using ST-Link easly but at the moment i don't have except an ftdi board which i use to upload sketches to the board using the Arduino IDE.

in short i was using the Arduino IDE so i upload all my programs to the board using a FTDI usb to serial converter, now i want to learn how to use the original software for my board The STM32CubeIDE, when debugging I couldn't see anything related to FTDI to upload my code so please help me.

Thanks in advance.

  • \$\begingroup\$ Beware that most of the little dongle-shaped fake ST-LINKs don't actually have a working reset output, though if you don't re-purpose the SWD pins or enter sleep modes you might not notice. The more sophisticated FTDI chips like the FT2232H can be used as SWD probes under something like OpenOCD, but it's unclear if the garden variety chip that is probably an FT232RL (or more likely fake imitation thereof) on your USB-UART gizmo could do so, if it could it would be slow. \$\endgroup\$ Commented Oct 11, 2019 at 23:28
  • \$\begingroup\$ Breakpoint debugging is occasionally very useful, but often frustrating - in the end there's no substitute for thinking about the problem, identifying likely issues, and devising strategies to check them, something that is entirely achievable with printf/output type debugging. If may be more efficient to stick with such methods until your ST-LINK or ST-LINK imitation arrives. \$\endgroup\$ Commented Oct 11, 2019 at 23:28

2 Answers 2


A USB-to-Serial adapter isn't a debugger.

So, this won't work. Get a debugging adapter: STlink v2-compatible adapters are really cheap.

  1. Install arm-none-eabi-gcc and openocd
  2. Connect FT2232 to MCU STM32 throug JTAG (ADBUS0->TCK, ADBUS1->TDI, ADBUS2->TDO, ADBUS3->TMS)
  3. Configure Debugging through JTAG 4pin in CubeMX (part of CubeIDE)
  4. Init OpenOCD server. Run->External Tools -> External Tools Configurations... Program->New launch configuration Fill in the fields and click Run enter image description here
  • Location: path_to_openocd
  • Working Directory: path_to_openocd_scripts_dir
  • Arguments: config_for_FTDI + config_for_MCU
  1. You wil see in console something like this enter image description here

  2. Make Debug Configuration (connect to server) Run->Debug Configurations... GDB Hardware Debugging -> New launch configuration Click Apply, Debug enter image description here *GDB Command: path_to_arm_gdb (I'm using short path ${gnu_tools_for_stm32_compiler_path}/arm-none-eabi-gdb) *Generic TCP/IP, port 3333

  3. Profit!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.