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>
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>
* Uses usbconfig to determine the Model 01's USB modem port.
* Works around incompatibe avrsize flags.
You need to be able to run usbconfig to flash the firmware from the
buildtools. This can be accomplished with appropriate groups and devfs
rules.
Requires gmake, perl, avrdude, and (probably) arduino18 from ports.
The version of avrdude in ports uses an avr-size command that doesn't
understand the -C or --mcu flags. From what I can tell, these flags
are uneccessary, as the size computed with them is the same as what
you get from adding up the appropriate segments from the standard
output of avr-size without any flags. However, since the size is only
informative, I've opted to simply check to see if the command
succeeded, and if not, output a string saying it could not be.
It would probably be better to:
* Determine appropriate flags based on build tools, or,
* Just not use the flags at all, and grab the .text, etc., segment
sizes from the standard output and add them up via `dc` for
display.
I've been using this toolchain to build successfully on FreeBSD 12 for
the Model 01 without issue. It should work with earlier versions of
FreeBSD as well.
Signed-off-by: Brian Cully <bjc@kublai.com>
We already support bootloaders that have the same vendor ID as the keyboard, but
a different product ID. We should also support bootloaders that have a different
vendor ID too.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
With the Atreus, we have a board that has a different max upload size depending
on what MCU is used. Until we figure out how to properly support that in the CLI
builder, default to using the first value. That's a reasonable approximation in
most cases.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Instead of hardcoding the max program size, pick it out of boards.txt, like we
pick the device VID and PID.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
7bd2e9fbb7/udev/99-hdmi2usb-mm-blacklist.rules (L4)
says:
It should be enough to set ID_MM_DEVICE_IGNORE:="1" but it seems many
versions of modem manager have a bug which makes them ignore that value.
Setting ID_MM_CANDIDATE:="0" has the same effect but is an "internal
implementation detail" of modem manager.
so set both to be safe. Also use := rather than =, in order to prevent
any later rules from overriding the settings.
Instead of hardcoding defaults for `VID`, `SKETCH_PID`, and `BOOTLOADER_PID`,
use `arduino-builder -dump-prefs` to pull these out of `boards.txt`.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
I install GNU coreutils on my Macs, to get GNU `ls`. It also installs
a GNU-flavored `stty`, which wants `-F` instead of `-f`. Giving the
full path to the OS `stty` avoids issues in this case, and should be
consequence-free for folks that _don't_ have GNU coreutils installed.