Skip to content

Latest commit

 

History

History
86 lines (63 loc) · 2.37 KB

README.md

File metadata and controls

86 lines (63 loc) · 2.37 KB

STM32 CubeMX Makefile-based project advanced Build System

This system is Based on the Zephyr Project Build system files. The system allows you to assemble autogenerated projects based on makefile, add your code, and build. The benefits are that it all works under VSdode Studio and has perfect Menuconfig functionality that makes your project more flexible and independent.

Features

  • CMake Based build system
  • Present awesome Menuconfig feature
  • Manual and Makefile-configured build
  • Cross-platform
  • Segger Debuger
  • RTT Debug Logging in the VSCode console

Deployment

To deploy this project run

  $git clone https://github.com/fillbert/CubeMX2CMake.git
  $cd CubeMX2CMake
  $chmod 0777 env_setup.sh
  $source ./env_setup.sh

Wait until it works...

  $code .

In VSCode:

  • ctrl+shift+b -> Build - DEBUG/RELEASE
  • Select Launch with proper project and run debugger...

Usage/Examples

  • Create an initial project in CubeMX and set up all hardware that should be initiated before running your application code.
  • Save the project inside of the root directory (as it was done in examples)
  • Setup CubeMX code generator to generate a makefile-based project
  • Generate code and clothe CubeMX
Then you have to override the default task code to exclude dependency of your code
and Cube Genetared project sources

void StartDefaultTask(void const * argument)
{
  /* init code for USB_DEVICE */
  MX_USB_DEVICE_Init();
  /* USER CODE BEGIN 5 */
  /* Infinite loop */
  for(;;)
  {
    extern void userCoreInit(void);
    userCoreInit();
    osThreadSuspend(NULL);
  }
  /* USER CODE END 5 */
}

The paradigm for the CMake-based projects is to avoid GLOBE usage, and the best way is to follow an example and add a sample CMakeLists.txt file to each directory and include all sources here. It provides you with a make-exclude build. For example to exclude some files from build by settings in Menuconfig.

Lecense

AGPL License

Authors

The Project based on this project @jameswalmsley

  • Author: @filbertby
  • Reviewer: [here can your name]

🚀 About Me

I'm an embedded firmware developer and hardware designer. I want to make this life easier.