1
0

110 Commits

Author SHA1 Message Date
Florian Fleissner
8a8e5512bc Removed flag -Os for virtual builds
The virtual hardware is among other purposses meant
to be used for debugging firmware issues.

The flag -Os optimizes out specific information that makes
proper debugging difficult in some situations.

Also, the virtual hardware does not come with restrictions
in terms of PROGMEM. That's why space efficiency is not needed there.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:30:41 -07:00
Florian Fleissner
2acc10f5d6 Restructured the virtual hardware
Some parts were moved over from Kaleidoscope-Hardware-Virtual.
The virtual hardware is now a drop in for the real
pluggable USB interface.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:30:33 -07:00
Florian Fleissner
bfe2fc9d3e Added a weak callback for command line parsing
Consumer code can access the command line via
an additional callback of the virtual hardware.
This makes it possible to access the name of
the executable that is currently executed.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:30:25 -07:00
Florian Fleissner
72b0f91c6c Added directory preservation dummy files to virtual variant dirs
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:30:17 -07:00
Florian Fleissner
904f06de09 Run the testing executable of virtual builds as a build step
By this means it is possible to simplify running automatic
simulation based testing with virtual firmare builds.

If a firmware sketch defines a test function it will
be executed.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:30:08 -07:00
Florian Fleissner
61ac4a1586 Added optional execution of a testing function.
Through a command line parameter, the virtual
firmware executable can be instructed to execute
a testing function instead of processing
stdin/stdout I/O.

This can be used to attach an external
testing interface.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:29:57 -07:00
Florian Fleissner
cc38d157ae Enable c++ exceptions in virtual builds
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:29:48 -07:00
Florian Fleissner
6e5eee72bd Renamed hardward x86 -> virtual
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
2019-07-07 14:29:38 -07:00
Florian Fleissner
f95d9e5084 Partially fixed virtual builds
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>
2019-07-07 14:29:20 -07:00
Jesse Vincent
821e2d3cf2 Blindly pull all plugins up to current 2019-07-07 13:10:46 -07:00
Jesse Vincent
60d06fdd42
Merge pull request #21 from CapeLeidokos/pr_HID_removed
Removed the redundant HID library
2019-06-19 14:05:25 -07:00
Florian Fleissner
16db1529b7 Removed the redundant HID library
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>
2019-06-19 22:36:42 +02:00
Florian Fleissner
af96c42cfa Blindly pull all plugins up to current 2019-06-17 11:06:27 +02:00
Jesse Vincent
810c22a4e1
Merge pull request #19 from CapeLeidokos/ng_joined_library_rm_fix
Fixed build errors with follow up builds after a failed attempt to link
2019-06-16 17:52:04 -07:00
Florian Fleissner
6334f327fb Fixed build errors with follow up builds after a failed attempt to link
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>
2019-06-11 12:38:37 +02:00
Jesse Vincent
a6c0022d98
Merge pull request #17 from CapeLeidokos/ng_pr_link_order_dependency_fix_java
Fix link order problems with inter-library/inter-plugin dependencies
2019-05-31 19:37:41 +08:00
Florian Fleissner
e5b97afa48 Fix link order problems with inter-library/inter-plugin dependencies
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>
2019-05-29 17:18:18 +02:00
Jesse Vincent
8c39a1526a I -think- that a typo in the Makefile caused Travis test to break six months ago. This is embarassing
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
2019-05-26 17:38:33 +02:00
Jesse Vincent
37fb442fc8 Blindly pull all plugins up to current 2019-05-20 10:14:28 -07:00
Jesse Vincent
f1f5745adb Blindly pull all plugins up to current 2019-05-08 23:11:52 -07:00
Jesse Vincent
afb37643b9 Blindly pull all plugins up to current 2019-05-08 20:21:00 -07:00
Jesse Vincent
c8c6856ec3 Initial support for a prototype of an Atreus with a couple extra keys 2019-05-08 20:14:28 -07:00
Jesse Vincent
65f8dc705b Blindly pull all plugins up to current 2019-03-04 14:48:24 -08:00
Jesse Vincent
7b3e34a688 Something busted travis builds 2019-03-03 22:44:42 -08:00
Jesse Vincent
47cb0db08d Blindly pull all plugins up to current 2019-03-03 22:34:01 -08:00
Jesse Vincent
ab7e7fcc81 attempt to enable ccache and our cache for building the bundle 2019-03-03 22:29:15 -08:00
Jesse Vincent
7493d71957 Blindly pull all plugins up to current 2019-03-03 22:26:08 -08:00
Jesse Vincent
1b5e409ba1 Blindly pull all plugins up to current 2019-03-03 17:53:18 -08:00
Jesse Vincent
a285169afa Blindly pull all plugins up to current 2019-02-28 22:43:55 -08:00
Jesse Vincent
b30671b82a Update support for the prototype Imago PCBs with a default Caterina
bootloader
2019-02-28 12:30:18 -08:00
Jesse Vincent
390c237f6e Blindly pull all plugins up to current 2019-02-22 12:13:21 -08:00
Jesse Vincent
6028adee67 Blindly pull all plugins up to current 2019-02-16 13:32:03 -08:00
Jesse Vincent
27cbcaf568 Blindly pull all plugins up to current 2019-02-05 18:32:59 -08:00
Jesse Vincent
cedffc8416 Blindly pull all plugins up to current 2019-02-04 14:13:07 -08:00
Jesse Vincent
15cc47a56a
Merge pull request #14 from keyboardio/boards.txt/kbdfans-kbd4x
Add KBDFans KBD4x
2019-01-22 15:32:58 -08:00
Gergely Nagy
de83a4ce8a
Add KBDFans KBD4x
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-01-22 08:18:21 +01:00
Jesse Vincent
fbe335e1ff Blindly pull all plugins up to current 2018-12-23 21:03:01 -08:00
Jesse Vincent
1982f10c3d Blindly pull all plugins up to current 2018-12-18 13:46:27 -08:00
Jesse Vincent
f114f58172
Merge pull request #13 from keyboardio/libraries/remove-kaleidoscope-hardware
Drop the Kaleidoscope-Hardware library
2018-12-18 10:09:52 -08:00
Gergely Nagy
b8e9a41e23
Drop the Kaleidoscope-Hardware library
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>
2018-12-18 10:15:36 +01:00
Jesse Vincent
4d178ea823
Merge pull request #12 from keyboardio/revert-7-osx/cdc-slowing-down
Revert "model01: Use a modified CDC.cpp"
2018-12-16 15:53:40 -08:00
Gergely Nagy
00c272df1a
Revert "model01: Use a modified CDC.cpp" 2018-12-16 17:41:43 +01:00
Gergely Nagy
029a5633a1
Merge pull request #7 from keyboardio/osx/cdc-slowing-down
model01: Use a modified CDC.cpp
2018-12-12 22:48:57 +01:00
Jesse Vincent
5a7c71b4c6
Merge pull request #11 from keyboardio/boards.txt/atreus-default
boards.txt: Add default extra_flags for Atreus
2018-12-08 16:14:29 -08:00
Gergely Nagy
2d22949dd1
boards.txt: Add default extra_flags for Atreus
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>
2018-12-08 18:53:07 +01:00
Jesse Vincent
352176e58e
Merge pull request #10 from keyboardio/hardware/splitography
Add support for the SOFT/HRUF Splitography
2018-12-06 21:18:25 -08:00
Gergely Nagy
de1e7e6d98
Add support for the SOFT/HRUF Splitography
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>
2018-12-07 02:09:30 +01:00
Gergely Nagy
b65228cf6f
Update Kaleidoscope to latest master
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2018-12-05 08:14:02 +01:00
Jesse Vincent
559573d788
Merge pull request #8 from keyboardio/travis/no-irc
travis.yml: Remove the IRC notifications
2018-12-04 07:18:15 -08:00
Jesse Vincent
f382d8a0c6
Merge pull request #9 from keyboardio/boards.txt/atreus-variants
boards.txt: Add support for a few Atreus variants
2018-12-04 07:17:39 -08:00