GithubHelp home page GithubHelp logo

mcu-project.cmake's Introduction

CMake based MCU build system

Simple MCU project build system

Suppored MCU Frameworks

  • stm
  • zephyr
  • esp-idf
  • arduino
  • mbedos

cmake mcu project apis

# project apis
mcu_project_<platform>
mcu_executable_<platform>

# library apis
mcu_library
mcu_link_libraries
mcu_compile_definitions

examples

Project API

mcu-project project apis

mcu_project_<platform>(<platform-options ...>)
mcu_executable_<platform>(<target> <sources ...>)
  • mcu_project_<platform> : top-level platform declare
  • mcu_executable_<platform> : project add

Simple Example

cmake_minimum_required(VERSION 3.20)

include (mcu-project)
mcu_project_zephyr()

project(myproject)

add_subdirectory(mylib)

mcu_executable_zephyr(myproject main.c)
target_link_library(myproject PUBLIC mylib)

Library API

mcu-project component library apis

component layout

  ├── include
  │   └── <headers>
  ├── src
  │   └── <sources>
  ├── priv
  │   └── <private-sources>
  ├── tests
  │   └── <test-sources>
  └── CMakeLists.txt

apis
  mcu_library(<target> <sources ...>)
  mcu_link_libraries(<target> <link-targets ...>)
  mcu_compile_definitions(<target> <definitions ...>)

CMakeLists.txt (in component library folder)

mcu_library(mylib src/mylib.c priv/mylib-priv.c)

mcu-project.cmake's People

Contributors

ys-oh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.