Merge pull request #936 from keyboardio/f/arduino-cli
Switch us over from arduino-builder to arduino-clipull/982/head
commit
780edea8b0
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
if ! git diff --exit-code; then
|
||||
>&2 echo "'make astyle' found code style differences. Please make astyle and commit your changes"
|
||||
exit 1;
|
||||
fi
|
||||
exit 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
ASTYLE_IGNORE_PATTERN='testing/googletest/'
|
||||
find ./* -type f \( -name '*.h' -o -name '*.cpp' -o -name '*.ino' \) | grep -v "$ASTYLE_IGNORE_PATTERN" | xargs -n 1 astyle -q --style=google --unpad-paren --pad-header --pad-oper --indent-classes --indent=spaces=2 --max-continuation-indent=80
|
@ -0,0 +1,48 @@
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
else
|
||||
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
@ -1,20 +1,24 @@
|
||||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
install -d /kaleidoscope/hardware/keyboardio \
|
||||
/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope \
|
||||
install -d /kaleidoscope/ \
|
||||
/kaleidoscope/.arduino/user/hardware/keyboardio \
|
||||
/kaleidoscope-persist/temp \
|
||||
/kaleidoscope-persist/ccache/cache
|
||||
|
||||
echo "Syncing the bundle..."
|
||||
tar xf /kaleidoscope-src/bundle.tar -C /kaleidoscope/hardware/keyboardio
|
||||
|
||||
echo "Syncing Kaleidoscope..."
|
||||
tar xf /kaleidoscope-src/kaleidoscope.tar -C /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
tar xf /kaleidoscope-src/kaleidoscope.tar -C /kaleidoscope/
|
||||
|
||||
echo "Syncing the bundle..."
|
||||
tar xf /kaleidoscope-src/bundle.tar -C /kaleidoscope/.arduino/user/hardware/keyboardio
|
||||
|
||||
rm -f /kaleidoscope/.arduino/user/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
ln -s /kaleidoscope /kaleidoscope/.arduino/user/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
|
||||
ln -s /kaleidoscope/hardware/keyboardio/virtual/libraries/Kaleidoscope \
|
||||
/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
|
||||
cd /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
cd /kaleidoscope/
|
||||
export ARDUINO_DIRECTORIES_DATA=/arduino-cli/data
|
||||
export KALEIDOSCOPE_CCACHE=1
|
||||
|
||||
/bin/bash -c "$*"
|
||||
|
@ -0,0 +1,4 @@
|
||||
// this is a dummy sketch that's just here so that we can get
|
||||
// arduino-cli to give us properties for our platform if we
|
||||
// don't have a sketch, like happens when building parts of the
|
||||
// simulator test infrastructure
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:keyboardio_atreus",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
ifeq ($(VERBOSE),)
|
||||
|
||||
ifeq ($(QUIET),)
|
||||
$(info Building in quiet mode. For a lot more informatiion, add 'VERBOSE=1' to the beginning of your call to $(MAKE))
|
||||
export QUIET = @
|
||||
endif
|
||||
|
||||
export ARDUINO_VERBOSE ?=
|
||||
else
|
||||
export ARDUINO_VERBOSE ?= --verbose
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# Build path config
|
||||
TMPDIR ?= /tmp
|
||||
|
||||
export KALEIDOSCOPE_DIR ?= $(abspath $(mkfile_dir)/../..)
|
||||
KALEIDOSCOPE_BIN_DIR ?= $(KALEIDOSCOPE_DIR)/bin
|
||||
KALEIDOSCOPE_ETC_DIR ?= $(KALEIDOSCOPE_DIR)/etc
|
||||
|
||||
KALEIDOSCOPE_TEMP_PATH ?= $(TMPDIR)/kaleidoscope-$(USER)
|
||||
KALEIDOSCOPE_BUILD_PATH ?= $(KALEIDOSCOPE_TEMP_PATH)/build
|
||||
KALEIDOSCOPE_OUTPUT_PATH ?= $(KALEIDOSCOPE_TEMP_PATH)/output
|
||||
|
||||
CORE_CACHE_PATH ?= $(KALEIDOSCOPE_TEMP_PATH)/arduino-cores
|
||||
|
||||
|
||||
ARDUINO_CONTENT ?= $(KALEIDOSCOPE_DIR)/.arduino
|
||||
export ARDUINO_DIRECTORIES_DATA ?= $(ARDUINO_CONTENT)/data
|
||||
export ARDUINO_DIRECTORIES_DOWNLOADS ?= $(ARDUINO_CONTENT)/downloads
|
||||
export ARDUINO_CLI_CONFIG ?= $(ARDUINO_DIRECTORIES_DATA)/arduino-cli.yaml
|
||||
export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS ?= https://raw.githubusercontent.com/keyboardio/boardsmanager/master/package_keyboardio_index.json
|
||||
|
||||
# If it looks like Kaleidoscope is inside a "traditional" Arduino hardware directory
|
||||
# in the user's homedir, let's use that.
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
traditional_path = $(HOME)/Documents/Arduino/
|
||||
else
|
||||
traditional_path = $(HOME)/Arduino/
|
||||
endif
|
||||
|
||||
# use realpath to compare the real absolute path of the kaleidoscope dir
|
||||
# and the arduino bundle, even if they're symlinked into the Arudino/hardware dir
|
||||
ifeq ($(realpath $(traditional_path)/hardware/keyboardio/avr/libraries/Kaleidoscope), $(realpath $(KALEIDOSCOPE_DIR)))
|
||||
export ARDUINO_DIRECTORIES_USER ?= $(traditional_path)
|
||||
endif
|
||||
# Otherwise, use the arduino-cli bundle
|
||||
export ARDUINO_DIRECTORIES_USER ?= $(ARDUINO_CONTENT)/user
|
||||
|
||||
# If we're not calling setup, we should freak out if the hardware
|
||||
# definitions don't exist
|
||||
|
||||
ifneq ($(MAKECMDGOALS),setup)
|
||||
|
||||
ifeq ($(wildcard $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/boards.txt),)
|
||||
|
||||
$(info Kaleidoscope hardware definitions not found in)
|
||||
$(info $(ARDUINO_DIRECTORIES_USER))
|
||||
$(info )
|
||||
$(info You may be able to resolve this issue by running the following command)
|
||||
$(info to initialize Kaleidoscope )
|
||||
$(info )
|
||||
$(info $(MAKE) -C $(KALEIDOSCOPE_DIR) setup )
|
||||
$(info )
|
||||
$(error )
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
system_arduino_cli=$(shell command -v arduino-cli || true)
|
||||
|
||||
arduino_env = ARDUINO_DIRECTORIES_USER=$(ARDUINO_DIRECTORIES_USER) \
|
||||
ARDUINO_DIRECTORIES_DATA=$(ARDUINO_DIRECTORIES_DATA)
|
||||
|
||||
ifeq ($(system_arduino_cli),)
|
||||
export ARDUINO_CLI_PATH ?= $(KALEIDOSCOPE_BIN_DIR)/arduino-cli
|
||||
else
|
||||
export ARDUINO_CLI_PATH ?= $(system_arduino_cli)
|
||||
endif
|
||||
|
||||
|
||||
export ARDUINO_CLI ?= $(arduino_env) $(ARDUINO_CLI_PATH)
|
||||
|
||||
ifneq ($(VERBOSE),)
|
||||
$(info Using ardino-cli from $(ARDUINO_CLI_PATH))
|
||||
endif
|
||||
|
||||
ifneq ($(FQBN),)
|
||||
fqbn_arg = --fqbn $(FQBN)
|
||||
endif
|
||||
|
||||
# if we don't have a sketch, make a pretend one so we can run --show properties
|
||||
# This is because arduino-cli doesn't currently allow us to get props with
|
||||
# just an FQBN. We've filed a bug with them
|
||||
ifeq ($(SKETCH_FILE_PATH),)
|
||||
_arduino_props_sketch_arg = $(KALEIDOSCOPE_ETC_DIR)/dummy-sketch/
|
||||
else
|
||||
_arduino_props_sketch_arg = $(SKETCH_FILE_PATH)
|
||||
endif
|
||||
|
||||
# This is horrible. But because make doesn't really support
|
||||
# multi-line variables and we want to cache the full
|
||||
# _arduino_props in a variable, which means letting make
|
||||
# split the properties on space, which is what it converts
|
||||
# newlines into. To make this go, we we need to replace interior
|
||||
# spaces in the variables with something. We chose the fire
|
||||
# emoji, since it accurately represents our feelings on this
|
||||
# state of affairs. Later, when finding props, we need to reverse
|
||||
# this process, turning fire into space.
|
||||
_arduino_props := $(shell ${ARDUINO_CLI} compile $(fqbn_arg) --show-properties "$(_arduino_props_sketch_arg)"|perl -p -e"s/ /🔥/g")
|
||||
|
||||
_arduino_prop = $(subst $1=,,$(subst 🔥, ,$(filter $1=%,$(_arduino_props))))
|
||||
|
||||
# How to use_arduino_prop
|
||||
# $(call _arduino_prop,recipe.hooks.sketch.prebuild.2.pattern)
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_CCACHE),)
|
||||
ccache_wrapper_property := --build-properties "compiler.wrapper.cmd=ccache"
|
||||
endif
|
||||
|
||||
.PHONY: configure-arduino-cli install-arduino-core-kaleidoscope install-arduino-core-avr
|
||||
.PHONY: stupid-workaround-for-make-inclusion-semantics
|
||||
|
||||
stupid-workaround-for-make-inclusion-semantics: DEFAULT_GOAL
|
||||
@: # This is here so that the sketch makefile including this file doesn't
|
||||
@: # default to arduino-cli installation as its priamry target
|
||||
|
||||
$(KALEIDOSCOPE_BIN_DIR)/arduino-cli:
|
||||
$(QUIET) curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$(KALEIDOSCOPE_BIN_DIR)" sh
|
||||
|
||||
install-arduino-cli: $(KALEIDOSCOPE_BIN_DIR)/arduino-cli
|
||||
|
||||
configure-arduino-cli:
|
||||
$(QUIET) $(ARDUINO_CLI) config init
|
||||
|
||||
install-arduino-core-kaleidoscope:
|
||||
$(QUIET) $(ARDUINO_CLI) core install "keyboardio:avr"
|
||||
|
||||
install-arduino-core-avr:
|
||||
$(QUIET) $(ARDUINO_CLI) core install "arduino:avr"
|
||||
|
@ -0,0 +1,211 @@
|
||||
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
# If the sketch is defined
|
||||
ifneq ($(SKETCH),)
|
||||
# If the sketch isn't a directory, we want to get the directory the sketch is in
|
||||
ifeq ($(wildcard $(SKETCH)/.),)
|
||||
SKETCH_DIR := $(dir $(SKETCH))
|
||||
endif
|
||||
else
|
||||
# If the sketch wasn't defined as we came in, assume the current directory
|
||||
# is where we're looking
|
||||
SKETCH_DIR := $(realpath $(CURDIR))
|
||||
endif
|
||||
|
||||
SKETCH_BASE_NAME := $(notdir $(SKETCH_DIR))
|
||||
SKETCH_FILE_NAME := $(addsuffix .ino, $(SKETCH_BASE_NAME))
|
||||
|
||||
# Find the path of the sketch file
|
||||
SKETCH_DIR_CANDIDATES = $(sketch_dir) src/ .
|
||||
sketch_exists_p = $(realpath $(wildcard $(dir)/$(SKETCH_FILE_NAME)))
|
||||
SKETCH_FILE_PATH := $(firstword $(foreach dir,$(SKETCH_DIR_CANDIDATES),$(sketch_exists_p)))
|
||||
|
||||
include $(mkfile_dir)/arduino-cli.mk
|
||||
|
||||
ifeq ($(FQBN),)
|
||||
export FQBN = $(call _arduino_prop,build.fqbn)
|
||||
ifneq ($(VERBOSE),)
|
||||
$(info Arduino provided FQBN $(call _arduino_prop,build.fqbn))
|
||||
endif
|
||||
endif
|
||||
|
||||
# We -could- check to see if sketch-dir is in git before running this command
|
||||
# but since we'd just return an empty value in that case, why bother?
|
||||
GIT_VERSION := $(shell git -C "$(SKETCH_DIR)" describe --abbrev=6 --dirty --alway 2>/dev/null || echo 'unknown')
|
||||
|
||||
SKETCH_IDENTIFIER ?= $(shell echo "${SKETCH_FILE_PATH}" | cksum | cut -d ' ' -f 1)-$(SKETCH_FILE_NAME)
|
||||
|
||||
|
||||
BUILD_PATH ?= $(KALEIDOSCOPE_BUILD_PATH)/$(SKETCH_IDENTIFIER)
|
||||
OUTPUT_PATH ?= $(KALEIDOSCOPE_OUTPUT_PATH)/$(SKETCH_IDENTIFIER)
|
||||
|
||||
|
||||
OUTPUT_FILE_PREFIX := $(SKETCH_BASE_NAME)-$(GIT_VERSION)
|
||||
HEX_FILE_PATH := $(OUTPUT_PATH)/$(OUTPUT_FILE_PREFIX).hex
|
||||
HEX_FILE_WITH_BOOTLOADER_PATH := $(OUTPUT_PATH)/$(OUTPUT_FILE_PREFIX)-with-bootloader.hex
|
||||
ELF_FILE_PATH := $(OUTPUT_PATH)/$(OUTPUT_FILE_PREFIX).elf
|
||||
LIB_FILE_PATH := $(OUTPUT_PATH)/$(OUTPUT_FILE_PREFIX).a
|
||||
|
||||
|
||||
KALEIDOSCOPE_PLATFORM_LIB_DIR := $(abspath $(KALEIDOSCOPE_DIR)/..)
|
||||
|
||||
|
||||
|
||||
|
||||
ifeq ($(FQBN),)
|
||||
possible_fqbns = $(shell $(ARDUINO_CLI) board list --format=json |grep FQBN| grep -v "keyboardio:virtual"|cut -d: -f 2-)
|
||||
|
||||
possible_fqbn = $(firstword $(possible_fqbns))
|
||||
|
||||
$(info *************************************************************** )
|
||||
$(info )
|
||||
$(info Arduino couldn't figure out what kind of device this sketch )
|
||||
$(info is for. Usually, Arduino looks in a file called `sketch.json` )
|
||||
$(info to figure this out. )
|
||||
ifneq ($(possible_fqbn),)
|
||||
|
||||
fake_var_to_run_shell := $(shell $(ARDUINO_CLI) board attach $(possible_fqbn))
|
||||
|
||||
$(info )
|
||||
$(info I have detected a connected device supported by Kaleidoscope and)
|
||||
$(info attepted to automatically resolve this issue by running the)
|
||||
$(info following command:)
|
||||
$(info )
|
||||
$(info $(ARDUINO_CLI) board attach $(possible_fqbn))
|
||||
$(info )
|
||||
$(info If the build fails or $(possible_fqbn) doesn't)
|
||||
$(info look like your keyboard, you may need to manually edit your)
|
||||
$(info `sketch.json` file or run )
|
||||
$(info )
|
||||
$(info $(ARDUINO_CLI) board attach )
|
||||
$(info )
|
||||
$(info manually, specifying the FQBN for your keyboard. )
|
||||
$(info )
|
||||
$(info *************************************************************** )
|
||||
|
||||
else
|
||||
|
||||
$(info )
|
||||
$(info I'm unable to detect your keyboard, you may need to manually )
|
||||
$(info edit your `sketch.json` file or run )
|
||||
$(info )
|
||||
$(info $(ARDUINO_CLI) board attach )
|
||||
$(info )
|
||||
$(info manually, specifying the FQBN for your keyboard. )
|
||||
$(info )
|
||||
$(info *************************************************************** )
|
||||
$(error )
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Flashing related config
|
||||
ifneq ($(FQBN),)
|
||||
KALEIDOSCOPE_DEVICE_PORT ?= $(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1)
|
||||
endif
|
||||
|
||||
flashing_instructions := $(shell printf $(call _arduino_prop,build.flashing_instructions))
|
||||
ifeq ($(flashing_instructions),)
|
||||
flashing_instruction := "If your keyboard needs you to do something to put it in flashing mode, do that now."
|
||||
endif
|
||||
|
||||
DEFAULT_GOAL: compile
|
||||
|
||||
|
||||
#$(SKETCH_FILE_PATH):
|
||||
# @: # dummy recipe for the sketch file
|
||||
|
||||
|
||||
.PHONY: compile configure-arduino-cli install-arduino-core-kaleidoscope install-arduino-core-avr
|
||||
.PHONY: disassemble decompile size-map flash clean all test
|
||||
|
||||
all: compile
|
||||
@: ## Do not remove this line, otherwise `make all` will trigger the `%` rule too.
|
||||
|
||||
|
||||
disassemble: ${ELF_FILE_PATH}
|
||||
$(call _arduino_prop,compiler.objdump.cmd) \
|
||||
$(call _arduino_prop,compiler.objdump.flags) \
|
||||
"${ELF_FILE_PATH}"
|
||||
|
||||
size-map: ${ELF_FILE_PATH}
|
||||
$(call _arduino_prop,compiler.size-map.cmd) \
|
||||
$(call _arduino_prop,compiler.size-map.flags) \
|
||||
"${ELF_FILE_PATH}"
|
||||
|
||||
flash: ${HEX_FILE_PATH}
|
||||
|
||||
${ELF_FILE_PATH}: compile
|
||||
${HEX_FILE_PATH}: compile
|
||||
|
||||
|
||||
BOOTLOADER_PATH := $(call _arduino_prop,runtime.platform.path)/bootloaders/$(call _arduino_prop,bootloader.file)
|
||||
|
||||
hex-with-bootloader: ${HEX_FILE_PATH}
|
||||
$(QUIET) awk '/^:00000001FF/ == 0' "${HEX_FILE_PATH}" >"${HEX_FILE_WITH_BOOTLOADER_PATH}"
|
||||
$(QUIET) cat "${BOOTLOADER_PATH}" >>"${HEX_FILE_WITH_BOOTLOADER_PATH}"
|
||||
$(QUIET) ln -sf -- "${OUTPUT_FILE_PREFIX}-with-bootloader.hex" "${OUTPUT_PATH}/${SKETCH_BASE_NAME}-latest-with-bootloader.hex"
|
||||
$(info Combined firmware and bootloader are now at)
|
||||
$(info ${HEX_FILE_WITH_BOOTLOADER_PATH})
|
||||
$(info )
|
||||
$(info Make sure you have the bootloader version you expect.)
|
||||
$(info )
|
||||
$(info )
|
||||
$(info And TEST THIS ON REAL HARDWARE BEFORE YOU GIVE IT TO ANYONE.)
|
||||
|
||||
clean:
|
||||
$(QUIET) rm -rf -- "${OUTPUT_PATH}"/*
|
||||
|
||||
|
||||
ifneq ($(LOCAL_CFLAGS),)
|
||||
local_cflags_property = --build-properties "compiler.cpp.extra_flags=${LOCAL_CFLAGS}"
|
||||
else
|
||||
local_cflags_property =
|
||||
endif
|
||||
|
||||
compile:
|
||||
$(QUIET) install -d "${OUTPUT_PATH}"
|
||||
$(QUIET) $(ARDUINO_CLI) compile --fqbn "${FQBN}" ${ARDUINO_VERBOSE} --warnings all ${ccache_wrapper_property} ${local_cflags_property} \
|
||||
--libraries "${KALEIDOSCOPE_PLATFORM_LIB_DIR}" \
|
||||
--build-path "${BUILD_PATH}" \
|
||||
--output-dir "${OUTPUT_PATH}" \
|
||||
--build-cache-path "${CORE_CACHE_PATH}" \
|
||||
"${SKETCH_FILE_PATH}"
|
||||
ifeq ($(LIBONLY),)
|
||||
$(QUIET) cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.hex" "${HEX_FILE_PATH}"
|
||||
$(QUIET) cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.elf" "${ELF_FILE_PATH}"
|
||||
$(QUIET) ln -sf "${OUTPUT_FILE_PREFIX}.hex" "${OUTPUT_PATH}/${SKETCH_BASE_NAME}-latest.hex"
|
||||
$(QUIET) ln -sf "${OUTPUT_FILE_PREFIX}.elf" "${OUTPUT_PATH}/${SKETCH_BASE_NAME}-latest.elf"
|
||||
else
|
||||
$(QUIET) cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.a" "${LIB_FILE_PATH}"
|
||||
$(QUIET) ln -sf "${OUTPUT_FILE_PREFIX}.a" "${OUTPUT_PATH}/${SKETCH_BASE_NAME}-latest.a"
|
||||
endif
|
||||
ifneq ($(VERBOSE),)
|
||||
$(info Build artifacts can be found in ${BUILD_PATH})
|
||||
endif
|
||||
|
||||
#TODO (arduino team) I'd love to do this with their json output
|
||||
#but it's short some of the data we kind of need
|
||||
|
||||
flash:
|
||||
ifeq ($(KALEIDOSCOPE_DEVICE_PORT),)
|
||||
$(info ERROR: Unable to detect keyboard serial port.)
|
||||
$(info )
|
||||
$(info Arduino should autodetect it, but you could also set )
|
||||
$(info KALEIDOSCOPE_DEVICE_PORt to your keyboard's serial port.)
|
||||
$(info )
|
||||
$(error )
|
||||
endif
|
||||
$(info $(flashing_instructions))
|
||||
$(info )
|
||||
$(info When you're ready to proceed, press 'Enter'.)
|
||||
$(info )
|
||||
@$(shell read)
|
||||
$(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \
|
||||
--input-dir "${OUTPUT_PATH}" \
|
||||
--port $(KALEIDOSCOPE_DEVICE_PORT) $(ARDUINO_VERBOSE)
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
flash_over_usb() {
|
||||
sleep 1s
|
||||
|
||||
echo "Please reset your keyboard!"
|
||||
teensy_loader_cli --mcu "${MCU}" -w "${HEX_FILE_PATH}"
|
||||
}
|
||||
|
||||
flash () {
|
||||
prepare_to_flash
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${preFlash_HOOKS}
|
||||
|
||||
flash_over_usb || flash_over_usb
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${postFlash_HOOKS}
|
||||
}
|
||||
|
||||
NO_RESET=1
|
||||
DEFAULT_SKETCH="ErgoDox"
|
||||
BOARD="ergodox"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:ergodox",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
flash_over_usb() {
|
||||
sleep 1s
|
||||
|
||||
dfu-programmer ${MCU} erase
|
||||
dfu-programmer ${MCU} flash "${HEX_FILE_PATH}"
|
||||
dfu-programmer ${MCU} start
|
||||
}
|
||||
|
||||
flash () {
|
||||
prepare_to_flash
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${preFlash_HOOKS}
|
||||
|
||||
flash_over_usb || flash_over_usb
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${postFlash_HOOKS}
|
||||
}
|
||||
|
||||
NO_RESET=1
|
||||
|
||||
DEFAULT_SKETCH="KBD4x"
|
||||
BOARD="kbd4x"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:kbd4x",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,56 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info )
|
||||
$(info or)
|
||||
else
|
||||
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:keyboardio_atreus",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
BOARD="keyboardio_imago"
|
||||
SKETCH="Imago"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:keyboardio_imago",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,71 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
endif
|
||||
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
|
||||
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
endif
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
ifneq ("$(wildcard $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk)","")
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
else
|
||||
|
||||
$(info ****************************************************************************)
|
||||
$(info I can't find an installed copy of Kaleidoscope's source code.)
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info This usually means you're attempting to build a device's firmware from a git)
|
||||
$(info checkout without having previously told Arduino where to find Kaleidoscope.)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info It is probably the case that you want to move or symlink your git checkout )
|
||||
$(info of the Kaleidoscope bundle to the directory: )
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio )
|
||||
$(info ****************************************************************************)
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
DEFAULT_SKETCH="Planck"
|
||||
BOARD="planck"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:planck",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
flash_over_usb() {
|
||||
sleep 1s
|
||||
|
||||
dfu-programmer ${MCU} erase
|
||||
dfu-programmer ${MCU} flash "${HEX_FILE_PATH}"
|
||||
dfu-programmer ${MCU} start
|
||||
}
|
||||
|
||||
flash () {
|
||||
prepare_to_flash
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${preFlash_HOOKS}
|
||||
|
||||
flash_over_usb || flash_over_usb
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${postFlash_HOOKS}
|
||||
}
|
||||
|
||||
NO_RESET=1
|
||||
DEFAULT_SKETCH="Splitography"
|
||||
BOARD="splitography"
|
@ -1,52 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info or)
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:splitography",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
flash_over_usb() {
|
||||
sleep 1s
|
||||
|
||||
echo "Please reset your keyboard!"
|
||||
teensy_loader_cli --mcu "${MCU}" -w "${HEX_FILE_PATH}"
|
||||
}
|
||||
|
||||
flash () {
|
||||
prepare_to_flash
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${preFlash_HOOKS}
|
||||
|
||||
flash_over_usb || flash_over_usb
|
||||
|
||||
# This is defined in the (optional) user config.
|
||||
# shellcheck disable=SC2154
|
||||
${postFlash_HOOKS}
|
||||
}
|
||||
|
||||
NO_RESET=1
|
||||
DEFAULT_SKETCH="Atreus"
|
||||
BOARD="atreus"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:atreus",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
DEFAULT_SKETCH="ButterStick"
|
||||
BOARD="gheavy_butterstick"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:gheavy_butterstick",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
DEFAULT_SKETCH="FaunchPad"
|
||||
BOARD="gheavy_faunchpad"
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:gheavy_faunchpad",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,55 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope example pulls in all the targets
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
else
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
|
||||
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cpu": {
|
||||
"fqbn": "keyboardio:avr:model01",
|
||||
"port": ""
|
||||
}
|
||||
}
|
@ -1,5 +1,2 @@
|
||||
**/bin/
|
||||
**/lib/
|
||||
**/obj/
|
||||
/googletest/googletest/generated/
|
||||
/googletest/build/
|
@ -1,73 +1,48 @@
|
||||
# This stub makefile for a Kaleidoscope plugin pulls in
|
||||
# all targets from the Kaleidoscope-Plugin library
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
|
||||
else
|
||||
SKETCHBOOK_DIR ?= $(HOME)/Arduino
|
||||
PACKAGE_DIR ?= $(HOME)/.arduino15
|
||||
endif
|
||||
|
||||
|
||||
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
|
||||
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
|
||||
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||||
# required to build the example
|
||||
|
||||
|
||||
|
||||
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
|
||||
|
||||
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
|
||||
|
||||
$(info ***************************************************************************)
|
||||
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
|
||||
$(info installed using Arduino's "Board Manager", while the other was installed by)
|
||||
$(info hand, probably using "git".)
|
||||
$(info )
|
||||
$(info This will likely cause some trouble as you try to build keyboard firmware)
|
||||
$(info using Kaleidoscope. You may want to remove either: )
|
||||
$(info )
|
||||
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
|
||||
$(info )
|
||||
$(info or)
|
||||
$(info )
|
||||
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
|
||||
$(info )
|
||||
$(info ***************************************************************************)
|
||||
$(info )
|
||||
ifneq ($(KALEIDOSCOPE_DIR),)
|
||||
search_path += $(KALEIDOSCOPE_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||||
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
|
||||
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
else
|
||||
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||||
endif
|
||||
|
||||
sketch_makefile := etc/makefiles/sketch.mk
|
||||
|
||||
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||||
|
||||
endif
|
||||
ifneq ($(ks_dir),)
|
||||
|
||||
$(info Using Kaleidoscope from $(ks_dir))
|
||||
|
||||
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
|
||||
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/build-tools/makefiles/
|
||||
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||||
include $(ks_dir)/$(sketch_makefile)
|
||||
|
||||
# If Kaleidoscope's Arduino libraries cannot be found, e.g. because
|
||||
# they reside outside of SKETCHBOOK_DIR, we fall back to assuming that
|
||||
# the hardware directory can be determined in relation to the position of
|
||||
# this Makefile.
|
||||
ifeq ("$(wildcard $(BOARD_HARDWARE_PATH)/keyboardio/build-tools/makefiles/rules.mk)","")
|
||||
# Determine the path of this Makefile
|
||||
MKFILE_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
BOARD_HARDWARE_PATH = $(MKFILE_DIR)/../../../../../..
|
||||
endif
|
||||
else
|
||||
|
||||
ifeq ("$(wildcard $(BOARD_HARDWARE_PATH)/keyboardio/build-tools/makefiles/rules.mk)","")
|
||||
$(info ***************************************************************************)
|
||||
$(info Unable to autodetect a proper BOARD_HARDWARE_PATH. Please define it manually.)
|
||||
$(info ***************************************************************************)
|
||||
$(info I can't find your Kaleidoscope installation.)
|
||||
$(info )
|
||||
$(info I tried looking in:)
|
||||
$(info )
|
||||
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||||
$(info )
|
||||
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||||
$(info variable to the location of your Kaleidoscope directory.)
|
||||
|
||||
endif
|
||||
|
||||
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk
|
||||
|
||||
null-target:
|
||||
$(info You should never see this message)
|
||||
@:
|
||||
|
@ -1,51 +1,41 @@
|
||||
top_dir := $(dir $(lastword ${MAKEFILE_LIST}))../..
|
||||
build_dir := ${top_dir}/_build
|
||||
mkfile_dir := $(dir $(lastword ${MAKEFILE_LIST}))
|
||||
top_dir := $(abspath $(mkfile_dir)../..)
|
||||
|
||||
ifndef BOARD_HARDWARE_PATH
|
||||
bundle_path = ${top_dir}/..
|
||||
else
|
||||
bundle_path = ${BOARD_HARDWARE_PATH}/keyboardio/avr/libraries
|
||||
endif
|
||||
include $(mkfile_dir)/shared.mk
|
||||
|
||||
|
||||
build_dir := ${top_dir}/_build
|
||||
|
||||
LIB_DIR := ${build_dir}/lib
|
||||
OBJ_DIR := ${build_dir}/obj
|
||||
|
||||
CXX_FILES := $(wildcard ${top_dir}/testing/*.cpp)
|
||||
H_FILES := $(wildcard ${top_dir}/testing/*.h)
|
||||
CXX_FILES := $(sort $(wildcard ${top_dir}/testing/*.cpp))
|
||||
H_FILES := $(sort $(wildcard ${top_dir}/testing/*.h))
|
||||
BARE_CXX_FILES := $(foreach path,${CXX_FILES},$(notdir ${path}))
|
||||
OBJ_FILES := $(patsubst %.cpp,${OBJ_DIR}/%.o,$(BARE_CXX_FILES))
|
||||
LIB_FILE := libcommon.a
|
||||
|
||||
ifneq ($(KALEIDOSCOPE_CCACHE),)
|
||||
COMPILER_WRAPPER := ccache
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
|
||||
DEFAULT_GOAL: all
|
||||
|
||||
all: ${OBJ_FILES} ${LIB_DIR}/${LIB_FILE}
|
||||
|
||||
${LIB_DIR}/${LIB_FILE}: ${OBJ_FILES}
|
||||
@install -d "${LIB_DIR}"
|
||||
ar rcs "${LIB_DIR}/${LIB_FILE}" ${OBJ_FILES}
|
||||
$(QUIET) install -d "${LIB_DIR}"
|
||||
$(QUIET) $(call _arduino_prop,compiler.ar.cmd) $(call _arduino_prop,compiler.ar.flags) "${LIB_DIR}/${LIB_FILE}" ${OBJ_FILES}
|
||||
|
||||
${OBJ_DIR}/%.o: ${top_dir}/testing/%.cpp ${H_FILES}
|
||||
@echo "compile $@"
|
||||
@install -d "${OBJ_DIR}"
|
||||
g++ -o "$@" -c \
|
||||
-std=c++14 \
|
||||
-I${top_dir} \
|
||||
-I${top_dir}/src \
|
||||
-I${bundle_path}/../../virtual/cores/arduino \
|
||||
-I${bundle_path}/Kaleidoscope-HIDAdaptor-KeyboardioHID/src \
|
||||
-I${bundle_path}/KeyboardioHID/src \
|
||||
-I${top_dir}/testing/googletest/googlemock/include \
|
||||
-I${top_dir}/testing/googletest/googletest/include \
|
||||
-DARDUINO=10607 \
|
||||
-DARDUINO_ARCH_VIRTUAL \
|
||||
-DARDUINO_AVR_MODEL01 \
|
||||
'-DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h"' \
|
||||
-DKALEIDOSCOPE_VIRTUAL_BUILD=1 \
|
||||
-DKEYBOARDIOHID_BUILD_WITHOUT_HID=1 \
|
||||
-DUSBCON=dummy \
|
||||
-DARDUINO_ARCH_AVR=1 \
|
||||
'-DUSB_PRODUCT="Model 01"' \
|
||||
$<
|
||||
$(info compile $@)
|
||||
$(QUIET) install -d "${OBJ_DIR}"
|
||||
$(QUIET) $(COMPILER_WRAPPER) $(call _arduino_prop,compiler.cpp.cmd) -o "$@" -c -std=c++14 ${shared_includes} ${shared_defines} $<
|
||||
|
||||
clean:
|
||||
rm -rf "${build_dir}"
|
||||
$(QUIET) rm -rf -- "${build_dir}"
|
||||
|
||||
include $(top_dir)/etc/makefiles/arduino-cli.mk
|
||||
|
@ -0,0 +1,21 @@
|
||||
arduino_platform_path := ${ARDUINO_DIRECTORIES_USER}/hardware/keyboardio/virtual/
|
||||
|
||||
shared_defines := \
|
||||
-DARDUINO=10607 \
|
||||
-DARDUINO_ARCH_VIRTUAL \
|
||||
-DKALEIDOSCOPE_VIRTUAL_BUILD=1 \
|
||||
-DKEYBOARDIOHID_BUILD_WITHOUT_HID=1 \
|
||||
-DUSBCON=dummy \
|
||||
-DARDUINO_ARCH_AVR=1 \
|
||||
-DARDUINO_AVR_MODEL01 \
|
||||
'-DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h"' \
|
||||
'-DUSB_PRODUCT="Model 01"'
|
||||
|
||||
shared_includes := \
|
||||
-I${top_dir} \
|
||||
-I${top_dir}/src \
|
||||
-I${arduino_platform_path}/cores/arduino \
|
||||
-I${arduino_platform_path}/libraries/KeyboardioHID/src \
|
||||
-I${top_dir}/testing/googletest/googlemock/include \
|
||||
-I${top_dir}/testing/googletest/googletest/include \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue