queezythegreat / arduino-cmake

Arduino CMake Build system
645 stars 216 forks source link

Mixing boards #153

Open galou opened 8 years ago

galou commented 8 years ago

I try to compile firmwares for different boards in the same CMakeLists.txt. Here is an excerpt of it:

register_hardware_platform(/home/gael/sketchbook/hardware/arbotix)
set(ARDUINO_DEFAULT_BOARD arbotix)
generate_arduino_firmware(commander
  SKETCH commander
  BOARD atmega328
  )

The compilation (make commander) fails with the following error:

/home/gael/sketchbook/hardware/arbotix/variants/standard/pins_arduino.h:105:14: error: ‘DDRA’ undeclared here

What disturbs me, is that the included pins_arduino.h is taken from the arbotix hardware, not the arduino one.