Skip to content

maxbader/Arduino-CMake-Template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino-CMake-Template

Starting point for Arduino development using CMake #Thanks

#Install

  • Install at least the Arduino IDE 1.6.5
    • File > Preferences > Show verbose output --> activate compilation and upload
  • For Arduino UNO
    • Check the verbose ouput and remember the path to
    • avr-gcc
    • avr-g++
    • avr-objcopy
    • avrdude
    • update the script/arduino_uno.cmake
  • For Arduino M0/M0pro/Zero
    • Check the verbose ouput and remember the path to
    • arm-none-eabi-gcc
    • arm-none-eabi-g++
    • openocd
    • flash_with_bootloader.ld
    • arm-none-eabi-objcopy
    • update the script/arduino_m0plus.cmake

#Usage

  1. Check the project root CMakeList.txt
    • include(${CMAKE_SOURCE_DIR}/scripts/arduino_m0plus.cmake or
    • include(${CMAKE_SOURCE_DIR}/scripts/arduino_uno.cmake
  2. Compile a demo
mkdir build
cd build
cmake ..
make demo_blink.upload # to upload compile, link and upload
make demo_flash.upload # to upload compile, link and upload

New cmake targets can be added by using the arduino macro.

#Updates

##2015-09-05 Markus Bader

  • Tested with Ardunio Zero
  • arduino macros added

##2015-08-20 Markus Bader

  • Works with Arduino IDE 1.6.5
  • Tested with Ardunio UNO

About

Starting point for Arduino development using CMake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 94.4%
  • C++ 4.8%
  • C 0.8%