Jesse Vincent
8150eec669
Switch from naming our cache directories based on inode to naming them based on the absolute path, so we don't blow the cache 100% of the time on travis
4 years ago
Jesse Vincent
b9bca2cf7f
remove a bit of unused info from the compilation step reporting
4 years ago
Eric Paniagua
fad1b7e051
Add a googletest-based test harness & tests
...
This adds a googletest-based test harness (with googletest pulled into
`testing/googletest`, so we have a fixed state of it), and a few test
cases that demonstrate its use.
Original work by Eric Paniagua in #898 , with minor cleanups by Gergely
Nagy.
Signed-off-by: Eric Paniagua <epaniagua@google.com>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
57814671a5
kaleidoscope-builder: Support building lib-only variants of the sketch
...
Originally by Eric Paniagua <epaniagua@google.com>.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
352a3fe547
kaleidoscope-builder: Allow overriding CXX, CC, AR, etc
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
fff5dce199
kaleidoscope-builder: Whitespace cleanup
...
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Jesse Vincent
63fa886d9b
symlink generation for hex file with bootloader wasn't quite right. It added an extra output path
4 years ago
Jason Koh
476cbe1785
Add a new MANUAL_RESET feature to Kaleidoscope builder
...
Some devices, like those coming from QMK don't have an automated reset
feature
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Les Aker
e997d8c495
allow overriding filename paths
...
Signed-off-by: Les Aker <me@lesaker.org>
5 years ago
Andre Arko
c0163c83f2
make sure SKETCH_DIR is set before we use it
5 years ago
Andre Arko
0264e77396
bash warns on -gt, demanding two brackets
5 years ago
Andre Arko
bb00c27de1
maybe_bulid depends on filling the hex path first
5 years ago
Jesse Vincent
680aac9818
refactor kaleidoscope-builder to make shellcheck happy
5 years ago
Jesse Vincent
16b2404ab9
Attempt to simplify output of the build and flash process, along with
...
more verbose verbose output
5 years ago
Jesse Vincent
559d210eed
slightly tweak sleep times and reformat our avrdude command to flash the
...
keyboard
5 years ago
Jesse Vincent
9a41d1cfa9
Make avrdude more verbose to help make sure customers can tell whether
...
their keyboards got flashed
5 years ago
Jesse Vincent
56a9b60d27
On linux (and possibly other operating systems), detect when the
...
keyboard is in bootloader mode already and skip the prompt to get to
bootloader mode.
5 years ago
Jesse Vincent
1b117b9eb0
Extract the compilation step from the flashing preparation step
5 years ago
Jesse Vincent
09da0477d9
Fix typo in flashing message
5 years ago
Jesse Vincent
b2977894f9
Move the build instructions into the arduino boards.txt file
5 years ago
Florian Fleissner
1a721f190e
Moved build flags and C++ language version setting to platform.txt
...
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
5 years ago
Florian Fleissner
12876f9a90
Fixed builds on msys2
...
This adds some quotes to various paths used in Kaleidoscope's build system.
This fixes builds on msys2 that failed due to whitespaces in system paths.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
5 years ago
Jesse Vincent
bab32fcc9d
Shellcheck flags -n as a better replacement -f ! -z
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Florian Fleissner
c0e0ca1034
Enable compiler specification via env. var. CC/CXX
...
Many build systems allow C and C++ compilers to be specified
via environment variables C and CXX.
This commit enables this for kaleidoscope-builder.
Furtheron, on unixoid systems virtual builds are possible through a
command line similar to
CXX=<path to C++ compiler> C=<path to C compiler> ARCH=virtual make
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
5 years ago
Dan Bjorge
0462230060
Fix whitespace inconsistencies
...
Signed-off-by: Dan Bjorge <dan@dbjorge.net>
5 years ago
Dan Bjorge
d33bdf53e3
Add Windows+Cygwin support for kaleidoscope-builder
...
Signed-off-by: Dan Bjorge <dan@dbjorge.net>
5 years ago
Gergely Nagy
1672f55945
kaleidoscope-builder: Pull the bootloader file from boards.txt
...
Fixes #697 .
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
5 years ago
Jesse Vincent
d14405541a
Without the -built-in-libraries option passed in to arduino-builder, it
...
can't find ctags. Which suggests to me that it's doing a lot more than
just finding libraries
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Florian Fleissner
0ac7c191dc
Renamed virtual architecture "virtual"
...
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
5 years ago
Florian Fleissner
7326be589f
kaleidoscope-builder fixed for builds of virtual hardware
...
This commit induces the following changes:
bin/kaleidoscope-builder
* ccache dummy compiler and executables are now generated in a way
that allows using the same CCACHE_WRAPPER_PATH for virtual and
non-virtual builds
* virtual builds are now triggered by either specifying the full FQBN with x86
as architecture or by defining ARCH=x86
etc/kaleidoscope-builder.conf
* COMPILER_PREFIX and COMPILER_PATH are now determined (if not predefined)
based on ARCH or FQBN
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
5 years ago
Florian Fleissner
2cad17b07b
Fixed Kaleidoscope Builder for Arduino paths containing whitespaces
...
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
6 years ago
Jesse Vincent
01e3793d39
Add a 'compile-all target, so that smoke output can get to a single line
...
per sucessful compile
6 years ago
Jesse Vincent
8ab5aa52dd
Slightly tighten up compilation output so that the smoke output is more readable
6 years ago
Jesse Vincent
b8d4e90f23
realpath isn't installed by default on travis' vms AND it's not
...
necessary if we're looking up by inode
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
ab91a04142
More recent shellcheck doesn't like "which" for finding a binary
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
a6a23380ab
make shellcheck happy, maybe?
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
67d0c6bd73
shellcheck fixes
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
02faf0d842
Refactor our directory environment variables to make it easier to set a
...
global place to stash your compiled output
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
02635d691a
Use the sketch directory's inode as part of its unique id
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
8cdd058d9e
CCACHE_WRAPPER_DIR->CCACHE_WRAPPER_PATH
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
e9668d36ab
STABLE_TEMP_DIR to KALEIDOSCOPE_TEMP_PATH
...
1. Better matches other _PATH env variables
2. Since it's something that might reasonably get set in the
environment, prefix it with KALEIDOSCOPE
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
7b27d9e2f9
default STABLE_TEMP_DIR to $TMPDIR if it's available
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
a33d797310
shellcheck fixes
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
b4dd906294
Switch to stashing our build artifacts in the stable kaleidoscope temp dir, rather than the source dir
...
This is particularly important for in-kaleidoscope-tree artifacts like
the examples.
If we build the examples and move the compiled artifacts into the
Kaleidoscope tree, even under examples, it busts arduino's core
compilation cache, adding an extra 10s to the next compilation.
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
f87d7bce64
Initial implementation of ccache caching for builds
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
6e9ee55552
move sketches into a subdir
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
59bb9a63f8
Switch back to stable build paths to take advantage of Arduino's build caching
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
9e45f9e7b2
Enable use of the Arduino core cache, stashing our cached prebuilt cores in /tmp
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
2ec7f83073
Break out setting our build paths into its own function
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago
Jesse Vincent
38b4663f00
When building a sketch that's not in a git directory, don't die.
...
We only cared because we were trying to get a nice version number
That doesn't matter as much as being able to build at all
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
6 years ago