Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Michi MCU Converter support #19163

Merged
merged 6 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/mappings/defaults.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
"bootloader": "rp2040",
"board": "QMK_PM2040"
},
"michi": {
"processor": "RP2040",
"bootloader": "rp2040",
"board": "QMK_PM2040"
},
"bit_c_pro": {
"processor": "RP2040",
"bootloader": "rp2040",
Expand Down
2 changes: 1 addition & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"development_board": {
"type": "string",
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"]
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"]
},
"pin_compatible": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion docs/feature_converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Currently the following converters are available:
| `promicro` | `stemcell` |
| `promicro` | `bonsai_c4` |
| `promicro` | `elite_pi` |
| `promicro` | `michi` |
| `elite_c` | `stemcell` |
| `elite_c` | `elite_pi` |

Expand Down Expand Up @@ -81,6 +82,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` |
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` |

Converter summary:

Expand All @@ -94,6 +96,7 @@ Converter summary:
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
| `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` |
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
| `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` |

### Proton C :id=proton_c

Expand Down Expand Up @@ -124,7 +127,7 @@ The following defaults are based on what has been implemented for [RP2040](platf
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
| [Split keyboards](feature_split_keyboard.md) | Partial via `PIO` vendor driver - heavily dependent on enabled features |

### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO, and Elite-Pi :id=promicro_rp2040
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO, Elite-Pi and Michi :id=promicro_rp2040

Currently identical to [Adafruit KB2040](#kb2040).

Expand Down
1 change: 1 addition & 0 deletions docs/squeezing_avr.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
* [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288)
* [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622)
* [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040)
* [Michi](https://github.com/ci-bus/michi-promicro-rp2040)

There are other, non-Pro Micro compatible boards out there. The most popular being:
* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD)
36 changes: 36 additions & 0 deletions platforms/chibios/converters/promicro_to_michi/_pin_defs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2022 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

// Left side (front)
#define D3 0U
#define D2 1U
// GND
// GND
#define D1 2U
#define D0 3U
#define D4 13U
#define C6 4U
#define D7 9U
#define E6 10U
#define B4 11U
#define B5 12U

// Right side (front)
// RAW
// GND
// RESET
// VCC
#define F4 29U
#define F5 28U
#define F6 27U
#define F7 26U
#define B1 20U
#define B3 19U
#define B2 18U
#define B6 17U

// LEDs (Mapped to unused pins to avoid collisions)
#define D5 14U
#define B0 15U
9 changes: 9 additions & 0 deletions platforms/chibios/converters/promicro_to_michi/converter.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Michi MCU settings for converting AVR projects
MCU := RP2040
BOARD := QMK_PM2040
BOOTLOADER := rp2040

# These are defaults based on what has been implemented for RP2040 boards
SERIAL_DRIVER ?= vendor
WS2812_DRIVER ?= vendor
BACKLIGHT_DRIVER ?= software