Skip to main content

C++

For developers who want to skip the Arduino IDE and work directly with the on-board STM32 — full control, your own toolchain, no abstractions.

C++ Logo


Who is this for?

Most people should use the Arduino IDE — it's the same C++ underneath, just with a friendlier shell and one-click upload. Pick this direct-C++ path only when you need to:

  • Use STM32-specific peripherals or features the Arduino core doesn't expose
  • Integrate DUELink modules into an existing C++/STM32 project
  • Use your team's existing IDE, build system, or debugger
  • Step through code with SWD (most modules expose SWD pads)

Toolchains

Any toolchain that targets STM32C071 will work. Common picks:

  • STM32CubeIDE — free, official ST IDE, full HAL/LL access
  • ARM Keil MDK — what we use internally; ST offers a free Cortex-M0 license that covers DUELink
  • PlatformIO — if you prefer that workflow
  • GCC + Make / CMake — for fully scripted builds

These give you everything Arduino does and a lot more. The trade-off is no friendly samples — you'll work from raw HAL/LL APIs, the STM32 reference manual, and your own project structure.


Uploading

Built a .bin or .hex? Any DFU upload tool will flash it onto a DUELink module:

  • STM32CubeProgrammer — recommended; cross-platform, GUI + CLI
  • Any other DFU tool that supports STM32 in DFU mode

(The Arduino IDE handles upload internally, which is why most users stick with it.)


Debugging with SWD

Most DUELink modules expose SWD pads so you can attach a debugger like ST-Link:

  • SWCLK — on the through-hole "boot pads" or LDR button
  • SWDIO — on a small surface-mount pad nearby
tip

SWD access is an advanced, unsupported feature. Pin locations vary by module — check the product page for your board.


Going further