GithubHelp home page GithubHelp logo

cdisselkoen / kaleidoscope-hardware-virtual Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 70 KB

"Virtual" hardware plugin for Kaleidoscope: test and debug Kaleidoscope sketches, plugins, and core on x86

License: GNU General Public License v3.0

Shell 0.06% Makefile 0.39% C++ 78.61% C 20.94%

kaleidoscope-hardware-virtual's People

Contributors

cdisselkoen avatar noseglasses avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

timnn

kaleidoscope-hardware-virtual's Issues

Problems building with default firmware sketch

Before I can build the HV plugin with the stock firmware sketch from Arduino-Boards, I always have to uncomment things related to the Kaleidoscope-Numlock and Kaleidoscope-Model01-TestMode in the stock sketch due to build errors.

This might be valuable information for other users that want to try out the HV plugin. Could this possibly be added to the README.md. Unless, of course, there is any other possible workaround that would enable to build without the required modifications described.

How to let other plugins depend uppon Kaleidoscope-Hardware-Virtual

This is not exactly an issue but rather a question. BTW, is this the right place to ask? I could also have asked at community.keyboard.io but I think that this question is too specific.

I am currently developing another plugin that builds a x86 version of the firmware, strongly related to the HV plugins approach. What differs is that my plugin builds a shared library that can be loaded as a python module. That's why I need slighly different compile flags.

To benefit as much as possible from the implementation of the HV plugin, I reuse most of its build system tweaks and code. To achieve this, I let my plugin have a directory support/x86 that is almost identical similar to that of the HV plugin, except for not using own copies of most files but let symbolic links point to the equivalent files of the HV plugin.

This the content of my plugin's support/x86 directory:

boards.txt
cores -> ../../../Kaleidoscope-Hardware-Virtual/support/x86/cores/
libraries -> <my_hardware_path>keyboardio/avr/libraries
variants -> ../../../Kaleidoscope-Hardware-Virtual/support/x86/variants/

The libraries link is generated during setup in a similar way as it is necessary for the orginal HV plugin. I only need a custom boards.txt file, as my compiler flags are different, e.g. -fpic is required.

This is the content of boards.txt:

virtual.name="Kaleidoscope Python Interface"
virtual.build.usb_product="Kaleidoscope Python Interface"
virtual.build.usb_manufacturer="Kaleidoscope"
virtual.build.board=VIRTUAL
virtual.build.core=virtual
virtual.build.variant=virtual
virtual.build.extra_flags=-DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Virtual.h" "-I/usr/include" "-I/usr/include/python2.7" -fPIC -fpermissive

I build with

cd <my_hardware_path>/keyboardio/avr/libraries/Model01-Firmware
BOARD=virtual BOARD_HARDWARE_PATH=<my_hardware_path> make

Unfortunately, I have a problem that the overall Arduino build system does try to compile files that are not meant to be part of the virtual build, such as KeyboardioHID/src/BootKeyboard/BootKeyboard.cpp.

To make sure that the overall methodology is correct, I build the HV plugin together with a slightly modified stock firmware (see #3). This build works fine.

Is there anything wrong with the symbolic link approach taken by my plugin or any other possible reason for my build to fail?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.