Jesse Vincent
810eaa3fef
move the explanation of cli parsing close to the actual code
4 years ago
Jesse Vincent
068e975acb
We only used md5sum for a diag message. So kill the dep
4 years ago
Jesse Vincent
340f16dc17
refactor to extract a couple config methods
4 years ago
Jesse Vincent
0823b816fd
remove "SOURCEDIR", a generic env variable we only used to mean pwd, right after setting it
4 years ago
Jesse Vincent
d3161c003e
Clean up logic for choosing where our arduino-cli comes from
4 years ago
Jesse Vincent
ee362308d8
Fixing some of our interim back-compat for old makefiles
4 years ago
Jesse Vincent
941ab0f7d6
Get rid of MCU variable
4 years ago
Jesse Vincent
2ba10574d4
Simplify defaulting of ARCH and FQBN
4 years ago
Jesse Vincent
809f367b32
update ARDUINO_VERBOSE
4 years ago
Jesse Vincent
16a78137a2
Remove unused AVR_GCC_PREFIX
4 years ago
Jesse Vincent
f9c523ac0f
misc shellcheck fixes
4 years ago
Jesse Vincent
fea85506ec
lift find_device_pid_vid to builder
4 years ago
Jesse Vincent
1f227a0d72
move get-arduino-pref out of the config file
4 years ago
Jesse Vincent
3c7a1312c1
Revert "remove obsolete? build-all target"
...
still need it for testing
This reverts commit 237d01df9e28c51bdccb3e1e123e3662d66dcdda.
4 years ago
Jesse Vincent
bb9de38354
remove obsolete? build-all target
4 years ago
Jesse Vincent
651d0bc5b4
remove obsolete compile-all target
4 years ago
Jesse Vincent
c6ff455c12
did I break the compiler path prop?
4 years ago
Jesse Vincent
54ee067758
Don't try to set BOARD_HARDWARE_PATH inside run-docker
4 years ago
Jesse Vincent
c375b8bf3f
remove a debugging echo
4 years ago
Jesse Vincent
f7995a6d9b
Remove local_LIBS which I believe to be obsolete
4 years ago
Jesse Vincent
64b989660c
turn ccache back on
4 years ago
Jesse Vincent
57a076b5e3
switch getting prefs to use arduino-cli instead of arudino-builder
4 years ago
Jesse Vincent
f74b87e2de
first pass at something that will actually run simulator tests, at least in docker
4 years ago
Jesse Vincent
ea0a0c3dd6
try a hacky workaround for the fact that arduino-cli doesn't seem to let us put doublequotes in build-props
4 years ago
Jesse Vincent
1b7ff0793b
ARDUINO_CFLAGS is, as far as I can tell, historical
4 years ago
Jesse Vincent
60ac839eb4
try another compiler.cpp.extra_flags line
4 years ago
Jesse Vincent
bb3465d102
do a better job of mirrroing our older config
4 years ago
Jesse Vincent
bca9ec9625
add debugging output for test
4 years ago
Jesse Vincent
bc66579214
don't force reinstall of our kaleidoscope core
4 years ago
Jesse Vincent
b3fed574d9
turn off default verbose in builder
4 years ago
Jesse Vincent
3bf986a8ab
slightly closer to building with -cli
4 years ago
Jesse Vincent
493a10b16e
switch which to command to make shellcheck happy
4 years ago
Jesse Vincent
912118e3c1
Start to be able to use the system arduino cli
4 years ago
Jesse Vincent
0b99c52178
don't package up arduino-cli when trying to run in docker
4 years ago
Jesse Vincent
f8c297d19b
Revert "remove a pair of obsolete make targets"
...
This reverts commit d33d61d5029d03ceb20e37a7930d694e04bcf720.
4 years ago
Jesse Vincent
a93361486b
remove build-all from docs
4 years ago
Jesse Vincent
98851c0728
move more of make clean out into the makefile, leaving the "make clean" target in builder so it works for sketches
4 years ago
Jesse Vincent
2104f4db78
remove a pair of obsolete make targets
4 years ago
Jesse Vincent
4c421277a7
make a comment in run-docker shellcheck friendlier
4 years ago
Jesse Vincent
b70b851321
Teach docker-run to run interactively or to be able to run from a non-interactive process like a git hook
...
Fixes #959
4 years ago
Michael Richters
26f4ef498a
Set BOARD_HARDWARE_PATH correctly for run-docker on macOS
...
Because ARDUINO_LOCAL_LIB_PATH was being set to a default value for other
operating systems before checking the OS version, it would never get set
correctly for macOS (unless it was already set externally). This change fixes
that problem so that it's no longer necessary to set BOARD_HARDWARE_PATH
externally when executing `run-docker`.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
5c0edd9b69
"make clean" needs to clear out build and output paths
...
It previously did not. Also, try -not- to clean out google test if the build dir doesn't even exist
4 years ago
Jesse Vincent
de45646c9d
extract out a variable for ARDUINO_BUILDER_TOOLS_PATH to make it easier to
...
get up and running on arch
4 years ago
Jesse Vincent
34b428c4a9
Simplify conditional building
4 years ago
Jesse Vincent
5bea41f630
reduce a bit of code duplication
4 years ago
Jesse Vincent
6e8d1d020a
Switch to a less verbose way to set defaults for environment variables
...
By reducing duplication, we improve readability and reduce errors
4 years ago
Jesse Vincent
a91c6a556e
refactor config file list to all be in one place
4 years ago
Jesse Vincent
25c8a8a180
Refactor the "SKETCH" environment variable and friends.
...
Functionality should be the same, but code should be clearer.
4 years ago
Jesse Vincent
e96902a9df
Switch from locally defining a "DIR" for every bin, to setting a global Kaleidoscope bin directory var
4 years ago
Jesse Vincent
660747c916
Rename ROOT to KALEIDOSCOPE_DIR, which is what it appears to actually be.
4 years ago
Jesse Vincent
ea0abc8833
inline a single-use cunction
4 years ago
Jesse Vincent
19f728ca56
lift find_bootloader_path' out of the config file into the program.
...
as it isn't something that's platform specific
'
4 years ago
Jesse Vincent
52a5265b9b
ROOT is defined automatically and not overridable. Remove the lines in the comments and docs
4 years ago
Jesse Vincent
12e59b8684
lift up BUILD_FILE_PATH to somewhere reusable.
4 years ago
Jesse Vincent
45bafe9bf5
SOURCEDIR was not actually used or honored. It was always set to pwd
4 years ago
Jesse Vincent
dfadd32400
Removeo outdated and unused 'LIBRARY' env variable
4 years ago
Jesse Vincent
a278efc21e
Absolute path to sized elf
4 years ago
Jesse Vincent
afc8388cd1
Move a bunch of makefile targets from the generic sketch makefile
4 years ago
Jesse Vincent
383a29d3e3
move run-tests out to the Makefile
4 years ago
Jesse Vincent
bbc84f6f33
move build-gtest-gmock into the Makefile
4 years ago
Jesse Vincent
1865e33426
Lift duplication of command to a var
4 years ago
Gergely Nagy
ba7b496af5
Rework our Docker config for performance
...
* never try to write anything to the host's disks
* read as little as possible from the host's disks
* keep source in ram
* cache build artifacts and intermediate content persistently
Most of these hacks are only necessary because Docker disk performance on macOS is...not performant
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Jesse Vincent
08bb9c5a14
Our previous conditional building was really wrong. It never built if any .hex existed.
...
This new version is still wrong, but less so. It at least checks the timestamp on the sketch
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Jesse Vincent
d7a45afdb5
Update the timestamp setting script ti make shellcheck happy
4 years ago
Jesse Vincent
6d00c6d7af
add "prepare-ccache" as a tool for travis
...
also bullet-proof setting up ccache against parallelization race conditions
4 years ago
Jesse Vincent
5774054d61
try to make shellcheck happy
4 years ago
Jesse Vincent
1b804a6d0f
make the timestmap-editor executable
4 years ago
Jesse Vincent
919f7753ff
We no longer need this, since we do it above. (But also, this was always a repeated call)
4 years ago
Jesse Vincent
d4a14fa7c9
expose the function that finds all the buildable sketches as "find_all_sketches"
4 years ago
Jesse Vincent
6bf70a2fdc
Don't strip out the path from the sketch before we can make use of it
4 years ago
Jesse Vincent
e378f9cd17
Switch find_sketch to set an env variable, rather than return a value, to reduce the number of times we need to call it. Also, begin to add better support for:
...
kaleidoscope-builder examples/Foo/Bar compile
4 years ago
Jesse Vincent
beb963d341
Add a tool to be able to set file timestamps to git commit dates.
...
This will eventually be used to help improve arduino caching behavior
4 years ago
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
Gergely Nagy
0f7ff140fc
docker: Simplify the Dockerfile a little
...
We can pass arguments to the entrypoint from the `docker run` commandline, so we
do not need to do that via an environment variable. This way, we're an
environment variable and an `eval` shorter.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
c743befb7f
Add a small tool, to run things within Docker
...
To make it easier to reproduce things, and to help build in a clean environment,
this adds a thin Dockerfile that has Arduino and arduino-cli pre-installed, and
- along with the `bin/run-docker` script - is set up so that one can easily run
arbitrary commands in the context of the current bundle and Kaleidoscope.
The first run will take a while, because docker will build the image. Subsequent
runs will use the cache.
To use: `bin/run-docker make`, for example. Any argument passed to the
`bin/run-docker` will be eval-ed within the container, and will run there.
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
Gergely Nagy
bbcdff6f67
Update the udev rules to tag devices as uaccess and seat
...
In order to be able to access the devices as the at-seat user, without having to
fiddle with distro-specific permissions and groups, we need to tag it both
`uaccess` and `seat`, and have the rule sorted before the one that applies
permissions based on these tags. As such, the file had to be renamed as well.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
66df8e9477
Rename the find-duplicate-cpp-files too to find-filename-conflicts
...
The new filename describes better what the tool does. Also adjusted the message
it writes, too.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
5 years ago
Gergely Nagy
f0334dcaa8
Add a small tool to find conflicting filenames
...
When building Kaleidoscope, the compiled object files are linked together into a
static archive. This static archive has a very simple structure, and only stores
filenames, not paths, not even relative ones. As such, we can't have files with
the same name, because they will conflict, and one will override the other.
To avoid this situation, this script will find all cpp source files (we don't
need to care about header-only things, those do not result in an object file),
and will comb through them to find conflicting filenames.
If a conflict is found, it will print all files that share the name, and will
exit with an error at the end. It does not exit at the first duplicate, but will
find and print all of them.
If no conflict is found, the script just prints its status message and exits
with zero.
This addresses the bulk of #850 .
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
5 years ago
Jason Koh
43526c4d92
Slightly updated probing logic based on Jason's code.
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Jason Koh
430b159913
Tweak location-based detection logic
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Jason Koh
b675ff2902
Make our hail-mary logic a little more flexible.
...
(Jason's original implementation just truncated the $sn, no matter
what. I modified it slightly.)
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 years ago
Jason Koh
94790f8db9
Make sure the macOS device prober only runs if you've supplied the required args
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
5 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
a4e99b8a34
hide the inevitable SystemProfiler warning
...
for some reason, this line shows up on stderr anytime I (or the
find-device-port script) run `system_profiler SPUSBDataType`
2020-02-24 23:19:14.656 system_profiler[23932:4118769] SPUSBDevice:
IOCreatePlugInInterfaceForService failed 0xe00002be
I got annoyed enough to suppress it, so I could see the other output
that I actually care about.
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
e5558eaf90
First pass at a device-independent find-device-port-macos
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