GithubHelp home page GithubHelp logo

enbyted / cmake-microchip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elemecca/cmake-microchip

6.0 4.0 5.0 27 KB

CMake modules for the Microchip embedded toolchain

License: Other

CMake 100.00%
microchip microchip-pic xc8 xc8-compiler cmake cmake-module

cmake-microchip's Introduction

CMake for the Microchip Toolchain

This project provides toolchains and other support modules to enable using CMake with the Microchip compilers. This fork focuses on supporting CLang compiler frontend for XC8 introduced in version 2.0.

Usage

First, you need to somehow get a copy of this project as a subdirectory of your project named external/cmake-microchip. If you use git, the easiest way is to add a submodule:

git submodule add git://github.com/Elemecca/cmake-microchip.git external/cmake-microchip

Then add this snippet at the very top of your CMakeLists.txt:

# set up the Microchip cross toolchain
set(CMAKE_TOOLCHAIN_FILE external/cmake-microchip/toolchain.cmake)

# set the default MCU model
set(MICROCHIP_MCU PIC24FJ32GB002)

The target MCU is set by the MICROCHIP_MCU variable. It can be set in CMakeLists.txt as above or on the CMake command line like so:

cmake -DMICROCHIP_MCU=PIC24FJ256GB004 .

If you wish to use the 'legacy' xc8 compiler (xc8) over the clang-based version (xc8-cc), this can be achieved by telling CMake to 'force' the use of non-cc version:

cmake -DMICROCHIP_XC8_FORCE_NON_CC:BOOL=ON .

Copying

This project is provided under the same BSD 3-Clause license as CMake itself. See COPYING.txt for details.

cmake-microchip's People

Contributors

aytey avatar elemecca avatar enbyted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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