diff options
70 files changed, 182 insertions, 806 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index dc86b232df..a258f33216 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -390,10 +390,12 @@ ifneq ("$(KEYMAP_H)","") CONFIG_H += $(KEYMAP_H) endif +OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\" + # project specific files SRC += \ $(KEYBOARD_SRC) \ - $(KEYMAP_C) \ + $(QUANTUM_DIR)/keymap_introspection.c \ $(QUANTUM_SRC) \ $(QUANTUM_DIR)/main.c \ diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c976b8296d..631558ef27 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -542,12 +542,6 @@ ifeq ($(strip $(LED_TABLES)), yes) SRC += $(QUANTUM_DIR)/led_tables.c endif -ifeq ($(strip $(TERMINAL_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c - OPT_DEFS += -DTERMINAL_ENABLE - OPT_DEFS += -DUSER_PRINT -endif - ifeq ($(strip $(VIA_ENABLE)), yes) DYNAMIC_KEYMAP_ENABLE := yes RAW_ENABLE := yes diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index d3acddc87b..6573257c78 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -1,19 +1,5 @@ # Hey Emacs, this is a -*- makefile -*- #---------------------------------------------------------------------------- -# WinAVR Makefile Template written by Eric B. Weddington, Jg Wunsch, et al. -# -# Released to the Public Domain -# -# Additional material for this makefile was written by: -# Peter Fleury -# Tim Henigan -# Colin O'Flynn -# Reiner Patommel -# Markus Pfaff -# Sander Pool -# Frederik Rouleau -# Carlos Lamas -# # Enable vpath seraching for source files only # Without this, output files, could be read from the wrong .build directories @@ -38,36 +24,15 @@ NO_LTO_OBJ := $(filter %.a,$(OBJ)) MASTER_OUTPUT := $(firstword $(OUTPUTS)) - - # Output format. (can be srec, ihex, binary) FORMAT = ihex # Optimization level, can be [0, 1, 2, 3, s]. -# 0 = turn off optimization. s = optimize for size. -# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT ?= s -# Compiler flag to set the C Standard level. -# c89 = "ANSI" C -# gnu89 = c89 plus GCC extensions -# c99 = ISO C99 standard (not yet fully implemented) -# gnu99 = c99 plus GCC extensions -CSTANDARD = -std=gnu99 - - -# Place -D or -U options here for C sources -#CDEFS += - - -# Place -D or -U options here for ASM sources -#ADEFS += - - -# Place -D or -U options here for C++ sources -#CXXDEFS += -D__STDC_LIMIT_MACROS -#CXXDEFS += -D__STDC_CONSTANT_MACROS -#CXXDEFS += +# Compiler flag to set the C and C++ language standard level +CSTANDARD = -std=gnu11 +CXXSTANDARD = -std=gnu++14 # Speed up recompilations by opt-in usage of ccache USE_CCACHE ?= no @@ -75,12 +40,8 @@ ifneq ($(USE_CCACHE),no) CC_PREFIX ?= ccache endif -#---------------- Compiler Options C ---------------- -# -g*: generate debugging information -# -O*: optimization level -# -f...: tuning, see GCC manual and avr-libc documentation -# -Wall...: warning level -# -Wa,...: tell GCC to pass this to the assembler. +#---------------- C Compiler Options ---------------- + ifeq ($(strip $(LTO_ENABLE)), yes) ifeq ($(PLATFORM),ARM_ATSAM) $(info Enabling LTO on arm_atsam-targeting boards is known to have a high likelihood of failure.) @@ -111,23 +72,14 @@ CFLAGS += -Wstrict-prototypes ifneq ($(strip $(ALLOW_WARNINGS)), yes) CFLAGS += -Werror endif -#CFLAGS += -mshort-calls -#CFLAGS += -fno-unit-at-a-time -#CFLAGS += -Wundef -#CFLAGS += -Wunreachable-code -#CFLAGS += -Wsign-compare CFLAGS += $(CSTANDARD) # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION # Fixing of multiple variable definitions must be made. CFLAGS += -fcommon -#---------------- Compiler Options C++ ---------------- -# -g*: generate debugging information -# -O*: optimization level -# -f...: tuning, see GCC manual and avr-libc documentation -# -Wall...: warning level -# -Wa,...: tell GCC to pass this to the assembler. +#---------------- C++ Compiler Options ---------------- + ifeq ($(strip $(DEBUG_ENABLE)),yes) CXXFLAGS += -g$(DEBUG) endif @@ -141,57 +93,17 @@ CXXFLAGS += -Wundef ifneq ($(strip $(ALLOW_WARNINGS)), yes) CXXFLAGS += -Werror endif -#CXXFLAGS += -mshort-calls -#CXXFLAGS += -fno-unit-at-a-time -#CXXFLAGS += -Wstrict-prototypes -#CXXFLAGS += -Wunreachable-code -#CXXFLAGS += -Wsign-compare -#CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- + ASFLAGS += $(ADEFS) ifeq ($(VERBOSE_AS_CMD),yes) ASFLAGS += -v endif -#---------------- Library Options ---------------- -# Minimalistic printf version -PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min - -# Floating point printf version (requires MATH_LIB = -lm below) -PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt - -# If this is left blank, then it will use the Standard printf version. -PRINTF_LIB = -#PRINTF_LIB = $(PRINTF_LIB_MIN) -#PRINTF_LIB = $(PRINTF_LIB_FLOAT) - - -# Minimalistic scanf version -SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min - -# Floating point + %[ scanf version (requires MATH_LIB = -lm below) -SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt - -# If this is left blank, then it will use the Standard scanf version. -SCANF_LIB = -#SCANF_LIB = $(SCANF_LIB_MIN) -#SCANF_LIB = $(SCANF_LIB_FLOAT) - - -MATH_LIB = -lm -CREATE_MAP ?= yes - - #---------------- Linker Options ---------------- -# -Wl,...: tell GCC to pass this to linker. -# -Map: create map file -# --cref: add cross reference to map file -# -# Comennt out "--relax" option to avoid a error such: -# (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12' -# +CREATE_MAP ?= yes ifeq ($(CREATE_MAP),yes) LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref endif @@ -201,20 +113,11 @@ endif #LDFLAGS += -Wl,--relax LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) -LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) -#LDFLAGS += -T linker_script.x +LDFLAGS += -lm # You can give EXTRALDFLAGS at 'make' command line. LDFLAGS += $(EXTRALDFLAGS) #---------------- Assembler Listings ---------------- -# -Wa,...: tell GCC to pass this to the assembler. -# -adhlns: create listing -# -gstabs: have the assembler create line number information; note that -# for use in COFF files, additional information about filenames -# and function names needs to be present in the assembler source -# files -- see avr-libc docs [FIXME: not yet described there] -# -listing-cont-lines: Sets the maximum number of continuation lines of hex -# dump that will be displayed for a given single line of source input. ADHLNS_ENABLE ?= no ifeq ($(ADHLNS_ENABLE),yes) diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index f67d009191..1c1c189f27 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -5,7 +5,6 @@ BUILD_OPTION_NAMES = \ CONSOLE_ENABLE \ COMMAND_ENABLE \ NKRO_ENABLE \ - TERMINAL_ENABLE \ CUSTOM_MATRIX \ DEBOUNCE_TYPE \ SPLIT_KEYBOARD \ diff --git a/docs/_summary.md b/docs/_summary.md index 11f5e1dd51..78d7f30ea4 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -88,7 +88,6 @@ * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) * [Tap-Hold Configuration](tap_hold.md) - * [Terminal](feature_terminal.md) * [Unicode](feature_unicode.md) * [Userspace](feature_userspace.md) * [WPM Calculation](feature_wpm.md) diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md index 6dcf10c04d..306ebacb3f 100644 --- a/docs/eeprom_driver.md +++ b/docs/eeprom_driver.md @@ -43,8 +43,9 @@ Module | Equivalent `#define` | Source -----------------|---------------------------------|------------------------------------------ CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764> RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764> -24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | <https://www.microchip.com/wwwproducts/en/24LC64> -24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128> +24LC32A EEPROM | `#define EEPROM_I2C_24LC32A` | <https://www.microchip.com/en-us/product/24LC32A> +24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | <https://www.microchip.com/en-us/product/24LC64> +24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/en-us/product/24LC128> 24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525> MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895> diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 295e610fc4..ec67e32078 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -409,6 +409,7 @@ You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 | | `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 | +| `AW_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 | | `AW_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 | Here is an example using 2 drivers. diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 6ef70bf788..4fac083974 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -141,6 +141,9 @@ Next, you will have to flash the EEPROM files once for the correct hand to the c * ARM controllers with a DFU compatible bootloader (e.g. Proton-C): * `:dfu-util-split-left` * `:dfu-util-split-right` +* ARM controllers with a UF2 compatible bootloader: + * `:uf2-split-left` + * `:uf2-split-right` Example: diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md deleted file mode 100644 index f850622165..0000000000 --- a/docs/feature_terminal.md +++ /dev/null @@ -1,107 +0,0 @@ -# Terminal - -> This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun. - -The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor. - -To enable, stick this in your `rules.mk` or `Makefile`: - - TERMINAL_ENABLE = yes - -And use the `TERM_ON` and `TERM_OFF` keycodes to turn it on or off. - -When enabled, a `> ` prompt will appear, where you'll be able to type, backspace (a bell will ding if you reach the beginning and audio is enabled), and hit enter to send the command. Arrow keys are currently disabled so it doesn't get confused. Moving your cursor around with the mouse is discouraged. - -`#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page. - -Pressing "up" and "down" will allow you to cycle through the past 5 commands entered. - -## Future Ideas - -* Keyboard/user-extensible commands -* Smaller footprint -* Arrow key support -* Command history - Done -* SD card support -* LCD support for buffer display -* Keycode -> name string LUT -* Layer status -* *Analog/digital port read/write* -* RGB mode stuff -* Macro definitions -* EEPROM read/write -* Audio control - -## Current Commands - -### `about` - -Prints out the current version of QMK with a build date: - -``` -> about -QMK Firmware - v0.5.115-7-g80ed73-dirty - Built: 2017-08-29-20:24:44 -``` - - -### `print-buffer` - -Outputs the last 5 commands entered - -``` -> print-buffer -0. print-buffer -1. help -2. about -3. keymap 0 -4. help -5. flush-buffer -``` - -### `flush-buffer` - -Clears command buffer -``` -> flush-buffer -Buffer cleared! -``` - - -### `help` - - -Prints out the available commands: - -``` -> help -commands available: - about help keycode keymap exit print-buffer flush-buffer -``` - -### `keycode <layer> <row> <col>` - -Prints out the keycode value of a certain layer, row, and column: - -``` -> keycode 0 1 0 -0x29 (41) -``` - -### `keymap <layer>` - -Prints out the entire keymap for a certain layer - -``` -> keymap 0 -0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a, -0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034, -0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028, -0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f, -> -``` - -### `exit` - -Exits the terminal - same as `TERM_OFF`. diff --git a/docs/flashing.md b/docs/flashing.md index 271e15b13c..dfb255f2dc 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -358,3 +358,7 @@ CLI Flashing sequence: 2. Wait for the OS to detect the device 3. Flash via QMK CLI eg. `qmk flash --keyboard handwired/onekey/blackpill_f411_tinyuf2 --keymap default` 4. Wait for the keyboard to become available + +### `make` Targets + +* `:uf2-split-left` and `:uf2-split-right`: Flashes the firmware but also sets the handedness setting in EEPROM by generating a side specific firmware. diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 81b5756c27..8516a5eaaa 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -85,7 +85,6 @@ * [スワップハンド](ja/feature_swap_hands.md) * [タップダンス](ja/feature_tap_dance.md) * [タップホールド設定](ja/tap_hold.md) - * [ターミナル](ja/feature_terminal.md) * [ユニコード](ja/feature_unicode.md) * [ユーザスペース](ja/feature_userspace.md) * [WPM 計算](ja/feature_wpm.md) diff --git a/docs/ja/feature_terminal.md b/docs/ja/feature_terminal.md deleted file mode 100644 index 8e125ecee0..0000000000 --- a/docs/ja/feature_terminal.md +++ /dev/null @@ -1,112 +0,0 @@ -# ターミナル - -<!--- - original document: 0.8.147:docs/feature_terminal.md - git diff 0.8.147 HEAD -- docs/feature_terminal.md | cat ---> - -> この機能は現在のところ*巨大*であり、おそらく大量のメモリを搭載したキーボード、または楽しみのためにのみ配置する必要があります。 - -ターミナル機能はテキストエディタを介してキーストロークで通信するように設計されたコマンドラインのようなインタフェースです。エディタで自動インデント機能をオフにすることは有益です。 - -有効にするには、以下を `rules.mk` または `Makefile` に貼り付けます: - - TERMINAL_ENABLE = yes - -そして、オンまたはオフにするために、`TERM_ON` および `TERM_OFF` キーコードを使います。 - -有効な場合、`> ` プロンプトが現れ、ここでコマンドやバックスペース(オーディオが有効な場合は、先頭に到達するとベルが鳴ります)を入力することができ、エンターを入力するとコマンドを送信します。矢印キーは現在のところ無効なため、混乱することはありません。マウスでカーソルを移動することはお勧めしません。 |