Comments (4)
Please see the readme and maybe issue #19
from ergodox-firmware.
Finally, got it work on my machine.
*** ergodox-firmware/build-scripts/gen-ui-info.py 2013-08-19 22:00:14.320530087 +0800
--- new/ergodox-firmware/build-scripts/gen-ui-info.py 2013-08-19 21:57:45.307586030 +0800
*** 168,183 ****
length = int( search.group(2), 16 )
search = re.search(r'0x\S+\s+(\S+)', next(f))
! name = search.group(1)
! return {
! 'keyboard-functions': {
! name: {
! 'position': position,
! 'length': length,
},
! },
! }
def parse_layout_matrices(f, line):
"""Parse layout matrix information in the '.map' file"""
--- 168,184 ----
length = int( search.group(2), 16 )
search = re.search(r'0x\S+\s+(\S+)', next(f))
! if search:
! name = search.group(1)
! return {
! 'keyboard-functions': {
! name: {
! 'position': position,
! 'length': length,
! },
},
! }
def parse_layout_matrices(f, line):
"""Parse layout matrix information in the '.map' file"""
*** 352,358 ****
def parse_layout_file(layout_file_path):
match = re.findall( # find each whole 'kb_layout' matrix definition
r'(kb_layout\w)[^=]=((?:[^{}]{){3}[^=](?:[^{}]}){3})',
! subprocess.getoutput("gcc -E '"+layout_file_path+"'") )
layout = {}
# collect all the values
--- 353,359 ----
def parse_layout_file(layout_file_path):
match = re.findall( # find each whole 'kb_layout' matrix definition
r'(kb_layout\w)[^=]=((?:[^{}]{){3}[^=](?:[^{}]}){3})',
! subprocess.getoutput("avr-gcc -D KEYBOARD__ERGODOX__LAYOUT_h -E '"+layout_file_path+"'") )
layout = {}
# collect all the values
from ergodox-firmware.
Hi Ben Blazak
Thanks for the pointer. With some changes, the layout is generated.
diff -c ergodox-firmware/build-scripts/gen-ui-info.py new/ergodox-firmware/build-scripts/gen-ui-info.py
*** ergodox-firmware/build-scripts/gen-ui-info.py 2013-08-19 22:00:14.320530087 +0800
--- new/ergodox-firmware/build-scripts/gen-ui-info.py 2013-08-19 21:57:45.307586030 +0800
*** 168,183 ****
length = int( search.group(2), 16 )
search = re.search(r'0x\S+\s+(\S+)', next(f))
! name = search.group(1)
! return {
! 'keyboard-functions': {
! name: {
! 'position': position,
! 'length': length,
},
! },
! }
def parse_layout_matrices(f, line):
"""Parse layout matrix information in the '.map' file"""
--- 168,184 ----
length = int( search.group(2), 16 )
search = re.search(r'0x\S+\s+(\S+)', next(f))
! if search:
! name = search.group(1)
! return {
! 'keyboard-functions': {
! name: {
! 'position': position,
! 'length': length,
! },
},
! }
def parse_layout_matrices(f, line):
"""Parse layout matrix information in the '.map' file"""
*** 352,358 ****
def parse_layout_file(layout_file_path):
match = re.findall( # find each whole 'kb_layout' matrix definition
r'(kb_layout\w)[^=]=((?:[^{}]{){3}[^=](?:[^{}]}){3})',
! subprocess.getoutput("gcc -E '"+layout_file_path+"'") )
layout = {}
# collect all the values
--- 353,359 ----
def parse_layout_file(layout_file_path):
match = re.findall( # find each whole 'kb_layout' matrix definition
r'(kb_layout\w)[^=]=((?:[^{}]{){3}[^=](?:[^{}]}){3})',
! subprocess.getoutput("avr-gcc -D KEYBOARD__ERGODOX__LAYOUT_h -E '"+layout_file_path+"'") )
layout = {}
# collect all the values
$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.7.2/lto-wrapper
Target: avr
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
Thread model: single
gcc version 4.7.2 (GCC)
/khl
From: Ben Blazak [email protected]
To: benblazak/ergodox-firmware [email protected]
Cc: khlkh [email protected]
Sent: Monday, August 19, 2013 5:28 AM
Subject: Re: [ergodox-firmware] Failed to generate json and keymap (#30)
Please see the readme and maybe issue #19
—
Reply to this email directly or view it on GitHub.
from ergodox-firmware.
Glad you got it working :)
from ergodox-firmware.
Related Issues (20)
- Will a non-soldered teensy be recognized as a keyboard? HOT 2
- Any way to give Ergodox the full control over layout? HOT 8
- PROBLEMS FOR UK KEYBOARD USERS HOT 1
- Is 80 key version of ergodox supported in your code ? HOT 9
- Compose key not registered HOT 1
- Latch Keys Not Working HOT 3
- changing key from `1` to `_grave` causes unexpected behavior
- "Simple macros" don't work on Mac OS Sierra HOT 4
- How to release the 'RightAlt' upon leaving a layer. HOT 4
- Updating the USB stack HOT 1
- How to use layers? HOT 1
- Readme still links to the defunct .org site in the title HOT 1
- Set what is sent on shift HOT 1
- Random sticky/unresponsive HOT 11
- Always switched to layer 2 on the first system startup HOT 3
- Hold letter key for another key entirely HOT 1
- About the drop page cannot download .HEX files HOT 1
- Keyboard doesnt boots after tried to flashing with another firmware HOT 4
- Using ancient frozen customized fork of your firmware (didn't set it up, kinda inherited it, don't really understand it). If I get a new ergodox, could I just flash my current firmware on to it? (Paranoid the old microcontroller in my current one *might* be starting to fail...) HOT 11
- default Make target (dist) fails running gen-ui-info.py with KeyError: '_kb_layout' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ergodox-firmware.