All Projects → ussserrr → Stm32pio

ussserrr / Stm32pio

Licence: other
Automate managing of STM32CubeMX + PlatformIO projects

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stm32pio

toolchain68k
build a toolchain for cross developement. Supports motorola m68k-elf, avr and arm-none-eabi
Stars: ✭ 18 (-79.78%)
Mutual labels:  stm32, platformio
LMIC-node
LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node qu…
Stars: ✭ 108 (+21.35%)
Mutual labels:  stm32, platformio
Platform Ststm32
ST STM32: development platform for PlatformIO
Stars: ✭ 201 (+125.84%)
Mutual labels:  stm32, platformio
platformio-libopencm3-freertos
Sample blinky project for PlatformIO using libopencm3 and FreeRTOS
Stars: ✭ 14 (-84.27%)
Mutual labels:  stm32, platformio
Plasma Mobile
A complete Plasma workspace targeted from small handheld devices to larger tablets.
Stars: ✭ 78 (-12.36%)
Mutual labels:  qml
Stm32f0 arm
STM32 Cortex-M0 course
Stars: ✭ 72 (-19.1%)
Mutual labels:  stm32
Screenplay
READONLY MIRROR (https://gitlab.com/kelteseth/screenplay) - Modern, Cross Plattform, Live Wallpaper & Widgets ! Free on Steam : https://store.steampowered.com/app/672870/ScreenPlay/
Stars: ✭ 70 (-21.35%)
Mutual labels:  qml
Ef S Adapter
https://twitter.com/JanHenrikH/status/1317520812761546753
Stars: ✭ 69 (-22.47%)
Mutual labels:  stm32
Nuttx
Standard NuttX (http://nuttx.org) with current PX4 WIP patches
Stars: ✭ 123 (+38.2%)
Mutual labels:  stm32
Graphicsprogramming
Demos related to OpenGL, Qt/QML, OpenCV and other X technologies.
Stars: ✭ 83 (-6.74%)
Mutual labels:  qml
Tesla
Remodel of Tesla Model S Instrument Cluster
Stars: ✭ 76 (-14.61%)
Mutual labels:  qml
Stm32 Ota
STM32-OTA on Arduino IDE
Stars: ✭ 72 (-19.1%)
Mutual labels:  stm32
Tft espi
Arduino and PlatformIO IDE compatible TFT library optimised for the STM32, ESP8266 and ESP32 that supports different driver chips
Stars: ✭ 1,215 (+1265.17%)
Mutual labels:  stm32
Stm32 Tutorial
Getting started with the STM32 HAL development environment. Tutorial documents in Markdown.
Stars: ✭ 69 (-22.47%)
Mutual labels:  stm32
Iec104
Protocol of IEC104 and IEC101
Stars: ✭ 86 (-3.37%)
Mutual labels:  stm32
Qmlnet
Qml.Net - Qt/QML integration/support for .NET
Stars: ✭ 1,162 (+1205.62%)
Mutual labels:  qml
Centsdr
CentSDR: tiny handheld standalone software defined receiver with LCD display.
Stars: ✭ 76 (-14.61%)
Mutual labels:  stm32
Stm32f429
Keil projects and libraries for STM32F4xx devices
Stars: ✭ 1,244 (+1297.75%)
Mutual labels:  stm32
Arduino Simplefocshield
Arduino Shiled for running Gimbal BLDC motors with FOC algorithm
Stars: ✭ 76 (-14.61%)
Mutual labels:  stm32
Traktor Kontrol Screens
Display modifications for the Traktor Kontrol S8/S5/D2
Stars: ✭ 73 (-17.98%)
Mutual labels:  qml

stm32pio

Build Status

Small cross-platform Python app that can create and update PlatformIO projects from STM32CubeMX .ioc files.

It uses the STM32CubeMX to generate a HAL-framework-based code and alongside creates the PlatformIO project with compatible parameters to bind them both together.

The GUI version is available, too (please, read this main introduction first).

Logo

Table of contents

Features

  • Originate the new full-fledged project in a single directory starting only from an .ioc file
  • Seamlessly update an existing project after the hardware changes by CubeMX
  • Quickly check the current state
  • Inspect tools (CubeMX, PlatformIO, etc.)
  • Clean-up the project
  • [optional] Automatically run your favorite editor or initiate a build in the end
  • [optional] GUI edition (see the dedicated README file) (please, read this main introduction first)

Requirements:

OS: macOS, Linux, Windows 7-10

Python: 3.6+

The app introduces zero dependencies by itself. Of course, you need to have all the necessary tools installed in order to perform the operations:

  • STM32CubeMX with the desired downloaded frameworks (F0, F1, etc.). All recent versions are fine (5.x, 6.x)
  • Java (JRE, Java runtime environment) for the CubeMX (already installed if the CubeMX is working). Which version is appropriate for the CubeMX you can find in its own description
  • PlatformIO (4.2.0 and above) CLI (most likely is already present if you have installed it via some package manager (pip, apt, brew, etc.) or need to be installed as a "command line extension" from the PlatformIO IDE (see its docs for more information))

If you, for some reasons, don't want to (or simply cannot) install (i.e. register in PATH) command line versions of these applications in your system, you can always specify the direct paths to them overriding the default values in the project configuration file stm32pio.ini. Check the config reference to see all possible ways of telling stm32pio where the tools are residing on your machine.

Installation

As a normal Python package the app can be run in a completely portable way by downloading (or cloning) the snapshot of this repository and invoking the main script:

stm32pio-repo/ $   python3 stm32pio/cli/app.py
stm32pio-repo/ $   python3 -m stm32pio.cli  # or as the Python module
any-path/ $   python3 path/to/stm32pio-repo/stm32pio/cli/app.py

Note: we will assume python3 and pip3 hereinafter.

However, it's handier to install the utility to be able to run from anywhere. The PyPI distribution is available:

$ pip install stm32pio

To uninstall run

$ pip uninstall stm32pio

Usage

You can always run

$ stm32pio --help

to see help on available commands.

Basically, you need to follow such a workflow (refer to the example which explains the same just illustrating it with some screenshots/command snippets):

  1. Create the CubeMX project (.ioc file) like you're used to, set up your hardware configuration, but after all save it with the compatible parameters
  2. Run stm32pio that automatically invokes CubeMX to generate a code, creates the PlatformIO project, patches the platformio.ini file.
  3. Work with your project normally as you wish, build/upload/debug etc.
  4. When necessary, come back to the hardware configuration in the CubeMX, then run stm32pio again to re-generate the code

See the commands reference file listing the complete help about the available commands/options. On the first run, stm32pio will create a config file stm32pio.ini, syntax of which is similar to the platformio.ini. You can also create this config without any following operations by initializing the project:

$ stm32pio init -d path/to/project

It may be useful to tweak some parameters before proceeding. See the config reference showing meanings for every key.

Troubleshooting

If you're stuck and the basic logs doesn't clear the situation, try the following:

  • Run the same command in the verbose mode using the -v key:
    $ stm32pio -v [command] [options]
    
    This will unlock additional logs which might help to clarify
  • Validate your environment, i.e. check whether the stm32pio can find all the essential tools on your machine:
    $ stm32pio validate -d path/to/project
    
    This will print the report about the current set up according to your config stm32pio.ini file.
  • Use the dynamic help feature which outputs information specifically about the requested command, e.g.:
    $ stm32pio new -h
    

Restrictions

  • The tool doesn't check for different parameters' compatibility, e.g. CPU/IO/etc frequencies, allocated memory and so on. It simply eases your workflow with these 2 programs (PlatformIO and STM32CubeMX) a little bit.
  • In order to add CubeMX middlewares to your build the manual adjustments should be applied, the stm32pio doesn't handle them automatically. For example, FreeRTOS can be added via PlatformIO' lib feature or be directly compiled in its own directory using lib_extra_dirs option:
    lib_extra_dirs = Middlewares/Third_Party/FreeRTOS
    
    You also need to move all .c/.h files to the appropriate folders respectively. See PlatformIO documentation for more information.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].