Code Monkey home page Code Monkey logo

arduino-cmake-wrapper's Introduction

CMAKE WRAPPER FOR ARDUINO SKETCH PROJECT

This repo contain the environment to build an arduino sketch with CMake.

Usage

  • put the sketch in cmake_wrapper/sketch
  • fill the CMakeLists.txt fields SRC and INO with the .cpp files and the .ino file.
  • define in the BoardOptions.cmake the arduno board you want to build to (if the arduino is not an avr standard, you need to provide the appropriate package platform in the BoardManager_InstallPlatform function).

With Docker

  • run dockerSetup.sh to build a docker image with the arduino-ide inside
  • run dockerBuild.sh to run into a container to build your project.

Directly on your host

  • run ./hostSteup.sh to setup the tools for the build
  • cd into the folder build
  • run make

Commands available in the build environment

  • make: build the sketch
  • make upload SERIAL_PORT_FILE=/dev/ttyACM0 : upload the sketch to an arduino (you need to provide the correct serial port in the variable SERIAL_PORT_FILE and share the serial port with the container by adding the arg --device=/dev/ttyACM0 to the docker run command)
  • make install: export the elf and bin files to the folder cmake_wrapper/binaries (usefull in the Docker env as the build folder is not retained)

Dependencies

This wrapper in based on the Arduino-CMake-Toolchain (the branch release-1.1-dev).
By default, the arduino-ide version used is the 1.8.16.

arduino-cmake-wrapper's People

Contributors

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