Giter VIP home page Giter VIP logo

cmake_iar_template's Introduction

Note

This repo has another copy in gitee url = https://gitee.com/wangben85/CMake_IAR_Template.git

CMake_IAR_Template##

This is the project template to use CMake, IAR and Ninja build. Based on NXP TWR-KW24D512

##What is ninja build?## Ninja is a small build system with a focus on speed. It is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible.

##Environment setup requirement## -Ninja build (There is a minimal version requirement, I am using the version v1.9.0) Where to download ninja https://ninja-build.org, currently use the version v1.9.0

-CMake (There is a minimal version requirement, I am using the version of 3.7.2 instead of the latest version) Where to download Cmake https://cmake.org/files/v3.7/

-C++11

-python3.6.5

-IAR Embedded Workbench 8.30

##Setup## 1.Run python script "create_build_dirs.py" with python 3.6 or python 3.7. Python.exe create_build_dirs_py

2.Run ninja build with below command ninja -C release # it is for release build or ninja -C debug # it is for debug build

3.hello_world.bin will be generated under C:\Other_Code_Repo\CMake_IAR_Template\TWR-KW24D512\boards\twrkw24d512\demo_apps\hello_world\iar\debug\Exe and C:\Other_Code_Repo\CMake_IAR_Template\TWR-KW24D512\boards\twrkw24d512\demo_apps\hello_world\iar\release\Exe

##Update&Modify## a. Build configuration change In python script "create_build_dirs.py", there is a cmds dictionary which contents configuration Vs. cmake commands. In our case, we use ninja build to get better speed.

b. Adding files to project There are two places we need to maintain, one is "project_sources.cmake". Whenever we add a new source file to project, we need to add reference to APP_SOURCE_FILES set in project_sources.cmake. If we add new folder to project, we need to update APP_INCLUDE_DIRS set in project_sources.cmake.

c. Other related files -toolchain_iar.cmake: Configure the build toolchain for project, if we want to adapt this framework to other projects, this file needs update accordingly.

cmake_iar_template's People

Contributors

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