aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayceFayne <13365789+JayceFayne@users.noreply.github.com>2022-01-12 01:07:24 +0000
committerGitHub <noreply@github.com>2022-01-11 17:07:24 -0800
commit93e55605d9f2de7f214a003058bcefbb5a5a0e00 (patch)
tree123603e17f265981f0798113501999e12a7c9abc
parent1f618c8302cc5053c382436a2d1fb11082c99057 (diff)
downloadqmk_firmware-93e55605d9f2de7f214a003058bcefbb5a5a0e00.tar.gz
qmk_firmware-93e55605d9f2de7f214a003058bcefbb5a5a0e00.zip
[Docs] fix typo and remove trailing whitespace (#15842)
-rw-r--r--docs/squeezing_avr.md36
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md
index f48643d1d..e4d8d7c14 100644
--- a/docs/squeezing_avr.md
+++ b/docs/squeezing_avr.md
@@ -1,16 +1,16 @@
1# Squeezing the most out of AVR 1# Squeezing the most out of AVR
2 2
3AVR is severely resource-constrained, and as QMK continues to grow, it is approaching a point where support for AVR may need to be moved to legacy status as newer development is unable to fit into those constraints. 3AVR is severely resource-constrained, and as QMK continues to grow, it is approaching a point where support for AVR may need to be moved to legacy status as newer development is unable to fit into those constraints.
4 4
5However, if you need to reduce the compiled size of your firmware, there are a number of options to do so. 5However, if you need to reduce the compiled size of your firmware, there are a number of options to do so.
6 6
7## `rules.mk` Settings 7## `rules.mk` Settings
8First and foremost is enabling link time optimization. To do so, add this to your rules.mk: 8First and foremost is enabling link time optimization. To do so, add this to your rules.mk:
9```make 9```make
10LTO_ENABLE = yes 10LTO_ENABLE = yes
11``` 11```
12This will cause the final step to take longer, but should get you a smaller compiled size. This also disables Action Functions, and Action Macros, both of which are deprecated. 12This will cause the final step to take longer, but should get you a smaller compiled size. This also disables Action Functions, and Action Macros, both of which are deprecated.
13This will get you the most savings, in most situations. 13This will get you the most savings, in most situations.
14 14
15From there, disabling extraneous systems will help -- e.g.: 15From there, disabling extraneous systems will help -- e.g.:
16```make 16```make
@@ -19,7 +19,7 @@ COMMAND_ENABLE = no
19MOUSEKEY_ENABLE = no 19MOUSEKEY_ENABLE = no
20EXTRAKEY_ENABLE = no 20EXTRAKEY_ENABLE = no
21``` 21```
22This disables some of the functionality that you may not need. But note that extrakeys disables stuff like the media keys and system volume control. 22This disables some of the functionality that you may not need. But note that extrakeys disables stuff like the media keys and system volume control.
23 23
24If that isn't enough to get your firmware down to size, then there are some additional features that you can disable: 24If that isn't enough to get your firmware down to size, then there are some additional features that you can disable:
25```make 25```make
@@ -27,19 +27,19 @@ SPACE_CADET_ENABLE = no
27GRAVE_ESC_ENABLE = no 27GRAVE_ESC_ENABLE = no
28MAGIC_ENABLE = no 28MAGIC_ENABLE = no
29``` 29```
30These features are enabled by default, but may not be needed. Double check to make sure, though. 30These features are enabled by default, but may not be needed. Double check to make sure, though.
31Largest in size is "magic" -- the QMK magic keycodes -- which control things like NKRO toggling, GUI and ALT/CTRL swapping, etc. Disabling it will disable those functions. 31Largest in size is "magic" -- the QMK magic keycodes -- which control things like NKRO toggling, GUI and ALT/CTRL swapping, etc. Disabling it will disable those functions.
32 32
33## `config.h` Settings 33## `config.h` Settings
34 34
35If you've done all of that, and you don't want to disable features like RGB, Audio, OLEDs, etc, there are some additional options that you can add to your config.h that can help. 35If you've done all of that, and you don't want to disable features like RGB, Audio, OLEDs, etc, there are some additional options that you can add to your config.h that can help.
36 36
37Starting with Lock Key support. If you have an Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your `config.h`: 37Starting with Lock Key support. If you have an Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your `config.h`:
38```c 38```c
39#undef LOCKING_SUPPORT_ENABLE 39#undef LOCKING_SUPPORT_ENABLE
40#undef LOCKING_RESYNC_ENABLE 40#undef LOCKING_RESYNC_ENABLE
41``` 41```
42Oneshots. If you're not using these, you can disable the feature by adding this to your `config.h`: 42Oneshots. If you're not using these, you can disable the feature by adding this to your `config.h`:
43```c 43```c
44#define NO_ACTION_ONESHOT 44#define NO_ACTION_ONESHOT
45``` 45```
@@ -49,7 +49,7 @@ The same with tapping keys (mod tap, layer tap, etc)
49``` 49```
50## Audio Settings 50## Audio Settings
51 51
52If you're using the Audio feature, by default that includes the music mode feature. This tranlates matrix positions into notes. It's neat for sure, but most likely, you're not using it. You can disable it by adding this to your `config.h`: 52If you're using the Audio feature, by default that includes the music mode feature. This tranlates matrix positions into notes. It's neat for sure, but most likely, you're not using it. You can disable it by adding this to your `config.h`:
53```c 53```c
54#define NO_MUSIC_MODE 54#define NO_MUSIC_MODE
55``` 55```
@@ -60,7 +60,7 @@ MUSIC_ENABLE = no
60 60
61## Layers 61## Layers
62 62
63There are also some options for layers, that can reduce the firmware size. All of these settngs are for your `config.h`. 63There are also some options for layers, that can reduce the firmware size. All of these settings are for your `config.h`.
64 64
65You can limit the number of layers that the firmware uses -- if you're using less than 8 layers in total: 65You can limit the number of layers that the firmware uses -- if you're using less than 8 layers in total:
66```c 66```c
@@ -93,7 +93,7 @@ into this:
93 oled_write_P(PSTR("WPM: "), false); 93 oled_write_P(PSTR("WPM: "), false);
94 oled_write(get_u8_str(get_current_wpm(), ' '), false); 94 oled_write(get_u8_str(get_current_wpm(), ' '), false);
95``` 95```
96which outputs `WPM: 5`. Or this: 96which outputs `WPM: 5`. Or this:
97```c 97```c
98 // NEW CODE 98 // NEW CODE
99 oled_write_P(PSTR("WPM: "), false); 99 oled_write_P(PSTR("WPM: "), false);
@@ -103,7 +103,7 @@ which outputs `WPM: 005`.
103 103
104## RGB Settings 104## RGB Settings
105 105
106If you're using RGB on your board, both RGB Light (Underglow) and RGB Matrix (per key RGB) now require defines to enable different animations -- some keyboards enable a lot of animations by default, so you can generally gain back some space by disabling specific animations if you don't use them.. For RGB Light you can disable these in your keymap's `config.h`: 106If you're using RGB on your board, both RGB Light (Underglow) and RGB Matrix (per key RGB) now require defines to enable different animations -- some keyboards enable a lot of animations by default, so you can generally gain back some space by disabling specific animations if you don't use them. For RGB Light you can disable these in your keymap's `config.h`:
107```c 107```c
108#undef RGBLIGHT_ANIMATIONS 108#undef RGBLIGHT_ANIMATIONS
109#undef RGBLIGHT_EFFECT_BREATHING 109#undef RGBLIGHT_EFFECT_BREATHING
@@ -118,7 +118,7 @@ If you're using RGB on your board, both RGB Light (Underglow) and RGB Matrix (pe
118#undef RGBLIGHT_EFFECT_TWINKLE 118#undef RGBLIGHT_EFFECT_TWINKLE
119``` 119```
120 120
121For RGB Matrix, these need to be explicitly enabled as well. To disable any that were enabled by the keyboard, add one or more of these to your keymap's `config.h`: 121For RGB Matrix, these need to be explicitly enabled as well. To disable any that were enabled by the keyboard, add one or more of these to your keymap's `config.h`:
122```c 122```c
123#undef ENABLE_RGB_MATRIX_ALPHAS_MODS 123#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
124#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN 124#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -168,7 +168,7 @@ For RGB Matrix, these need to be explicitly enabled as well. To disable any that
168 168
169# Final Thoughts 169# Final Thoughts
170 170
171If you've done all of this, and your firmware is still too large, then it's time. It's time to consider making the switch to ARM. Unfortunately, right now is the worst possible time for that, due to the silicon shortage, and supply chain issues. Getting an ARM chip is difficult, at best, and significantly overpriced, at worst. 171If you've done all of this, and your firmware is still too large, then it's time. It's time to consider making the switch to ARM. Unfortunately, right now is the worst possible time for that, due to the silicon shortage, and supply chain issues. Getting an ARM chip is difficult, at best, and significantly overpriced, at worst.
172 -- Drashna 172 -- Drashna
173 173
174That said, there are a number of Pro Micro replacements with ARM controllers: 174That said, there are a number of Pro Micro replacements with ARM controllers:
@@ -176,5 +176,5 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
176* [Bonsai C](https://github.com/customMK/Bonsai-C) (Open Source, DIY/PCBA) 176* [Bonsai C](https://github.com/customMK/Bonsai-C) (Open Source, DIY/PCBA)
177* [Raspberry Pi 2040](https://www.sparkfun.com/products/18288) (not currently supported, no ETA) 177* [Raspberry Pi 2040](https://www.sparkfun.com/products/18288) (not currently supported, no ETA)
178 178
179There are other, non-Pro Micro compatible boards out there. The most popular being: 179There are other, non-Pro Micro compatible boards out there. The most popular being:
180* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD) 180* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD)