Skip to main content

STM32CubeMX2CMake

Installation

From this repository:

git clone https://github.com/eugene-babichenko/cubemx2cmake.git

cd cubemx2cmake

pip install .

Or you can install it from PyPI:

pip install cubemx2cmake

Usage

Generate your initialization code from STM32CubeMX with the following Code Generation Options:

  • Toolchain: SW4STM32

  • [X] Generate under root

Then open your project directory and run cubemx2cmake <your_cube_mx_file>.ioc. If your working directory contains only one CubeMX project file (.ioc), you can simply run *cubemx2cmake and it will find your project file automatically. This will generate CMakeLists.txt, STM32Toolchain.cmake, openocd_debug.cfg and openocd_flash.cfg files.

To get all the things done right use -DCMAKE_TOOLCHAIN_FILE=STM32Toolchain.cmake command line option with CMake.

CMakeLists contains the separate target called flash, which compiles your code and then flashes it to the target processor with OpenOCD. By default stlink-v2 is specified as the debugging interface. You can specify any other interface with –interface command line option. You can also specify flash memory start address with –memory_start option (0x08000000 by default). Telnet and GDB ports can be changed with –telnet-port and –gdb-port (4444 and 3333 are the defaults).

This scripts also generates a bunch of shell script files: * openocd_flash.sh - flashes the target MCU; * openocd_debug.sh - open debugging port for the target MCU; * gdb.sh - connect to the target MCU after openocd_debug.sh was started.

Metadata

Release files for cubemx2cmake 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubemx2cmake 1.2
File Size Uploaded Provenance Actions
cubemx2cmake-1.2.tar.gz 4.8 kB Without provenance Details for cubemx2cmake-1.2.tar.gz

Release files / cubemx2cmake-1.2.tar.gz

Download URL cubemx2cmake-1.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dead384726cffbb568ed33fa1777e8409ebc48aa34ab147a70f9b1ce4c5f13bd
BLAKE2b-256 checksum
How to use checksums
fc61c298105aa590dcfc6e69ebde2806f6764f72734fd96fc71ab61d51fec2ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cubemx2cmake 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

1.0.1

1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page