Giter Site home page Giter Site logo

mcu / kconfig Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 10.0 1.17 MB

Kconfig for ARM based MCUs

Home Page: https://mcu.github.io/kconfig/

License: GNU General Public License v3.0

Makefile 0.36% C 97.61% C++ 0.92% Assembly 0.19% Shell 0.17% Lex 0.17% Yacc 0.28% Perl 0.30%
kconfig menuconfig arm stm32 build-system embedded makefile

kconfig's Introduction

Kconfig for embedded applications

This example provides the ability to configure components and application using kconfig language Originally created for STM32 Black Pill but it can be used for any MCU

Development environment consists of:

  • Ubuntu OS
  • STM32CubeIDE
  • STM32CubeMX
  • STM32CubeProg
  • Cppcheck
  • Cloc

Install

  sudo apt install bison flex

Get GNU Arm Embedded Toolchain

  sudo apt install gcc-arm-none-eabi
  arm-none-eabi-gcc --version

Alternative way is to download Arm GNU Toolchain and setup path to compiler binaries by adding the following line into ~/.profile with your path to toolchain folder:

  export PATH="$PATH:$HOME/path/to/gcc-arm-none-eabi-8-2019-q3-update/bin"

Log out and log back in to update PATH variable

Get project and build

  git clone https://github.com/mcu/kconfig.git
  cd kconfig
  make menuconfig
  make
  make clean
  make -f scripts/Makefile clean

How it works

At first, 'make' utility use 'ls' command recursively to create a list of all folders in the 'components', 'application'. Then 'make' creates a list of all *.s, *.c, *.ld and *.a files into variables CBMXASRC, CBMXLD, CBMXOBJS... After that 'make' starts the process of compiling cubemx, components, application sorce files in parallel, linking and generating binary file. It's easy but more correctly is to build components separately into libraries (for advanced developers https://github.com/mcu/kconfig-libs).

You can change cubemx source files using STM32CubeMX program or replace cubemx folder with your own, small changes need to be made to the Makefile.

You can also add *.h, *.c files and folders as you want into "components", "application" folders. All source files will be compiled

Comment

Implementation of makefile has its pros and cons. Since all header files are visible to each source file during the build process it is not recommended to use this example for large projects

kconfig's People

Contributors

mcu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.