Skip to content

Liergou532/stm32_cmake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32 CMake Project Template

This template has been tested in Linux. Additional adjustments may be required for use in Windows.

How to compile code

Prerequisite:

This cmake setup assumes the gcc-arm-none-eabi toolchain has been set up correctly in your system.

Generally there are two ways to set up the toolchain:

  1. Install using the package manager

    $ sudo apt install gcc-arm-none-eabi
    
  2. Download the toolchain binaries and add its directory to system path

Now you can try to compile the sample project using the cmake template.

$ cd <root-folder-of-this-repo>
$ mkdir build
$ cmake ../src
$ make

If the "cmake ../src" step runs successfully, you should see something similar to the below screenshot:

cmake step

Then you can continue to actually compile the code and you can expect a similar result:

cmake step

About

CMake template for STM32 projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.7%
  • C 25.5%
  • Assembly 3.8%