This commit re-enables virtual builds with the Model01 keyboard.
The commit also prepares the infrastructure to generate virtual builds with all other
keyboards currently supported.
Please note that this commit does not enable virtual builds of the stock firmware
right away. This is because currently the stock firmware uses the
Model01-Testmode which is not compatible with virtual builds.
The stock firmware could be made ready for virtual builds by replacing the
Model01-Testmode with the more general HardwareTestMode.
In general for those features/plugins that do not support virtual builds,
this commit adds the generation of compiler error messages
that inform about what parts of the sketch need to be changed to allow virtual
builds.
To allow the stock firmware to build for the virtual core, just remove the
Model01-TestMode, then run the build on a unixoid system as follows.
cd ..../libraries/Model01-Firmware
ARCH=x86 make
With this change, virtual builds are furtheron triggered via setting ARCH=x86.
The board that firmware is meant to be build for is defined through the
BOARD variable, just like with non-virtual builds.
Please note that it is currently not yet possible to run virtual builds for
other keyboards than the Model01. This as because only for the Model01
specification files Model01_Spec.h/cpp have been generated.
To enable virtual builds for all keyboards, specification files need to be
factored out for all keyboards apart from Model01.
After all keyboards will have been made available to virtual builds
through future changes, it will be possible to build the whole examples set
as
cd ..../libraries/Kaleidoscope
ARCH=x86 BOARD_HARDWARE_PATH=$PWD/../../../.. make smoke-examples
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
The two contained c++ files are almost identical to those
in KeyboardioHID.
The HID library is not used by the build. Checks prove that two
firmware binaries build with and without the library are identical.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
In rare occasions during development when e.g. a missing symbol caused
the linker process to abort, the joined library was not removed
at the end of the build. In subsequent builds this possibly
caused problems during creation of the joined library as a
static library cannot be updated but must be removed and re-created.
This change solves the described problem by removing a possibly
pre-exising joined library before the link.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
Before this change, when Arduino was linking the elf binary, it added all
objects and archives (libraries/plugins) to a long linker command line.
This would sometimes cause issues due to the linker's gargabe collection feature.
When one library A referenced a symbol from a library B but library A appeared after B
in the linker command line, the referenced symbol was in some cases garbage
collected as to the linker it appeared to be unreferenced.
To understand this better it is important to know that the linker processes
objects and archives one by one in the order of their appearance at the command
line. For every object or archive encountered it runs garbage collection individually.
That's why symbols might get discarded although an object or archives that is
encountered later on while processing the linker command line might have referenced it.
To fix this problem this commit divides up the linker process into two steps.
First, all objects and archives are combined in a large .a archive. Then, this
archive is passed to the original linker command line, thereby replacing the
original set of objects and archives.
The final link now sees all symbols together. Thus, it is able to determine the true
interdependencies and do a proper garbage collection without accidentally
generating unresolved symbols.
With this fix, the order of appearance of include directives in the sketch file that formerly had an
influence on the link order (as Arduino passes library archives to the linker in
the order of the appearance of the matching includes in the sketch),
can now be savely chosen arbitrarily.
To erase the joined archive file that is generated from all objects and
archives, we have to use different solutions on Linux/macOS and Windows. This is
done via defining tools.rm.cmd differently for those platforms.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
The library is being superseded by a hardware base class in Kaleidoscope itself.
As it is not used anywhere, and served only documentation purposes, remove it.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Not having a default means that arduino-builder will not use any extra flags.
With the default set to the same as the Post-2016 PCB (the most recent one), the
Atreus example in Kaleidoscope will compile again.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
As a side effect, this changes the dfu-programmer invocation in platform.txt for
all boards (Planck included) that use it.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Introduces a Pinout menu when the Atreus is the selected target, making it
possible for the user to select which pinout their Atreus has.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
At least for OSX, we need to slow down Serial writes. The easiest way to do that
is to add a delay after each write, and to accomplish that, the easiest is to
modify `CDC.cpp`. Without this, on OSX, we end up writing too fast (and
changing the baud rate does not help, no matter in which direction I change),
and end up losing data.
This is not a great solution. It's not even a solution, but a workaround. But it
works for now.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
We're going to change this file, so add the original (from arduino-1.8.7,
hardware/arduino/avr/cores/arduino/CDC.cpp) before applying our changes.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Remove `Kaleidoscope-Hardware-EZ-ErgoDox` and
`Kaleidoscope-Hardware-Technomancy-Atreus`, as they were merged into
`Kaleidoscope`. Update `Kaleidoscope` to pull in the latest merges.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
`AtmegaScanner` wasn't ever useful outside of the Shortcut port (which has been
dropped from the predecessor of this repo, a good while ago).
`FingerprintUSBHost` is not very reliable, and the only user of it (`HostOS`)
stopped using it. `Kaleidoscope-Focus` was superseded by `FocusSerial`, which is
now in core, so `Kaleidoscope-Focus` is permanently broken due to a symbol
conflict.
For these reasons, lets remove them.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
We recently started converting Kaleidoscope into a monorepo, merging most
plugins used by the factory firmware. With this change, we update the
Kaleidoscope repo, and remove those submodules that were already merged into it.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>