aboutsummaryrefslogtreecommitdiffstats
path: root/docs/compatible_microcontrollers.md
blob: ac90ed7464fa3fb36d6cc5a309d99b7687f2c175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Compatible Microcontrollers

QMK runs on any USB-capable AVR or ARM microcontroller with enough flash space - generally 32kB or more, though it will *just* squeeze into 16kB with most features disabled.

## Atmel AVR

The following use [LUFA](https://www.fourwalledcubicle.com/LUFA.php) as the USB stack:

* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2)
* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4)
* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286)

Certain MCUs which do not have native USB will use [V-USB](https://www.obdev.at/products/vusb/index.html) instead:

* [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A)
* [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P)
* [ATmega328](https://www.microchip.com/wwwproducts/en/ATmega328)

## ARM

You can also use any ARM chip with USB that [ChibiOS](http://www.chibios.org) supports. Most have plenty of flash. Known to work are:

### STMicroelectronics (STM32)

 * [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
 * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
 * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)

### NXP (Kinetis)

 * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
 * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50)
 * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)

## Atmel ATSAM

There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop).
"kt">Compile_Init_Acc is access procedure (Analyze_Only : Boolean); -- This procedure is called for elaboration. -- CMD_NAME is the name of the command, used to report errors. -- ARGS is the argument list, starting from the unit name to be elaborated. -- The procedure should extract the unit. -- OPT_ARG is the index of the first argument from ARGS to be used as -- a run option. type Compile_Elab_Acc is access procedure (Cmd_Name : String; Args : Argument_List; Opt_Arg : out Natural); -- Use ARGS as run options. -- Should do all the work. type Set_Run_Options_Acc is access procedure (Args : Argument_List); -- Run the simulation. -- All the parameters were set through calling Compile_Elab and -- Set_Run_Options. type Run_Acc is access procedure; -- Called when an analysis/elaboration option is decoded. -- Return True if OPTION is known (and do the side effects). -- No parameters are allowed. type Decode_Option_Acc is access function (Option : String) return Boolean; -- Disp help for options decoded by Decode_Option. type Disp_Long_Help_Acc is access procedure; -- All the hooks gathered. -- A record is used to be sure all hooks are set. type Hooks_Type is record Compile_Init : Compile_Init_Acc := null; Compile_Elab : Compile_Elab_Acc := null; Set_Run_Options : Set_Run_Options_Acc := null; Run : Run_Acc := null; Decode_Option : Decode_Option_Acc := null; Disp_Long_Help : Disp_Long_Help_Acc := null; end record; Hooks : Hooks_Type; -- Register commands. procedure Register_Commands; -- Output of --disp-config. procedure Disp_Config; -- Option --expect-failure. Flag_Expect_Failure : Boolean := False; -- --time-resolution=X -- Where X corresponds to: -- fs => 'f' -- ps => 'p' -- ns => 'n' -- us => 'u' -- ms => 'm' -- sec => 's' -- min => 'M' -- hr => 'h' Time_Resolution: Character := 'f'; -- Common action to perform before analysis: library setup. procedure Common_Compile_Init (Analyze_Only : Boolean); -- Common action to perform before elaboration: -- * extract PRIM_NAME and SEC_NAME from ARGS. -- * configure -- * Check top entity -- If ALLOW_UNDEF_GENERIC is False, the generics must have a default value. procedure Common_Compile_Elab (Cmd_Name : String; Args : Argument_List; Allow_Undef_Generic : Boolean; Opt_Arg : out Natural; Config : out Iir); -- Functionnal interface. -- Must be first initialized by Compile_Init procedure Compile_Analyze_Init (Load_Work : Boolean := True); -- Load and parse FILE, put library units in the work library (without -- analyzing them). procedure Compile_Load_Vhdl_File (File : String); -- Load, parse and analyze FILE. function Compile_Analyze_File (File : String) return Iir; procedure Compile_Elaborate (Unit_Name : String_Access); procedure Compile_Run; -- Load and parse file (without analysis). Put units in the work library. type Load_File_Acc is access procedure (File : String); -- Hook for verilog. Init_Verilog_Options : Compile_Init_Acc; Load_Verilog_File : Load_File_Acc; end Ghdlcomp;