diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-08-27 14:54:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-27 14:54:55 -0400 |
commit | f815b4871ebc5cc2f8d1a306eceec68c0a973a4c (patch) | |
tree | 84c78137841ad83036de7e36579bc7973b024f7a | |
parent | 36b6a96596e6cbca879d5304a586e279c15b04a9 (diff) | |
parent | cff26bc48413ec62d4f4a37e3a6ba34721e7670c (diff) | |
download | qmk_firmware-f815b4871ebc5cc2f8d1a306eceec68c0a973a4c.tar.gz qmk_firmware-f815b4871ebc5cc2f8d1a306eceec68c0a973a4c.zip |
Merge pull request #691 from fredizzimo/fix_line_endings
Fix line endings
40 files changed, 6252 insertions, 6251 deletions
diff --git a/.gitattributes b/.gitattributes index 8fd1fd752..92dfc3c61 100644 --- a/.gitattributes +++ b/.gitattributes | |||
@@ -91,3 +91,4 @@ GRAPHICS | |||
91 | 91 | ||
92 | # hex files | 92 | # hex files |
93 | *.hex binary | 93 | *.hex binary |
94 | *.eep binary | ||
diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c index 31319ef57..2809c9d18 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c | |||
@@ -1,49 +1,49 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "hal.h" | 17 | #include "hal.h" |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * @brief PAL setup. | 20 | * @brief PAL setup. |
21 | * @details Digital I/O ports static configuration as defined in @p board.h. | 21 | * @details Digital I/O ports static configuration as defined in @p board.h. |
22 | * This variable is used by the HAL when initializing the PAL driver. | 22 | * This variable is used by the HAL when initializing the PAL driver. |
23 | */ | 23 | */ |
24 | #if HAL_USE_PAL || defined(__DOXYGEN__) | 24 | #if HAL_USE_PAL || defined(__DOXYGEN__) |
25 | const PALConfig pal_default_config = | 25 | const PALConfig pal_default_config = |
26 | { | 26 | { |
27 | {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, | 27 | {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, |
28 | {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, | 28 | {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, |
29 | {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, | 29 | {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, |
30 | {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, | 30 | {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, |
31 | {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, | 31 | {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, |
32 | }; | 32 | }; |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Early initialization code. | 36 | * Early initialization code. |
37 | * This initialization must be performed just after stack setup and before | 37 | * This initialization must be performed just after stack setup and before |
38 | * any other initialization. | 38 | * any other initialization. |
39 | */ | 39 | */ |
40 | void __early_init(void) { | 40 | void __early_init(void) { |
41 | 41 | ||
42 | stm32_clock_init(); | 42 | stm32_clock_init(); |
43 | } | 43 | } |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Board-specific initialization code. | 46 | * Board-specific initialization code. |
47 | */ | 47 | */ |
48 | void boardInit(void) { | 48 | void boardInit(void) { |
49 | } | 49 | } |
diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h index 7253e7782..b31d74307 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h | |||
@@ -1,166 +1,166 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _BOARD_H_ | 17 | #ifndef _BOARD_H_ |
18 | #define _BOARD_H_ | 18 | #define _BOARD_H_ |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Setup for a Generic STM32F103 board. | 21 | * Setup for a Generic STM32F103 board. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Board identifier. | 25 | * Board identifier. |
26 | */ | 26 | */ |
27 | #define BOARD_GENERIC_STM32_F103 | 27 | #define BOARD_GENERIC_STM32_F103 |
28 | #define BOARD_NAME "Generic STM32F103x board" | 28 | #define BOARD_NAME "Generic STM32F103x board" |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * Board frequencies. | 31 | * Board frequencies. |
32 | */ | 32 | */ |
33 | #define STM32_LSECLK 32768 | 33 | #define STM32_LSECLK 32768 |
34 | #define STM32_HSECLK 8000000 | 34 | #define STM32_HSECLK 8000000 |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. | 37 | * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. |
38 | */ | 38 | */ |
39 | #define STM32F103xB | 39 | #define STM32F103xB |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * IO pins assignments | 42 | * IO pins assignments |
43 | */ | 43 | */ |
44 | 44 | ||
45 | /* on-board */ | 45 | /* on-board */ |
46 | 46 | ||
47 | #define GPIOC_LED 13 | 47 | #define GPIOC_LED 13 |
48 | #define GPIOD_OSC_IN 0 | 48 | #define GPIOD_OSC_IN 0 |
49 | #define GPIOD_OSC_OUT 1 | 49 | #define GPIOD_OSC_OUT 1 |
50 | 50 | ||
51 | /* In case your board has a "USB enable" hardware | 51 | /* In case your board has a "USB enable" hardware |
52 | controlled by a pin, define it here. (It could be just | 52 | controlled by a pin, define it here. (It could be just |
53 | a 1.5k resistor connected to D+ line.) | 53 | a 1.5k resistor connected to D+ line.) |
54 | */ | 54 | */ |
55 | /* | 55 | /* |
56 | #define GPIOB_USB_DISC 10 | 56 | #define GPIOB_USB_DISC 10 |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * I/O ports initial setup, this configuration is established soon after reset | 60 | * I/O ports initial setup, this configuration is established soon after reset |
61 | * in the initialization code. | 61 | * in the initialization code. |
62 | * | 62 | * |
63 | * The digits have the following meaning: | 63 | * The digits have the following meaning: |
64 | * 0 - Analog input. | 64 | * 0 - Analog input. |
65 | * 1 - Push Pull output 10MHz. | 65 | * 1 - Push Pull output 10MHz. |
66 | * 2 - Push Pull output 2MHz. | 66 | * 2 - Push Pull output 2MHz. |
67 | * 3 - Push Pull output 50MHz. | 67 | * 3 - Push Pull output 50MHz. |
68 | * 4 - Digital input. | 68 | * 4 - Digital input. |
69 | * 5 - Open Drain output 10MHz. | 69 | * 5 - Open Drain output 10MHz. |
70 | * 6 - Open Drain output 2MHz. | 70 | * 6 - Open Drain output 2MHz. |
71 | * 7 - Open Drain output 50MHz. | 71 | * 7 - Open Drain output 50MHz. |
72 | * 8 - Digital input with PullUp or PullDown resistor depending on ODR. | 72 | * 8 - Digital input with PullUp or PullDown resistor depending on ODR. |
73 | * 9 - Alternate Push Pull output 10MHz. | 73 | * 9 - Alternate Push Pull output 10MHz. |
74 | * A - Alternate Push Pull output 2MHz. | 74 | * A - Alternate Push Pull output 2MHz. |
75 | * B - Alternate Push Pull output 50MHz. | 75 | * B - Alternate Push Pull output 50MHz. |
76 | * C - Reserved. | 76 | * C - Reserved. |
77 | * D - Alternate Open Drain output 10MHz. | 77 | * D - Alternate Open Drain output 10MHz. |
78 | * E - Alternate Open Drain output 2MHz. | 78 | * E - Alternate Open Drain output 2MHz. |
79 | * F - Alternate Open Drain output 50MHz. | 79 | * F - Alternate Open Drain output 50MHz. |
80 | * Please refer to the STM32 Reference Manual for details. | 80 | * Please refer to the STM32 Reference Manual for details. |
81 | */ | 81 | */ |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Port A setup. | 84 | * Port A setup. |
85 | * Everything input with pull-up except: | 85 | * Everything input with pull-up except: |
86 | * PA2 - Alternate output (USART2 TX). | 86 | * PA2 - Alternate output (USART2 TX). |
87 | * PA3 - Normal input (USART2 RX). | 87 | * PA3 - Normal input (USART2 RX). |
88 | * PA9 - Alternate output (USART1 TX). | 88 | * PA9 - Alternate output (USART1 TX). |
89 | * PA10 - Normal input (USART1 RX). | 89 | * PA10 - Normal input (USART1 RX). |
90 | */ | 90 | */ |
91 | #define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ | 91 | #define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ |
92 | #define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ | 92 | #define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ |
93 | #define VAL_GPIOAODR 0xFFFFFFFF | 93 | #define VAL_GPIOAODR 0xFFFFFFFF |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * Port B setup. | 96 | * Port B setup. |
97 | * Everything input with pull-up except: | 97 | * Everything input with pull-up except: |
98 | * PB10 - Push Pull output (USB switch). | 98 | * PB10 - Push Pull output (USB switch). |
99 | */ | 99 | */ |
100 | #define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ | 100 | #define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ |
101 | #define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ | 101 | #define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ |
102 | #define VAL_GPIOBODR 0xFFFFFFFF | 102 | #define VAL_GPIOBODR 0xFFFFFFFF |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Port C setup. | 105 | * Port C setup. |
106 | * Everything input with pull-up except: | 106 | * Everything input with pull-up except: |
107 | * PC13 - Push Pull output (LED). | 107 | * PC13 - Push Pull output (LED). |
108 | */ | 108 | */ |
109 | #define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ | 109 | #define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ |
110 | #define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ | 110 | #define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ |
111 | #define VAL_GPIOCODR 0xFFFFFFFF | 111 | #define VAL_GPIOCODR 0xFFFFFFFF |
112 | 112 | ||
113 | /* | 113 | /* |
114 | * Port D setup. | 114 | * Port D setup. |
115 | * Everything input with pull-up except: | 115 | * Everything input with pull-up except: |
116 | * PD0 - Normal input (XTAL). | 116 | * PD0 - Normal input (XTAL). |
117 | * PD1 - Normal input (XTAL). | 117 | * PD1 - Normal input (XTAL). |
118 | */ | 118 | */ |
119 | #define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ | 119 | #define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ |
120 | #define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ | 120 | #define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ |
121 | #define VAL_GPIODODR 0xFFFFFFFF | 121 | #define VAL_GPIODODR 0xFFFFFFFF |
122 | 122 | ||
123 | /* | 123 | /* |
124 | * Port E setup. | 124 | * Port E setup. |
125 | * Everything input with pull-up except: | 125 | * Everything input with pull-up except: |
126 | */ | 126 | */ |
127 | #define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ | 127 | #define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ |
128 | #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ | 128 | #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ |
129 | #define VAL_GPIOEODR 0xFFFFFFFF | 129 | #define VAL_GPIOEODR 0xFFFFFFFF |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * USB bus activation macro, required by the USB driver. | 132 | * USB bus activation macro, required by the USB driver. |
133 | */ | 133 | */ |
134 | /* The point is that most of the generic STM32F103* boards | 134 | /* The point is that most of the generic STM32F103* boards |
135 | have a 1.5k resistor connected on one end to the D+ line | 135 | have a 1.5k resistor connected on one end to the D+ line |
136 | and on the other end to some pin. Or even a slightly more | 136 | and on the other end to some pin. Or even a slightly more |
137 | complicated "USB enable" circuit, controlled by a pin. | 137 | complicated "USB enable" circuit, controlled by a pin. |
138 | That should go here. | 138 | That should go here. |
139 | 139 | ||
140 | However on some boards (e.g. one that I have), there's no | 140 | However on some boards (e.g. one that I have), there's no |
141 | such hardware. In which case it's better to not do anything. | 141 | such hardware. In which case it's better to not do anything. |
142 | */ | 142 | */ |
143 | /* | 143 | /* |
144 | #define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) | 144 | #define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) |
145 | */ | 145 | */ |
146 | #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); | 146 | #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * USB bus de-activation macro, required by the USB driver. | 149 | * USB bus de-activation macro, required by the USB driver. |
150 | */ | 150 | */ |
151 | /* | 151 | /* |
152 | #define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) | 152 | #define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) |
153 | */ | 153 | */ |
154 | #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); | 154 | #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); |
155 | 155 | ||
156 | #if !defined(_FROM_ASM_) | 156 | #if !defined(_FROM_ASM_) |
157 | #ifdef __cplusplus | 157 | #ifdef __cplusplus |
158 | extern "C" { | 158 | extern "C" { |
159 | #endif | 159 | #endif |
160 | void boardInit(void); | 160 | void boardInit(void); |
161 | #ifdef __cplusplus | 161 | #ifdef __cplusplus |
162 | } | 162 | } |
163 | #endif | 163 | #endif |
164 | #endif /* _FROM_ASM_ */ | 164 | #endif /* _FROM_ASM_ */ |
165 | 165 | ||
166 | #endif /* _BOARD_H_ */ | 166 | #endif /* _BOARD_H_ */ |
diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk index d692c0ee4..48e0e51fe 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk | |||
@@ -1,5 +1,5 @@ | |||
1 | # List of all the board related files. | 1 | # List of all the board related files. |
2 | BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c | 2 | BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c |
3 | 3 | ||
4 | # Required include directories | 4 | # Required include directories |
5 | BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103 | 5 | BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103 |
diff --git a/keyboards/chibios_test/ld/MKL26Z64.ld b/keyboards/chibios_test/ld/MKL26Z64.ld index fb141f888..c4ca8b874 100644 --- a/keyboards/chibios_test/ld/MKL26Z64.ld +++ b/keyboards/chibios_test/ld/MKL26Z64.ld | |||
@@ -1,105 +1,105 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com | 2 | * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com |
3 | * (C) 2016 flabbergast <s3+flabbergast@sdfeu.org> | 3 | * (C) 2016 flabbergast <s3+flabbergast@sdfeu.org> |
4 | * | 4 | * |
5 | * Permission is hereby granted, free of charge, to any person obtaining | 5 | * Permission is hereby granted, free of charge, to any person obtaining |
6 | * a copy of this software and associated documentation files (the "Software"), | 6 | * a copy of this software and associated documentation files (the "Software"), |
7 | * to deal in the Software without restriction, including without limitation | 7 | * to deal in the Software without restriction, including without limitation |
8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
9 | * and/or sell copies of the Software, and to permit persons to whom the | 9 | * and/or sell copies of the Software, and to permit persons to whom the |
10 | * Software is furnished to do so, subject to the following conditions: | 10 | * Software is furnished to do so, subject to the following conditions: |
11 | * | 11 | * |
12 | * The above copyright notice and this permission notice shall be included in | 12 | * The above copyright notice and this permission notice shall be included in |
13 | * all copies or substantial portions of the Software. | 13 | * all copies or substantial portions of the Software. |
14 | * | 14 | * |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
21 | * SOFTWARE. | 21 | * SOFTWARE. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * KL26Z64 memory setup. | 25 | * KL26Z64 memory setup. |
26 | */ | 26 | */ |
27 | MEMORY | 27 | MEMORY |
28 | { | 28 | { |
29 | flash0 : org = 0x00000000, len = 0x100 | 29 | flash0 : org = 0x00000000, len = 0x100 |
30 | flash1 : org = 0x00000400, len = 0x10 | 30 | flash1 : org = 0x00000400, len = 0x10 |
31 | flash2 : org = 0x00000410, len = 62k - 0x410 | 31 | flash2 : org = 0x00000410, len = 62k - 0x410 |
32 | flash3 : org = 0x0000F800, len = 2k | 32 | flash3 : org = 0x0000F800, len = 2k |
33 | flash4 : org = 0x00000000, len = 0 | 33 | flash4 : org = 0x00000000, len = 0 |
34 | flash5 : org = 0x00000000, len = 0 | 34 | flash5 : org = 0x00000000, len = 0 |
35 | flash6 : org = 0x00000000, len = 0 | 35 | flash6 : org = 0x00000000, len = 0 |
36 | flash7 : org = 0x00000000, len = 0 | 36 | flash7 : org = 0x00000000, len = 0 |
37 | ram0 : org = 0x1FFFF800, len = 8k | 37 | ram0 : org = 0x1FFFF800, len = 8k |
38 | ram1 : org = 0x00000000, len = 0 | 38 | ram1 : org = 0x00000000, len = 0 |
39 | ram2 : org = 0x00000000, len = 0 | 39 | ram2 : org = 0x00000000, len = 0 |
40 | ram3 : org = 0x00000000, len = 0 | 40 | ram3 : org = 0x00000000, len = 0 |
41 | ram4 : org = 0x00000000, len = 0 | 41 | ram4 : org = 0x00000000, len = 0 |
42 | ram5 : org = 0x00000000, len = 0 | 42 | ram5 : org = 0x00000000, len = 0 |
43 | ram6 : org = 0x00000000, len = 0 | 43 | ram6 : org = 0x00000000, len = 0 |
44 | ram7 : org = 0x00000000, len = 0 | 44 | ram7 : org = 0x00000000, len = 0 |
45 | } | 45 | } |
46 | 46 | ||
47 | /* Flash region for the configuration bytes.*/ | 47 | /* Flash region for the configuration bytes.*/ |
48 | SECTIONS | 48 | SECTIONS |
49 | { | 49 | { |
50 | .cfmprotect : ALIGN(4) SUBALIGN(4) | 50 | .cfmprotect : ALIGN(4) SUBALIGN(4) |
51 | { | 51 | { |
52 | KEEP(*(.cfmconfig)) | 52 | KEEP(*(.cfmconfig)) |
53 | } > flash1 | 53 | } > flash1 |
54 | } | 54 | } |
55 | 55 | ||
56 | /* For each data/text section two region are defined, a virtual region | 56 | /* For each data/text section two region are defined, a virtual region |
57 | and a load region (_LMA suffix).*/ | 57 | and a load region (_LMA suffix).*/ |
58 | 58 | ||
59 | /* Flash region to be used for exception vectors.*/ | 59 | /* Flash region to be used for exception vectors.*/ |
60 | REGION_ALIAS("VECTORS_FLASH", flash0); | 60 | REGION_ALIAS("VECTORS_FLASH", flash0); |
61 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); | 61 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); |
62 | 62 | ||
63 | /* Flash region to be used for constructors and destructors.*/ | 63 | /* Flash region to be used for constructors and destructors.*/ |
64 | REGION_ALIAS("XTORS_FLASH", flash2); | 64 | REGION_ALIAS("XTORS_FLASH", flash2); |
65 | REGION_ALIAS("XTORS_FLASH_LMA", flash2); | 65 | REGION_ALIAS("XTORS_FLASH_LMA", flash2); |
66 | 66 | ||
67 | /* Flash region to be used for code text.*/ | 67 | /* Flash region to be used for code text.*/ |
68 | REGION_ALIAS("TEXT_FLASH", flash2); | 68 | REGION_ALIAS("TEXT_FLASH", flash2); |
69 | REGION_ALIAS("TEXT_FLASH_LMA", flash2); | 69 | REGION_ALIAS("TEXT_FLASH_LMA", flash2); |
70 | 70 | ||
71 | /* Flash region to be used for read only data.*/ | 71 | /* Flash region to be used for read only data.*/ |
72 | REGION_ALIAS("RODATA_FLASH", flash2); | 72 | REGION_ALIAS("RODATA_FLASH", flash2); |
73 | REGION_ALIAS("RODATA_FLASH_LMA", flash2); | 73 | REGION_ALIAS("RODATA_FLASH_LMA", flash2); |
74 | 74 | ||
75 | /* Flash region to be used for various.*/ | 75 | /* Flash region to be used for various.*/ |
76 | REGION_ALIAS("VARIOUS_FLASH", flash2); | 76 | REGION_ALIAS("VARIOUS_FLASH", flash2); |
77 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); | 77 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); |
78 | 78 | ||
79 | /* Flash region to be used for RAM(n) initialization data.*/ | 79 | /* Flash region to be used for RAM(n) initialization data.*/ |
80 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); | 80 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); |
81 | 81 | ||
82 | /* RAM region to be used for Main stack. This stack accommodates the processing | 82 | /* RAM region to be used for Main stack. This stack accommodates the processing |
83 | of all exceptions and interrupts.*/ | 83 | of all exceptions and interrupts.*/ |
84 | REGION_ALIAS("MAIN_STACK_RAM", ram0); | 84 | REGION_ALIAS("MAIN_STACK_RAM", ram0); |
85 | 85 | ||
86 | /* RAM region to be used for the process stack. This is the stack used by | 86 | /* RAM region to be used for the process stack. This is the stack used by |
87 | the main() function.*/ | 87 | the main() function.*/ |
88 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); | 88 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); |
89 | 89 | ||
90 | /* RAM region to be used for data segment.*/ | 90 | /* RAM region to be used for data segment.*/ |
91 | REGION_ALIAS("DATA_RAM", ram0); | 91 | REGION_ALIAS("DATA_RAM", ram0); |
92 | REGION_ALIAS("DATA_RAM_LMA", flash2); | 92 | REGION_ALIAS("DATA_RAM_LMA", flash2); |
93 | 93 | ||
94 | /* RAM region to be used for BSS segment.*/ | 94 | /* RAM region to be used for BSS segment.*/ |
95 | REGION_ALIAS("BSS_RAM", ram0); | 95 | REGION_ALIAS("BSS_RAM", ram0); |
96 | 96 | ||
97 | /* RAM region to be used for the default heap.*/ | 97 | /* RAM region to be used for the default heap.*/ |
98 | REGION_ALIAS("HEAP_RAM", ram0); | 98 | REGION_ALIAS("HEAP_RAM", ram0); |
99 | 99 | ||
100 | __eeprom_workarea_start__ = ORIGIN(flash3); | 100 | __eeprom_workarea_start__ = ORIGIN(flash3); |
101 | __eeprom_workarea_size__ = LENGTH(flash3); | 101 | __eeprom_workarea_size__ = LENGTH(flash3); |
102 | __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; | 102 | __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; |
103 | 103 | ||
104 | /* Generic rules inclusion.*/ | 104 | /* Generic rules inclusion.*/ |
105 | INCLUDE rules.ld | 105 | INCLUDE rules.ld |
diff --git a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld index 00613328e..f9bfe9c00 100644 --- a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld | |||
@@ -1,88 +1,88 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * ST32F103xB memory setup for use with the maplemini bootloader. | 18 | * ST32F103xB memory setup for use with the maplemini bootloader. |
19 | * You will have to | 19 | * You will have to |
20 | * #define CORTEX_VTOR_INIT 0x5000 | 20 | * #define CORTEX_VTOR_INIT 0x5000 |
21 | * in your projects chconf.h | 21 | * in your projects chconf.h |
22 | */ | 22 | */ |
23 | MEMORY | 23 | MEMORY |
24 | { | 24 | { |
25 | flash0 : org = 0x08002000, len = 128k - 0x2000 | 25 | flash0 : org = 0x08002000, len = 128k - 0x2000 |
26 | flash1 : org = 0x00000000, len = 0 | 26 | flash1 : org = 0x00000000, len = 0 |
27 | flash2 : org = 0x00000000, len = 0 | 27 | flash2 : org = 0x00000000, len = 0 |
28 | flash3 : org = 0x00000000, len = 0 | 28 | flash3 : org = 0x00000000, len = 0 |
29 | flash4 : org = 0x00000000, len = 0 | 29 | flash4 : org = 0x00000000, len = 0 |
30 | flash5 : org = 0x00000000, len = 0 | 30 | flash5 : org = 0x00000000, len = 0 |
31 | flash6 : org = 0x00000000, len = 0 | 31 | flash6 : org = 0x00000000, len = 0 |
32 | flash7 : org = 0x00000000, len = 0 | 32 | flash7 : org = 0x00000000, len = 0 |
33 | ram0 : org = 0x20000000, len = 20k | 33 | ram0 : org = 0x20000000, len = 20k |
34 | ram1 : org = 0x00000000, len = 0 | 34 | ram1 : org = 0x00000000, len = 0 |
35 | ram2 : org = 0x00000000, len = 0 | 35 | ram2 : org = 0x00000000, len = 0 |
36 | ram3 : org = 0x00000000, len = 0 | 36 | ram3 : org = 0x00000000, len = 0 |
37 | ram4 : org = 0x00000000, len = 0 | 37 | ram4 : org = 0x00000000, len = 0 |
38 | ram5 : org = 0x00000000, len = 0 | 38 | ram5 : org = 0x00000000, len = 0 |
39 | ram6 : org = 0x00000000, len = 0 | 39 | ram6 : org = 0x00000000, len = 0 |
40 | ram7 : org = 0x00000000, len = 0 | 40 | ram7 : org = 0x00000000, len = 0 |
41 | } | 41 | } |
42 | 42 | ||
43 | /* For each data/text section two region are defined, a virtual region | 43 | /* For each data/text section two region are defined, a virtual region |
44 | and a load region (_LMA suffix).*/ | 44 | and a load region (_LMA suffix).*/ |
45 | 45 | ||
46 | /* Flash region to be used for exception vectors.*/ | 46 | /* Flash region to be used for exception vectors.*/ |
47 | REGION_ALIAS("VECTORS_FLASH", flash0); | 47 | REGION_ALIAS("VECTORS_FLASH", flash0); |
48 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); | 48 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); |
49 | 49 | ||
50 | /* Flash region to be used for constructors and destructors.*/ | 50 | /* Flash region to be used for constructors and destructors.*/ |
51 | REGION_ALIAS("XTORS_FLASH", flash0); | 51 | REGION_ALIAS("XTORS_FLASH", flash0); |
52 | REGION_ALIAS("XTORS_FLASH_LMA", flash0); | 52 | REGION_ALIAS("XTORS_FLASH_LMA", flash0); |
53 | 53 | ||
54 | /* Flash region to be used for code text.*/ | 54 | /* Flash region to be used for code text.*/ |
55 | REGION_ALIAS("TEXT_FLASH", flash0); | 55 | REGION_ALIAS("TEXT_FLASH", flash0); |
56 | REGION_ALIAS("TEXT_FLASH_LMA", flash0); | 56 | REGION_ALIAS("TEXT_FLASH_LMA", flash0); |
57 | 57 | ||
58 | /* Flash region to be used for read only data.*/ | 58 | /* Flash region to be used for read only data.*/ |
59 | REGION_ALIAS("RODATA_FLASH", flash0); | 59 | REGION_ALIAS("RODATA_FLASH", flash0); |
60 | REGION_ALIAS("RODATA_FLASH_LMA", flash0); | 60 | REGION_ALIAS("RODATA_FLASH_LMA", flash0); |
61 | 61 | ||
62 | /* Flash region to be used for various.*/ | 62 | /* Flash region to be used for various.*/ |
63 | REGION_ALIAS("VARIOUS_FLASH", flash0); | 63 | REGION_ALIAS("VARIOUS_FLASH", flash0); |
64 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); | 64 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); |
65 | 65 | ||
66 | /* Flash region to be used for RAM(n) initialization data.*/ | 66 | /* Flash region to be used for RAM(n) initialization data.*/ |
67 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); | 67 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); |
68 | 68 | ||
69 | /* RAM region to be used for Main stack. This stack accommodates the processing | 69 | /* RAM region to be used for Main stack. This stack accommodates the processing |
70 | of all exceptions and interrupts.*/ | 70 | of all exceptions and interrupts.*/ |
71 | REGION_ALIAS("MAIN_STACK_RAM", ram0); | 71 | REGION_ALIAS("MAIN_STACK_RAM", ram0); |
72 | 72 | ||
73 | /* RAM region to be used for the process stack. This is the stack used by | 73 | /* RAM region to be used for the process stack. This is the stack used by |
74 | the main() function.*/ | 74 | the main() function.*/ |
75 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); | 75 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); |
76 | 76 | ||
77 | /* RAM region to be used for data segment.*/ | 77 | /* RAM region to be used for data segment.*/ |
78 | REGION_ALIAS("DATA_RAM", ram0); | 78 | REGION_ALIAS("DATA_RAM", ram0); |
79 | REGION_ALIAS("DATA_RAM_LMA", flash0); | 79 | REGION_ALIAS("DATA_RAM_LMA", flash0); |
80 | 80 | ||
81 | /* RAM region to be used for BSS segment.*/ | 81 | /* RAM region to be used for BSS segment.*/ |
82 | REGION_ALIAS("BSS_RAM", ram0); | 82 | REGION_ALIAS("BSS_RAM", ram0); |
83 | 83 | ||
84 | /* RAM region to be used for the default heap.*/ | 84 | /* RAM region to be used for the default heap.*/ |
85 | REGION_ALIAS("HEAP_RAM", ram0); | 85 | REGION_ALIAS("HEAP_RAM", ram0); |
86 | 86 | ||
87 | /* Generic rules inclusion.*/ | 87 | /* Generic rules inclusion.*/ |
88 | INCLUDE rules.ld | 88 | INCLUDE rules.ld |
diff --git a/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h b/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h index 3d877aaa2..faca3defd 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h +++ b/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h | |||
@@ -1,171 +1,171 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MCUCONF_H_ | 17 | #ifndef _MCUCONF_H_ |
18 | #define _MCUCONF_H_ | 18 | #define _MCUCONF_H_ |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * STM32F0xx drivers configuration. | 21 | * STM32F0xx drivers configuration. |
22 | * The following settings override the default settings present in | 22 | * The following settings override the default settings present in |
23 | * the various device driver implementation headers. | 23 | * the various device driver implementation headers. |
24 | * Note that the settings for each driver only have effect if the whole | 24 | * Note that the settings for each driver only have effect if the whole |
25 | * driver is enabled in halconf.h. | 25 | * driver is enabled in halconf.h. |
26 | * | 26 | * |
27 | * IRQ priorities: | 27 | * IRQ priorities: |
28 | * 3...0 Lowest...Highest. | 28 | * 3...0 Lowest...Highest. |
29 | * | 29 | * |
30 | * DMA priorities: | 30 | * DMA priorities: |
31 | * 0...3 Lowest...Highest. | 31 | * 0...3 Lowest...Highest. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define STM32F0xx_MCUCONF | 34 | #define STM32F0xx_MCUCONF |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * HAL driver system settings. | 37 | * HAL driver system settings. |
38 | */ | 38 | */ |
39 | #define STM32_NO_INIT FALSE | 39 | #define STM32_NO_INIT FALSE |
40 | #define STM32_PVD_ENABLE FALSE | 40 | #define STM32_PVD_ENABLE FALSE |
41 | #define STM32_PLS STM32_PLS_LEV0 | 41 | #define STM32_PLS STM32_PLS_LEV0 |
42 | #define STM32_HSI_ENABLED TRUE | 42 | #define STM32_HSI_ENABLED TRUE |
43 | #define STM32_HSI14_ENABLED TRUE | 43 | #define STM32_HSI14_ENABLED TRUE |
44 | #define STM32_HSI48_ENABLED FALSE | 44 | #define STM32_HSI48_ENABLED FALSE |
45 | #define STM32_LSI_ENABLED TRUE | 45 | #define STM32_LSI_ENABLED TRUE |
46 | #define STM32_HSE_ENABLED FALSE | 46 | #define STM32_HSE_ENABLED FALSE |
47 | #define STM32_LSE_ENABLED FALSE | 47 | #define STM32_LSE_ENABLED FALSE |
48 | #define STM32_SW STM32_SW_PLL | 48 | #define STM32_SW STM32_SW_PLL |
49 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 | 49 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 |
50 | #define STM32_PREDIV_VALUE 1 | 50 | #define STM32_PREDIV_VALUE 1 |
51 | #define STM32_PLLMUL_VALUE 12 | 51 | #define STM32_PLLMUL_VALUE 12 |
52 | #define STM32_HPRE STM32_HPRE_DIV1 | 52 | #define STM32_HPRE STM32_HPRE_DIV1 |
53 | #define STM32_PPRE STM32_PPRE_DIV1 | 53 | #define STM32_PPRE STM32_PPRE_DIV1 |
54 | #define STM32_ADCSW STM32_ADCSW_HSI14 | 54 | #define STM32_ADCSW STM32_ADCSW_HSI14 |
55 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | 55 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 |
56 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | 56 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK |
57 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | 57 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 |
58 | #define STM32_ADCSW STM32_ADCSW_HSI14 | 58 | #define STM32_ADCSW STM32_ADCSW_HSI14 |
59 | #define STM32_USBSW STM32_USBSW_HSI48 | 59 | #define STM32_USBSW STM32_USBSW_HSI48 |
60 | #define STM32_CECSW STM32_CECSW_HSI | 60 | #define STM32_CECSW STM32_CECSW_HSI |
61 | #define STM32_I2C1SW STM32_I2C1SW_HSI | 61 | #define STM32_I2C1SW STM32_I2C1SW_HSI |
62 | #define STM32_USART1SW STM32_USART1SW_PCLK | 62 | #define STM32_USART1SW STM32_USART1SW_PCLK |
63 | #define STM32_RTCSEL STM32_RTCSEL_LSI | 63 | #define STM32_RTCSEL STM32_RTCSEL_LSI |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * ADC driver system settings. | 66 | * ADC driver system settings. |
67 | */ | 67 | */ |
68 | #define STM32_ADC_USE_ADC1 FALSE | 68 | #define STM32_ADC_USE_ADC1 FALSE |
69 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | 69 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 |
70 | #define STM32_ADC_IRQ_PRIORITY 2 | 70 | #define STM32_ADC_IRQ_PRIORITY 2 |
71 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 | 71 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * EXT driver system settings. | 74 | * EXT driver system settings. |
75 | */ | 75 | */ |
76 | #define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 | 76 | #define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 |
77 | #define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 | 77 | #define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 |
78 | #define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 | 78 | #define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 |
79 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 3 | 79 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 3 |
80 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 3 | 80 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 3 |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * GPT driver system settings. | 83 | * GPT driver system settings. |
84 | */ | 84 | */ |
85 | #define STM32_GPT_USE_TIM1 FALSE | 85 | #define STM32_GPT_USE_TIM1 FALSE |
86 | #define STM32_GPT_USE_TIM2 FALSE | 86 | #define STM32_GPT_USE_TIM2 FALSE |
87 | #define STM32_GPT_USE_TIM3 FALSE | 87 | #define STM32_GPT_USE_TIM3 FALSE |
88 | #define STM32_GPT_USE_TIM14 FALSE | 88 | #define STM32_GPT_USE_TIM14 FALSE |
89 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 | 89 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 |
90 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 | 90 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 |
91 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 | 91 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 |
92 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 | 92 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * I2C driver system settings. | 95 | * I2C driver system settings. |
96 | */ | 96 | */ |
97 | #define STM32_I2C_USE_I2C1 FALSE | 97 | #define STM32_I2C_USE_I2C1 FALSE |
98 | #define STM32_I2C_USE_I2C2 FALSE | 98 | #define STM32_I2C_USE_I2C2 FALSE |
99 | #define STM32_I2C_BUSY_TIMEOUT 50 | 99 | #define STM32_I2C_BUSY_TIMEOUT 50 |
100 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 | 100 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 |
101 | #define STM32_I2C_I2C2_IRQ_PRIORITY 3 | 101 | #define STM32_I2C_I2C2_IRQ_PRIORITY 3 |
102 | #define STM32_I2C_USE_DMA TRUE | 102 | #define STM32_I2C_USE_DMA TRUE |
103 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 | 103 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 |
104 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 | 104 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 |
105 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | 105 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * ICU driver system settings. | 108 | * ICU driver system settings. |
109 | */ | 109 | */ |
110 | #define STM32_ICU_USE_TIM1 FALSE | 110 | #define STM32_ICU_USE_TIM1 FALSE |
111 | #define STM32_ICU_USE_TIM2 FALSE | 111 | #define STM32_ICU_USE_TIM2 FALSE |
112 | #define STM32_ICU_USE_TIM3 FALSE | 112 | #define STM32_ICU_USE_TIM3 FALSE |
113 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 | 113 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 |
114 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 | 114 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 |
115 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 | 115 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * PWM driver system settings. | 118 | * PWM driver system settings. |
119 | */ | 119 | */ |
120 | #define STM32_PWM_USE_ADVANCED FALSE | 120 | #define STM32_PWM_USE_ADVANCED FALSE |
121 | #define STM32_PWM_USE_TIM1 FALSE | 121 | #define STM32_PWM_USE_TIM1 FALSE |
122 | #define STM32_PWM_USE_TIM2 FALSE | 122 | #define STM32_PWM_USE_TIM2 FALSE |
123 | #define STM32_PWM_USE_TIM3 FALSE | 123 | #define STM32_PWM_USE_TIM3 FALSE |
124 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 | 124 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 |
125 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 | 125 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 |
126 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 | 126 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * SERIAL driver system settings. | 129 | * SERIAL driver system settings. |
130 | */ | 130 | */ |
131 | #define STM32_SERIAL_USE_USART1 FALSE | 131 | #define STM32_SERIAL_USE_USART1 FALSE |
132 | #define STM32_SERIAL_USE_USART2 FALSE | 132 | #define STM32_SERIAL_USE_USART2 FALSE |
133 | #define STM32_SERIAL_USART1_PRIORITY 3 | 133 | #define STM32_SERIAL_USART1_PRIORITY 3 |
134 | #define STM32_SERIAL_USART2_PRIORITY 3 | 134 | #define STM32_SERIAL_USART2_PRIORITY 3 |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * SPI driver system settings. | 137 | * SPI driver system settings. |
138 | */ | 138 | */ |
139 | #define STM32_SPI_USE_SPI1 FALSE | 139 | #define STM32_SPI_USE_SPI1 FALSE |
140 | #define STM32_SPI_USE_SPI2 FALSE | 140 | #define STM32_SPI_USE_SPI2 FALSE |
141 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | 141 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 |
142 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | 142 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 |
143 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 | 143 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 |
144 | #define STM32_SPI_SPI2_IRQ_PRIORITY 2 | 144 | #define STM32_SPI_SPI2_IRQ_PRIORITY 2 |
145 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | 145 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * ST driver system settings. | 148 | * ST driver system settings. |
149 | */ | 149 | */ |
150 | #define STM32_ST_IRQ_PRIORITY 2 | 150 | #define STM32_ST_IRQ_PRIORITY 2 |
151 | #define STM32_ST_USE_TIMER 2 | 151 | #define STM32_ST_USE_TIMER 2 |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * UART driver system settings. | 154 | * UART driver system settings. |
155 | */ | 155 | */ |
156 | #define STM32_UART_USE_USART1 FALSE | 156 | #define STM32_UART_USE_USART1 FALSE |
157 | #define STM32_UART_USE_USART2 FALSE | 157 | #define STM32_UART_USE_USART2 FALSE |
158 | #define STM32_UART_USART1_IRQ_PRIORITY 3 | 158 | #define STM32_UART_USART1_IRQ_PRIORITY 3 |
159 | #define STM32_UART_USART2_IRQ_PRIORITY 3 | 159 | #define STM32_UART_USART2_IRQ_PRIORITY 3 |
160 | #define STM32_UART_USART1_DMA_PRIORITY 0 | 160 | #define STM32_UART_USART1_DMA_PRIORITY 0 |
161 | #define STM32_UART_USART2_DMA_PRIORITY 0 | 161 | #define STM32_UART_USART2_DMA_PRIORITY 0 |
162 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | 162 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") |
163 | 163 | ||
164 | /* | 164 | /* |
165 | * USB driver system settings. | 165 | * USB driver system settings. |
166 | */ | 166 | */ |
167 | #define STM32_USB_USE_USB1 TRUE | 167 | #define STM32_USB_USE_USB1 TRUE |
168 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | 168 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE |
169 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 | 169 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 |
170 | 170 | ||
171 | #endif /* _MCUCONF_H_ */ | 171 | #endif /* _MCUCONF_H_ */ |
diff --git a/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h b/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h index 626332a6a..276829216 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h +++ b/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h | |||
@@ -1,209 +1,209 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MCUCONF_H_ | 17 | #ifndef _MCUCONF_H_ |
18 | #define _MCUCONF_H_ | 18 | #define _MCUCONF_H_ |
19 | 19 | ||
20 | #define STM32F103_MCUCONF | 20 | #define STM32F103_MCUCONF |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * STM32F103 drivers configuration. | 23 | * STM32F103 drivers configuration. |
24 | * The following settings override the default settings present in | 24 | * The following settings override the default settings present in |
25 | * the various device driver implementation headers. | 25 | * the various device driver implementation headers. |
26 | * Note that the settings for each driver only have effect if the whole | 26 | * Note that the settings for each driver only have effect if the whole |
27 | * driver is enabled in halconf.h. | 27 | * driver is enabled in halconf.h. |
28 | * | 28 | * |
29 | * IRQ priorities: | 29 | * IRQ priorities: |
30 | * 15...0 Lowest...Highest. | 30 | * 15...0 Lowest...Highest. |
31 | * | 31 | * |
32 | * DMA priorities: | 32 | * DMA priorities: |
33 | * 0...3 Lowest...Highest. | 33 | * 0...3 Lowest...Highest. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * HAL driver system settings. | 37 | * HAL driver system settings. |
38 | */ | 38 | */ |
39 | #define STM32_NO_INIT FALSE | 39 | #define STM32_NO_INIT FALSE |
40 | #define STM32_HSI_ENABLED TRUE | 40 | #define STM32_HSI_ENABLED TRUE |
41 | #define STM32_LSI_ENABLED FALSE | 41 | #define STM32_LSI_ENABLED FALSE |
42 | #define STM32_HSE_ENABLED TRUE | 42 | #define STM32_HSE_ENABLED TRUE |
43 | #define STM32_LSE_ENABLED FALSE | 43 | #define STM32_LSE_ENABLED FALSE |
44 | #define STM32_SW STM32_SW_PLL | 44 | #define STM32_SW STM32_SW_PLL |
45 | #define STM32_PLLSRC STM32_PLLSRC_HSE | 45 | #define STM32_PLLSRC STM32_PLLSRC_HSE |
46 | #define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 | 46 | #define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 |
47 | #define STM32_PLLMUL_VALUE 9 | 47 | #define STM32_PLLMUL_VALUE 9 |
48 | #define STM32_HPRE STM32_HPRE_DIV1 | 48 | #define STM32_HPRE STM32_HPRE_DIV1 |
49 | #define STM32_PPRE1 STM32_PPRE1_DIV2 | 49 | #define STM32_PPRE1 STM32_PPRE1_DIV2 |
50 | #define STM32_PPRE2 STM32_PPRE2_DIV2 | 50 | #define STM32_PPRE2 STM32_PPRE2_DIV2 |
51 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | 51 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 |
52 | #define STM32_USB_CLOCK_REQUIRED TRUE | 52 | #define STM32_USB_CLOCK_REQUIRED TRUE |
53 | #define STM32_USBPRE STM32_USBPRE_DIV1P5 | 53 | #define STM32_USBPRE STM32_USBPRE_DIV1P5 |
54 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | 54 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK |
55 | #define STM32_RTCSEL STM32_RTCSEL_HSEDIV | 55 | #define STM32_RTCSEL STM32_RTCSEL_HSEDIV |
56 | #define STM32_PVD_ENABLE FALSE | 56 | #define STM32_PVD_ENABLE FALSE |
57 | #define STM32_PLS STM32_PLS_LEV0 | 57 | #define STM32_PLS STM32_PLS_LEV0 |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * ADC driver system settings. | 60 | * ADC driver system settings. |
61 | */ | 61 | */ |
62 | #define STM32_ADC_USE_ADC1 FALSE | 62 | #define STM32_ADC_USE_ADC1 FALSE |
63 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | 63 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 |
64 | #define STM32_ADC_ADC1_IRQ_PRIORITY 6 | 64 | #define STM32_ADC_ADC1_IRQ_PRIORITY 6 |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * CAN driver system settings. | 67 | * CAN driver system settings. |
68 | */ | 68 | */ |
69 | #define STM32_CAN_USE_CAN1 FALSE | 69 | #define STM32_CAN_USE_CAN1 FALSE |
70 | #define STM32_CAN_CAN1_IRQ_PRIORITY 11 | 70 | #define STM32_CAN_CAN1_IRQ_PRIORITY 11 |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * EXT driver system settings. | 73 | * EXT driver system settings. |
74 | */ | 74 | */ |
75 | #define STM32_EXT_EXTI0_IRQ_PRIORITY 6 | 75 | #define STM32_EXT_EXTI0_IRQ_PRIORITY 6 |
76 | #define STM32_EXT_EXTI1_IRQ_PRIORITY 6 | 76 | #define STM32_EXT_EXTI1_IRQ_PRIORITY 6 |
77 | #define STM32_EXT_EXTI2_IRQ_PRIORITY 6 | 77 | #define STM32_EXT_EXTI2_IRQ_PRIORITY 6 |
78 | #define STM32_EXT_EXTI3_IRQ_PRIORITY 6 | 78 | #define STM32_EXT_EXTI3_IRQ_PRIORITY 6 |
79 | #define STM32_EXT_EXTI4_IRQ_PRIORITY 6 | 79 | #define STM32_EXT_EXTI4_IRQ_PRIORITY 6 |
80 | #define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 | 80 | #define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 |
81 | #define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 | 81 | #define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 |
82 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 6 | 82 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 6 |
83 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 6 | 83 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 6 |
84 | #define STM32_EXT_EXTI18_IRQ_PRIORITY 6 | 84 | #define STM32_EXT_EXTI18_IRQ_PRIORITY 6 |
85 | #define STM32_EXT_EXTI19_IRQ_PRIORITY 6 | 85 | #define STM32_EXT_EXTI19_IRQ_PRIORITY 6 |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * GPT driver system settings. | 88 | * GPT driver system settings. |
89 | */ | 89 | */ |
90 | #define STM32_GPT_USE_TIM1 FALSE | 90 | #define STM32_GPT_USE_TIM1 FALSE |
91 | #define STM32_GPT_USE_TIM2 FALSE | 91 | #define STM32_GPT_USE_TIM2 FALSE |
92 | #define STM32_GPT_USE_TIM3 FALSE | 92 | #define STM32_GPT_USE_TIM3 FALSE |
93 | #define STM32_GPT_USE_TIM4 FALSE | 93 | #define STM32_GPT_USE_TIM4 FALSE |
94 | #define STM32_GPT_USE_TIM5 FALSE | 94 | #define STM32_GPT_USE_TIM5 FALSE |
95 | #define STM32_GPT_USE_TIM8 FALSE | 95 | #define STM32_GPT_USE_TIM8 FALSE |
96 | #define STM32_GPT_TIM1_IRQ_PRIORITY 7 | 96 | #define STM32_GPT_TIM1_IRQ_PRIORITY 7 |
97 | #define STM32_GPT_TIM2_IRQ_PRIORITY 7 | 97 | #define STM32_GPT_TIM2_IRQ_PRIORITY 7 |
98 | #define STM32_GPT_TIM3_IRQ_PRIORITY 7 | 98 | #define STM32_GPT_TIM3_IRQ_PRIORITY 7 |
99 | #define STM32_GPT_TIM4_IRQ_PRIORITY 7 | 99 | #define STM32_GPT_TIM4_IRQ_PRIORITY 7 |
100 | #define STM32_GPT_TIM5_IRQ_PRIORITY 7 | 100 | #define STM32_GPT_TIM5_IRQ_PRIORITY 7 |
101 | #define STM32_GPT_TIM8_IRQ_PRIORITY 7 | 101 | #define STM32_GPT_TIM8_IRQ_PRIORITY 7 |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * I2C driver system settings. | 104 | * I2C driver system settings. |
105 | */ | 105 | */ |
106 | #define STM32_I2C_USE_I2C1 FALSE | 106 | #define STM32_I2C_USE_I2C1 FALSE |
107 | #define STM32_I2C_USE_I2C2 FALSE | 107 | #define STM32_I2C_USE_I2C2 FALSE |
108 | #define STM32_I2C_BUSY_TIMEOUT 50 | 108 | #define STM32_I2C_BUSY_TIMEOUT 50 |
109 | #define STM32_I2C_I2C1_IRQ_PRIORITY 5 | 109 | #define STM32_I2C_I2C1_IRQ_PRIORITY 5 |
110 | #define STM32_I2C_I2C2_IRQ_PRIORITY 5 | 110 | #define STM32_I2C_I2C2_IRQ_PRIORITY 5 |
111 | #define STM32_I2C_I2C1_DMA_PRIORITY 3 | 111 | #define STM32_I2C_I2C1_DMA_PRIORITY 3 |
112 | #define STM32_I2C_I2C2_DMA_PRIORITY 3 | 112 | #define STM32_I2C_I2C2_DMA_PRIORITY 3 |
113 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | 113 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * ICU driver system settings. | 116 | * ICU driver system settings. |
117 | */ | 117 | */ |
118 | #define STM32_ICU_USE_TIM1 FALSE | 118 | #define STM32_ICU_USE_TIM1 FALSE |
119 | #define STM32_ICU_USE_TIM2 FALSE | 119 | #define STM32_ICU_USE_TIM2 FALSE |
120 | #define STM32_ICU_USE_TIM3 FALSE | 120 | #define STM32_ICU_USE_TIM3 FALSE |
121 | #define STM32_ICU_USE_TIM4 FALSE | 121 | #define STM32_ICU_USE_TIM4 FALSE |
122 | #define STM32_ICU_USE_TIM5 FALSE | 122 | #define STM32_ICU_USE_TIM5 FALSE |
123 | #define STM32_ICU_USE_TIM8 FALSE | 123 | #define STM32_ICU_USE_TIM8 FALSE |
124 | #define STM32_ICU_TIM1_IRQ_PRIORITY 7 | 124 | #define STM32_ICU_TIM1_IRQ_PRIORITY 7 |
125 | #define STM32_ICU_TIM2_IRQ_PRIORITY 7 | 125 | #define STM32_ICU_TIM2_IRQ_PRIORITY 7 |
126 | #define STM32_ICU_TIM3_IRQ_PRIORITY 7 | 126 | #define STM32_ICU_TIM3_IRQ_PRIORITY 7 |
127 | #define STM32_ICU_TIM4_IRQ_PRIORITY 7 | 127 | #define STM32_ICU_TIM4_IRQ_PRIORITY 7 |
128 | #define STM32_ICU_TIM5_IRQ_PRIORITY 7 | 128 | #define STM32_ICU_TIM5_IRQ_PRIORITY 7 |
129 | #define STM32_ICU_TIM8_IRQ_PRIORITY 7 | 129 | #define STM32_ICU_TIM8_IRQ_PRIORITY 7 |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * PWM driver system settings. | 132 | * PWM driver system settings. |
133 | */ | 133 | */ |
134 | #define STM32_PWM_USE_ADVANCED FALSE | 134 | #define STM32_PWM_USE_ADVANCED FALSE |
135 | #define STM32_PWM_USE_TIM1 FALSE | 135 | #define STM32_PWM_USE_TIM1 FALSE |
136 | #define STM32_PWM_USE_TIM2 FALSE | 136 | #define STM32_PWM_USE_TIM2 FALSE |
137 | #define STM32_PWM_USE_TIM3 FALSE | 137 | #define STM32_PWM_USE_TIM3 FALSE |
138 | #define STM32_PWM_USE_TIM4 FALSE | 138 | #define STM32_PWM_USE_TIM4 FALSE |
139 | #define STM32_PWM_USE_TIM5 FALSE | 139 | #define STM32_PWM_USE_TIM5 FALSE |
140 | #define STM32_PWM_USE_TIM8 FALSE | 140 | #define STM32_PWM_USE_TIM8 FALSE |
141 | #define STM32_PWM_TIM1_IRQ_PRIORITY 7 | 141 | #define STM32_PWM_TIM1_IRQ_PRIORITY 7 |
142 | #define STM32_PWM_TIM2_IRQ_PRIORITY 7 | 142 | #define STM32_PWM_TIM2_IRQ_PRIORITY 7 |
143 | #define STM32_PWM_TIM3_IRQ_PRIORITY 7 | 143 | #define STM32_PWM_TIM3_IRQ_PRIORITY 7 |
144 | #define STM32_PWM_TIM4_IRQ_PRIORITY 7 | 144 | #define STM32_PWM_TIM4_IRQ_PRIORITY 7 |
145 | #define STM32_PWM_TIM5_IRQ_PRIORITY 7 | 145 | #define STM32_PWM_TIM5_IRQ_PRIORITY 7 |
146 | #define STM32_PWM_TIM8_IRQ_PRIORITY 7 | 146 | #define STM32_PWM_TIM8_IRQ_PRIORITY 7 |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * RTC driver system settings. | 149 | * RTC driver system settings. |
150 | */ | 150 | */ |
151 | #define STM32_RTC_IRQ_PRIORITY 15 | 151 | #define STM32_RTC_IRQ_PRIORITY 15 |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * SERIAL driver system settings. | 154 | * SERIAL driver system settings. |
155 | */ | 155 | */ |
156 | #define STM32_SERIAL_USE_USART1 FALSE | 156 | #define STM32_SERIAL_USE_USART1 FALSE |
157 | #define STM32_SERIAL_USE_USART2 FALSE | 157 | #define STM32_SERIAL_USE_USART2 FALSE |
158 | #define STM32_SERIAL_USE_USART3 FALSE | 158 | #define STM32_SERIAL_USE_USART3 FALSE |
159 | #define STM32_SERIAL_USE_UART4 FALSE | 159 | #define STM32_SERIAL_USE_UART4 FALSE |
160 | #define STM32_SERIAL_USE_UART5 FALSE | 160 | #define STM32_SERIAL_USE_UART5 FALSE |
161 | #define STM32_SERIAL_USART1_PRIORITY 12 | 161 | #define STM32_SERIAL_USART1_PRIORITY 12 |
162 | #define STM32_SERIAL_USART2_PRIORITY 12 | 162 | #define STM32_SERIAL_USART2_PRIORITY 12 |
163 | #define STM32_SERIAL_USART3_PRIORITY 12 | 163 | #define STM32_SERIAL_USART3_PRIORITY 12 |
164 | #define STM32_SERIAL_UART4_PRIORITY 12 | 164 | #define STM32_SERIAL_UART4_PRIORITY 12 |
165 | #define STM32_SERIAL_UART5_PRIORITY 12 | 165 | #define STM32_SERIAL_UART5_PRIORITY 12 |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * SPI driver system settings. | 168 | * SPI driver system settings. |
169 | */ | 169 | */ |
170 | #define STM32_SPI_USE_SPI1 FALSE | 170 | #define STM32_SPI_USE_SPI1 FALSE |
171 | #define STM32_SPI_USE_SPI2 FALSE | 171 | #define STM32_SPI_USE_SPI2 FALSE |
172 | #define STM32_SPI_USE_SPI3 FALSE | 172 | #define STM32_SPI_USE_SPI3 FALSE |
173 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | 173 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 |
174 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | 174 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 |
175 | #define STM32_SPI_SPI3_DMA_PRIORITY 1 | 175 | #define STM32_SPI_SPI3_DMA_PRIORITY 1 |
176 | #define STM32_SPI_SPI1_IRQ_PRIORITY 10 | 176 | #define STM32_SPI_SPI1_IRQ_PRIORITY 10 |
177 | #define STM32_SPI_SPI2_IRQ_PRIORITY 10 | 177 | #define STM32_SPI_SPI2_IRQ_PRIORITY 10 |
178 | #define STM32_SPI_SPI3_IRQ_PRIORITY 10 | 178 | #define STM32_SPI_SPI3_IRQ_PRIORITY 10 |
179 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | 179 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * ST driver system settings. | 182 | * ST driver system settings. |
183 | */ | 183 | */ |
184 | #define STM32_ST_IRQ_PRIORITY 8 | 184 | #define STM32_ST_IRQ_PRIORITY 8 |
185 | #define STM32_ST_USE_TIMER 2 | 185 | #define STM32_ST_USE_TIMER 2 |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * UART driver system settings. | 188 | * UART driver system settings. |
189 | */ | 189 | */ |
190 | #define STM32_UART_USE_USART1 FALSE | 190 | #define STM32_UART_USE_USART1 FALSE |
191 | #define STM32_UART_USE_USART2 FALSE | 191 | #define STM32_UART_USE_USART2 FALSE |
192 | #define STM32_UART_USE_USART3 FALSE | 192 | #define STM32_UART_USE_USART3 FALSE |
193 | #define STM32_UART_USART1_IRQ_PRIORITY 12 | 193 | #define STM32_UART_USART1_IRQ_PRIORITY 12 |
194 | #define STM32_UART_USART2_IRQ_PRIORITY 12 | 194 | #define STM32_UART_USART2_IRQ_PRIORITY 12 |
195 | #define STM32_UART_USART3_IRQ_PRIORITY 12 | 195 | #define STM32_UART_USART3_IRQ_PRIORITY 12 |
196 | #define STM32_UART_USART1_DMA_PRIORITY 0 | 196 | #define STM32_UART_USART1_DMA_PRIORITY 0 |
197 | #define STM32_UART_USART2_DMA_PRIORITY 0 | 197 | #define STM32_UART_USART2_DMA_PRIORITY 0 |
198 | #define STM32_UART_USART3_DMA_PRIORITY 0 | 198 | #define STM32_UART_USART3_DMA_PRIORITY 0 |
199 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | 199 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * USB driver system settings. | 202 | * USB driver system settings. |
203 | */ | 203 | */ |
204 | #define STM32_USB_USE_USB1 TRUE | 204 | #define STM32_USB_USE_USB1 TRUE |
205 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | 205 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE |
206 | #define STM32_USB_USB1_HP_IRQ_PRIORITY 13 | 206 | #define STM32_USB_USB1_HP_IRQ_PRIORITY 13 |
207 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 14 | 207 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 14 |
208 | 208 | ||
209 | #endif /* _MCUCONF_H_ */ | 209 | #endif /* _MCUCONF_H_ */ |
diff --git a/keyboards/chibios_test/teensy_lc_onekey/chconf.h b/keyboards/chibios_test/teensy_lc_onekey/chconf.h index cb36996c3..3294ac7ee 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/chconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/chconf.h | |||
@@ -1,524 +1,524 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * @file templates/chconf.h | 18 | * @file templates/chconf.h |
19 | * @brief Configuration file template. | 19 | * @brief Configuration file template. |
20 | * @details A copy of this file must be placed in each project directory, it | 20 | * @details A copy of this file must be placed in each project directory, it |
21 | * contains the application specific kernel settings. | 21 | * contains the application specific kernel settings. |
22 | * | 22 | * |
23 | * @addtogroup config | 23 | * @addtogroup config |
24 | * @details Kernel related settings and hooks. | 24 | * @details Kernel related settings and hooks. |
25 | * @{ | 25 | * @{ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef CHCONF_H | 28 | #ifndef CHCONF_H |
29 | #define CHCONF_H | 29 | #define CHCONF_H |
30 | 30 | ||
31 | #define _CHIBIOS_RT_CONF_ | 31 | #define _CHIBIOS_RT_CONF_ |
32 | 32 | ||
33 | /*===========================================================================*/ | 33 | /*===========================================================================*/ |
34 | /** | 34 | /** |
35 | * @name System timers settings | 35 | * @name System timers settings |
36 | * @{ | 36 | * @{ |
37 | */ | 37 | */ |
38 | /*===========================================================================*/ | 38 | /*===========================================================================*/ |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * @brief System time counter resolution. | 41 | * @brief System time counter resolution. |
42 | * @note Allowed values are 16 or 32 bits. | 42 | * @note Allowed values are 16 or 32 bits. |
43 | */ | 43 | */ |
44 | #define CH_CFG_ST_RESOLUTION 32 | 44 | #define CH_CFG_ST_RESOLUTION 32 |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * @brief System tick frequency. | 47 | * @brief System tick frequency. |
48 | * @details Frequency of the system timer that drives the system ticks. This | 48 | * @details Frequency of the system timer that drives the system ticks. This |
49 | * setting also defines the system tick time unit. | 49 | * setting also defines the system tick time unit. |
50 | */ | 50 | */ |
51 | #define CH_CFG_ST_FREQUENCY 1000 | 51 | #define CH_CFG_ST_FREQUENCY 1000 |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * @brief Time delta constant for the tick-less mode. | 54 | * @brief Time delta constant for the tick-less mode. |
55 | * @note If this value is zero then the system uses the classic | 55 | * @note If this value is zero then the system uses the classic |
56 | * periodic tick. This value represents the minimum number | 56 | * periodic tick. This value represents the minimum number |
57 | * of ticks that is safe to specify in a timeout directive. | 57 | * of ticks that is safe to specify in a timeout directive. |
58 | * The value one is not valid, timeouts are rounded up to | 58 | * The value one is not valid, timeouts are rounded up to |
59 | * this value. | 59 | * this value. |
60 | */ | 60 | */ |
61 | #define CH_CFG_ST_TIMEDELTA 0 | 61 | #define CH_CFG_ST_TIMEDELTA 0 |
62 | 62 | ||
63 | /** @} */ | 63 | /** @} */ |
64 | 64 | ||
65 | /*===========================================================================*/ | 65 | /*===========================================================================*/ |
66 | /** | 66 | /** |
67 | * @name Kernel parameters and options | 67 | * @name Kernel parameters and options |
68 | * @{ | 68 | * @{ |
69 | */ | 69 | */ |
70 | /*===========================================================================*/ | 70 | /*===========================================================================*/ |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * @brief Round robin interval. | 73 | * @brief Round robin interval. |
74 | * @details This constant is the number of system ticks allowed for the | 74 | * @details This constant is the number of system ticks allowed for the |
75 | * threads before preemption occurs. Setting this value to zero | 75 | * threads before preemption occurs. Setting this value to zero |
76 | * disables the preemption for threads with equal priority and the | 76 | * disables the preemption for threads with equal priority and the |
77 | * round robin becomes cooperative. Note that higher priority | 77 | * round robin becomes cooperative. Note that higher priority |
78 | * threads can still preempt, the kernel is always preemptive. | 78 | * threads can still preempt, the kernel is always preemptive. |
79 | * @note Disabling the round robin preemption makes the kernel more compact | 79 | * @note Disabling the round robin preemption makes the kernel more compact |
80 | * and generally faster. | 80 | * and generally faster. |
81 | * @note The round robin preemption is not supported in tickless mode and | 81 | * @note The round robin preemption is not supported in tickless mode and |
82 | * must be set to zero in that case. | 82 | * must be set to zero in that case. |
83 | */ | 83 | */ |
84 | #define CH_CFG_TIME_QUANTUM 20 | 84 | #define CH_CFG_TIME_QUANTUM 20 |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * @brief Managed RAM size. | 87 | * @brief Managed RAM size. |
88 | * @details Size of the RAM area to be managed by the OS. If set to zero | 88 | * @details Size of the RAM area to be managed by the OS. If set to zero |
89 | * then the whole available RAM is used. The core memory is made | 89 | * then the whole available RAM is used. The core memory is made |
90 | * available to the heap allocator and/or can be used directly through | 90 | * available to the heap allocator and/or can be used directly through |
91 | * the simplified core memory allocator. | 91 | * the simplified core memory allocator. |
92 | * | 92 | * |
93 | * @note In order to let the OS manage the whole RAM the linker script must | 93 | * @note In order to let the OS manage the whole RAM the linker script must |
94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | 94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. |
95 | * @note Requires @p CH_CFG_USE_MEMCORE. | 95 | * @note Requires @p CH_CFG_USE_MEMCORE. |
96 | */ | 96 | */ |
97 | #define CH_CFG_MEMCORE_SIZE 0 | 97 | #define CH_CFG_MEMCORE_SIZE 0 |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * @brief Idle thread automatic spawn suppression. | 100 | * @brief Idle thread automatic spawn suppression. |
101 | * @details When this option is activated the function @p chSysInit() | 101 | * @details When this option is activated the function @p chSysInit() |
102 | * does not spawn the idle thread. The application @p main() | 102 | * does not spawn the idle thread. The application @p main() |
103 | * function becomes the idle thread and must implement an | 103 | * function becomes the idle thread and must implement an |
104 | * infinite loop. | 104 | * infinite loop. |
105 | */ | 105 | */ |
106 | #define CH_CFG_NO_IDLE_THREAD FALSE | 106 | #define CH_CFG_NO_IDLE_THREAD FALSE |
107 | 107 | ||
108 | /* Use __WFI in the idle thread for waiting. Does lower the power | 108 | /* Use __WFI in the idle thread for waiting. Does lower the power |
109 | * consumption. */ | 109 | * consumption. */ |
110 | #define CORTEX_ENABLE_WFI_IDLE TRUE | 110 | #define CORTEX_ENABLE_WFI_IDLE TRUE |
111 | 111 | ||
112 | /** @} */ | 112 | /** @} */ |
113 | 113 | ||
114 | /*===========================================================================*/ | 114 | /*===========================================================================*/ |
115 | /** | 115 | /** |
116 | * @name Performance options | 116 | * @name Performance options |
117 | * @{ | 117 | * @{ |
118 | */ | 118 | */ |
119 | /*===========================================================================*/ | 119 | /*===========================================================================*/ |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * @brief OS optimization. | 122 | * @brief OS optimization. |
123 | * @details If enabled then time efficient rather than space efficient code | 123 | * @details If enabled then time efficient rather than space efficient code |
124 | * is used when two possible implementations exist. | 124 | * is used when two possible implementations exist. |
125 | * | 125 | * |
126 | * @note This is not related to the compiler optimization options. | 126 | * @note This is not related to the compiler optimization options. |
127 | * @note The default is @p TRUE. | 127 | * @note The default is @p TRUE. |
128 | */ | 128 | */ |
129 | #define CH_CFG_OPTIMIZE_SPEED TRUE | 129 | #define CH_CFG_OPTIMIZE_SPEED TRUE |
130 | 130 | ||
131 | /** @} */ | 131 | /** @} */ |
132 | 132 | ||
133 | /*===========================================================================*/ | 133 | /*===========================================================================*/ |
134 | /** | 134 | /** |
135 | * @name Subsystem options | 135 | * @name Subsystem options |
136 | * @{ | 136 | * @{ |
137 | */ | 137 | */ |
138 | /*===========================================================================*/ | 138 | /*===========================================================================*/ |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * @brief Time Measurement APIs. | 141 | * @brief Time Measurement APIs. |
142 | * @details If enabled then the time measurement APIs are included in | 142 | * @details If enabled then the time measurement APIs are included in |
143 | * the kernel. | 143 | * the kernel. |
144 | * | 144 | * |
145 | * @note The default is @p TRUE. | 145 | * @note The default is @p TRUE. |
146 | */ | 146 | */ |
147 | #define CH_CFG_USE_TM FALSE | 147 | #define CH_CFG_USE_TM FALSE |
148 | 148 | ||
149 | /** | 149 | /** |
150 | * @brief Threads registry APIs. | 150 | * @brief Threads registry APIs. |
151 | * @details If enabled then the registry APIs are included in the kernel. | 151 | * @details If enabled then the registry APIs are included in the kernel. |
152 | * | 152 | * |
153 | * @note The default is @p TRUE. | 153 | * @note The default is @p TRUE. |
154 | */ | 154 | */ |
155 | #define CH_CFG_USE_REGISTRY TRUE | 155 | #define CH_CFG_USE_REGISTRY TRUE |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * @brief Threads synchronization APIs. | 158 | * @brief Threads synchronization APIs. |
159 | * @details If enabled then the @p chThdWait() function is included in | 159 | * @details If enabled then the @p chThdWait() function is included in |
160 | * the kernel. | 160 | * the kernel. |
161 | * | 161 | * |
162 | * @note The default is @p TRUE. | 162 | * @note The default is @p TRUE. |
163 | */ | 163 | */ |
164 | #define CH_CFG_USE_WAITEXIT TRUE | 164 | #define CH_CFG_USE_WAITEXIT TRUE |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * @brief Semaphores APIs. | 167 | * @brief Semaphores APIs. |
168 | * @details If enabled then the Semaphores APIs are included in the kernel. | 168 | * @details If enabled then the Semaphores APIs are included in the kernel. |
169 | * | 169 | * |
170 | * @note The default is @p TRUE. | 170 | * @note The default is @p TRUE. |
171 | */ | 171 | */ |
172 | #define CH_CFG_USE_SEMAPHORES TRUE | 172 | #define CH_CFG_USE_SEMAPHORES TRUE |
173 | 173 | ||
174 | /** | 174 | /** |
175 | * @brief Semaphores queuing mode. | 175 | * @brief Semaphores queuing mode. |
176 | * @details If enabled then the threads are enqueued on semaphores by | 176 | * @details If enabled then the threads are enqueued on semaphores by |
177 | * priority rather than in FIFO order. | 177 | * priority rather than in FIFO order. |
178 | * | 178 | * |
179 | * @note The default is @p FALSE. Enable this if you have special | 179 | * @note The default is @p FALSE. Enable this if you have special |
180 | * requirements. | 180 | * requirements. |
181 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 181 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
182 | */ | 182 | */ |
183 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | 183 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * @brief Mutexes APIs. | 186 | * @brief Mutexes APIs. |
187 | * @details If enabled then the mutexes APIs are included in the kernel. | 187 | * @details If enabled then the mutexes APIs are included in the kernel. |
188 | * | 188 | * |
189 | * @note The default is @p TRUE. | 189 | * @note The default is @p TRUE. |
190 | */ | 190 | */ |
191 | #define CH_CFG_USE_MUTEXES TRUE | 191 | #define CH_CFG_USE_MUTEXES TRUE |
192 | 192 | ||
193 | /** | 193 | /** |
194 | * @brief Enables recursive behavior on mutexes. | 194 | * @brief Enables recursive behavior on mutexes. |
195 | * @note Recursive mutexes are heavier and have an increased | 195 | * @note Recursive mutexes are heavier and have an increased |
196 | * memory footprint. | 196 | * memory footprint. |
197 | * | 197 | * |
198 | * @note The default is @p FALSE. | 198 | * @note The default is @p FALSE. |
199 | * @note Requires @p CH_CFG_USE_MUTEXES. | 199 | * @note Requires @p CH_CFG_USE_MUTEXES. |
200 | */ | 200 | */ |
201 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | 201 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * @brief Conditional Variables APIs. | 204 | * @brief Conditional Variables APIs. |
205 | * @details If enabled then the conditional variables APIs are included | 205 | * @details If enabled then the conditional variables APIs are included |
206 | * in the kernel. | 206 | * in the kernel. |
207 | * | 207 | * |
208 | * @note The default is @p TRUE. | 208 | * @note The default is @p TRUE. |
209 | * @note Requires @p CH_CFG_USE_MUTEXES. | 209 | * @note Requires @p CH_CFG_USE_MUTEXES. |
210 | */ | 210 | */ |
211 | #define CH_CFG_USE_CONDVARS TRUE | 211 | #define CH_CFG_USE_CONDVARS TRUE |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * @brief Conditional Variables APIs with timeout. | 214 | * @brief Conditional Variables APIs with timeout. |
215 | * @details If enabled then the conditional variables APIs with timeout | 215 | * @details If enabled then the conditional variables APIs with timeout |
216 | * specification are included in the kernel. | 216 | * specification are included in the kernel. |
217 | * | 217 | * |
218 | * @note The default is @p TRUE. | 218 | * @note The default is @p TRUE. |
219 | * @note Requires @p CH_CFG_USE_CONDVARS. | 219 | * @note Requires @p CH_CFG_USE_CONDVARS. |
220 | */ | 220 | */ |
221 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE | 221 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * @brief Events Flags APIs. | 224 | * @brief Events Flags APIs. |
225 | * @details If enabled then the event flags APIs are included in the kernel. | 225 | * @details If enabled then the event flags APIs are included in the kernel. |
226 | * | 226 | * |
227 | * @note The default is @p TRUE. | 227 | * @note The default is @p TRUE. |
228 | */ | 228 | */ |
229 | #define CH_CFG_USE_EVENTS TRUE | 229 | #define CH_CFG_USE_EVENTS TRUE |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * @brief Events Flags APIs with timeout. | 232 | * @brief Events Flags APIs with timeout. |
233 | * @details If enabled then the events APIs with timeout specification | 233 | * @details If enabled then the events APIs with timeout specification |
234 | * are included in the kernel. | 234 | * are included in the kernel. |
235 | * | 235 | * |
236 | * @note The default is @p TRUE. | 236 | * @note The default is @p TRUE. |
237 | * @note Requires @p CH_CFG_USE_EVENTS. | 237 | * @note Requires @p CH_CFG_USE_EVENTS. |
238 | */ | 238 | */ |
239 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | 239 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
240 | 240 | ||
241 | /** | 241 | /** |
242 | * @brief Synchronous Messages APIs. | 242 | * @brief Synchronous Messages APIs. |
243 | * @details If enabled then the synchronous messages APIs are included | 243 | * @details If enabled then the synchronous messages APIs are included |
244 | * in the kernel. | 244 | * in the kernel. |
245 | * | 245 | * |
246 | * @note The default is @p TRUE. | 246 | * @note The default is @p TRUE. |
247 | */ | 247 | */ |
248 | #define CH_CFG_USE_MESSAGES TRUE | 248 | #define CH_CFG_USE_MESSAGES TRUE |
249 | 249 | ||
250 | /** | 250 | /** |
251 | * @brief Synchronous Messages queuing mode. | 251 | * @brief Synchronous Messages queuing mode. |
252 | * @details If enabled then messages are served by priority rather than in | 252 | * @details If enabled then messages are served by priority rather than in |
253 | * FIFO order. | 253 | * FIFO order. |
254 | * | 254 | * |
255 | * @note The default is @p FALSE. Enable this if you have special | 255 | * @note The default is @p FALSE. Enable this if you have special |
256 | * requirements. | 256 | * requirements. |
257 | * @note Requires @p CH_CFG_USE_MESSAGES. | 257 | * @note Requires @p CH_CFG_USE_MESSAGES. |
258 | */ | 258 | */ |
259 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | 259 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
260 | 260 | ||
261 | /** | 261 | /** |
262 | * @brief Mailboxes APIs. | 262 | * @brief Mailboxes APIs. |
263 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | 263 | * @details If enabled then the asynchronous messages (mailboxes) APIs are |
264 | * included in the kernel. | 264 | * included in the kernel. |
265 | * | 265 | * |
266 | * @note The default is @p TRUE. | 266 | * @note The default is @p TRUE. |
267 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 267 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
268 | */ | 268 | */ |
269 | #define CH_CFG_USE_MAILBOXES TRUE | 269 | #define CH_CFG_USE_MAILBOXES TRUE |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * @brief Core Memory Manager APIs. | 272 | * @brief Core Memory Manager APIs. |
273 | * @details If enabled then the core memory manager APIs are included | 273 | * @details If enabled then the core memory manager APIs are included |
274 | * in the kernel. | 274 | * in the kernel. |
275 | * | 275 | * |
276 | * @note The default is @p TRUE. | 276 | * @note The default is @p TRUE. |
277 | */ | 277 | */ |
278 | #define CH_CFG_USE_MEMCORE TRUE | 278 | #define CH_CFG_USE_MEMCORE TRUE |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * @brief Heap Allocator APIs. | 281 | * @brief Heap Allocator APIs. |
282 | * @details If enabled then the memory heap allocator APIs are included | 282 | * @details If enabled then the memory heap allocator APIs are included |
283 | * in the kernel. | 283 | * in the kernel. |
284 | * | 284 | * |
285 | * @note The default is @p TRUE. | 285 | * @note The default is @p TRUE. |
286 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | 286 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or |
287 | * @p CH_CFG_USE_SEMAPHORES. | 287 | * @p CH_CFG_USE_SEMAPHORES. |
288 | * @note Mutexes are recommended. | 288 | * @note Mutexes are recommended. |
289 | */ | 289 | */ |
290 | #define CH_CFG_USE_HEAP TRUE | 290 | #define CH_CFG_USE_HEAP TRUE |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * @brief Memory Pools Allocator APIs. | 293 | * @brief Memory Pools Allocator APIs. |
294 | * @details If enabled then the memory pools allocator APIs are included | 294 | * @details If enabled then the memory pools allocator APIs are included |
295 | * in the kernel. | 295 | * in the kernel. |
296 | * | 296 | * |
297 | * @note The default is @p TRUE. | 297 | * @note The default is @p TRUE. |
298 | */ | 298 | */ |
299 | #define CH_CFG_USE_MEMPOOLS TRUE | 299 | #define CH_CFG_USE_MEMPOOLS TRUE |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * @brief Dynamic Threads APIs. | 302 | * @brief Dynamic Threads APIs. |
303 | * @details If enabled then the dynamic threads creation APIs are included | 303 | * @details If enabled then the dynamic threads creation APIs are included |
304 | * in the kernel. | 304 | * in the kernel. |
305 | * | 305 | * |
306 | * @note The default is @p TRUE. | 306 | * @note The default is @p TRUE. |
307 | * @note Requires @p CH_CFG_USE_WAITEXIT. | 307 | * @note Requires @p CH_CFG_USE_WAITEXIT. |
308 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | 308 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. |
309 | */ | 309 | */ |
310 | #define CH_CFG_USE_DYNAMIC TRUE | 310 | #define CH_CFG_USE_DYNAMIC TRUE |
311 | 311 | ||
312 | /** @} */ | 312 | /** @} */ |
313 | 313 | ||
314 | /*===========================================================================*/ | 314 | /*===========================================================================*/ |
315 | /** | 315 | /** |
316 | * @name Debug options | 316 | * @name Debug options |
317 | * @{ | 317 | * @{ |
318 | */ | 318 | */ |
319 | /*===========================================================================*/ | 319 | /*===========================================================================*/ |
320 | 320 | ||
321 | /** | 321 | /** |
322 | * @brief Debug option, kernel statistics. | 322 | * @brief Debug option, kernel statistics. |
323 | * | 323 | * |
324 | * @note The default is @p FALSE. | 324 | * @note The default is @p FALSE. |
325 | */ | 325 | */ |
326 | #define CH_DBG_STATISTICS FALSE | 326 | #define CH_DBG_STATISTICS FALSE |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * @brief Debug option, system state check. | 329 | * @brief Debug option, system state check. |
330 | * @details If enabled the correct call protocol for system APIs is checked | 330 | * @details If enabled the correct call protocol for system APIs is checked |
331 | * at runtime. | 331 | * at runtime. |
332 | * | 332 | * |
333 | * @note The default is @p FALSE. | 333 | * @note The default is @p FALSE. |
334 | */ | 334 | */ |
335 | #define CH_DBG_SYSTEM_STATE_CHECK TRUE | 335 | #define CH_DBG_SYSTEM_STATE_CHECK TRUE |
336 | 336 | ||
337 | /** | 337 | /** |
338 | * @brief Debug option, parameters checks. | 338 | * @brief Debug option, parameters checks. |
339 | * @details If enabled then the checks on the API functions input | 339 | * @details If enabled then the checks on the API functions input |
340 | * parameters are activated. | 340 | * parameters are activated. |
341 | * | 341 | * |
342 | * @note The default is @p FALSE. | 342 | * @note The default is @p FALSE. |
343 | */ | 343 | */ |
344 | #define CH_DBG_ENABLE_CHECKS TRUE | 344 | #define CH_DBG_ENABLE_CHECKS TRUE |
345 | 345 | ||
346 | /** | 346 | /** |
347 | * @brief Debug option, consistency checks. | 347 | * @brief Debug option, consistency checks. |
348 | * @details If enabled then all the assertions in the kernel code are | 348 | * @details If enabled then all the assertions in the kernel code are |
349 | * activated. This includes consistency checks inside the kernel, | 349 | * activated. This includes consistency checks inside the kernel, |
350 | * runtime anomalies and port-defined checks. | 350 | * runtime anomalies and port-defined checks. |
351 | * | 351 | * |
352 | * @note The default is @p FALSE. | 352 | * @note The default is @p FALSE. |
353 | */ | 353 | */ |
354 | #define CH_DBG_ENABLE_ASSERTS TRUE | 354 | #define CH_DBG_ENABLE_ASSERTS TRUE |
355 | 355 | ||
356 | /** | 356 | /** |
357 | * @brief Debug option, trace buffer. | 357 | * @brief Debug option, trace buffer. |
358 | * @details If enabled then the trace buffer is activated. | 358 | * @details If enabled then the trace buffer is activated. |
359 | * | 359 | * |
360 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | 360 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. |
361 | */ | 361 | */ |
362 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | 362 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * @brief Trace buffer entries. | 365 | * @brief Trace buffer entries. |
366 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | 366 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is |
367 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | 367 | * different from @p CH_DBG_TRACE_MASK_DISABLED. |
368 | */ | 368 | */ |
369 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | 369 | #define CH_DBG_TRACE_BUFFER_SIZE 128 |
370 | 370 | ||
371 | /** | 371 | /** |
372 | * @brief Debug option, stack checks. | 372 | * @brief Debug option, stack checks. |
373 | * @details If enabled then a runtime stack check is performed. | 373 | * @details If enabled then a runtime stack check is performed. |
374 | * | 374 | * |
375 | * @note The default is @p FALSE. | 375 | * @note The default is @p FALSE. |
376 | * @note The stack check is performed in a architecture/port dependent way. | 376 | * @note The stack check is performed in a architecture/port dependent way. |
377 | * It may not be implemented or some ports. | 377 | * It may not be implemented or some ports. |
378 | * @note The default failure mode is to halt the system with the global | 378 | * @note The default failure mode is to halt the system with the global |
379 | * @p panic_msg variable set to @p NULL. | 379 | * @p panic_msg variable set to @p NULL. |
380 | */ | 380 | */ |
381 | #define CH_DBG_ENABLE_STACK_CHECK TRUE | 381 | #define CH_DBG_ENABLE_STACK_CHECK TRUE |
382 | 382 | ||
383 | /** | 383 | /** |
384 | * @brief Debug option, stacks initialization. | 384 | * @brief Debug option, stacks initialization. |
385 | * @details If enabled then the threads working area is filled with a byte | 385 | * @details If enabled then the threads working area is filled with a byte |
386 | * value when a thread is created. This can be useful for the | 386 | * value when a thread is created. This can be useful for the |
387 | * runtime measurement of the used stack. | 387 | * runtime measurement of the used stack. |
388 | * | 388 | * |
389 | * @note The default is @p FALSE. | 389 | * @note The default is @p FALSE. |
390 | */ | 390 | */ |
391 | #define CH_DBG_FILL_THREADS TRUE | 391 | #define CH_DBG_FILL_THREADS TRUE |
392 | 392 | ||
393 | /** | 393 | /** |
394 | * @brief Debug option, threads profiling. | 394 | * @brief Debug option, threads profiling. |
395 | * @details If enabled then a field is added to the @p thread_t structure that | 395 | * @details If enabled then a field is added to the @p thread_t structure that |
396 | * counts the system ticks occurred while executing the thread. | 396 | * counts the system ticks occurred while executing the thread. |
397 | * | 397 | * |
398 | * @note The default is @p FALSE. | 398 | * @note The default is @p FALSE. |
399 | * @note This debug option is not currently compatible with the | 399 | * @note This debug option is not currently compatible with the |
400 | * tickless mode. | 400 | * tickless mode. |
401 | */ | 401 | */ |
402 | #define CH_DBG_THREADS_PROFILING FALSE | 402 | #define CH_DBG_THREADS_PROFILING FALSE |
403 | 403 | ||
404 | /** @} */ | 404 | /** @} */ |
405 | 405 | ||
406 | /*===========================================================================*/ | 406 | /*===========================================================================*/ |
407 | /** | 407 | /** |
408 | * @name Kernel hooks | 408 | * @name Kernel hooks |
409 | * @{ | 409 | * @{ |
410 | */ | 410 | */ |
411 | /*===========================================================================*/ | 411 | /*===========================================================================*/ |
412 | 412 | ||
413 | /** | 413 | /** |
414 | * @brief Threads descriptor structure extension. | 414 | * @brief Threads descriptor structure extension. |
415 | * @details User fields added to the end of the @p thread_t structure. | 415 | * @details User fields added to the end of the @p thread_t structure. |
416 | */ | 416 | */ |
417 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | 417 | #define CH_CFG_THREAD_EXTRA_FIELDS \ |
418 | /* Add threads custom fields here.*/ | 418 | /* Add threads custom fields here.*/ |
419 | 419 | ||
420 | /** | 420 | /** |
421 | * @brief Threads initialization hook. | 421 | * @brief Threads initialization hook. |
422 | * @details User initialization code added to the @p chThdInit() API. | 422 | * @details User initialization code added to the @p chThdInit() API. |
423 | * | 423 | * |
424 | * @note It is invoked from within @p chThdInit() and implicitly from all | 424 | * @note It is invoked from within @p chThdInit() and implicitly from all |
425 | * the threads creation APIs. | 425 | * the threads creation APIs. |
426 | */ | 426 | */ |
427 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | 427 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ |
428 | /* Add threads initialization code here.*/ \ | 428 | /* Add threads initialization code here.*/ \ |
429 | } | 429 | } |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * @brief Threads finalization hook. | 432 | * @brief Threads finalization hook. |
433 | * @details User finalization code added to the @p chThdExit() API. | 433 | * @details User finalization code added to the @p chThdExit() API. |
434 | */ | 434 | */ |
435 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | 435 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ |
436 | /* Add threads finalization code here.*/ \ | 436 | /* Add threads finalization code here.*/ \ |
437 | } | 437 | } |
438 | 438 | ||
439 | /** | 439 | /** |
440 | * @brief Context switch hook. | 440 | * @brief Context switch hook. |
441 | * @details This hook is invoked just before switching between threads. | 441 | * @details This hook is invoked just before switching between threads. |
442 | */ | 442 | */ |
443 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | 443 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ |
444 | /* Context switch code here.*/ \ | 444 | /* Context switch code here.*/ \ |
445 | } | 445 | } |
446 | 446 | ||
447 | /** | 447 | /** |
448 | * @brief ISR enter hook. | 448 | * @brief ISR enter hook. |
449 | */ | 449 | */ |
450 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | 450 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ |
451 | /* IRQ prologue code here.*/ \ | 451 | /* IRQ prologue code here.*/ \ |
452 | } | 452 | } |
453 | 453 | ||
454 | /** | 454 | /** |
455 | * @brief ISR exit hook. | 455 | * @brief ISR exit hook. |
456 | */ | 456 | */ |
457 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | 457 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ |
458 | /* IRQ epilogue code here.*/ \ | 458 | /* IRQ epilogue code here.*/ \ |
459 | } | 459 | } |
460 | 460 | ||
461 | /** | 461 | /** |
462 | * @brief Idle thread enter hook. | 462 | * @brief Idle thread enter hook. |
463 | * @note This hook is invoked within a critical zone, no OS functions | 463 | * @note This hook is invoked within a critical zone, no OS functions |
464 | * should be invoked from here. | 464 | * should be invoked from here. |
465 | * @note This macro can be used to activate a power saving mode. | 465 | * @note This macro can be used to activate a power saving mode. |
466 | */ | 466 | */ |
467 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | 467 | #define CH_CFG_IDLE_ENTER_HOOK() { \ |
468 | /* Idle-enter code here.*/ \ | 468 | /* Idle-enter code here.*/ \ |
469 | } | 469 | } |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * @brief Idle thread leave hook. | 472 | * @brief Idle thread leave hook. |
473 | * @note This hook is invoked within a critical zone, no OS functions | 473 | * @note This hook is invoked within a critical zone, no OS functions |
474 | * should be invoked from here. | 474 | * should be invoked from here. |
475 | * @note This macro can be used to deactivate a power saving mode. | 475 | * @note This macro can be used to deactivate a power saving mode. |
476 | */ | 476 | */ |
477 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | 477 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ |
478 | /* Idle-leave code here.*/ \ | 478 | /* Idle-leave code here.*/ \ |
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |
482 | * @brief Idle Loop hook. | 482 | * @brief Idle Loop hook. |
483 | * @details This hook is continuously invoked by the idle thread loop. | 483 | * @details This hook is continuously invoked by the idle thread loop. |
484 | */ | 484 | */ |
485 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | 485 | #define CH_CFG_IDLE_LOOP_HOOK() { \ |
486 | /* Idle loop code here.*/ \ | 486 | /* Idle loop code here.*/ \ |
487 | } | 487 | } |
488 | 488 | ||
489 | /** | 489 | /** |
490 | * @brief System tick event hook. | 490 | * @brief System tick event hook. |
491 | * @details This hook is invoked in the system tick handler immediately | 491 | * @details This hook is invoked in the system tick handler immediately |
492 | * after processing the virtual timers queue. | 492 | * after processing the virtual timers queue. |
493 | */ | 493 | */ |
494 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | 494 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ |
495 | /* System tick event code here.*/ \ | 495 | /* System tick event code here.*/ \ |
496 | } | 496 | } |
497 | 497 | ||
498 | /** | 498 | /** |
499 | * @brief System halt hook. | 499 | * @brief System halt hook. |
500 | * @details This hook is invoked in case to a system halting error before | 500 | * @details This hook is invoked in case to a system halting error before |
501 | * the system is halted. | 501 | * the system is halted. |
502 | */ | 502 | */ |
503 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | 503 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ |
504 | /* System halt code here.*/ \ | 504 | /* System halt code here.*/ \ |
505 | } | 505 | } |
506 | 506 | ||
507 | /** | 507 | /** |
508 | * @brief Trace hook. | 508 | * @brief Trace hook. |
509 | * @details This hook is invoked each time a new record is written in the | 509 | * @details This hook is invoked each time a new record is written in the |
510 | * trace buffer. | 510 | * trace buffer. |
511 | */ | 511 | */ |
512 | #define CH_CFG_TRACE_HOOK(tep) { \ | 512 | #define CH_CFG_TRACE_HOOK(tep) { \ |
513 | /* Trace code here.*/ \ | 513 | /* Trace code here.*/ \ |
514 | } | 514 | } |
515 | 515 | ||
516 | /** @} */ | 516 | /** @} */ |
517 | 517 | ||
518 | /*===========================================================================*/ | 518 | /*===========================================================================*/ |
519 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | 519 | /* Port-specific settings (override port settings defaulted in chcore.h). */ |
520 | /*===========================================================================*/ | 520 | /*===========================================================================*/ |
521 | 521 | ||
522 | #endif /* CHCONF_H */ | 522 | #endif /* CHCONF_H */ |
523 | 523 | ||
524 | /** @} */ | 524 | /** @} */ |
diff --git a/keyboards/chibios_test/teensy_lc_onekey/halconf.h b/keyboards/chibios_test/teensy_lc_onekey/halconf.h index b1d2cd550..0436408b0 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/halconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/halconf.h | |||
@@ -1,187 +1,187 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * @file templates/halconf.h | 18 | * @file templates/halconf.h |
19 | * @brief HAL configuration header. | 19 | * @brief HAL configuration header. |
20 | * @details HAL configuration file, this file allows to enable or disable the | 20 | * @details HAL configuration file, this file allows to enable or disable the |
21 | * various device drivers from your application. You may also use | 21 | * various device drivers from your application. You may also use |
22 | * this file in order to override the device drivers default settings. | 22 | * this file in order to override the device drivers default settings. |
23 | * | 23 | * |
24 | * @addtogroup HAL_CONF | 24 | * @addtogroup HAL_CONF |
25 | * @{ | 25 | * @{ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef _HALCONF_H_ | 28 | #ifndef _HALCONF_H_ |
29 | #define _HALCONF_H_ | 29 | #define _HALCONF_H_ |
30 | 30 | ||
31 | #include "mcuconf.h" | 31 | #include "mcuconf.h" |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * @brief Enables the PAL subsystem. | 34 | * @brief Enables the PAL subsystem. |
35 | */ | 35 | */ |
36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | 36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) |
37 | #define HAL_USE_PAL TRUE | 37 | #define HAL_USE_PAL TRUE |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * @brief Enables the ADC subsystem. | 41 | * @brief Enables the ADC subsystem. |
42 | */ | 42 | */ |
43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | 43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) |
44 | #define HAL_USE_ADC FALSE | 44 | #define HAL_USE_ADC FALSE |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * @brief Enables the CAN subsystem. | 48 | * @brief Enables the CAN subsystem. |
49 | */ | 49 | */ |
50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | 50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) |
51 | #define HAL_USE_CAN FALSE | 51 | #define HAL_USE_CAN FALSE |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * @brief Enables the DAC subsystem. | 55 | * @brief Enables the DAC subsystem. |
56 | */ | 56 | */ |
57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | 57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) |
58 | #define HAL_USE_DAC FALSE | 58 | #define HAL_USE_DAC FALSE |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * @brief Enables the EXT subsystem. | 62 | * @brief Enables the EXT subsystem. |
63 | */ | 63 | */ |
64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) | 64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) |
65 | #define HAL_USE_EXT FALSE | 65 | #define HAL_USE_EXT FALSE |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * @brief Enables the GPT subsystem. | 69 | * @brief Enables the GPT subsystem. |
70 | */ | 70 | */ |
71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | 71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) |
72 | #define HAL_USE_GPT FALSE | 72 | #define HAL_USE_GPT FALSE |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * @brief Enables the I2C subsystem. | 76 | * @brief Enables the I2C subsystem. |
77 | */ | 77 | */ |
78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | 78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) |
79 | #define HAL_USE_I2C FALSE | 79 | #define HAL_USE_I2C FALSE |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * @brief Enables the I2S subsystem. | 83 | * @brief Enables the I2S subsystem. |
84 | */ | 84 | */ |
85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | 85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) |
86 | #define HAL_USE_I2S FALSE | 86 | #define HAL_USE_I2S FALSE |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * @brief Enables the ICU subsystem. | 90 | * @brief Enables the ICU subsystem. |
91 | */ | 91 | */ |
92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | 92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) |
93 | #define HAL_USE_ICU FALSE | 93 | #define HAL_USE_ICU FALSE |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * @brief Enables the MAC subsystem. | 97 | * @brief Enables the MAC subsystem. |
98 | */ | 98 | */ |
99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | 99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) |
100 | #define HAL_USE_MAC FALSE | 100 | #define HAL_USE_MAC FALSE |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * @brief Enables the MMC_SPI subsystem. | 104 | * @brief Enables the MMC_SPI subsystem. |
105 | */ | 105 | */ |
106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | 106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) |
107 | #define HAL_USE_MMC_SPI FALSE | 107 | #define HAL_USE_MMC_SPI FALSE |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * @brief Enables the PWM subsystem. | 111 | * @brief Enables the PWM subsystem. |
112 | */ | 112 | */ |
113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | 113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) |
114 | #define HAL_USE_PWM FALSE | 114 | #define HAL_USE_PWM FALSE |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * @brief Enables the RTC subsystem. | 118 | * @brief Enables the RTC subsystem. |
119 | */ | 119 | */ |
120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | 120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) |
121 | #define HAL_USE_RTC FALSE | 121 | #define HAL_USE_RTC FALSE |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * @brief Enables the SDC subsystem. | 125 | * @brief Enables the SDC subsystem. |
126 | */ | 126 | */ |
127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | 127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) |
128 | #define HAL_USE_SDC FALSE | 128 | #define HAL_USE_SDC FALSE |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * @brief Enables the SERIAL subsystem. | 132 | * @brief Enables the SERIAL subsystem. |
133 | */ | 133 | */ |
134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | 134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) |
135 | #define HAL_USE_SERIAL FALSE | 135 | #define HAL_USE_SERIAL FALSE |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * @brief Enables the SERIAL over USB subsystem. | 139 | * @brief Enables the SERIAL over USB subsystem. |
140 | */ | 140 | */ |
141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | 141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) |
142 | #define HAL_USE_SERIAL_USB FALSE | 142 | #define HAL_USE_SERIAL_USB FALSE |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * @brief Enables the SPI subsystem. | 146 | * @brief Enables the SPI subsystem. |
147 | */ | 147 | */ |
148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) |
149 | #define HAL_USE_SPI FALSE | 149 | #define HAL_USE_SPI FALSE |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * @brief Enables the UART subsystem. | 153 | * @brief Enables the UART subsystem. |
154 | */ | 154 | */ |
155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | 155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) |
156 | #define HAL_USE_UART FALSE | 156 | #define HAL_USE_UART FALSE |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * @brief Enables the USB subsystem. | 160 | * @brief Enables the USB subsystem. |
161 | */ | 161 | */ |
162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | 162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) |
163 | #define HAL_USE_USB TRUE | 163 | #define HAL_USE_USB TRUE |
164 | #endif | 164 | #endif |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * @brief Enables the WDG subsystem. | 167 | * @brief Enables the WDG subsystem. |
168 | */ | 168 | */ |
169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | 169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) |
170 | #define HAL_USE_WDG FALSE | 170 | #define HAL_USE_WDG FALSE |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | /*===========================================================================*/ | 173 | /*===========================================================================*/ |
174 | /* USB driver related settings. */ | 174 | /* USB driver related settings. */ |
175 | /*===========================================================================*/ | 175 | /*===========================================================================*/ |
176 | 176 | ||
177 | /** | 177 | /** |
178 | * @brief Enables synchronous APIs. | 178 | * @brief Enables synchronous APIs. |
179 | * @note Disabling this option saves both code and data space. | 179 | * @note Disabling this option saves both code and data space. |
180 | */ | 180 | */ |
181 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | 181 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) |
182 | #define USB_USE_WAIT TRUE | 182 | #define USB_USE_WAIT TRUE |
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | #endif /* _HALCONF_H_ */ | 185 | #endif /* _HALCONF_H_ */ |
186 | 186 | ||
187 | /** @} */ | 187 | /** @} */ |
diff --git a/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h b/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h index c63659019..2764e8898 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h | |||
@@ -1,55 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MCUCONF_H_ | 17 | #ifndef _MCUCONF_H_ |
18 | #define _MCUCONF_H_ | 18 | #define _MCUCONF_H_ |
19 | 19 | ||
20 | #define KL2x_MCUCONF | 20 | #define KL2x_MCUCONF |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * HAL driver system settings. | 23 | * HAL driver system settings. |
24 | */ | 24 | */ |
25 | #if 1 | 25 | #if 1 |
26 | /* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ | 26 | /* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ |
27 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE | 27 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE |
28 | #define KINETIS_PLLCLK_FREQUENCY 96000000UL | 28 | #define KINETIS_PLLCLK_FREQUENCY 96000000UL |
29 | #define KINETIS_SYSCLK_FREQUENCY 48000000UL | 29 | #define KINETIS_SYSCLK_FREQUENCY 48000000UL |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #if 0 | 32 | #if 0 |
33 | /* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */ | 33 | /* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */ |
34 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI | 34 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI |
35 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | 35 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ |
36 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ | 36 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ |
37 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ | 37 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ |
38 | #define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */ | 38 | #define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */ |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * SERIAL driver system settings. | 42 | * SERIAL driver system settings. |
43 | */ | 43 | */ |
44 | #define KINETIS_SERIAL_USE_UART0 TRUE | 44 | #define KINETIS_SERIAL_USE_UART0 TRUE |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * USB driver settings | 47 | * USB driver settings |
48 | */ | 48 | */ |
49 | #define KINETIS_USB_USE_USB0 TRUE | 49 | #define KINETIS_USB_USE_USB0 TRUE |
50 | /* Need to redefine this, since the default is for K20x */ | 50 | /* Need to redefine this, since the default is for K20x */ |
51 | /* This is for Teensy LC; you should comment it out (or change to 5) | 51 | /* This is for Teensy LC; you should comment it out (or change to 5) |
52 | * for Teensy 3.x */ | 52 | * for Teensy 3.x */ |
53 | #define KINETIS_USB_USB0_IRQ_PRIORITY 2 | 53 | #define KINETIS_USB_USB0_IRQ_PRIORITY 2 |
54 | 54 | ||
55 | #endif /* _MCUCONF_H_ */ | 55 | #endif /* _MCUCONF_H_ */ |
diff --git a/keyboards/gh60/Makefile b/keyboards/gh60/Makefile index 4e2a6f00f..57b2ef62e 100644 --- a/keyboards/gh60/Makefile +++ b/keyboards/gh60/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | ifndef MAKEFILE_INCLUDED | 1 | ifndef MAKEFILE_INCLUDED |
2 | include ../../Makefile | 2 | include ../../Makefile |
3 | endif \ No newline at end of file | 3 | endif |
diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h index 4813c4e78..97753bc06 100644 --- a/keyboards/gh60/config.h +++ b/keyboards/gh60/config.h | |||
@@ -1,161 +1,161 @@ | |||
1 | /* | 1 | /* |
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> |
3 | 3 | ||
4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation, either version 2 of the License, or | 6 | the Free Software Foundation, either version 2 of the License, or |
7 | (at your option) any later version. | 7 | (at your option) any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef CONFIG_H | 18 | #ifndef CONFIG_H |
19 | #define CONFIG_H | 19 | #define CONFIG_H |
20 | 20 | ||
21 | #include "config_common.h" | 21 | #include "config_common.h" |
22 | 22 | ||
23 | /* USB Device descriptor parameter */ | 23 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xFEED | 24 | #define VENDOR_ID 0xFEED |
25 | #define PRODUCT_ID 0x6060 | 25 | #define PRODUCT_ID 0x6060 |
26 | #define DEVICE_VER 0x0001 | 26 | #define DEVICE_VER 0x0001 |
27 | #define MANUFACTURER geekhack | 27 | #define MANUFACTURER geekhack |
28 | #define PRODUCT GH60 | 28 | #define PRODUCT GH60 |
29 | #define DESCRIPTION t.m.k. keyboard firmware for GH60 | 29 | #define DESCRIPTION t.m.k. keyboard firmware for GH60 |
30 | 30 | ||
31 | /* key matrix size */ | 31 | /* key matrix size */ |
32 | #define MATRIX_ROWS 5 | 32 | #define MATRIX_ROWS 5 |
33 | #define MATRIX_COLS 14 | 33 | #define MATRIX_COLS 14 |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Keyboard Matrix Assignments | 36 | * Keyboard Matrix Assignments |
37 | * | 37 | * |
38 | * Change this to how you wired your keyboard | 38 | * Change this to how you wired your keyboard |
39 | * COLS: AVR pins used for columns, left to right | 39 | * COLS: AVR pins used for columns, left to right |
40 | * ROWS: AVR pins used for rows, top to bottom | 40 | * ROWS: AVR pins used for rows, top to bottom |
41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) |
42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
43 | * | 43 | * |
44 | */ | 44 | */ |
45 | #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } | 45 | #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } |
46 | // Rev A | 46 | // Rev A |
47 | // #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } | 47 | // #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } |
48 | // Rev B/C | 48 | // Rev B/C |
49 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } | 49 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } |
50 | #define UNUSED_PINS | 50 | #define UNUSED_PINS |
51 | 51 | ||
52 | /* COL2ROW or ROW2COL */ | 52 | /* COL2ROW or ROW2COL */ |
53 | #define DIODE_DIRECTION COL2ROW | 53 | #define DIODE_DIRECTION COL2ROW |
54 | 54 | ||
55 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 55 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
56 | #define DEBOUNCING_DELAY 5 | 56 | #define DEBOUNCING_DELAY 5 |
57 | 57 | ||
58 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | 58 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ |
59 | //#define MATRIX_HAS_GHOST | 59 | //#define MATRIX_HAS_GHOST |
60 | 60 | ||
61 | /* number of backlight levels */ | 61 | /* number of backlight levels */ |
62 | #define BACKLIGHT_LEVELS 3 | 62 | #define BACKLIGHT_LEVELS 3 |
63 | 63 | ||
64 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 64 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
65 | #define LOCKING_SUPPORT_ENABLE | 65 | #define LOCKING_SUPPORT_ENABLE |
66 | /* Locking resynchronize hack */ | 66 | /* Locking resynchronize hack */ |
67 | #define LOCKING_RESYNC_ENABLE | 67 | #define LOCKING_RESYNC_ENABLE |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Force NKRO | 70 | * Force NKRO |
71 | * | 71 | * |
72 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | 72 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved |
73 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | 73 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the |
74 | * makefile for this to work.) | 74 | * makefile for this to work.) |
75 | * | 75 | * |
76 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | 76 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) |
77 | * until the next keyboard reset. | 77 | * until the next keyboard reset. |
78 | * | 78 | * |
79 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | 79 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is |
80 | * fully operational during normal computer usage. | 80 | * fully operational during normal computer usage. |
81 | * | 81 | * |
82 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | 82 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) |
83 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | 83 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by |
84 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | 84 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a |
85 | * power-up. | 85 | * power-up. |
86 | * | 86 | * |
87 | */ | 87 | */ |
88 | //#define FORCE_NKRO | 88 | //#define FORCE_NKRO |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Magic Key Options | 91 | * Magic Key Options |
92 | * | 92 | * |
93 | * Magic keys are hotkey commands that allow control over firmware functions of | 93 | * Magic keys are hotkey commands that allow control over firmware functions of |
94 | * the keyboard. They are best used in combination with the HID Listen program, | 94 | * the keyboard. They are best used in combination with the HID Listen program, |
95 | * found here: https://www.pjrc.com/teensy/hid_listen.html | 95 | * found here: https://www.pjrc.com/teensy/hid_listen.html |
96 | * | 96 | * |
97 | * The options below allow the magic key functionality to be changed. This is | 97 | * The options below allow the magic key functionality to be changed. This is |
98 | * useful if your keyboard/keypad is missing keys and you want magic key support. | 98 | * useful if your keyboard/keypad is missing keys and you want magic key support. |
99 | * | 99 | * |
100 | */ | 100 | */ |
101 | 101 | ||
102 | /* key combination for magic key command */ | 102 | /* key combination for magic key command */ |
103 | #define IS_COMMAND() ( \ | 103 | #define IS_COMMAND() ( \ |
104 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | 104 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ |
105 | ) | 105 | ) |
106 | 106 | ||
107 | /* control how magic key switches layers */ | 107 | /* control how magic key switches layers */ |
108 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | 108 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true |
109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true |
110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false |
111 | 111 | ||
112 | /* override magic key keymap */ | 112 | /* override magic key keymap */ |
113 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | 113 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS |
114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS |
115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM |
116 | //#define MAGIC_KEY_HELP1 H | 116 | //#define MAGIC_KEY_HELP1 H |
117 | //#define MAGIC_KEY_HELP2 SLASH | 117 | //#define MAGIC_KEY_HELP2 SLASH |
118 | //#define MAGIC_KEY_DEBUG D | 118 | //#define MAGIC_KEY_DEBUG D |
119 | //#define MAGIC_KEY_DEBUG_MATRIX X | 119 | //#define MAGIC_KEY_DEBUG_MATRIX X |
120 | //#define MAGIC_KEY_DEBUG_KBD K | 120 | //#define MAGIC_KEY_DEBUG_KBD K |
121 | //#define MAGIC_KEY_DEBUG_MOUSE M | 121 | //#define MAGIC_KEY_DEBUG_MOUSE M |
122 | //#define MAGIC_KEY_VERSION V | 122 | //#define MAGIC_KEY_VERSION V |
123 | //#define MAGIC_KEY_STATUS S | 123 | //#define MAGIC_KEY_STATUS S |
124 | //#define MAGIC_KEY_CONSOLE C | 124 | //#define MAGIC_KEY_CONSOLE C |
125 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | 125 | //#define MAGIC_KEY_LAYER0_ALT1 ESC |
126 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | 126 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE |
127 | //#define MAGIC_KEY_LAYER0 0 | 127 | //#define MAGIC_KEY_LAYER0 0 |
128 | //#define MAGIC_KEY_LAYER1 1 | 128 | //#define MAGIC_KEY_LAYER1 1 |
129 | //#define MAGIC_KEY_LAYER2 2 | 129 | //#define MAGIC_KEY_LAYER2 2 |
130 | //#define MAGIC_KEY_LAYER3 3 | 130 | //#define MAGIC_KEY_LAYER3 3 |
131 | //#define MAGIC_KEY_LAYER4 4 | 131 | //#define MAGIC_KEY_LAYER4 4 |
132 | //#define MAGIC_KEY_LAYER5 5 | 132 | //#define MAGIC_KEY_LAYER5 5 |
133 | //#define MAGIC_KEY_LAYER6 6 | 133 | //#define MAGIC_KEY_LAYER6 6 |
134 | //#define MAGIC_KEY_LAYER7 7 | 134 | //#define MAGIC_KEY_LAYER7 7 |
135 | //#define MAGIC_KEY_LAYER8 8 | 135 | //#define MAGIC_KEY_LAYER8 8 |
136 | //#define MAGIC_KEY_LAYER9 9 | 136 | //#define MAGIC_KEY_LAYER9 9 |
137 | //#define MAGIC_KEY_BOOTLOADER PAUSE | 137 | //#define MAGIC_KEY_BOOTLOADER PAUSE |
138 | //#define MAGIC_KEY_LOCK CAPS | 138 | //#define MAGIC_KEY_LOCK CAPS |
139 | //#define MAGIC_KEY_EEPROM E | 139 | //#define MAGIC_KEY_EEPROM E |
140 | //#define MAGIC_KEY_NKRO N | 140 | //#define MAGIC_KEY_NKRO N |
141 | //#define MAGIC_KEY_SLEEP_LED Z | 141 | //#define MAGIC_KEY_SLEEP_LED Z |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * Feature disable options | 144 | * Feature disable options |
145 | * These options are also useful to firmware size reduction. | 145 | * These options are also useful to firmware size reduction. |
146 | */ | 146 | */ |
147 | 147 | ||
148 | /* disable debug print */ | 148 | /* disable debug print */ |
149 | //#define NO_DEBUG | 149 | //#define NO_DEBUG |
150 | 150 | ||
151 | /* disable print */ | 151 | /* disable print */ |
152 | //#define NO_PRINT | 152 | //#define NO_PRINT |
153 | 153 | ||
154 | /* disable action features */ | 154 | /* disable action features */ |
155 | //#define NO_ACTION_LAYER | 155 | //#define NO_ACTION_LAYER |
156 | //#define NO_ACTION_TAPPING | 156 | //#define NO_ACTION_TAPPING |
157 | //#define NO_ACTION_ONESHOT | 157 | //#define NO_ACTION_ONESHOT |
158 | //#define NO_ACTION_MACRO | 158 | //#define NO_ACTION_MACRO |
159 | //#define NO_ACTION_FUNCTION | 159 | //#define NO_ACTION_FUNCTION |
160 | 160 | ||
161 | #endif | 161 | #endif |
diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c index 255d87de9..f5a158e12 100644 --- a/keyboards/gh60/gh60.c +++ b/keyboards/gh60/gh60.c | |||
@@ -1,25 +1,25 @@ | |||
1 | #include "gh60.h" | 1 | #include "gh60.h" |
2 | 2 | ||
3 | void led_set_kb(uint8_t usb_led) { | 3 | void led_set_kb(uint8_t usb_led) { |
4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | 4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here |
5 | 5 | ||
6 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | 6 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { |
7 | gh60_caps_led_on(); | 7 | gh60_caps_led_on(); |
8 | } else { | 8 | } else { |
9 | gh60_caps_led_off(); | 9 | gh60_caps_led_off(); |
10 | } | 10 | } |
11 | 11 | ||
12 | // if (usb_led & (1<<USB_LED_NUM_LOCK)) { | 12 | // if (usb_led & (1<<USB_LED_NUM_LOCK)) { |
13 | // gh60_esc_led_on(); | 13 | // gh60_esc_led_on(); |
14 | // } else { | 14 | // } else { |
15 | // gh60_esc_led_off(); | 15 | // gh60_esc_led_off(); |
16 | // } | 16 | // } |
17 | 17 | ||
18 | // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | 18 | // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { |
19 | // gh60_fn_led_on(); | 19 | // gh60_fn_led_on(); |
20 | // } else { | 20 | // } else { |
21 | // gh60_fn_led_off(); | 21 | // gh60_fn_led_off(); |
22 | // } | 22 | // } |
23 | 23 | ||
24 | led_set_user(usb_led); | 24 | led_set_user(usb_led); |
25 | } | 25 | } |
diff --git a/keyboards/gh60/gh60.h b/keyboards/gh60/gh60.h index ca30562a4..82624b614 100644 --- a/keyboards/gh60/gh60.h +++ b/keyboards/gh60/gh60.h | |||
@@ -1,74 +1,74 @@ | |||
1 | #ifndef GH60_H | 1 | #ifndef GH60_H |
2 | #define GH60_H | 2 | #define GH60_H |
3 | 3 | ||
4 | #include "quantum.h" | 4 | #include "quantum.h" |
5 | #include "led.h" | 5 | #include "led.h" |
6 | 6 | ||
7 | /* GH60 LEDs | 7 | /* GH60 LEDs |
8 | * GPIO pads | 8 | * GPIO pads |
9 | * 0 F7 WASD LEDs | 9 | * 0 F7 WASD LEDs |
10 | * 1 F6 ESC LED | 10 | * 1 F6 ESC LED |
11 | * 2 F5 FN LED | 11 | * 2 F5 FN LED |
12 | * 3 F4 POKER Arrow LEDs | 12 | * 3 F4 POKER Arrow LEDs |
13 | * B2 Capslock LED | 13 | * B2 Capslock LED |
14 | * B0 not connected | 14 | * B0 not connected |
15 | */ | 15 | */ |
16 | inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } | 16 | inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } |
17 | inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } | 17 | inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } |
18 | inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } | 18 | inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } |
19 | inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } | 19 | inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } |
20 | inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } | 20 | inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } |
21 | 21 | ||
22 | inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } | 22 | inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } |
23 | inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } | 23 | inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } |
24 | inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } | 24 | inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } |
25 | inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } | 25 | inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } |
26 | inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } | 26 | inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } |
27 | 27 | ||
28 | /* GH60 keymap definition macro | 28 | /* GH60 keymap definition macro |
29 | * K2C, K31 and K3C are extra keys for ISO | 29 | * K2C, K31 and K3C are extra keys for ISO |
30 | */ | 30 | */ |
31 | #define KEYMAP( \ | 31 | #define KEYMAP( \ |
32 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | 32 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ |
33 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 33 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
34 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ | 34 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ |
35 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | 35 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ |
36 | K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ | 36 | K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ |
37 | ) { \ | 37 | ) { \ |
38 | { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \ | 38 | { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \ |
39 | { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \ | 39 | { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \ |
40 | { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \ | 40 | { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \ |
41 | { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \ | 41 | { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \ |
42 | { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \ | 42 | { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \ |
43 | } | 43 | } |
44 | 44 | ||
45 | /* ANSI valiant. No extra keys for ISO */ | 45 | /* ANSI valiant. No extra keys for ISO */ |
46 | #define KEYMAP_ANSI( \ | 46 | #define KEYMAP_ANSI( \ |
47 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | 47 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ |
48 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 48 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
49 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | 49 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ |
50 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ | 50 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ |
51 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | 51 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ |
52 | ) KEYMAP( \ | 52 | ) KEYMAP( \ |
53 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | 53 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ |
54 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 54 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
55 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ | 55 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ |
56 | K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \ | 56 | K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \ |
57 | K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \ | 57 | K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \ |
58 | ) | 58 | ) |
59 | 59 | ||
60 | #define KEYMAP_HHKB( \ | 60 | #define KEYMAP_HHKB( \ |
61 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ | 61 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ |
62 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 62 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
63 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | 63 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ |
64 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ | 64 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ |
65 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | 65 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ |
66 | ) KEYMAP( \ | 66 | ) KEYMAP( \ |
67 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | 67 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ |
68 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 68 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
69 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ | 69 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ |
70 | K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | 70 | K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ |
71 | K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ | 71 | K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ |
72 | ) | 72 | ) |
73 | 73 | ||
74 | #endif | 74 | #endif |
diff --git a/keyboards/gh60/keymaps/robotmaxtron/Makefile b/keyboards/gh60/keymaps/robotmaxtron/Makefile index 2e69aee29..c73cf1141 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/Makefile +++ b/keyboards/gh60/keymaps/robotmaxtron/Makefile | |||
@@ -1,112 +1,112 @@ | |||
1 | #---------------------------------------------------------------------------- | 1 | #---------------------------------------------------------------------------- |
2 | # On command line: | 2 | # On command line: |
3 | # | 3 | # |
4 | # make all = Make software. | 4 | # make all = Make software. |
5 | # | 5 | # |
6 | # make clean = Clean out built project files. | 6 | # make clean = Clean out built project files. |
7 | # | 7 | # |
8 | # make coff = Convert ELF to AVR COFF. | 8 | # make coff = Convert ELF to AVR COFF. |
9 | # | 9 | # |
10 | # make extcoff = Convert ELF to AVR Extended COFF. | 10 | # make extcoff = Convert ELF to AVR Extended COFF. |
11 | # | 11 | # |
12 | # make program = Download the hex file to the device. | 12 | # make program = Download the hex file to the device. |
13 | # Please customize your programmer settings(PROGRAM_CMD) | 13 | # Please customize your programmer settings(PROGRAM_CMD) |
14 | # | 14 | # |
15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. | 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. |
16 | # (must have teensy_loader_cli installed). | 16 | # (must have teensy_loader_cli installed). |
17 | # | 17 | # |
18 | # make dfu = Download the hex file to the device, using dfu-programmer (must | 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must |
19 | # have dfu-programmer installed). | 19 | # have dfu-programmer installed). |
20 | # | 20 | # |
21 | # make flip = Download the hex file to the device, using Atmel FLIP (must | 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must |
22 | # have Atmel FLIP installed). | 22 | # have Atmel FLIP installed). |
23 | # | 23 | # |
24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer | 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer |
25 | # (must have dfu-programmer installed). | 25 | # (must have dfu-programmer installed). |
26 | # | 26 | # |
27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP | 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP |
28 | # (must have Atmel FLIP installed). | 28 | # (must have Atmel FLIP installed). |
29 | # | 29 | # |
30 | # make debug = Start either simulavr or avarice as specified for debugging, | 30 | # make debug = Start either simulavr or avarice as specified for debugging, |
31 | # with avr-gdb or avr-insight as the front end for debugging. | 31 | # with avr-gdb or avr-insight as the front end for debugging. |
32 | # | 32 | # |
33 | # make filename.s = Just compile filename.c into the assembler code only. | 33 | # make filename.s = Just compile filename.c into the assembler code only. |
34 | # | 34 | # |
35 | # make filename.i = Create a preprocessed source file for use in submitting | 35 | # make filename.i = Create a preprocessed source file for use in submitting |
36 | # bug reports to the GCC project. | 36 | # bug reports to the GCC project. |
37 | # | 37 | # |
38 | # To rebuild project do "make clean" then "make all". | 38 | # To rebuild project do "make clean" then "make all". |
39 | #---------------------------------------------------------------------------- | 39 | #---------------------------------------------------------------------------- |
40 | 40 | ||
41 | # MCU name | 41 | # MCU name |
42 | #MCU = at90usb1287 | 42 | #MCU = at90usb1287 |
43 | MCU = atmega32u4 | 43 | MCU = atmega32u4 |
44 | 44 | ||
45 | # Processor frequency. | 45 | # Processor frequency. |
46 | # This will define a symbol, F_CPU, in all source code files equal to the | 46 | # This will define a symbol, F_CPU, in all source code files equal to the |
47 | # processor frequency in Hz. You can then use this symbol in your source code to | 47 | # processor frequency in Hz. You can then use this symbol in your source code to |
48 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 48 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done |
49 | # automatically to create a 32-bit value in your source code. | 49 | # automatically to create a 32-bit value in your source code. |
50 | # | 50 | # |
51 | # This will be an integer division of F_USB below, as it is sourced by | 51 | # This will be an integer division of F_USB below, as it is sourced by |
52 | # F_USB after it has run through any CPU prescalers. Note that this value | 52 | # F_USB after it has run through any CPU prescalers. Note that this value |
53 | # does not *change* the processor frequency - it should merely be updated to | 53 | # does not *change* the processor frequency - it should merely be updated to |
54 | # reflect the processor speed set externally so that the code can use accurate | 54 | # reflect the processor speed set externally so that the code can use accurate |
55 | # software delays. | 55 | # software delays. |
56 | F_CPU = 16000000 | 56 | F_CPU = 16000000 |
57 | 57 | ||
58 | 58 | ||
59 | # | 59 | # |
60 | # LUFA specific | 60 | # LUFA specific |
61 | # | 61 | # |
62 | # Target architecture (see library "Board Types" documentation). | 62 | # Target architecture (see library "Board Types" documentation). |
63 | ARCH = AVR8 | 63 | ARCH = AVR8 |
64 | 64 | ||
65 | # Input clock frequency. | 65 | # Input clock frequency. |
66 | # This will define a symbol, F_USB, in all source code files equal to the | 66 | # This will define a symbol, F_USB, in all source code files equal to the |
67 | # input clock frequency (before any prescaling is performed) in Hz. This value may | 67 | # input clock frequency (before any prescaling is performed) in Hz. This value may |
68 | # differ from F_CPU if prescaling is used on the latter, and is required as the | 68 | # differ from F_CPU if prescaling is used on the latter, and is required as the |
69 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | 69 | # raw input clock is fed directly to the PLL sections of the AVR for high speed |
70 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | 70 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' |
71 | # at the end, this will be done automatically to create a 32-bit value in your | 71 | # at the end, this will be done automatically to create a 32-bit value in your |
72 | # source code. | 72 | # source code. |
73 | # | 73 | # |
74 | # If no clock division is performed on the input clock inside the AVR (via the | 74 | # If no clock division is performed on the input clock inside the AVR (via the |
75 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | 75 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. |
76 | F_USB = $(F_CPU) | 76 | F_USB = $(F_CPU) |
77 | 77 | ||
78 | # Interrupt driven control endpoint task(+60) | 78 | # Interrupt driven control endpoint task(+60) |
79 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | 79 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT |
80 | 80 | ||
81 | 81 | ||
82 | # Boot Section Size in *bytes* | 82 | # Boot Section Size in *bytes* |
83 | # Teensy halfKay 512 | 83 | # Teensy halfKay 512 |
84 | # Teensy++ halfKay 1024 | 84 | # Teensy++ halfKay 1024 |
85 | # Atmel DFU loader 4096 | 85 | # Atmel DFU loader 4096 |
86 | # LUFA bootloader 4096 | 86 | # LUFA bootloader 4096 |
87 | # USBaspLoader 2048 | 87 | # USBaspLoader 2048 |
88 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | 88 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 |
89 | 89 | ||
90 | 90 | ||
91 | # Build Options | 91 | # Build Options |
92 | # comment out to disable the options. | 92 | # comment out to disable the options. |
93 | # | 93 | # |
94 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | 94 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) |
95 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | 95 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) |
96 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | 96 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) |
97 | # CONSOLE_ENABLE ?= yes # Console for debug(+400) | 97 | # CONSOLE_ENABLE ?= yes # Console for debug(+400) |
98 | # COMMAND_ENABLE ?= yes # Commands for debug and configuration | 98 | # COMMAND_ENABLE ?= yes # Commands for debug and configuration |
99 | KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key | 99 | KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key |
100 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 100 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
101 | # SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend | 101 | # SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend |
102 | NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 102 | NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
103 | # BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality | 103 | # BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality |
104 | # MIDI_ENABLE ?= YES # MIDI controls | 104 | # MIDI_ENABLE ?= YES # MIDI controls |
105 | # UNICODE_ENABLE ?= YES # Unicode | 105 | # UNICODE_ENABLE ?= YES # Unicode |
106 | # BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID | 106 | # BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID |
107 | RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow | 107 | RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow |
108 | 108 | ||
109 | ifndef QUANTUM_DIR | 109 | ifndef QUANTUM_DIR |
110 | include ../../../../Makefile | 110 | include ../../../../Makefile |
111 | endif | 111 | endif |
112 | 112 | ||
diff --git a/keyboards/gh60/keymaps/robotmaxtron/config.h b/keyboards/gh60/keymaps/robotmaxtron/config.h index 8272875ed..6a29e6b8c 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/config.h +++ b/keyboards/gh60/keymaps/robotmaxtron/config.h | |||
@@ -1,190 +1,190 @@ | |||
1 | /* | 1 | /* |
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> |
3 | 3 | ||
4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation, either version 2 of the License, or | 6 | the Free Software Foundation, either version 2 of the License, or |
7 | (at your option) any later version. | 7 | (at your option) any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef CONFIG_H | 18 | #ifndef CONFIG_H |
19 | #define CONFIG_H | 19 | #define CONFIG_H |
20 | 20 | ||
21 | #include "config_common.h" | 21 | #include "config_common.h" |
22 | 22 | ||
23 | /* USB Device descriptor parameter */ | 23 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xFEED | 24 | #define VENDOR_ID 0xFEED |
25 | #define PRODUCT_ID 0x6060 | 25 | #define PRODUCT_ID 0x6060 |
26 | #define DEVICE_VER 0x0001 | 26 | #define DEVICE_VER 0x0001 |
27 | #define MANUFACTURER geekhack | 27 | #define MANUFACTURER geekhack |
28 | #define PRODUCT GH60 | 28 | #define PRODUCT GH60 |
29 | #define DESCRIPTION t.m.k. keyboard firmware for GH60 | 29 | #define DESCRIPTION t.m.k. keyboard firmware for GH60 |
30 | 30 | ||
31 | /* key matrix size */ | 31 | /* key matrix size */ |
32 | #define MATRIX_ROWS 5 | 32 | #define MATRIX_ROWS 5 |
33 | #define MATRIX_COLS 14 | 33 | #define MATRIX_COLS 14 |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Keyboard Matrix Assignments | 36 | * Keyboard Matrix Assignments |
37 | * | 37 | * |
38 | * Change this to how you wired your keyboard | 38 | * Change this to how you wired your keyboard |
39 | * COLS: AVR pins used for columns, left to right | 39 | * COLS: AVR pins used for columns, left to right |
40 | * ROWS: AVR pins used for rows, top to bottom | 40 | * ROWS: AVR pins used for rows, top to bottom |
41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) |
42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
43 | * | 43 | * |
44 | */ | 44 | */ |
45 | #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } | 45 | #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } |
46 | // Rev A | 46 | // Rev A |
47 | // #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } | 47 | // #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } |
48 | // Rev B/C | 48 | // Rev B/C |
49 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } | 49 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } |
50 | #define UNUSED_PINS | 50 | #define UNUSED_PINS |
51 | 51 | ||
52 | /* COL2ROW or ROW2COL */ | 52 | /* COL2ROW or ROW2COL */ |
53 | #define DIODE_DIRECTION COL2ROW | 53 | #define DIODE_DIRECTION COL2ROW |
54 | 54 | ||
55 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 55 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
56 | #define DEBOUNCING_DELAY 5 | 56 | #define DEBOUNCING_DELAY 5 |
57 | 57 | ||
58 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | 58 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ |
59 | //#define MATRIX_HAS_GHOST | 59 | //#define MATRIX_HAS_GHOST |
60 | 60 | ||
61 | /* number of backlight levels */ | 61 | /* number of backlight levels */ |
62 | #define BACKLIGHT_LEVELS 3 | 62 | #define BACKLIGHT_LEVELS 3 |
63 | 63 | ||
64 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 64 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
65 | #define LOCKING_SUPPORT_ENABLE | 65 | #define LOCKING_SUPPORT_ENABLE |
66 | /* Locking resynchronize hack */ | 66 | /* Locking resynchronize hack */ |
67 | #define LOCKING_RESYNC_ENABLE | 67 | #define LOCKING_RESYNC_ENABLE |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Force NKRO | 70 | * Force NKRO |
71 | * | 71 | * |
72 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | 72 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved |
73 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | 73 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the |
74 | * makefile for this to work.) | 74 | * makefile for this to work.) |
75 | * | 75 | * |
76 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | 76 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) |
77 | * until the next keyboard reset. | 77 | * until the next keyboard reset. |
78 | * | 78 | * |
79 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | 79 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is |
80 | * fully operational during normal computer usage. | 80 | * fully operational during normal computer usage. |
81 | * | 81 | * |
82 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | 82 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) |
83 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | 83 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by |
84 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | 84 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a |
85 | * power-up. | 85 | * power-up. |
86 | * | 86 | * |
87 | */ | 87 | */ |
88 | //#define FORCE_NKRO | 88 | //#define FORCE_NKRO |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Magic Key Options | 91 | * Magic Key Options |
92 | * | 92 | * |
93 | * Magic keys are hotkey commands that allow control over firmware functions of | 93 | * Magic keys are hotkey commands that allow control over firmware functions of |
94 | * the keyboard. They are best used in combination with the HID Listen program, | 94 | * the keyboard. They are best used in combination with the HID Listen program, |
95 | * found here: https://www.pjrc.com/teensy/hid_listen.html | 95 | * found here: https://www.pjrc.com/teensy/hid_listen.html |
96 | * | 96 | * |
97 | * The options below allow the magic key functionality to be changed. This is | 97 | * The options below allow the magic key functionality to be changed. This is |
98 | * useful if your keyboard/keypad is missing keys and you want magic key support. | 98 | * useful if your keyboard/keypad is missing keys and you want magic key support. |
99 | * | 99 | * |
100 | */ | 100 | */ |
101 | 101 | ||
102 | /* key combination for magic key command */ | 102 | /* key combination for magic key command */ |
103 | #define IS_COMMAND() ( \ | 103 | #define IS_COMMAND() ( \ |
104 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | 104 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ |
105 | ) | 105 | ) |
106 | 106 | ||
107 | /* control how magic key switches layers */ | 107 | /* control how magic key switches layers */ |
108 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | 108 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true |
109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true |
110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false |
111 | 111 | ||
112 | /* override magic key keymap */ | 112 | /* override magic key keymap */ |
113 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | 113 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS |
114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS |
115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM |
116 | //#define MAGIC_KEY_HELP1 H | 116 | //#define MAGIC_KEY_HELP1 H |
117 | //#define MAGIC_KEY_HELP2 SLASH | 117 | //#define MAGIC_KEY_HELP2 SLASH |
118 | //#define MAGIC_KEY_DEBUG D | 118 | //#define MAGIC_KEY_DEBUG D |
119 | //#define MAGIC_KEY_DEBUG_MATRIX X | 119 | //#define MAGIC_KEY_DEBUG_MATRIX X |
120 | //#define MAGIC_KEY_DEBUG_KBD K | 120 | //#define MAGIC_KEY_DEBUG_KBD K |
121 | //#define MAGIC_KEY_DEBUG_MOUSE M | 121 | //#define MAGIC_KEY_DEBUG_MOUSE M |
122 | //#define MAGIC_KEY_VERSION V | 122 | //#define MAGIC_KEY_VERSION V |
123 | //#define MAGIC_KEY_STATUS S | 123 | //#define MAGIC_KEY_STATUS S |
124 | //#define MAGIC_KEY_CONSOLE C | 124 | //#define MAGIC_KEY_CONSOLE C |
125 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | 125 | //#define MAGIC_KEY_LAYER0_ALT1 ESC |
126 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | 126 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE |
127 | //#define MAGIC_KEY_LAYER0 0 | 127 | //#define MAGIC_KEY_LAYER0 0 |
128 | //#define MAGIC_KEY_LAYER1 1 | 128 | //#define MAGIC_KEY_LAYER1 1 |
129 | //#define MAGIC_KEY_LAYER2 2 | 129 | //#define MAGIC_KEY_LAYER2 2 |
130 | //#define MAGIC_KEY_LAYER3 3 | 130 | //#define MAGIC_KEY_LAYER3 3 |
131 | //#define MAGIC_KEY_LAYER4 4 | 131 | //#define MAGIC_KEY_LAYER4 4 |
132 | //#define MAGIC_KEY_LAYER5 5 | 132 | //#define MAGIC_KEY_LAYER5 5 |
133 | //#define MAGIC_KEY_LAYER6 6 | 133 | //#define MAGIC_KEY_LAYER6 6 |
134 | //#define MAGIC_KEY_LAYER7 7 | 134 | //#define MAGIC_KEY_LAYER7 7 |
135 | //#define MAGIC_KEY_LAYER8 8 | 135 | //#define MAGIC_KEY_LAYER8 8 |
136 | //#define MAGIC_KEY_LAYER9 9 | 136 | //#define MAGIC_KEY_LAYER9 9 |
137 | //#define MAGIC_KEY_BOOTLOADER PAUSE | 137 | //#define MAGIC_KEY_BOOTLOADER PAUSE |
138 | //#define MAGIC_KEY_LOCK CAPS | 138 | //#define MAGIC_KEY_LOCK CAPS |
139 | //#define MAGIC_KEY_EEPROM E | 139 | //#define MAGIC_KEY_EEPROM E |
140 | //#define MAGIC_KEY_NKRO N | 140 | //#define MAGIC_KEY_NKRO N |
141 | //#define MAGIC_KEY_SLEEP_LED Z | 141 | //#define MAGIC_KEY_SLEEP_LED Z |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * Feature disable options | 144 | * Feature disable options |
145 | * These options are also useful to firmware size reduction. | 145 | * These options are also useful to firmware size reduction. |
146 | */ | 146 | */ |
147 | 147 | ||
148 | /* disable debug print */ | 148 | /* disable debug print */ |
149 | //#define NO_DEBUG | 149 | //#define NO_DEBUG |
150 | 150 | ||
151 | /* disable print */ | 151 | /* disable print */ |
152 | //#define NO_PRINT | 152 | //#define NO_PRINT |
153 | 153 | ||
154 | /* disable action features */ | 154 | /* disable action features */ |
155 | //#define NO_ACTION_LAYER | 155 | //#define NO_ACTION_LAYER |
156 | //#define NO_ACTION_TAPPING | 156 | //#define NO_ACTION_TAPPING |
157 | //#define NO_ACTION_ONESHOT | 157 | //#define NO_ACTION_ONESHOT |
158 | //#define NO_ACTION_MACRO | 158 | //#define NO_ACTION_MACRO |
159 | //#define NO_ACTION_FUNCTION | 159 | //#define NO_ACTION_FUNCTION |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * RGB Underglow | 162 | * RGB Underglow |
163 | * These settings are for the F4 by default: | 163 | * These settings are for the F4 by default: |
164 | * | 164 | * |
165 | * | 165 | * |
166 | * #define ws2812_PORTREG PORTF | 166 | * #define ws2812_PORTREG PORTF |
167 | * #define ws2812_DDRREG DDRF | 167 | * #define ws2812_DDRREG DDRF |
168 | * #define ws2812_pin PF4 | 168 | * #define ws2812_pin PF4 |
169 | * #define RGBLED_NUM 14 // Number of LEDs | 169 | * #define RGBLED_NUM 14 // Number of LEDs |
170 | * #define RGBLIGHT_HUE_STEP 10 | 170 | * #define RGBLIGHT_HUE_STEP 10 |
171 | * #define RGBLIGHT_SAT_STEP 17 | 171 | * #define RGBLIGHT_SAT_STEP 17 |
172 | * #define RGBLIGHT_VAL_STEP 17 | 172 | * #define RGBLIGHT_VAL_STEP 17 |
173 | * | 173 | * |
174 | * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. | 174 | * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. |
175 | * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. | 175 | * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. |
176 | * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c | 176 | * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c |
177 | */ | 177 | */ |
178 | 178 | ||
179 | /* Deprecated code below | 179 | /* Deprecated code below |
180 | #define ws2812_PORTREG PORTF | 180 | #define ws2812_PORTREG PORTF |
181 | #define ws2812_DDRREG DDRF | 181 | #define ws2812_DDRREG DDRF |
182 | #define ws2812_pin PF4 | 182 | #define ws2812_pin PF4 |
183 | */ | 183 | */ |
184 | #define RGB_DI_PIN F4 | 184 | #define RGB_DI_PIN F4 |
185 | #define RGBLIGHT_TIMER | 185 | #define RGBLIGHT_TIMER |
186 | #define RGBLED_NUM 8 // Number of LEDs | 186 | #define RGBLED_NUM 8 // Number of LEDs |
187 | #define RGBLIGHT_HUE_STEP 8 | 187 | #define RGBLIGHT_HUE_STEP 8 |
188 | #define RGBLIGHT_SAT_STEP 8 | 188 | #define RGBLIGHT_SAT_STEP 8 |
189 | #define RGBLIGHT_VAL_STEP 8 | 189 | #define RGBLIGHT_VAL_STEP 8 |
190 | #endif | 190 | #endif |
diff --git a/keyboards/gh60/pinout.txt b/keyboards/gh60/pinout.txt index 3787f938e..e9bf1983a 100644 --- a/keyboards/gh60/pinout.txt +++ b/keyboards/gh60/pinout.txt | |||
@@ -1,18 +1,18 @@ | |||
1 | /* Column pin configuration | 1 | /* Column pin configuration |
2 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 | 2 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 |
3 | * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) | 3 | * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* Row pin configuration | 6 | /* Row pin configuration |
7 | * row: 0 1 2 3 4 | 7 | * row: 0 1 2 3 4 |
8 | * pin: D0 D1 D2 D3 D5 | 8 | * pin: D0 D1 D2 D3 D5 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | GPIO pads | 11 | GPIO pads |
12 | 0 F7 WASD LEDs | 12 | 0 F7 WASD LEDs |
13 | 1 F6 ESC LED | 13 | 1 F6 ESC LED |
14 | 2 F5 FN LED | 14 | 2 F5 FN LED |
15 | 3 F4 POKER Arrow LEDs | 15 | 3 F4 POKER Arrow LEDs |
16 | 16 | ||
17 | B2 Capslock LED | 17 | B2 Capslock LED |
18 | B0 not connected \ No newline at end of file | 18 | B0 not connected \ No newline at end of file |
diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index 20afb0db0..8c744bfd3 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md | |||
@@ -1,62 +1,62 @@ | |||
1 | ## gh60 Rev C keyboard firmware | 1 | ## gh60 Rev C keyboard firmware |
2 | 2 | ||
3 |  | 3 |  |
4 | 4 | ||
5 | /* Column pin configuration | 5 | /* Column pin configuration |
6 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 | 6 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 |
7 | * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) | 7 | * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* Row pin configuration | 10 | /* Row pin configuration |
11 | * row: 0 1 2 3 4 | 11 | * row: 0 1 2 3 4 |
12 | * pin: D0 D1 D2 D3 D5 | 12 | * pin: D0 D1 D2 D3 D5 |
13 | */ | 13 | */ |
14 | 14 | ||
15 | GPIO pads | 15 | GPIO pads |
16 | 0 F7 WASD LEDs | 16 | 0 F7 WASD LEDs |
17 | 1 F6 ESC LED | 17 | 1 F6 ESC LED |
18 | 2 F5 FN LED | 18 | 2 F5 FN LED |
19 | 3 F4 POKER Arrow LEDs | 19 | 3 F4 POKER Arrow LEDs |
20 | 20 | ||
21 | B2 Capslock LED | 21 | B2 Capslock LED |
22 | B0 not connected | 22 | B0 not connected |
23 | 23 | ||
24 | Functions to controls LED clusters | 24 | Functions to controls LED clusters |
25 | 25 | ||
26 | gh60_caps_led_on() | 26 | gh60_caps_led_on() |
27 | gh60_poker_leds_on() | 27 | gh60_poker_leds_on() |
28 | gh60_fn_led_on() | 28 | gh60_fn_led_on() |
29 | gh60_esc_led_on() | 29 | gh60_esc_led_on() |
30 | gh60_wasd_leds_on() | 30 | gh60_wasd_leds_on() |
31 | 31 | ||
32 | gh60_caps_led_off() | 32 | gh60_caps_led_off() |
33 | gh60_poker_leds_off() | 33 | gh60_poker_leds_off() |
34 | gh60_fn_led_off() | 34 | gh60_fn_led_off() |
35 | gh60_esc_led_off() | 35 | gh60_esc_led_off() |
36 | gh60_wasd_leds_off() | 36 | gh60_wasd_leds_off() |
37 | 37 | ||
38 | ====================== | 38 | ====================== |
39 | 39 | ||
40 | ## Quantum MK Firmware | 40 | ## Quantum MK Firmware |
41 | 41 | ||
42 | For the full Quantum feature list, see [the parent readme.md](/readme.md). | 42 | For the full Quantum feature list, see [the parent readme.md](/readme.md). |
43 | 43 | ||
44 | ## Building | 44 | ## Building |
45 | 45 | ||
46 | Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. | 46 | Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. |
47 | 47 | ||
48 | Depending on which keymap you would like to use, you will have to compile slightly differently. | 48 | Depending on which keymap you would like to use, you will have to compile slightly differently. |
49 | 49 | ||
50 | ### Default | 50 | ### Default |
51 | To build with the default keymap, simply run `make default`. | 51 | To build with the default keymap, simply run `make default`. |
52 | 52 | ||
53 | ### Other Keymaps | 53 | ### Other Keymaps |
54 | Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. | 54 | Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. |
55 | 55 | ||
56 | To build the firmware binary hex file with a keymap just do `make` with a keymap like this: | 56 | To build the firmware binary hex file with a keymap just do `make` with a keymap like this: |
57 | 57 | ||
58 | ``` | 58 | ``` |
59 | $ make [default|jack|<name>] | 59 | $ make [default|jack|<name>] |
60 | ``` | 60 | ``` |
61 | 61 | ||
62 | Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. | 62 | Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. |
diff --git a/keyboards/infinity_chibios/chconf.h b/keyboards/infinity_chibios/chconf.h index b886c383b..43c845739 100644 --- a/keyboards/infinity_chibios/chconf.h +++ b/keyboards/infinity_chibios/chconf.h | |||
@@ -1,524 +1,524 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * @file templates/chconf.h | 18 | * @file templates/chconf.h |
19 | * @brief Configuration file template. | 19 | * @brief Configuration file template. |
20 | * @details A copy of this file must be placed in each project directory, it | 20 | * @details A copy of this file must be placed in each project directory, it |
21 | * contains the application specific kernel settings. | 21 | * contains the application specific kernel settings. |
22 | * | 22 | * |
23 | * @addtogroup config | 23 | * @addtogroup config |
24 | * @details Kernel related settings and hooks. | 24 | * @details Kernel related settings and hooks. |
25 | * @{ | 25 | * @{ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef CHCONF_H | 28 | #ifndef CHCONF_H |
29 | #define CHCONF_H | 29 | #define CHCONF_H |
30 | 30 | ||
31 | #define _CHIBIOS_RT_CONF_ | 31 | #define _CHIBIOS_RT_CONF_ |
32 | 32 | ||
33 | /*===========================================================================*/ | 33 | /*===========================================================================*/ |
34 | /** | 34 | /** |
35 | * @name System timers settings | 35 | * @name System timers settings |
36 | * @{ | 36 | * @{ |
37 | */ | 37 | */ |
38 | /*===========================================================================*/ | 38 | /*===========================================================================*/ |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * @brief System time counter resolution. | 41 | * @brief System time counter resolution. |
42 | * @note Allowed values are 16 or 32 bits. | 42 | * @note Allowed values are 16 or 32 bits. |
43 | */ | 43 | */ |
44 | #define CH_CFG_ST_RESOLUTION 32 | 44 | #define CH_CFG_ST_RESOLUTION 32 |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * @brief System tick frequency. | 47 | * @brief System tick frequency. |
48 | * @details Frequency of the system timer that drives the system ticks. This | 48 | * @details Frequency of the system timer that drives the system ticks. This |
49 | * setting also defines the system tick time unit. | 49 | * setting also defines the system tick time unit. |
50 | */ | 50 | */ |
51 | #define CH_CFG_ST_FREQUENCY 1000 | 51 | #define CH_CFG_ST_FREQUENCY 1000 |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * @brief Time delta constant for the tick-less mode. | 54 | * @brief Time delta constant for the tick-less mode. |
55 | * @note If this value is zero then the system uses the classic | 55 | * @note If this value is zero then the system uses the classic |
56 | * periodic tick. This value represents the minimum number | 56 | * periodic tick. This value represents the minimum number |
57 | * of ticks that is safe to specify in a timeout directive. | 57 | * of ticks that is safe to specify in a timeout directive. |
58 | * The value one is not valid, timeouts are rounded up to | 58 | * The value one is not valid, timeouts are rounded up to |
59 | * this value. | 59 | * this value. |
60 | */ | 60 | */ |
61 | #define CH_CFG_ST_TIMEDELTA 0 | 61 | #define CH_CFG_ST_TIMEDELTA 0 |
62 | 62 | ||
63 | /** @} */ | 63 | /** @} */ |
64 | 64 | ||
65 | /*===========================================================================*/ | 65 | /*===========================================================================*/ |
66 | /** | 66 | /** |
67 | * @name Kernel parameters and options | 67 | * @name Kernel parameters and options |
68 | * @{ | 68 | * @{ |
69 | */ | 69 | */ |
70 | /*===========================================================================*/ | 70 | /*===========================================================================*/ |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * @brief Round robin interval. | 73 | * @brief Round robin interval. |
74 | * @details This constant is the number of system ticks allowed for the | 74 | * @details This constant is the number of system ticks allowed for the |
75 | * threads before preemption occurs. Setting this value to zero | 75 | * threads before preemption occurs. Setting this value to zero |
76 | * disables the preemption for threads with equal priority and the | 76 | * disables the preemption for threads with equal priority and the |
77 | * round robin becomes cooperative. Note that higher priority | 77 | * round robin becomes cooperative. Note that higher priority |
78 | * threads can still preempt, the kernel is always preemptive. | 78 | * threads can still preempt, the kernel is always preemptive. |
79 | * @note Disabling the round robin preemption makes the kernel more compact | 79 | * @note Disabling the round robin preemption makes the kernel more compact |
80 | * and generally faster. | 80 | * and generally faster. |
81 | * @note The round robin preemption is not supported in tickless mode and | 81 | * @note The round robin preemption is not supported in tickless mode and |
82 | * must be set to zero in that case. | 82 | * must be set to zero in that case. |
83 | */ | 83 | */ |
84 | #define CH_CFG_TIME_QUANTUM 20 | 84 | #define CH_CFG_TIME_QUANTUM 20 |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * @brief Managed RAM size. | 87 | * @brief Managed RAM size. |
88 | * @details Size of the RAM area to be managed by the OS. If set to zero | 88 | * @details Size of the RAM area to be managed by the OS. If set to zero |
89 | * then the whole available RAM is used. The core memory is made | 89 | * then the whole available RAM is used. The core memory is made |
90 | * available to the heap allocator and/or can be used directly through | 90 | * available to the heap allocator and/or can be used directly through |
91 | * the simplified core memory allocator. | 91 | * the simplified core memory allocator. |
92 | * | 92 | * |
93 | * @note In order to let the OS manage the whole RAM the linker script must | 93 | * @note In order to let the OS manage the whole RAM the linker script must |
94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | 94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. |
95 | * @note Requires @p CH_CFG_USE_MEMCORE. | 95 | * @note Requires @p CH_CFG_USE_MEMCORE. |
96 | */ | 96 | */ |
97 | #define CH_CFG_MEMCORE_SIZE 0 | 97 | #define CH_CFG_MEMCORE_SIZE 0 |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * @brief Idle thread automatic spawn suppression. | 100 | * @brief Idle thread automatic spawn suppression. |
101 | * @details When this option is activated the function @p chSysInit() | 101 | * @details When this option is activated the function @p chSysInit() |
102 | * does not spawn the idle thread. The application @p main() | 102 | * does not spawn the idle thread. The application @p main() |
103 | * function becomes the idle thread and must implement an | 103 | * function becomes the idle thread and must implement an |
104 | * infinite loop. | 104 | * infinite loop. |
105 | */ | 105 | */ |
106 | #define CH_CFG_NO_IDLE_THREAD FALSE | 106 | #define CH_CFG_NO_IDLE_THREAD FALSE |
107 | 107 | ||
108 | /* Use __WFI in the idle thread for waiting. Does lower the power | 108 | /* Use __WFI in the idle thread for waiting. Does lower the power |
109 | * consumption. */ | 109 | * consumption. */ |
110 | #define CORTEX_ENABLE_WFI_IDLE TRUE | 110 | #define CORTEX_ENABLE_WFI_IDLE TRUE |
111 | 111 | ||
112 | /** @} */ | 112 | /** @} */ |
113 | 113 | ||
114 | /*===========================================================================*/ | 114 | /*===========================================================================*/ |
115 | /** | 115 | /** |
116 | * @name Performance options | 116 | * @name Performance options |
117 | * @{ | 117 | * @{ |
118 | */ | 118 | */ |
119 | /*===========================================================================*/ | 119 | /*===========================================================================*/ |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * @brief OS optimization. | 122 | * @brief OS optimization. |
123 | * @details If enabled then time efficient rather than space efficient code | 123 | * @details If enabled then time efficient rather than space efficient code |
124 | * is used when two possible implementations exist. | 124 | * is used when two possible implementations exist. |
125 | * | 125 | * |
126 | * @note This is not related to the compiler optimization options. | 126 | * @note This is not related to the compiler optimization options. |
127 | * @note The default is @p TRUE. | 127 | * @note The default is @p TRUE. |
128 | */ | 128 | */ |
129 | #define CH_CFG_OPTIMIZE_SPEED TRUE | 129 | #define CH_CFG_OPTIMIZE_SPEED TRUE |
130 | 130 | ||
131 | /** @} */ | 131 | /** @} */ |
132 | 132 | ||
133 | /*===========================================================================*/ | 133 | /*===========================================================================*/ |
134 | /** | 134 | /** |
135 | * @name Subsystem options | 135 | * @name Subsystem options |
136 | * @{ | 136 | * @{ |
137 | */ | 137 | */ |
138 | /*===========================================================================*/ | 138 | /*===========================================================================*/ |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * @brief Time Measurement APIs. | 141 | * @brief Time Measurement APIs. |
142 | * @details If enabled then the time measurement APIs are included in | 142 | * @details If enabled then the time measurement APIs are included in |
143 | * the kernel. | 143 | * the kernel. |
144 | * | 144 | * |
145 | * @note The default is @p TRUE. | 145 | * @note The default is @p TRUE. |
146 | */ | 146 | */ |
147 | #define CH_CFG_USE_TM FALSE | 147 | #define CH_CFG_USE_TM FALSE |
148 | 148 | ||
149 | /** | 149 | /** |
150 | * @brief Threads registry APIs. | 150 | * @brief Threads registry APIs. |
151 | * @details If enabled then the registry APIs are included in the kernel. | 151 | * @details If enabled then the registry APIs are included in the kernel. |
152 | * | 152 | * |
153 | * @note The default is @p TRUE. | 153 | * @note The default is @p TRUE. |
154 | */ | 154 | */ |
155 | #define CH_CFG_USE_REGISTRY TRUE | 155 | #define CH_CFG_USE_REGISTRY TRUE |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * @brief Threads synchronization APIs. | 158 | * @brief Threads synchronization APIs. |
159 | * @details If enabled then the @p chThdWait() function is included in | 159 | * @details If enabled then the @p chThdWait() function is included in |
160 | * the kernel. | 160 | * the kernel. |
161 | * | 161 | * |
162 | * @note The default is @p TRUE. | 162 | * @note The default is @p TRUE. |
163 | */ | 163 | */ |
164 | #define CH_CFG_USE_WAITEXIT TRUE | 164 | #define CH_CFG_USE_WAITEXIT TRUE |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * @brief Semaphores APIs. | 167 | * @brief Semaphores APIs. |
168 | * @details If enabled then the Semaphores APIs are included in the kernel. | 168 | * @details If enabled then the Semaphores APIs are included in the kernel. |
169 | * | 169 | * |
170 | * @note The default is @p TRUE. | 170 | * @note The default is @p TRUE. |
171 | */ | 171 | */ |
172 | #define CH_CFG_USE_SEMAPHORES TRUE | 172 | #define CH_CFG_USE_SEMAPHORES TRUE |
173 | 173 | ||
174 | /** | 174 | /** |
175 | * @brief Semaphores queuing mode. | 175 | * @brief Semaphores queuing mode. |
176 | * @details If enabled then the threads are enqueued on semaphores by | 176 | * @details If enabled then the threads are enqueued on semaphores by |
177 | * priority rather than in FIFO order. | 177 | * priority rather than in FIFO order. |
178 | * | 178 | * |
179 | * @note The default is @p FALSE. Enable this if you have special | 179 | * @note The default is @p FALSE. Enable this if you have special |
180 | * requirements. | 180 | * requirements. |
181 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 181 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
182 | */ | 182 | */ |
183 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | 183 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * @brief Mutexes APIs. | 186 | * @brief Mutexes APIs. |
187 | * @details If enabled then the mutexes APIs are included in the kernel. | 187 | * @details If enabled then the mutexes APIs are included in the kernel. |
188 | * | 188 | * |
189 | * @note The default is @p TRUE. | 189 | * @note The default is @p TRUE. |
190 | */ | 190 | */ |
191 | #define CH_CFG_USE_MUTEXES TRUE | 191 | #define CH_CFG_USE_MUTEXES TRUE |
192 | 192 | ||
193 | /** | 193 | /** |
194 | * @brief Enables recursive behavior on mutexes. | 194 | * @brief Enables recursive behavior on mutexes. |
195 | * @note Recursive mutexes are heavier and have an increased | 195 | * @note Recursive mutexes are heavier and have an increased |
196 | * memory footprint. | 196 | * memory footprint. |
197 | * | 197 | * |
198 | * @note The default is @p FALSE. | 198 | * @note The default is @p FALSE. |
199 | * @note Requires @p CH_CFG_USE_MUTEXES. | 199 | * @note Requires @p CH_CFG_USE_MUTEXES. |
200 | */ | 200 | */ |
201 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | 201 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
202 | 202 | ||
203 | /** | 203 | /** |
204 | * @brief Conditional Variables APIs. | 204 | * @brief Conditional Variables APIs. |
205 | * @details If enabled then the conditional variables APIs are included | 205 | * @details If enabled then the conditional variables APIs are included |
206 | * in the kernel. | 206 | * in the kernel. |
207 | * | 207 | * |
208 | * @note The default is @p TRUE. | 208 | * @note The default is @p TRUE. |
209 | * @note Requires @p CH_CFG_USE_MUTEXES. | 209 | * @note Requires @p CH_CFG_USE_MUTEXES. |
210 | */ | 210 | */ |
211 | #define CH_CFG_USE_CONDVARS TRUE | 211 | #define CH_CFG_USE_CONDVARS TRUE |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * @brief Conditional Variables APIs with timeout. | 214 | * @brief Conditional Variables APIs with timeout. |
215 | * @details If enabled then the conditional variables APIs with timeout | 215 | * @details If enabled then the conditional variables APIs with timeout |
216 | * specification are included in the kernel. | 216 | * specification are included in the kernel. |
217 | * | 217 | * |
218 | * @note The default is @p TRUE. | 218 | * @note The default is @p TRUE. |
219 | * @note Requires @p CH_CFG_USE_CONDVARS. | 219 | * @note Requires @p CH_CFG_USE_CONDVARS. |
220 | */ | 220 | */ |
221 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE | 221 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * @brief Events Flags APIs. | 224 | * @brief Events Flags APIs. |
225 | * @details If enabled then the event flags APIs are included in the kernel. | 225 | * @details If enabled then the event flags APIs are included in the kernel. |
226 | * | 226 | * |
227 | * @note The default is @p TRUE. | 227 | * @note The default is @p TRUE. |
228 | */ | 228 | */ |
229 | #define CH_CFG_USE_EVENTS TRUE | 229 | #define CH_CFG_USE_EVENTS TRUE |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * @brief Events Flags APIs with timeout. | 232 | * @brief Events Flags APIs with timeout. |
233 | * @details If enabled then the events APIs with timeout specification | 233 | * @details If enabled then the events APIs with timeout specification |
234 | * are included in the kernel. | 234 | * are included in the kernel. |
235 | * | 235 | * |
236 | * @note The default is @p TRUE. | 236 | * @note The default is @p TRUE. |
237 | * @note Requires @p CH_CFG_USE_EVENTS. | 237 | * @note Requires @p CH_CFG_USE_EVENTS. |
238 | */ | 238 | */ |
239 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | 239 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
240 | 240 | ||
241 | /** | 241 | /** |
242 | * @brief Synchronous Messages APIs. | 242 | * @brief Synchronous Messages APIs. |
243 | * @details If enabled then the synchronous messages APIs are included | 243 | * @details If enabled then the synchronous messages APIs are included |
244 | * in the kernel. | 244 | * in the kernel. |
245 | * | 245 | * |
246 | * @note The default is @p TRUE. | 246 | * @note The default is @p TRUE. |
247 | */ | 247 | */ |
248 | #define CH_CFG_USE_MESSAGES TRUE | 248 | #define CH_CFG_USE_MESSAGES TRUE |
249 | 249 | ||
250 | /** | 250 | /** |
251 | * @brief Synchronous Messages queuing mode. | 251 | * @brief Synchronous Messages queuing mode. |
252 | * @details If enabled then messages are served by priority rather than in | 252 | * @details If enabled then messages are served by priority rather than in |
253 | * FIFO order. | 253 | * FIFO order. |
254 | * | 254 | * |
255 | * @note The default is @p FALSE. Enable this if you have special | 255 | * @note The default is @p FALSE. Enable this if you have special |
256 | * requirements. | 256 | * requirements. |
257 | * @note Requires @p CH_CFG_USE_MESSAGES. | 257 | * @note Requires @p CH_CFG_USE_MESSAGES. |
258 | */ | 258 | */ |
259 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | 259 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
260 | 260 | ||
261 | /** | 261 | /** |
262 | * @brief Mailboxes APIs. | 262 | * @brief Mailboxes APIs. |
263 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | 263 | * @details If enabled then the asynchronous messages (mailboxes) APIs are |
264 | * included in the kernel. | 264 | * included in the kernel. |
265 | * | 265 | * |
266 | * @note The default is @p TRUE. | 266 | * @note The default is @p TRUE. |
267 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 267 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
268 | */ | 268 | */ |
269 | #define CH_CFG_USE_MAILBOXES TRUE | 269 | #define CH_CFG_USE_MAILBOXES TRUE |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * @brief Core Memory Manager APIs. | 272 | * @brief Core Memory Manager APIs. |
273 | * @details If enabled then the core memory manager APIs are included | 273 | * @details If enabled then the core memory manager APIs are included |
274 | * in the kernel. | 274 | * in the kernel. |
275 | * | 275 | * |
276 | * @note The default is @p TRUE. | 276 | * @note The default is @p TRUE. |
277 | */ | 277 | */ |
278 | #define CH_CFG_USE_MEMCORE TRUE | 278 | #define CH_CFG_USE_MEMCORE TRUE |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * @brief Heap Allocator APIs. | 281 | * @brief Heap Allocator APIs. |
282 | * @details If enabled then the memory heap allocator APIs are included | 282 | * @details If enabled then the memory heap allocator APIs are included |
283 | * in the kernel. | 283 | * in the kernel. |
284 | * | 284 | * |
285 | * @note The default is @p TRUE. | 285 | * @note The default is @p TRUE. |
286 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | 286 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or |
287 | * @p CH_CFG_USE_SEMAPHORES. | 287 | * @p CH_CFG_USE_SEMAPHORES. |
288 | * @note Mutexes are recommended. | 288 | * @note Mutexes are recommended. |
289 | */ | 289 | */ |
290 | #define CH_CFG_USE_HEAP TRUE | 290 | #define CH_CFG_USE_HEAP TRUE |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * @brief Memory Pools Allocator APIs. | 293 | * @brief Memory Pools Allocator APIs. |
294 | * @details If enabled then the memory pools allocator APIs are included | 294 | * @details If enabled then the memory pools allocator APIs are included |
295 | * in the kernel. | 295 | * in the kernel. |
296 | * | 296 | * |
297 | * @note The default is @p TRUE. | 297 | * @note The default is @p TRUE. |
298 | */ | 298 | */ |
299 | #define CH_CFG_USE_MEMPOOLS TRUE | 299 | #define CH_CFG_USE_MEMPOOLS TRUE |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * @brief Dynamic Threads APIs. | 302 | * @brief Dynamic Threads APIs. |
303 | * @details If enabled then the dynamic threads creation APIs are included | 303 | * @details If enabled then the dynamic threads creation APIs are included |
304 | * in the kernel. | 304 | * in the kernel. |
305 | * | 305 | * |
306 | * @note The default is @p TRUE. | 306 | * @note The default is @p TRUE. |
307 | * @note Requires @p CH_CFG_USE_WAITEXIT. | 307 | * @note Requires @p CH_CFG_USE_WAITEXIT. |
308 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | 308 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. |
309 | */ | 309 | */ |
310 | #define CH_CFG_USE_DYNAMIC TRUE | 310 | #define CH_CFG_USE_DYNAMIC TRUE |
311 | 311 | ||
312 | /** @} */ | 312 | /** @} */ |
313 | 313 | ||
314 | /*===========================================================================*/ | 314 | /*===========================================================================*/ |
315 | /** | 315 | /** |
316 | * @name Debug options | 316 | * @name Debug options |
317 | * @{ | 317 | * @{ |
318 | */ | 318 | */ |
319 | /*===========================================================================*/ | 319 | /*===========================================================================*/ |
320 | 320 | ||
321 | /** | 321 | /** |
322 | * @brief Debug option, kernel statistics. | 322 | * @brief Debug option, kernel statistics. |
323 | * | 323 | * |
324 | * @note The default is @p FALSE. | 324 | * @note The default is @p FALSE. |
325 | */ | 325 | */ |
326 | #define CH_DBG_STATISTICS FALSE | 326 | #define CH_DBG_STATISTICS FALSE |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * @brief Debug option, system state check. | 329 | * @brief Debug option, system state check. |
330 | * @details If enabled the correct call protocol for system APIs is checked | 330 | * @details If enabled the correct call protocol for system APIs is checked |
331 | * at runtime. | 331 | * at runtime. |
332 | * | 332 | * |
333 | * @note The default is @p FALSE. | 333 | * @note The default is @p FALSE. |
334 | */ | 334 | */ |
335 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | 335 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE |
336 | 336 | ||
337 | /** | 337 | /** |
338 | * @brief Debug option, parameters checks. | 338 | * @brief Debug option, parameters checks. |
339 | * @details If enabled then the checks on the API functions input | 339 | * @details If enabled then the checks on the API functions input |
340 | * parameters are activated. | 340 | * parameters are activated. |
341 | * | 341 | * |
342 | * @note The default is @p FALSE. | 342 | * @note The default is @p FALSE. |
343 | */ | 343 | */ |
344 | #define CH_DBG_ENABLE_CHECKS FALSE | 344 | #define CH_DBG_ENABLE_CHECKS FALSE |
345 | 345 | ||
346 | /** | 346 | /** |
347 | * @brief Debug option, consistency checks. | 347 | * @brief Debug option, consistency checks. |
348 | * @details If enabled then all the assertions in the kernel code are | 348 | * @details If enabled then all the assertions in the kernel code are |
349 | * activated. This includes consistency checks inside the kernel, | 349 | * activated. This includes consistency checks inside the kernel, |
350 | * runtime anomalies and port-defined checks. | 350 | * runtime anomalies and port-defined checks. |
351 | * | 351 | * |
352 | * @note The default is @p FALSE. | 352 | * @note The default is @p FALSE. |
353 | */ | 353 | */ |
354 | #define CH_DBG_ENABLE_ASSERTS FALSE | 354 | #define CH_DBG_ENABLE_ASSERTS FALSE |
355 | 355 | ||
356 | /** | 356 | /** |
357 | * @brief Debug option, trace buffer. | 357 | * @brief Debug option, trace buffer. |
358 | * @details If enabled then the trace buffer is activated. | 358 | * @details If enabled then the trace buffer is activated. |
359 | * | 359 | * |
360 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | 360 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. |
361 | */ | 361 | */ |
362 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | 362 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * @brief Trace buffer entries. | 365 | * @brief Trace buffer entries. |
366 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | 366 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is |
367 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | 367 | * different from @p CH_DBG_TRACE_MASK_DISABLED. |
368 | */ | 368 | */ |
369 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | 369 | #define CH_DBG_TRACE_BUFFER_SIZE 128 |
370 | 370 | ||
371 | /** | 371 | /** |
372 | * @brief Debug option, stack checks. | 372 | * @brief Debug option, stack checks. |
373 | * @details If enabled then a runtime stack check is performed. | 373 | * @details If enabled then a runtime stack check is performed. |
374 | * | 374 | * |
375 | * @note The default is @p FALSE. | 375 | * @note The default is @p FALSE. |
376 | * @note The stack check is performed in a architecture/port dependent way. | 376 | * @note The stack check is performed in a architecture/port dependent way. |
377 | * It may not be implemented or some ports. | 377 | * It may not be implemented or some ports. |
378 | * @note The default failure mode is to halt the system with the global | 378 | * @note The default failure mode is to halt the system with the global |
379 | * @p panic_msg variable set to @p NULL. | 379 | * @p panic_msg variable set to @p NULL. |
380 | */ | 380 | */ |
381 | #define CH_DBG_ENABLE_STACK_CHECK FALSE | 381 | #define CH_DBG_ENABLE_STACK_CHECK FALSE |
382 | 382 | ||
383 | /** | 383 | /** |
384 | * @brief Debug option, stacks initialization. | 384 | * @brief Debug option, stacks initialization. |
385 | * @details If enabled then the threads working area is filled with a byte | 385 | * @details If enabled then the threads working area is filled with a byte |
386 | * value when a thread is created. This can be useful for the | 386 | * value when a thread is created. This can be useful for the |
387 | * runtime measurement of the used stack. | 387 | * runtime measurement of the used stack. |
388 | * | 388 | * |
389 | * @note The default is @p FALSE. | 389 | * @note The default is @p FALSE. |
390 | */ | 390 | */ |
391 | #define CH_DBG_FILL_THREADS FALSE | 391 | #define CH_DBG_FILL_THREADS FALSE |
392 | 392 | ||
393 | /** | 393 | /** |
394 | * @brief Debug option, threads profiling. | 394 | * @brief Debug option, threads profiling. |
395 | * @details If enabled then a field is added to the @p thread_t structure that | 395 | * @details If enabled then a field is added to the @p thread_t structure that |
396 | * counts the system ticks occurred while executing the thread. | 396 | * counts the system ticks occurred while executing the thread. |
397 | * | 397 | * |
398 | * @note The default is @p FALSE. | 398 | * @note The default is @p FALSE. |
399 | * @note This debug option is not currently compatible with the | 399 | * @note This debug option is not currently compatible with the |
400 | * tickless mode. | 400 | * tickless mode. |
401 | */ | 401 | */ |
402 | #define CH_DBG_THREADS_PROFILING FALSE | 402 | #define CH_DBG_THREADS_PROFILING FALSE |
403 | 403 | ||
404 | /** @} */ | 404 | /** @} */ |
405 | 405 | ||
406 | /*===========================================================================*/ | 406 | /*===========================================================================*/ |
407 | /** | 407 | /** |
408 | * @name Kernel hooks | 408 | * @name Kernel hooks |
409 | * @{ | 409 | * @{ |
410 | */ | 410 | */ |
411 | /*===========================================================================*/ | 411 | /*===========================================================================*/ |
412 | 412 | ||
413 | /** | 413 | /** |
414 | * @brief Threads descriptor structure extension. | 414 | * @brief Threads descriptor structure extension. |
415 | * @details User fields added to the end of the @p thread_t structure. | 415 | * @details User fields added to the end of the @p thread_t structure. |
416 | */ | 416 | */ |
417 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | 417 | #define CH_CFG_THREAD_EXTRA_FIELDS \ |
418 | /* Add threads custom fields here.*/ | 418 | /* Add threads custom fields here.*/ |
419 | 419 | ||
420 | /** | 420 | /** |
421 | * @brief Threads initialization hook. | 421 | * @brief Threads initialization hook. |
422 | * @details User initialization code added to the @p chThdInit() API. | 422 | * @details User initialization code added to the @p chThdInit() API. |
423 | * | 423 | * |
424 | * @note It is invoked from within @p chThdInit() and implicitly from all | 424 | * @note It is invoked from within @p chThdInit() and implicitly from all |
425 | * the threads creation APIs. | 425 | * the threads creation APIs. |
426 | */ | 426 | */ |
427 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | 427 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ |
428 | /* Add threads initialization code here.*/ \ | 428 | /* Add threads initialization code here.*/ \ |
429 | } | 429 | } |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * @brief Threads finalization hook. | 432 | * @brief Threads finalization hook. |
433 | * @details User finalization code added to the @p chThdExit() API. | 433 | * @details User finalization code added to the @p chThdExit() API. |
434 | */ | 434 | */ |
435 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | 435 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ |
436 | /* Add threads finalization code here.*/ \ | 436 | /* Add threads finalization code here.*/ \ |
437 | } | 437 | } |
438 | 438 | ||
439 | /** | 439 | /** |
440 | * @brief Context switch hook. | 440 | * @brief Context switch hook. |
441 | * @details This hook is invoked just before switching between threads. | 441 | * @details This hook is invoked just before switching between threads. |
442 | */ | 442 | */ |
443 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | 443 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ |
444 | /* Context switch code here.*/ \ | 444 | /* Context switch code here.*/ \ |
445 | } | 445 | } |
446 | 446 | ||
447 | /** | 447 | /** |
448 | * @brief ISR enter hook. | 448 | * @brief ISR enter hook. |
449 | */ | 449 | */ |
450 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | 450 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ |
451 | /* IRQ prologue code here.*/ \ | 451 | /* IRQ prologue code here.*/ \ |
452 | } | 452 | } |
453 | 453 | ||
454 | /** | 454 | /** |
455 | * @brief ISR exit hook. | 455 | * @brief ISR exit hook. |
456 | */ | 456 | */ |
457 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | 457 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ |
458 | /* IRQ epilogue code here.*/ \ | 458 | /* IRQ epilogue code here.*/ \ |
459 | } | 459 | } |
460 | 460 | ||
461 | /** | 461 | /** |
462 | * @brief Idle thread enter hook. | 462 | * @brief Idle thread enter hook. |
463 | * @note This hook is invoked within a critical zone, no OS functions | 463 | * @note This hook is invoked within a critical zone, no OS functions |
464 | * should be invoked from here. | 464 | * should be invoked from here. |
465 | * @note This macro can be used to activate a power saving mode. | 465 | * @note This macro can be used to activate a power saving mode. |
466 | */ | 466 | */ |
467 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | 467 | #define CH_CFG_IDLE_ENTER_HOOK() { \ |
468 | /* Idle-enter code here.*/ \ | 468 | /* Idle-enter code here.*/ \ |
469 | } | 469 | } |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * @brief Idle thread leave hook. | 472 | * @brief Idle thread leave hook. |
473 | * @note This hook is invoked within a critical zone, no OS functions | 473 | * @note This hook is invoked within a critical zone, no OS functions |
474 | * should be invoked from here. | 474 | * should be invoked from here. |
475 | * @note This macro can be used to deactivate a power saving mode. | 475 | * @note This macro can be used to deactivate a power saving mode. |
476 | */ | 476 | */ |
477 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | 477 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ |
478 | /* Idle-leave code here.*/ \ | 478 | /* Idle-leave code here.*/ \ |
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |
482 | * @brief Idle Loop hook. | 482 | * @brief Idle Loop hook. |
483 | * @details This hook is continuously invoked by the idle thread loop. | 483 | * @details This hook is continuously invoked by the idle thread loop. |
484 | */ | 484 | */ |
485 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | 485 | #define CH_CFG_IDLE_LOOP_HOOK() { \ |
486 | /* Idle loop code here.*/ \ | 486 | /* Idle loop code here.*/ \ |
487 | } | 487 | } |
488 | 488 | ||
489 | /** | 489 | /** |
490 | * @brief System tick event hook. | 490 | * @brief System tick event hook. |
491 | * @details This hook is invoked in the system tick handler immediately | 491 | * @details This hook is invoked in the system tick handler immediately |
492 | * after processing the virtual timers queue. | 492 | * after processing the virtual timers queue. |
493 | */ | 493 | */ |
494 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | 494 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ |
495 | /* System tick event code here.*/ \ | 495 | /* System tick event code here.*/ \ |
496 | } | 496 | } |
497 | 497 | ||
498 | /** | 498 | /** |
499 | * @brief System halt hook. | 499 | * @brief System halt hook. |
500 | * @details This hook is invoked in case to a system halting error before | 500 | * @details This hook is invoked in case to a system halting error before |
501 | * the system is halted. | 501 | * the system is halted. |
502 | */ | 502 | */ |
503 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | 503 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ |
504 | /* System halt code here.*/ \ | 504 | /* System halt code here.*/ \ |
505 | } | 505 | } |
506 | 506 | ||
507 | /** | 507 | /** |
508 | * @brief Trace hook. | 508 | * @brief Trace hook. |
509 | * @details This hook is invoked each time a new record is written in the | 509 | * @details This hook is invoked each time a new record is written in the |
510 | * trace buffer. | 510 | * trace buffer. |
511 | */ | 511 | */ |
512 | #define CH_CFG_TRACE_HOOK(tep) { \ | 512 | #define CH_CFG_TRACE_HOOK(tep) { \ |
513 | /* Trace code here.*/ \ | 513 | /* Trace code here.*/ \ |
514 | } | 514 | } |
515 | 515 | ||
516 | /** @} */ | 516 | /** @} */ |
517 | 517 | ||
518 | /*===========================================================================*/ | 518 | /*===========================================================================*/ |
519 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | 519 | /* Port-specific settings (override port settings defaulted in chcore.h). */ |
520 | /*===========================================================================*/ | 520 | /*===========================================================================*/ |
521 | 521 | ||
522 | #endif /* CHCONF_H */ | 522 | #endif /* CHCONF_H */ |
523 | 523 | ||
524 | /** @} */ | 524 | /** @} */ |
diff --git a/keyboards/infinity_chibios/halconf.h b/keyboards/infinity_chibios/halconf.h index 53538de14..46b37a4f4 100644 --- a/keyboards/infinity_chibios/halconf.h +++ b/keyboards/infinity_chibios/halconf.h | |||
@@ -1,353 +1,353 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * @file templates/halconf.h | 18 | * @file templates/halconf.h |
19 | * @brief HAL configuration header. | 19 | * @brief HAL configuration header. |
20 | * @details HAL configuration file, this file allows to enable or disable the | 20 | * @details HAL configuration file, this file allows to enable or disable the |
21 | * various device drivers from your application. You may also use | 21 | * various device drivers from your application. You may also use |
22 | * this file in order to override the device drivers default settings. | 22 | * this file in order to override the device drivers default settings. |
23 | * | 23 | * |
24 | * @addtogroup HAL_CONF | 24 | * @addtogroup HAL_CONF |
25 | * @{ | 25 | * @{ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef _HALCONF_H_ | 28 | #ifndef _HALCONF_H_ |
29 | #define _HALCONF_H_ | 29 | #define _HALCONF_H_ |
30 | 30 | ||
31 | #include "mcuconf.h" | 31 | #include "mcuconf.h" |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * @brief Enables the PAL subsystem. | 34 | * @brief Enables the PAL subsystem. |
35 | */ | 35 | */ |
36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | 36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) |
37 | #define HAL_USE_PAL TRUE | 37 | #define HAL_USE_PAL TRUE |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * @brief Enables the ADC subsystem. | 41 | * @brief Enables the ADC subsystem. |
42 | */ | 42 | */ |
43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | 43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) |
44 | #define HAL_USE_ADC FALSE | 44 | #define HAL_USE_ADC FALSE |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * @brief Enables the CAN subsystem. | 48 | * @brief Enables the CAN subsystem. |
49 | */ | 49 | */ |
50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | 50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) |
51 | #define HAL_USE_CAN FALSE | 51 | #define HAL_USE_CAN FALSE |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * @brief Enables the DAC subsystem. | 55 | * @brief Enables the DAC subsystem. |
56 | */ | 56 | */ |
57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | 57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) |
58 | #define HAL_USE_DAC FALSE | 58 | #define HAL_USE_DAC FALSE |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * @brief Enables the EXT subsystem. | 62 | * @brief Enables the EXT subsystem. |
63 | */ | 63 | */ |
64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) | 64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) |
65 | #define HAL_USE_EXT FALSE | 65 | #define HAL_USE_EXT FALSE |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * @brief Enables the GPT subsystem. | 69 | * @brief Enables the GPT subsystem. |
70 | */ | 70 | */ |
71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | 71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) |
72 | #define HAL_USE_GPT FALSE | 72 | #define HAL_USE_GPT FALSE |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * @brief Enables the I2C subsystem. | 76 | * @brief Enables the I2C subsystem. |
77 | */ | 77 | */ |
78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | 78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) |
79 | #define HAL_USE_I2C FALSE | 79 | #define HAL_USE_I2C FALSE |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * @brief Enables the I2S subsystem. | 83 | * @brief Enables the I2S subsystem. |
84 | */ | 84 | */ |
85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | 85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) |
86 | #define HAL_USE_I2S FALSE | 86 | #define HAL_USE_I2S FALSE |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * @brief Enables the ICU subsystem. | 90 | * @brief Enables the ICU subsystem. |
91 | */ | 91 | */ |
92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | 92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) |
93 | #define HAL_USE_ICU FALSE | 93 | #define HAL_USE_ICU FALSE |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * @brief Enables the MAC subsystem. | 97 | * @brief Enables the MAC subsystem. |
98 | */ | 98 | */ |
99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | 99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) |
100 | #define HAL_USE_MAC FALSE | 100 | #define HAL_USE_MAC FALSE |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * @brief Enables the MMC_SPI subsystem. | 104 | * @brief Enables the MMC_SPI subsystem. |
105 | */ | 105 | */ |
106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | 106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) |
107 | #define HAL_USE_MMC_SPI FALSE | 107 | #define HAL_USE_MMC_SPI FALSE |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * @brief Enables the PWM subsystem. | 111 | * @brief Enables the PWM subsystem. |
112 | */ | 112 | */ |
113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | 113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) |
114 | #define HAL_USE_PWM FALSE | 114 | #define HAL_USE_PWM FALSE |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * @brief Enables the RTC subsystem. | 118 | * @brief Enables the RTC subsystem. |
119 | */ | 119 | */ |
120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | 120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) |
121 | #define HAL_USE_RTC FALSE | 121 | #define HAL_USE_RTC FALSE |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * @brief Enables the SDC subsystem. | 125 | * @brief Enables the SDC subsystem. |
126 | */ | 126 | */ |
127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | 127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) |
128 | #define HAL_USE_SDC FALSE | 128 | #define HAL_USE_SDC FALSE |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * @brief Enables the SERIAL subsystem. | 132 | * @brief Enables the SERIAL subsystem. |
133 | */ | 133 | */ |
134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | 134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) |
135 | #define HAL_USE_SERIAL FALSE | 135 | #define HAL_USE_SERIAL FALSE |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * @brief Enables the SERIAL over USB subsystem. | 139 | * @brief Enables the SERIAL over USB subsystem. |
140 | */ | 140 | */ |
141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | 141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) |
142 | #define HAL_USE_SERIAL_USB TRUE | 142 | #define HAL_USE_SERIAL_USB TRUE |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * @brief Enables the SPI subsystem. | 146 | * @brief Enables the SPI subsystem. |
147 | */ | 147 | */ |
148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) |
149 | #define HAL_USE_SPI FALSE | 149 | #define HAL_USE_SPI FALSE |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * @brief Enables the UART subsystem. | 153 | * @brief Enables the UART subsystem. |
154 | */ | 154 | */ |
155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | 155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) |
156 | #define HAL_USE_UART FALSE | 156 | #define HAL_USE_UART FALSE |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * @brief Enables the USB subsystem. | 160 | * @brief Enables the USB subsystem. |
161 | */ | 161 | */ |
162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | 162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) |
163 | #define HAL_USE_USB TRUE | 163 | #define HAL_USE_USB TRUE |
164 | #endif | 164 | #endif |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * @brief Enables the WDG subsystem. | 167 | * @brief Enables the WDG subsystem. |
168 | */ | 168 | */ |
169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | 169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) |
170 | #define HAL_USE_WDG FALSE | 170 | #define HAL_USE_WDG FALSE |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | /*===========================================================================*/ | 173 | /*===========================================================================*/ |
174 | /* ADC driver related settings. */ | 174 | /* ADC driver related settings. */ |
175 | /*===========================================================================*/ | 175 | /*===========================================================================*/ |
176 | 176 | ||
177 | /** | 177 | /** |
178 | * @brief Enables synchronous APIs. | 178 | * @brief Enables synchronous APIs. |
179 | * @note Disabling this option saves both code and data space. | 179 | * @note Disabling this option saves both code and data space. |
180 | */ | 180 | */ |
181 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | 181 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) |
182 | #define ADC_USE_WAIT TRUE | 182 | #define ADC_USE_WAIT TRUE |
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | 186 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. |
187 | * @note Disabling this option saves both code and data space. | 187 | * @note Disabling this option saves both code and data space. |
188 | */ | 188 | */ |
189 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 189 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
190 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | 190 | #define ADC_USE_MUTUAL_EXCLUSION TRUE |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | /*===========================================================================*/ | 193 | /*===========================================================================*/ |
194 | /* CAN driver related settings. */ | 194 | /* CAN driver related settings. */ |
195 | /*===========================================================================*/ | 195 | /*===========================================================================*/ |
196 | 196 | ||
197 | /** | 197 | /** |
198 | * @brief Sleep mode related APIs inclusion switch. | 198 | * @brief Sleep mode related APIs inclusion switch. |
199 | */ | 199 | */ |
200 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | 200 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) |
201 | #define CAN_USE_SLEEP_MODE TRUE | 201 | #define CAN_USE_SLEEP_MODE TRUE |
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | /*===========================================================================*/ | 204 | /*===========================================================================*/ |
205 | /* I2C driver related settings. */ | 205 | /* I2C driver related settings. */ |
206 | /*===========================================================================*/ | 206 | /*===========================================================================*/ |
207 | 207 | ||
208 | /** | 208 | /** |
209 | * @brief Enables the mutual exclusion APIs on the I2C bus. | 209 | * @brief Enables the mutual exclusion APIs on the I2C bus. |
210 | */ | 210 | */ |
211 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 211 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
212 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | 212 | #define I2C_USE_MUTUAL_EXCLUSION TRUE |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | /*===========================================================================*/ | 215 | /*===========================================================================*/ |
216 | /* MAC driver related settings. */ | 216 | /* MAC driver related settings. */ |
217 | /*===========================================================================*/ | 217 | /*===========================================================================*/ |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * @brief Enables an event sources for incoming packets. | 220 | * @brief Enables an event sources for incoming packets. |
221 | */ | 221 | */ |
222 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | 222 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) |
223 | #define MAC_USE_ZERO_COPY FALSE | 223 | #define MAC_USE_ZERO_COPY FALSE |
224 | #endif | 224 | #endif |
225 | 225 | ||
226 | /** | 226 | /** |
227 | * @brief Enables an event sources for incoming packets. | 227 | * @brief Enables an event sources for incoming packets. |
228 | */ | 228 | */ |
229 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | 229 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) |
230 | #define MAC_USE_EVENTS TRUE | 230 | #define MAC_USE_EVENTS TRUE |
231 | #endif | 231 | #endif |
232 | 232 | ||
233 | /*===========================================================================*/ | 233 | /*===========================================================================*/ |
234 | /* MMC_SPI driver related settings. */ | 234 | /* MMC_SPI driver related settings. */ |
235 | /*===========================================================================*/ | 235 | /*===========================================================================*/ |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * @brief Delays insertions. | 238 | * @brief Delays insertions. |
239 | * @details If enabled this options inserts delays into the MMC waiting | 239 | * @details If enabled this options inserts delays into the MMC waiting |
240 | * routines releasing some extra CPU time for the threads with | 240 | * routines releasing some extra CPU time for the threads with |
241 | * lower priority, this may slow down the driver a bit however. | 241 | * lower priority, this may slow down the driver a bit however. |
242 | * This option is recommended also if the SPI driver does not | 242 | * This option is recommended also if the SPI driver does not |
243 | * use a DMA channel and heavily loads the CPU. | 243 | * use a DMA channel and heavily loads the CPU. |
244 | */ | 244 | */ |
245 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | 245 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) |
246 | #define MMC_NICE_WAITING TRUE | 246 | #define MMC_NICE_WAITING TRUE |
247 | #endif | 247 | #endif |
248 | 248 | ||
249 | /*===========================================================================*/ | 249 | /*===========================================================================*/ |
250 | /* SDC driver related settings. */ | 250 | /* SDC driver related settings. */ |
251 | /*===========================================================================*/ | 251 | /*===========================================================================*/ |
252 | 252 | ||
253 | /** | 253 | /** |
254 | * @brief Number of initialization attempts before rejecting the card. | 254 | * @brief Number of initialization attempts before rejecting the card. |
255 | * @note Attempts are performed at 10mS intervals. | 255 | * @note Attempts are performed at 10mS intervals. |
256 | */ | 256 | */ |
257 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | 257 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) |
258 | #define SDC_INIT_RETRY 100 | 258 | #define SDC_INIT_RETRY 100 |
259 | #endif | 259 | #endif |
260 | 260 | ||
261 | /** | 261 | /** |
262 | * @brief Include support for MMC cards. | 262 | * @brief Include support for MMC cards. |
263 | * @note MMC support is not yet implemented so this option must be kept | 263 | * @note MMC support is not yet implemented so this option must be kept |
264 | * at @p FALSE. | 264 | * at @p FALSE. |
265 | */ | 265 | */ |
266 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | 266 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) |
267 | #define SDC_MMC_SUPPORT FALSE | 267 | #define SDC_MMC_SUPPORT FALSE |
268 | #endif | 268 | #endif |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * @brief Delays insertions. | 271 | * @brief Delays insertions. |
272 | * @details If enabled this options inserts delays into the MMC waiting | 272 | * @details If enabled this options inserts delays into the MMC waiting |
273 | * routines releasing some extra CPU time for the threads with | 273 | * routines releasing some extra CPU time for the threads with |
274 | * lower priority, this may slow down the driver a bit however. | 274 | * lower priority, this may slow down the driver a bit however. |
275 | */ | 275 | */ |
276 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | 276 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) |
277 | #define SDC_NICE_WAITING TRUE | 277 | #define SDC_NICE_WAITING TRUE |
278 | #endif | 278 | #endif |
279 | 279 | ||
280 | /*===========================================================================*/ | 280 | /*===========================================================================*/ |
281 | /* SERIAL driver related settings. */ | 281 | /* SERIAL driver related settings. */ |
282 | /*===========================================================================*/ | 282 | /*===========================================================================*/ |
283 | 283 | ||
284 | /** | 284 | /** |
285 | * @brief Default bit rate. | 285 | * @brief Default bit rate. |
286 | * @details Configuration parameter, this is the baud rate selected for the | 286 | * @details Configuration parameter, this is the baud rate selected for the |
287 | * default configuration. | 287 | * default configuration. |
288 | */ | 288 | */ |
289 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | 289 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) |
290 | #define SERIAL_DEFAULT_BITRATE 38400 | 290 | #define SERIAL_DEFAULT_BITRATE 38400 |
291 | #endif | 291 | #endif |
292 | 292 | ||
293 | /** | 293 | /** |
294 | * @brief Serial buffers size. | 294 | * @brief Serial buffers size. |
295 | * @details Configuration parameter, you can change the depth of the queue | 295 | * @details Configuration parameter, you can change the depth of the queue |
296 | * buffers depending on the requirements of your application. | 296 | * buffers depending on the requirements of your application. |
297 | * @note The default is 64 bytes for both the transmission and receive | 297 | * @note The default is 64 bytes for both the transmission and receive |
298 | * buffers. | 298 | * buffers. |
299 | */ | 299 | */ |
300 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | 300 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) |
301 | #define SERIAL_BUFFERS_SIZE 16 | 301 | #define SERIAL_BUFFERS_SIZE 16 |
302 | #endif | 302 | #endif |
303 | 303 | ||
304 | /*===========================================================================*/ | 304 | /*===========================================================================*/ |
305 | /* SERIAL_USB driver related setting. */ | 305 | /* SERIAL_USB driver related setting. */ |
306 | /*===========================================================================*/ | 306 | /*===========================================================================*/ |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * @brief Serial over USB buffers size. | 309 | * @brief Serial over USB buffers size. |
310 | * @details Configuration parameter, the buffer size must be a multiple of | 310 | * @details Configuration parameter, the buffer size must be a multiple of |
311 | * the USB data endpoint maximum packet size. | 311 | * the USB data endpoint maximum packet size. |
312 | * @note The default is 64 bytes for both the transmission and receive | 312 | * @note The default is 64 bytes for both the transmission and receive |
313 | * buffers. | 313 | * buffers. |
314 | */ | 314 | */ |
315 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | 315 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) |
316 | #define SERIAL_USB_BUFFERS_SIZE 256 | 316 | #define SERIAL_USB_BUFFERS_SIZE 256 |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | /*===========================================================================*/ | 319 | /*===========================================================================*/ |
320 | /* SPI driver related settings. */ | 320 | /* SPI driver related settings. */ |
321 | /*===========================================================================*/ | 321 | /*===========================================================================*/ |
322 | 322 | ||
323 | /** | 323 | /** |
324 | * @brief Enables synchronous APIs. | 324 | * @brief Enables synchronous APIs. |
325 | * @note Disabling this option saves both code and data space. | 325 | * @note Disabling this option saves both code and data space. |
326 | */ | 326 | */ |
327 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | 327 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) |
328 | #define SPI_USE_WAIT TRUE | 328 | #define SPI_USE_WAIT TRUE |
329 | #endif | 329 | #endif |
330 | 330 | ||
331 | /** | 331 | /** |
332 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | 332 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. |
333 | * @note Disabling this option saves both code and data space. | 333 | * @note Disabling this option saves both code and data space. |
334 | */ | 334 | */ |
335 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 335 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
336 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | 336 | #define SPI_USE_MUTUAL_EXCLUSION TRUE |
337 | #endif | 337 | #endif |
338 | 338 | ||
339 | /*===========================================================================*/ | 339 | /*===========================================================================*/ |
340 | /* USB driver related settings. */ | 340 | /* USB driver related settings. */ |
341 | /*===========================================================================*/ | 341 | /*===========================================================================*/ |
342 | 342 | ||
343 | /** | 343 | /** |
344 | * @brief Enables synchronous APIs. | 344 | * @brief Enables synchronous APIs. |
345 | * @note Disabling this option saves both code and data space. | 345 | * @note Disabling this option saves both code and data space. |
346 | */ | 346 | */ |
347 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | 347 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) |
348 | #define USB_USE_WAIT TRUE | 348 | #define USB_USE_WAIT TRUE |
349 | #endif | 349 | #endif |
350 | 350 | ||
351 | #endif /* _HALCONF_H_ */ | 351 | #endif /* _HALCONF_H_ */ |
352 | 352 | ||
353 | /** @} */ | 353 | /** @} */ |
diff --git a/keyboards/infinity_chibios/mcuconf.h b/keyboards/infinity_chibios/mcuconf.h index 66b6ce25d..f453304b7 100644 --- a/keyboards/infinity_chibios/mcuconf.h +++ b/keyboards/infinity_chibios/mcuconf.h | |||
@@ -1,55 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio |
3 | 3 | ||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at | 6 | You may obtain a copy of the License at |
7 | 7 | ||
8 | http://www.apache.org/licenses/LICENSE-2.0 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | ||
10 | Unless required by applicable law or agreed to in writing, software | 10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and | 13 | See the License for the specific language governing permissions and |
14 | limitations under the License. | 14 | limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MCUCONF_H_ | 17 | #ifndef _MCUCONF_H_ |
18 | #define _MCUCONF_H_ | 18 | #define _MCUCONF_H_ |
19 | 19 | ||
20 | #define K20x_MCUCONF | 20 | #define K20x_MCUCONF |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * HAL driver system settings. | 23 | * HAL driver system settings. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | /* Select the MCU clocking mode below by enabling the appropriate block. */ | 26 | /* Select the MCU clocking mode below by enabling the appropriate block. */ |
27 | 27 | ||
28 | #define KINETIS_NO_INIT FALSE | 28 | #define KINETIS_NO_INIT FALSE |
29 | 29 | ||
30 | /* FEI mode - 48 MHz with internal 32.768 kHz crystal */ | 30 | /* FEI mode - 48 MHz with internal 32.768 kHz crystal */ |
31 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI | 31 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI |
32 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | 32 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ |
33 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ | 33 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ |
34 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ | 34 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ |
35 | #define KINETIS_CLKDIV1_OUTDIV1 1 | 35 | #define KINETIS_CLKDIV1_OUTDIV1 1 |
36 | #define KINETIS_CLKDIV1_OUTDIV2 1 | 36 | #define KINETIS_CLKDIV1_OUTDIV2 1 |
37 | #define KINETIS_CLKDIV1_OUTDIV4 2 | 37 | #define KINETIS_CLKDIV1_OUTDIV4 2 |
38 | #define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY | 38 | #define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY |
39 | #define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 | 39 | #define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * SERIAL driver system settings. | 42 | * SERIAL driver system settings. |
43 | */ | 43 | */ |
44 | #define KINETIS_SERIAL_USE_UART0 TRUE | 44 | #define KINETIS_SERIAL_USE_UART0 TRUE |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * USB driver settings | 47 | * USB driver settings |
48 | */ | 48 | */ |
49 | #define KINETIS_USB_USE_USB0 TRUE | 49 | #define KINETIS_USB_USE_USB0 TRUE |
50 | /* Need to redefine this, since the default is for K20x */ | 50 | /* Need to redefine this, since the default is for K20x */ |
51 | /* This is for Teensy LC; you should comment it out (or change to 5) | 51 | /* This is for Teensy LC; you should comment it out (or change to 5) |
52 | * for Teensy 3.x */ | 52 | * for Teensy 3.x */ |
53 | #define KINETIS_USB_USB0_IRQ_PRIORITY 2 | 53 | #define KINETIS_USB_USB0_IRQ_PRIORITY 2 |
54 | 54 | ||
55 | #endif /* _MCUCONF_H_ */ | 55 | #endif /* _MCUCONF_H_ */ |
diff --git a/tmk_core/common/avr/xprintf.S b/tmk_core/common/avr/xprintf.S index 0cec70ce2..06434b98d 100644 --- a/tmk_core/common/avr/xprintf.S +++ b/tmk_core/common/avr/xprintf.S | |||
@@ -1,500 +1,500 @@ | |||
1 | ;---------------------------------------------------------------------------; | 1 | ;---------------------------------------------------------------------------; |
2 | ; Extended itoa, puts, printf and atoi (C)ChaN, 2011 | 2 | ; Extended itoa, puts, printf and atoi (C)ChaN, 2011 |
3 | ;---------------------------------------------------------------------------; | 3 | ;---------------------------------------------------------------------------; |
4 | 4 | ||
5 | // Base size is 152 bytes | 5 | // Base size is 152 bytes |
6 | #define CR_CRLF 0 // Convert \n to \r\n (+10 bytes) | 6 | #define CR_CRLF 0 // Convert \n to \r\n (+10 bytes) |
7 | #define USE_XPRINTF 1 // Enable xprintf function (+194 bytes) | 7 | #define USE_XPRINTF 1 // Enable xprintf function (+194 bytes) |
8 | #define USE_XSPRINTF 0 // Add xsprintf function (+78 bytes) | 8 | #define USE_XSPRINTF 0 // Add xsprintf function (+78 bytes) |
9 | #define USE_XFPRINTF 0 // Add xfprintf function (+54 bytes) | 9 | #define USE_XFPRINTF 0 // Add xfprintf function (+54 bytes) |
10 | #define USE_XATOI 0 // Enable xatoi function (+182 bytes) | 10 | #define USE_XATOI 0 // Enable xatoi function (+182 bytes) |
11 | 11 | ||
12 | 12 | ||
13 | #if FLASHEND > 0x1FFFF | 13 | #if FLASHEND > 0x1FFFF |
14 | #error xitoa module does not support 256K devices | 14 | #error xitoa module does not support 256K devices |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | .nolist | 17 | .nolist |
18 | #include <avr/io.h> // Include device specific definitions. | 18 | #include <avr/io.h> // Include device specific definitions. |
19 | .list | 19 | .list |
20 | 20 | ||
21 | #ifdef SPM_PAGESIZE // Recent devices have "lpm Rd,Z+" and "movw". | 21 | #ifdef SPM_PAGESIZE // Recent devices have "lpm Rd,Z+" and "movw". |
22 | .macro _LPMI reg | 22 | .macro _LPMI reg |
23 | lpm \reg, Z+ | 23 | lpm \reg, Z+ |
24 | .endm | 24 | .endm |
25 | .macro _MOVW dh,dl, sh,sl | 25 | .macro _MOVW dh,dl, sh,sl |
26 | movw \dl, \sl | 26 | movw \dl, \sl |
27 | .endm | 27 | .endm |
28 | #else // Earlier devices do not have "lpm Rd,Z+" nor "movw". | 28 | #else // Earlier devices do not have "lpm Rd,Z+" nor "movw". |
29 | .macro _LPMI reg | 29 | .macro _LPMI reg |
30 | lpm | 30 | lpm |
31 | mov \reg, r0 | 31 | mov \reg, r0 |
32 | adiw ZL, 1 | 32 | adiw ZL, 1 |
33 | .endm | 33 | .endm |
34 | .macro _MOVW dh,dl, sh,sl | 34 | .macro _MOVW dh,dl, sh,sl |
35 | mov \dl, \sl | 35 | mov \dl, \sl |
36 | mov \dh, \sh | 36 | mov \dh, \sh |
37 | .endm | 37 | .endm |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | ;--------------------------------------------------------------------------- | 42 | ;--------------------------------------------------------------------------- |
43 | ; Stub function to forward to user output function | 43 | ; Stub function to forward to user output function |
44 | ; | 44 | ; |
45 | ;Prototype: void xputc (char chr // a character to be output | 45 | ;Prototype: void xputc (char chr // a character to be output |
46 | ; ); | 46 | ; ); |
47 | ;Size: 12/12 words | 47 | ;Size: 12/12 words |
48 | 48 | ||
49 | .section .bss | 49 | .section .bss |
50 | .global xfunc_out ; xfunc_out must be initialized before using this module. | 50 | .global xfunc_out ; xfunc_out must be initialized before using this module. |
51 | xfunc_out: .ds.w 1 | 51 | xfunc_out: .ds.w 1 |
52 | .section .text | 52 | .section .text |
53 | 53 | ||
54 | 54 | ||
55 | .func xputc | 55 | .func xputc |
56 | .global xputc | 56 | .global xputc |
57 | xputc: | 57 | xputc: |
58 | #if CR_CRLF | 58 | #if CR_CRLF |
59 | cpi r24, 10 ;LF --> CRLF | 59 | cpi r24, 10 ;LF --> CRLF |
60 | brne 1f ; | 60 | brne 1f ; |
61 | ldi r24, 13 ; | 61 | ldi r24, 13 ; |
62 | rcall 1f ; | 62 | rcall 1f ; |
63 | ldi r24, 10 ;/ | 63 | ldi r24, 10 ;/ |
64 | 1: | 64 | 1: |
65 | #endif | 65 | #endif |
66 | push ZH | 66 | push ZH |
67 | push ZL | 67 | push ZL |
68 | lds ZL, xfunc_out+0 ;Pointer to the registered output function. | 68 | lds ZL, xfunc_out+0 ;Pointer to the registered output function. |
69 | lds ZH, xfunc_out+1 ;/ | 69 | lds ZH, xfunc_out+1 ;/ |
70 | sbiw ZL, 0 ;Skip if null | 70 | sbiw ZL, 0 ;Skip if null |
71 | breq 2f ;/ | 71 | breq 2f ;/ |
72 | icall | 72 | icall |
73 | 2: pop ZL | 73 | 2: pop ZL |
74 | pop ZH | 74 | pop ZH |
75 | ret | 75 | ret |
76 | .endfunc | 76 | .endfunc |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | ;--------------------------------------------------------------------------- | 80 | ;--------------------------------------------------------------------------- |
81 | ; Direct ROM string output | 81 | ; Direct ROM string output |
82 | ; | 82 | ; |
83 | ;Prototype: void xputs (const char *str_p // rom string to be output | 83 | ;Prototype: void xputs (const char *str_p // rom string to be output |
84 | ; ); | 84 | ; ); |
85 | 85 | ||
86 | .func xputs | 86 | .func xputs |
87 | .global xputs | 87 | .global xputs |
88 | xputs: | 88 | xputs: |
89 | _MOVW ZH,ZL, r25,r24 ; Z = pointer to rom string | 89 | _MOVW ZH,ZL, r25,r24 ; Z = pointer to rom string |
90 | 1: _LPMI r24 | 90 | 1: _LPMI r24 |
91 | cpi r24, 0 | 91 | cpi r24, 0 |
92 | breq 2f | 92 | breq 2f |
93 | rcall xputc | 93 | rcall xputc |
94 | rjmp 1b | 94 | rjmp 1b |
95 | 2: ret | 95 | 2: ret |
96 | .endfunc | 96 | .endfunc |
97 | 97 | ||
98 | 98 | ||
99 | ;--------------------------------------------------------------------------- | 99 | ;--------------------------------------------------------------------------- |
100 | ; Extended direct numeral string output (32bit version) | 100 | ; Extended direct numeral string output (32bit version) |
101 | ; | 101 | ; |
102 | ;Prototype: void xitoa (long value, // value to be output | 102 | ;Prototype: void xitoa (long value, // value to be output |
103 | ; char radix, // radix | 103 | ; char radix, // radix |
104 | ; char width); // minimum width | 104 | ; char width); // minimum width |
105 | ; | 105 | ; |
106 | 106 | ||
107 | .func xitoa | 107 | .func xitoa |
108 | .global xitoa | 108 | .global xitoa |
109 | xitoa: | 109 | xitoa: |
110 | ;r25:r22 = value, r20 = base, r18 = digits | 110 | ;r25:r22 = value, r20 = base, r18 = digits |
111 | clr r31 ;r31 = stack level | 111 | clr r31 ;r31 = stack level |
112 | ldi r30, ' ' ;r30 = sign | 112 | ldi r30, ' ' ;r30 = sign |
113 | ldi r19, ' ' ;r19 = filler | 113 | ldi r19, ' ' ;r19 = filler |
114 | sbrs r20, 7 ;When base indicates signd format and the value | 114 | sbrs r20, 7 ;When base indicates signd format and the value |
115 | rjmp 0f ;is minus, add a '-'. | 115 | rjmp 0f ;is minus, add a '-'. |
116 | neg r20 ; | 116 | neg r20 ; |
117 | sbrs r25, 7 ; | 117 | sbrs r25, 7 ; |
118 | rjmp 0f ; | 118 | rjmp 0f ; |
119 | ldi r30, '-' ; | 119 | ldi r30, '-' ; |
120 | com r22 ; | 120 | com r22 ; |
121 | com r23 ; | 121 | com r23 ; |
122 | com r24 ; | 122 | com r24 ; |
123 | com r25 ; | 123 | com r25 ; |
124 | adc r22, r1 ; | 124 | adc r22, r1 ; |
125 | adc r23, r1 ; | 125 | adc r23, r1 ; |
126 | adc r24, r1 ; | 126 | adc r24, r1 ; |
127 | adc r25, r1 ;/ | 127 | adc r25, r1 ;/ |
128 | 0: sbrs r18, 7 ;When digits indicates zero filled, | 128 | 0: sbrs r18, 7 ;When digits indicates zero filled, |
129 | rjmp 1f ;filler is '0'. | 129 | rjmp 1f ;filler is '0'. |
130 | neg r18 ; | 130 | neg r18 ; |
131 | ldi r19, '0' ;/ | 131 | ldi r19, '0' ;/ |
132 | ;----- string conversion loop | 132 | ;----- string conversion loop |
133 | 1: ldi r21, 32 ;r26 = r25:r22 % r20 | 133 | 1: ldi r21, 32 ;r26 = r25:r22 % r20 |
134 | clr r26 ;r25:r22 /= r20 | 134 | clr r26 ;r25:r22 /= r20 |
135 | 2: lsl r22 ; | 135 | 2: lsl r22 ; |
136 | rol r23 ; | 136 | rol r23 ; |
137 | rol r24 ; | 137 | rol r24 ; |
138 | rol r25 ; | 138 | rol r25 ; |
139 | rol r26 ; | 139 | rol r26 ; |
140 | cp r26, r20 ; | 140 | cp r26, r20 ; |
141 | brcs 3f ; | 141 | brcs 3f ; |
142 | sub r26, r20 ; | 142 | sub r26, r20 ; |
143 | inc r22 ; | 143 | inc r22 ; |
144 | 3: dec r21 ; | 144 | 3: dec r21 ; |
145 | brne 2b ;/ | 145 | brne 2b ;/ |
146 | cpi r26, 10 ;r26 is a numeral digit '0'-'F' | 146 | cpi r26, 10 ;r26 is a numeral digit '0'-'F' |
147 | brcs 4f ; | 147 | brcs 4f ; |
148 | subi r26, -7 ; | 148 | subi r26, -7 ; |
149 | 4: subi r26, -'0' ;/ | 149 | 4: subi r26, -'0' ;/ |
150 | push r26 ;Stack it | 150 | push r26 ;Stack it |
151 | inc r31 ;/ | 151 | inc r31 ;/ |
152 | cp r22, r1 ;Repeat until r25:r22 gets zero | 152 | cp r22, r1 ;Repeat until r25:r22 gets zero |
153 | cpc r23, r1 ; | 153 | cpc r23, r1 ; |
154 | cpc r24, r1 ; | 154 | cpc r24, r1 ; |
155 | cpc r25, r1 ; | 155 | cpc r25, r1 ; |
156 | brne 1b ;/ | 156 | brne 1b ;/ |
157 | 157 | ||
158 | cpi r30, '-' ;Minus sign if needed | 158 | cpi r30, '-' ;Minus sign if needed |
159 | brne 5f ; | 159 | brne 5f ; |
160 | push r30 ; | 160 | push r30 ; |
161 | inc r31 ;/ | 161 | inc r31 ;/ |
162 | 5: cp r31, r18 ;Filler | 162 | 5: cp r31, r18 ;Filler |
163 | brcc 6f ; | 163 | brcc 6f ; |
164 | push r19 ; | 164 | push r19 ; |
165 | inc r31 ; | 165 | inc r31 ; |
166 | rjmp 5b ;/ | 166 | rjmp 5b ;/ |
167 | 167 | ||
168 | 6: pop r24 ;Flush stacked digits and exit | 168 | 6: pop r24 ;Flush stacked digits and exit |
169 | rcall xputc ; | 169 | rcall xputc ; |
170 | dec r31 ; | 170 | dec r31 ; |
171 | brne 6b ;/ | 171 | brne 6b ;/ |
172 | 172 | ||
173 | ret | 173 | ret |
174 | .endfunc | 174 | .endfunc |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | ;---------------------------------------------------------------------------; | 178 | ;---------------------------------------------------------------------------; |
179 | ; Formatted string output (16/32bit version) | 179 | ; Formatted string output (16/32bit version) |
180 | ; | 180 | ; |
181 | ;Prototype: | 181 | ;Prototype: |
182 | ; void __xprintf (const char *format_p, ...); | 182 | ; void __xprintf (const char *format_p, ...); |
183 | ; void __xsprintf(char*, const char *format_p, ...); | 183 | ; void __xsprintf(char*, const char *format_p, ...); |
184 | ; void __xfprintf(void(*func)(char), const char *format_p, ...); | 184 | ; void __xfprintf(void(*func)(char), const char *format_p, ...); |
185 | ; | 185 | ; |
186 | 186 | ||
187 | #if USE_XPRINTF | 187 | #if USE_XPRINTF |
188 | 188 | ||
189 | .func xvprintf | 189 | .func xvprintf |
190 | xvprintf: | 190 | xvprintf: |
191 | ld ZL, Y+ ;Z = pointer to format string | 191 | ld ZL, Y+ ;Z = pointer to format string |
192 | ld ZH, Y+ ;/ | 192 | ld ZH, Y+ ;/ |
193 | 193 | ||
194 | 0: _LPMI r24 ;Get a format char | 194 | 0: _LPMI r24 ;Get a format char |
195 | cpi r24, 0 ;End of format string? | 195 | cpi r24, 0 ;End of format string? |
196 | breq 90f ;/ | 196 | breq 90f ;/ |
197 | cpi r24, '%' ;Is format? | 197 | cpi r24, '%' ;Is format? |
198 | breq 20f ;/ | 198 | breq 20f ;/ |
199 | 1: rcall xputc ;Put a normal character | 199 | 1: rcall xputc ;Put a normal character |
200 | rjmp 0b ;/ | 200 | rjmp 0b ;/ |
201 | 90: ret | 201 | 90: ret |
202 | 202 | ||
203 | 20: ldi r18, 0 ;r18: digits | 203 | 20: ldi r18, 0 ;r18: digits |
204 | clt ;T: filler | 204 | clt ;T: filler |
205 | _LPMI r21 ;Get flags | 205 | _LPMI r21 ;Get flags |
206 | cpi r21, '%' ;Is a %? | 206 | cpi r21, '%' ;Is a %? |
207 | breq 1b ;/ | 207 | breq 1b ;/ |
208 | cpi r21, '0' ;Zero filled? | 208 | cpi r21, '0' ;Zero filled? |
209 | brne 23f ; | 209 | brne 23f ; |
210 | set ;/ | 210 | set ;/ |
211 | 22: _LPMI r21 ;Get width | 211 | 22: _LPMI r21 ;Get width |
212 | 23: cpi r21, '9'+1 ; | 212 | 23: cpi r21, '9'+1 ; |
213 | brcc 24f ; | 213 | brcc 24f ; |
214 | subi r21, '0' ; | 214 | subi r21, '0' ; |
215 | brcs 90b ; | 215 | brcs 90b ; |
216 | lsl r18 ; | 216 | lsl r18 ; |
217 | mov r0, r18 ; | 217 | mov r0, r18 ; |
218 | lsl r18 ; | 218 | lsl r18 ; |
219 | lsl r18 ; | 219 | lsl r18 ; |
220 | add r18, r0 ; | 220 | add r18, r0 ; |
221 | add r18, r21 ; | 221 | add r18, r21 ; |
222 | rjmp 22b ;/ | 222 | rjmp 22b ;/ |
223 | 223 | ||
224 | 24: brtc 25f ;get value (low word) | 224 | 24: brtc 25f ;get value (low word) |
225 | neg r18 ; | 225 | neg r18 ; |
226 | 25: ld r24, Y+ ; | 226 | 25: ld r24, Y+ ; |
227 | ld r25, Y+ ;/ | 227 | ld r25, Y+ ;/ |
228 | cpi r21, 'c' ;Is type character? | 228 | cpi r21, 'c' ;Is type character? |
229 | breq 1b ;/ | 229 | breq 1b ;/ |
230 | cpi r21, 's' ;Is type RAM string? | 230 | cpi r21, 's' ;Is type RAM string? |
231 | breq 50f ;/ | 231 | breq 50f ;/ |
232 | cpi r21, 'S' ;Is type ROM string? | 232 | cpi r21, 'S' ;Is type ROM string? |
233 | breq 60f ;/ | 233 | breq 60f ;/ |
234 | _MOVW r23,r22,r25,r24 ;r25:r22 = value | 234 | _MOVW r23,r22,r25,r24 ;r25:r22 = value |
235 | clr r24 ; | 235 | clr r24 ; |
236 | clr r25 ; | 236 | clr r25 ; |
237 | clt ;/ | 237 | clt ;/ |
238 | cpi r21, 'l' ;Is long int? | 238 | cpi r21, 'l' ;Is long int? |
239 | brne 26f ; | 239 | brne 26f ; |
240 | ld r24, Y+ ;get value (high word) | 240 | ld r24, Y+ ;get value (high word) |
241 | ld r25, Y+ ; | 241 | ld r25, Y+ ; |
242 | set ; | 242 | set ; |
243 | _LPMI r21 ;/ | 243 | _LPMI r21 ;/ |
244 | 26: cpi r21, 'd' ;Is type signed decimal? | 244 | 26: cpi r21, 'd' ;Is type signed decimal? |
245 | brne 27f ;/ | 245 | brne 27f ;/ |
246 | ldi r20, -10 ; | 246 | ldi r20, -10 ; |
247 | brts 40f ; | 247 | brts 40f ; |
248 | sbrs r23, 7 ; | 248 | sbrs r23, 7 ; |
249 | rjmp 40f ; | 249 | rjmp 40f ; |
250 | ldi r24, -1 ; | 250 | ldi r24, -1 ; |
251 | ldi r25, -1 ; | 251 | ldi r25, -1 ; |
252 | rjmp 40f ;/ | 252 | rjmp 40f ;/ |
253 | 27: cpi r21, 'u' ;Is type unsigned decimal? | 253 | 27: cpi r21, 'u' ;Is type unsigned decimal? |
254 | ldi r20, 10 ; | 254 | ldi r20, 10 ; |
255 | breq 40f ;/ | 255 | breq 40f ;/ |
256 | cpi r21, 'X' ;Is type hexdecimal? | 256 | cpi r21, 'X' ;Is type hexdecimal? |
257 | ldi r20, 16 ; | 257 | ldi r20, 16 ; |
258 | breq 40f ;/ | 258 | breq 40f ;/ |
259 | cpi r21, 'b' ;Is type binary? | 259 | cpi r21, 'b' ;Is type binary? |
260 | ldi r20, 2 ; | 260 | ldi r20, 2 ; |
261 | breq 40f ;/ | 261 | breq 40f ;/ |
262 | ret ;abort | 262 | ret ;abort |
263 | 40: push ZH ;Output the value | 263 | 40: push ZH ;Output the value |
264 | push ZL ; | 264 | push ZL ; |
265 | rcall xitoa ; | 265 | rcall xitoa ; |
266 | 42: pop ZL ; | 266 | 42: pop ZL ; |
267 | pop ZH ; | 267 | pop ZH ; |
268 | rjmp 0b ;/ | 268 | rjmp 0b ;/ |
269 | 269 | ||
270 | 50: push ZH ;Put a string on the RAM | 270 | 50: push ZH ;Put a string on the RAM |
271 | push ZL | 271 | push ZL |
272 | _MOVW ZH,ZL, r25,r24 | 272 | _MOVW ZH,ZL, r25,r24 |
273 | 51: ld r24, Z+ | 273 | 51: ld r24, Z+ |
274 | cpi r24, 0 | 274 | cpi r24, 0 |
275 | breq 42b | 275 | breq 42b |
276 | rcall xputc | 276 | rcall xputc |
277 | rjmp 51b | 277 | rjmp 51b |
278 | 278 | ||
279 | 60: push ZH ;Put a string on the ROM | 279 | 60: push ZH ;Put a string on the ROM |
280 | push ZL | 280 | push ZL |
281 | rcall xputs | 281 | rcall xputs |
282 | rjmp 42b | 282 | rjmp 42b |
283 | .endfunc | 283 | .endfunc |
284 | 284 | ||
285 | 285 | ||
286 | .func __xprintf | 286 | .func __xprintf |
287 | .global __xprintf | 287 | .global __xprintf |
288 | __xprintf: | 288 | __xprintf: |
289 | push YH | 289 | push YH |
290 | push YL | 290 | push YL |
291 | in YL, _SFR_IO_ADDR(SPL) | 291 | in YL, _SFR_IO_ADDR(SPL) |
292 | #ifdef SPH | 292 | #ifdef SPH |
293 | in YH, _SFR_IO_ADDR(SPH) | 293 | in YH, _SFR_IO_ADDR(SPH) |
294 | #else | 294 | #else |
295 | clr YH | 295 | clr YH |
296 | #endif | 296 | #endif |
297 | adiw YL, 5 ;Y = pointer to arguments | 297 | adiw YL, 5 ;Y = pointer to arguments |
298 | rcall xvprintf | 298 | rcall xvprintf |
299 | pop YL | 299 | pop YL |
300 | pop YH | 300 | pop YH |
301 | ret | 301 | ret |
302 | .endfunc | 302 | .endfunc |
303 | 303 | ||
304 | 304 | ||
305 | #if USE_XSPRINTF | 305 | #if USE_XSPRINTF |
306 | 306 | ||
307 | .func __xsprintf | 307 | .func __xsprintf |
308 | putram: | 308 | putram: |
309 | _MOVW ZH,ZL, r15,r14 | 309 | _MOVW ZH,ZL, r15,r14 |
310 | st Z+, r24 | 310 | st Z+, r24 |
311 | _MOVW r15,r14, ZH,ZL | 311 | _MOVW r15,r14, ZH,ZL |
312 | ret | 312 | ret |
313 | .global __xsprintf | 313 | .global __xsprintf |
314 | __xsprintf: | 314 | __xsprintf: |
315 | push YH | 315 | push YH |
316 | push YL | 316 | push YL |
317 | in YL, _SFR_IO_ADDR(SPL) | 317 | in YL, _SFR_IO_ADDR(SPL) |
318 | #ifdef SPH | 318 | #ifdef SPH |
319 | in YH, _SFR_IO_ADDR(SPH) | 319 | in YH, _SFR_IO_ADDR(SPH) |
320 | #else | 320 | #else |
321 | clr YH | 321 | clr YH |
322 | #endif | 322 | #endif |
323 | adiw YL, 5 ;Y = pointer to arguments | 323 | adiw YL, 5 ;Y = pointer to arguments |
324 | lds ZL, xfunc_out+0 ;Save registered output function | 324 | lds ZL, xfunc_out+0 ;Save registered output function |
325 | lds ZH, xfunc_out+1 ; | 325 | lds ZH, xfunc_out+1 ; |
326 | push ZL ; | 326 | push ZL ; |
327 | push ZH ;/ | 327 | push ZH ;/ |
328 | ldi ZL, lo8(pm(putram));Set local output function | 328 | ldi ZL, lo8(pm(putram));Set local output function |
329 | ldi ZH, hi8(pm(putram)); | 329 | ldi ZH, hi8(pm(putram)); |
330 | sts xfunc_out+0, ZL ; | 330 | sts xfunc_out+0, ZL ; |
331 | sts xfunc_out+1, ZH ;/ | 331 | sts xfunc_out+1, ZH ;/ |
332 | push r15 ;Initialize pointer to string buffer | 332 | push r15 ;Initialize pointer to string buffer |
333 | push r14 ; | 333 | push r14 ; |
334 | ld r14, Y+ ; | 334 | ld r14, Y+ ; |
335 | ld r15, Y+ ;/ | 335 | ld r15, Y+ ;/ |
336 | rcall xvprintf | 336 | rcall xvprintf |
337 | _MOVW ZH,ZL, r15,r14 ;Terminate string | 337 | _MOVW ZH,ZL, r15,r14 ;Terminate string |
338 | st Z, r1 ; | 338 | st Z, r1 ; |
339 | pop r14 ; | 339 | pop r14 ; |
340 | pop r15 ;/ | 340 | pop r15 ;/ |
341 | pop ZH ;Restore registered output function | 341 | pop ZH ;Restore registered output function |
342 | pop ZL ; | 342 | pop ZL ; |
343 | sts xfunc_out+0, ZL ; | 343 | sts xfunc_out+0, ZL ; |
344 | sts xfunc_out+1, ZH ;/ | 344 | sts xfunc_out+1, ZH ;/ |
345 | pop YL | 345 | pop YL |
346 | pop YH | 346 | pop YH |
347 | ret | 347 | ret |
348 | .endfunc | 348 | .endfunc |
349 | #endif | 349 | #endif |
350 | 350 | ||
351 | 351 | ||
352 | #if USE_XFPRINTF | 352 | #if USE_XFPRINTF |
353 | .func __xfprintf | 353 | .func __xfprintf |
354 | .global __xfprintf | 354 | .global __xfprintf |
355 | __xfprintf: | 355 | __xfprintf: |
356 | push YH | 356 | push YH |
357 | push YL | 357 | push YL |
358 | in YL, _SFR_IO_ADDR(SPL) | 358 | in YL, _SFR_IO_ADDR(SPL) |
359 | #ifdef SPH | 359 | #ifdef SPH |
360 | in YH, _SFR_IO_ADDR(SPH) | 360 | in YH, _SFR_IO_ADDR(SPH) |
361 | #else | 361 | #else |
362 | clr YH | 362 | clr YH |
363 | #endif | 363 | #endif |
364 | adiw YL, 5 ;Y = pointer to arguments | 364 | adiw YL, 5 ;Y = pointer to arguments |
365 | lds ZL, xfunc_out+0 ;Save registered output function | 365 | lds ZL, xfunc_out+0 ;Save registered output function |
366 | lds ZH, xfunc_out+1 ; | 366 | lds ZH, xfunc_out+1 ; |
367 | push ZL ; | 367 | push ZL ; |
368 | push ZH ;/ | 368 | push ZH ;/ |
369 | ld ZL, Y+ ;Set output function | 369 | ld ZL, Y+ ;Set output function |
370 | ld ZH, Y+ ; | 370 | ld ZH, Y+ ; |
371 | sts xfunc_out+0, ZL ; | 371 | sts xfunc_out+0, ZL ; |
372 | sts xfunc_out+1, ZH ;/ | 372 | sts xfunc_out+1, ZH ;/ |
373 | rcall xvprintf | 373 | rcall xvprintf |
374 | pop ZH ;Restore registered output function | 374 | pop ZH ;Restore registered output function |
375 | pop ZL ; | 375 | pop ZL ; |
376 | sts xfunc_out+0, ZL ; | 376 | sts xfunc_out+0, ZL ; |
377 | sts xfunc_out+1, ZH ;/ | 377 | sts xfunc_out+1, ZH ;/ |
378 | pop YL | 378 | pop YL |
379 | pop YH | 379 | pop YH |
380 | ret | 380 | ret |
381 | .endfunc | 381 | .endfunc |
382 | #endif | 382 | #endif |
383 | 383 | ||
384 | #endif | 384 | #endif |
385 | 385 | ||
386 | 386 | ||
387 | 387 | ||
388 | ;--------------------------------------------------------------------------- | 388 | ;--------------------------------------------------------------------------- |
389 | ; Extended numeral string input | 389 | ; Extended numeral string input |
390 | ; | 390 | ; |
391 | ;Prototype: | 391 | ;Prototype: |
392 | ; char xatoi ( /* 1: Successful, 0: Failed */ | 392 | ; char xatoi ( /* 1: Successful, 0: Failed */ |
393 | ; const char **str, /* pointer to pointer to source string */ | 393 | ; const char **str, /* pointer to pointer to source string */ |
394 | ; long *res /* result */ | 394 | ; long *res /* result */ |
395 | ; ); | 395 | ; ); |
396 | ; | 396 | ; |
397 | 397 | ||
398 | 398 | ||
399 | #if USE_XATOI | 399 | #if USE_XATOI |
400 | .func xatoi | 400 | .func xatoi |
401 | .global xatoi | 401 | .global xatoi |
402 | xatoi: | 402 | xatoi: |
403 | _MOVW r1, r0, r23, r22 | 403 | _MOVW r1, r0, r23, r22 |
404 | _MOVW XH, XL, r25, r24 | 404 | _MOVW XH, XL, r25, r24 |
405 | ld ZL, X+ | 405 | ld ZL, X+ |
406 | ld ZH, X+ | 406 | ld ZH, X+ |
407 | clr r18 ;r21:r18 = 0; | 407 | clr r18 ;r21:r18 = 0; |
408 | clr r19 ; | 408 | clr r19 ; |
409 | clr r20 ; | 409 | clr r20 ; |
410 | clr r21 ;/ | 410 | clr r21 ;/ |
411 | clt ;T = 0; | 411 | clt ;T = 0; |
412 | 412 | ||
413 | ldi r25, 10 ;r25 = 10; | 413 | ldi r25, 10 ;r25 = 10; |
414 | rjmp 41f ;/ | 414 | rjmp 41f ;/ |
415 | 40: adiw ZL, 1 ;Z++; | 415 | 40: adiw ZL, 1 ;Z++; |
416 | 41: ld r22, Z ;r22 = *Z; | 416 | 41: ld r22, Z ;r22 = *Z; |
417 | cpi r22, ' ' ;if(r22 == ' ') continue | 417 | cpi r22, ' ' ;if(r22 == ' ') continue |
418 | breq 40b ;/ | 418 | breq 40b ;/ |
419 | brcs 70f ;if(r22 < ' ') error; | 419 | brcs 70f ;if(r22 < ' ') error; |
420 | cpi r22, '-' ;if(r22 == '-') { | 420 | cpi r22, '-' ;if(r22 == '-') { |
421 | brne 42f ; T = 1; | 421 | brne 42f ; T = 1; |
422 | set ; continue; | 422 | set ; continue; |
423 | rjmp 40b ;} | 423 | rjmp 40b ;} |
424 | 42: cpi r22, '9'+1 ;if(r22 > '9') error; | 424 | 42: cpi r22, '9'+1 ;if(r22 > '9') error; |
425 | brcc 70f ;/ | 425 | brcc 70f ;/ |
426 | cpi r22, '0' ;if(r22 < '0') error; | 426 | cpi r22, '0' ;if(r22 < '0') error; |
427 | brcs 70f ;/ | 427 | brcs 70f ;/ |
428 | brne 51f ;if(r22 > '0') cv_start; | 428 | brne 51f ;if(r22 > '0') cv_start; |
429 | ldi r25, 8 ;r25 = 8; | 429 | ldi r25, 8 ;r25 = 8; |
430 | adiw ZL, 1 ;r22 = *(++Z); | 430 | adiw ZL, 1 ;r22 = *(++Z); |
431 | ld r22, Z ;/ | 431 | ld r22, Z ;/ |
432 | cpi r22, ' '+1 ;if(r22 <= ' ') exit; | 432 | cpi r22, ' '+1 ;if(r22 <= ' ') exit; |
433 | brcs 80f ;/ | 433 | brcs 80f ;/ |
434 | cpi r22, 'b' ;if(r22 == 'b') { | 434 | cpi r22, 'b' ;if(r22 == 'b') { |
435 | brne 43f ; r25 = 2; | 435 | brne 43f ; r25 = 2; |
436 | ldi r25, 2 ; cv_start; | 436 | ldi r25, 2 ; cv_start; |
437 | rjmp 50f ;} | 437 | rjmp 50f ;} |
438 | 43: cpi r22, 'x' ;if(r22 != 'x') error; | 438 | 43: cpi r22, 'x' ;if(r22 != 'x') error; |
439 | brne 51f ;/ | 439 | brne 51f ;/ |
440 | ldi r25, 16 ;r25 = 16; | 440 | ldi r25, 16 ;r25 = 16; |
441 | 441 | ||
442 | 50: adiw ZL, 1 ;Z++; | 442 | 50: adiw ZL, 1 ;Z++; |
443 | ld r22, Z ;r22 = *Z; | 443 | ld r22, Z ;r22 = *Z; |
444 | 51: cpi r22, ' '+1 ;if(r22 <= ' ') break; | 444 | 51: cpi r22, ' '+1 ;if(r22 <= ' ') break; |
445 | brcs 80f ;/ | 445 | brcs 80f ;/ |
446 | cpi r22, 'a' ;if(r22 >= 'a') r22 =- 0x20; | 446 | cpi r22, 'a' ;if(r22 >= 'a') r22 =- 0x20; |
447 | brcs 52f ; | 447 | brcs 52f ; |
448 | subi r22, 0x20 ;/ | 448 | subi r22, 0x20 ;/ |
449 | 52: subi r22, '0' ;if((r22 -= '0') < 0) error; | 449 | 52: subi r22, '0' ;if((r22 -= '0') < 0) error; |
450 | brcs 70f ;/ | 450 | brcs 70f ;/ |
451 | cpi r22, 10 ;if(r22 >= 10) { | 451 | cpi r22, 10 ;if(r22 >= 10) { |
452 | brcs 53f ; r22 -= 7; | 452 | brcs 53f ; r22 -= 7; |
453 | subi r22, 7 ; if(r22 < 10) | 453 | subi r22, 7 ; if(r22 < 10) |
454 | cpi r22, 10 ; | 454 | cpi r22, 10 ; |
455 | brcs 70f ;} | 455 | brcs 70f ;} |
456 | 53: cp r22, r25 ;if(r22 >= r25) error; | 456 | 53: cp r22, r25 ;if(r22 >= r25) error; |
457 | brcc 70f ;/ | 457 | brcc 70f ;/ |
458 | 60: ldi r24, 33 ;r21:r18 *= r25; | 458 | 60: ldi r24, 33 ;r21:r18 *= r25; |
459 | sub r23, r23 ; | 459 | sub r23, r23 ; |
460 | 61: brcc 62f ; | 460 | 61: brcc 62f ; |
461 | add r23, r25 ; | 461 | add r23, r25 ; |
462 | 62: lsr r23 ; | 462 | 62: lsr r23 ; |
463 | ror r21 ; | 463 | ror r21 ; |
464 | ror r20 ; | 464 | ror r20 ; |
465 | ror r19 ; | 465 | ror r19 ; |
466 | ror r18 ; | 466 | ror r18 ; |
467 | dec r24 ; | 467 | dec r24 ; |
468 | brne 61b ;/ | 468 | brne 61b ;/ |
469 | add r18, r22 ;r21:r18 += r22; | 469 | add r18, r22 ;r21:r18 += r22; |
470 | adc r19, r24 ; | 470 | adc r19, r24 ; |
471 | adc r20, r24 ; | 471 | adc r20, r24 ; |
472 | adc r21, r24 ;/ | 472 | adc r21, r24 ;/ |
473 | rjmp 50b ;repeat | 473 | rjmp 50b ;repeat |
474 | 474 | ||
475 | 70: ldi r24, 0 | 475 | 70: ldi r24, 0 |
476 | rjmp 81f | 476 | rjmp 81f |
477 | 80: ldi r24, 1 | 477 | 80: ldi r24, 1 |
478 | 81: brtc 82f | 478 | 81: brtc 82f |
479 | clr r22 | 479 | clr r22 |
480 | com r18 | 480 | com r18 |
481 | com r19 | 481 | com r19 |
482 | com r20 | 482 | com r20 |
483 | com r21 | 483 | com r21 |
484 | adc r18, r22 | 484 | adc r18, r22 |
485 | adc r19, r22 | 485 | adc r19, r22 |
486 | adc r20, r22 | 486 | adc r20, r22 |
487 | adc r21, r22 | 487 | adc r21, r22 |
488 | 82: st -X, ZH | 488 | 82: st -X, ZH |
489 | st -X, ZL | 489 | st -X, ZL |
490 | _MOVW XH, XL, r1, r0 | 490 | _MOVW XH, XL, r1, r0 |
491 | st X+, r18 | 491 | st X+, r18 |
492 | st X+, r19 | 492 | st X+, r19 |
493 | st X+, r20 | 493 | st X+, r20 |
494 | st X+, r21 | 494 | st X+, r21 |
495 | clr r1 | 495 | clr r1 |
496 | ret | 496 | ret |
497 | .endfunc | 497 | .endfunc |
498 | #endif | 498 | #endif |
499 | 499 | ||
500 | 500 | ||
diff --git a/tmk_core/common/avr/xprintf.h b/tmk_core/common/avr/xprintf.h index 59c6f2531..e53c0dd8e 100644 --- a/tmk_core/common/avr/xprintf.h +++ b/tmk_core/common/avr/xprintf.h | |||
@@ -1,111 +1,111 @@ | |||
1 | /*--------------------------------------------------------------------------- | 1 | /*--------------------------------------------------------------------------- |
2 | Extended itoa, puts and printf (C)ChaN, 2011 | 2 | Extended itoa, puts and printf (C)ChaN, 2011 |
3 | -----------------------------------------------------------------------------*/ | 3 | -----------------------------------------------------------------------------*/ |
4 | 4 | ||
5 | #ifndef XPRINTF_H | 5 | #ifndef XPRINTF_H |
6 | #define XPRINTF_H | 6 | #define XPRINTF_H |
7 | 7 | ||
8 | #include <inttypes.h> | 8 | #include <inttypes.h> |
9 | #include <avr/pgmspace.h> | 9 | #include <avr/pgmspace.h> |
10 | 10 | ||
11 | #ifdef __cplusplus | 11 | #ifdef __cplusplus |
12 | extern "C" { | 12 | extern "C" { |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | extern void (*xfunc_out)(uint8_t); | 15 | extern void (*xfunc_out)(uint8_t); |
16 | #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func) | 16 | #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func) |
17 | 17 | ||
18 | /* This is a pointer to user defined output function. It must be initialized | 18 | /* This is a pointer to user defined output function. It must be initialized |
19 | before using this modle. | 19 | before using this modle. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | void xputc(char chr); | 22 | void xputc(char chr); |
23 | 23 | ||
24 | /* This is a stub function to forward outputs to user defined output function. | 24 | /* This is a stub function to forward outputs to user defined output function. |
25 | All outputs from this module are output via this function. | 25 | All outputs from this module are output via this function. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | /*-----------------------------------------------------------------------------*/ | 29 | /*-----------------------------------------------------------------------------*/ |
30 | void xputs(const char *string_p); | 30 | void xputs(const char *string_p); |
31 | 31 | ||
32 | /* The string placed in the ROM is forwarded to xputc() directly. | 32 | /* The string placed in the ROM is forwarded to xputc() directly. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | 35 | ||
36 | /*-----------------------------------------------------------------------------*/ | 36 | /*-----------------------------------------------------------------------------*/ |
37 | void xitoa(long value, char radix, char width); | 37 | void xitoa(long value, char radix, char width); |
38 | 38 | ||
39 | /* Extended itoa(). | 39 | /* Extended itoa(). |
40 | 40 | ||
41 | value radix width output | 41 | value radix width output |
42 | 100 10 6 " 100" | 42 | 100 10 6 " 100" |
43 | 100 10 -6 "000100" | 43 | 100 10 -6 "000100" |
44 | 100 10 0 "100" | 44 | 100 10 0 "100" |
45 | 4294967295 10 0 "4294967295" | 45 | 4294967295 10 0 "4294967295" |
46 | 4294967295 -10 0 "-1" | 46 | 4294967295 -10 0 "-1" |
47 | 655360 16 -8 "000A0000" | 47 | 655360 16 -8 "000A0000" |
48 | 1024 16 0 "400" | 48 | 1024 16 0 "400" |
49 | 0x55 2 -8 "01010101" | 49 | 0x55 2 -8 "01010101" |
50 | */ | 50 | */ |
51 | 51 | ||
52 | 52 | ||
53 | /*-----------------------------------------------------------------------------*/ | 53 | /*-----------------------------------------------------------------------------*/ |
54 | #define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__) | 54 | #define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__) |
55 | #define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__) | 55 | #define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__) |
56 | #define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__) | 56 | #define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__) |
57 | 57 | ||
58 | void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */ | 58 | void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */ |
59 | void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */ | 59 | void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */ |
60 | void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */ | 60 | void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */ |
61 | 61 | ||
62 | /* Format string is placed in the ROM. The format flags is similar to printf(). | 62 | /* Format string is placed in the ROM. The format flags is similar to printf(). |
63 | 63 | ||
64 | %[flag][width][size]type | 64 | %[flag][width][size]type |
65 | 65 | ||
66 | flag | 66 | flag |
67 | A '0' means filled with '0' when output is shorter than width. | 67 | A '0' means filled with '0' when output is shorter than width. |
68 | ' ' is used in default. This is effective only numeral type. | 68 | ' ' is used in default. This is effective only numeral type. |
69 | width | 69 | width |
70 | Minimum width in decimal number. This is effective only numeral type. | 70 | Minimum width in decimal number. This is effective only numeral type. |
71 | Default width is zero. | 71 | Default width is zero. |
72 | size | 72 | size |
73 | A 'l' means the argument is long(32bit). Default is short(16bit). | 73 | A 'l' means the argument is long(32bit). Default is short(16bit). |
74 | This is effective only numeral type. | 74 | This is effective only numeral type. |
75 | type | 75 | type |
76 | 'c' : Character, argument is the value | 76 | 'c' : Character, argument is the value |
77 | 's' : String placed on the RAM, argument is the pointer | 77 | 's' : String placed on the RAM, argument is the pointer |
78 | 'S' : String placed on the ROM, argument is the pointer | 78 | 'S' : String placed on the ROM, argument is the pointer |
79 | 'd' : Signed decimal, argument is the value | 79 | 'd' : Signed decimal, argument is the value |
80 | 'u' : Unsigned decimal, argument is the value | 80 | 'u' : Unsigned decimal, argument is the value |
81 | 'X' : Hexdecimal, argument is the value | 81 | 'X' : Hexdecimal, argument is the value |
82 | 'b' : Binary, argument is the value | 82 | 'b' : Binary, argument is the value |
83 | '%' : '%' | 83 | '%' : '%' |
84 | 84 | ||
85 | */ | 85 | */ |
86 | 86 | ||
87 | 87 | ||
88 | /*-----------------------------------------------------------------------------*/ | 88 | /*-----------------------------------------------------------------------------*/ |
89 | char xatoi(char **str, long *ret); | 89 | char xatoi(char **str, long *ret); |
90 | 90 | ||
91 | /* Get value of the numeral string. | 91 | /* Get value of the numeral string. |
92 | 92 | ||
93 | str | 93 | str |
94 | Pointer to pointer to source string | 94 | Pointer to pointer to source string |
95 | 95 | ||
96 | "0b11001010" binary | 96 | "0b11001010" binary |
97 | "0377" octal | 97 | "0377" octal |
98 | "0xff800" hexdecimal | 98 | "0xff800" hexdecimal |
99 | "1250000" decimal | 99 | "1250000" decimal |
100 | "-25000" decimal | 100 | "-25000" decimal |
101 | 101 | ||
102 | ret | 102 | ret |
103 | Pointer to return value | 103 | Pointer to return value |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #ifdef __cplusplus | 106 | #ifdef __cplusplus |
107 | } | 107 | } |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | #endif | 110 | #endif |
111 | 111 | ||
diff --git a/tmk_core/protocol/iwrap/suart.S b/tmk_core/protocol/iwrap/suart.S index 1b0290963..a873515e1 100644 --- a/tmk_core/protocol/iwrap/suart.S +++ b/tmk_core/protocol/iwrap/suart.S | |||
@@ -1,156 +1,156 @@ | |||
1 | ;---------------------------------------------------------------------------; | 1 | ;---------------------------------------------------------------------------; |
2 | ; Software implemented UART module ; | 2 | ; Software implemented UART module ; |
3 | ; (C)ChaN, 2005 (http://elm-chan.org/) ; | 3 | ; (C)ChaN, 2005 (http://elm-chan.org/) ; |
4 | ;---------------------------------------------------------------------------; | 4 | ;---------------------------------------------------------------------------; |
5 | ; Bit rate settings: | 5 | ; Bit rate settings: |
6 | ; | 6 | ; |
7 | ; 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz 12MHz 16MHz 20MHz | 7 | ; 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz 12MHz 16MHz 20MHz |
8 | ; 2.4kbps 138 - - - - - - - - | 8 | ; 2.4kbps 138 - - - - - - - - |
9 | ; 4.8kbps 68 138 - - - - - - - | 9 | ; 4.8kbps 68 138 - - - - - - - |
10 | ; 9.6kbps 33 68 138 208 - - - - - | 10 | ; 9.6kbps 33 68 138 208 - - - - - |
11 | ; 19.2kbps - 33 68 102 138 173 208 - - | 11 | ; 19.2kbps - 33 68 102 138 173 208 - - |
12 | ; 38.4kbps - - 33 50 68 85 102 138 172 | 12 | ; 38.4kbps - - 33 50 68 85 102 138 172 |
13 | ; 57.6kbps - - 21 33 44 56 68 91 114 | 13 | ; 57.6kbps - - 21 33 44 56 68 91 114 |
14 | ; 115.2kbps - - - - 21 27 33 44 56 | 14 | ; 115.2kbps - - - - 21 27 33 44 56 |
15 | 15 | ||
16 | .nolist | 16 | .nolist |
17 | #include <avr/io.h> | 17 | #include <avr/io.h> |
18 | .list | 18 | .list |
19 | 19 | ||
20 | #define BPS 102 /* Bit delay. (see above table) */ | 20 | #define BPS 102 /* Bit delay. (see above table) */ |
21 | #define BIDIR 0 /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */ | 21 | #define BIDIR 0 /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */ |
22 | 22 | ||
23 | #define OUT_1 sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */ | 23 | #define OUT_1 sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */ |
24 | #define OUT_0 cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */ | 24 | #define OUT_0 cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */ |
25 | #define SKIP_IN_1 sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 1 */ | 25 | #define SKIP_IN_1 sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 1 */ |
26 | #define SKIP_IN_0 sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 0 */ | 26 | #define SKIP_IN_0 sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 0 */ |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | #ifdef SPM_PAGESIZE | 30 | #ifdef SPM_PAGESIZE |
31 | .macro _LPMI reg | 31 | .macro _LPMI reg |
32 | lpm \reg, Z+ | 32 | lpm \reg, Z+ |
33 | .endm | 33 | .endm |
34 | .macro _MOVW dh,dl, sh,sl | 34 | .macro _MOVW dh,dl, sh,sl |
35 | movw \dl, \sl | 35 | movw \dl, \sl |
36 | .endm | 36 | .endm |
37 | #else | 37 | #else |
38 | .macro _LPMI reg | 38 | .macro _LPMI reg |
39 | lpm | 39 | lpm |
40 | mov \reg, r0 | 40 | mov \reg, r0 |
41 | adiw ZL, 1 | 41 | adiw ZL, 1 |
42 | .endm | 42 | .endm |
43 | .macro _MOVW dh,dl, sh,sl | 43 | .macro _MOVW dh,dl, sh,sl |
44 | mov \dl, \sl | 44 | mov \dl, \sl |
45 | mov \dh, \sh | 45 | mov \dh, \sh |
46 | .endm | 46 | .endm |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | ;---------------------------------------------------------------------------; | 51 | ;---------------------------------------------------------------------------; |
52 | ; Transmit a byte in serial format of N81 | 52 | ; Transmit a byte in serial format of N81 |
53 | ; | 53 | ; |
54 | ;Prototype: void xmit (uint8_t data); | 54 | ;Prototype: void xmit (uint8_t data); |
55 | ;Size: 16 words | 55 | ;Size: 16 words |
56 | 56 | ||
57 | .global xmit | 57 | .global xmit |
58 | .func xmit | 58 | .func xmit |
59 | xmit: | 59 | xmit: |
60 | #if BIDIR | 60 | #if BIDIR |
61 | ldi r23, BPS-1 ;Pre-idle time for bidirectional data line | 61 | ldi r23, BPS-1 ;Pre-idle time for bidirectional data line |
62 | 5: dec r23 ; | 62 | 5: dec r23 ; |
63 | brne 5b ;/ | 63 | brne 5b ;/ |
64 | #endif | 64 | #endif |
65 | in r0, _SFR_IO_ADDR(SREG) ;Save flags | 65 | in r0, _SFR_IO_ADDR(SREG) ;Save flags |
66 | 66 | ||
67 | com r24 ;C = start bit | 67 | com r24 ;C = start bit |
68 | ldi r25, 10 ;Bit counter | 68 | ldi r25, 10 ;Bit counter |
69 | cli ;Start critical section | 69 | cli ;Start critical section |
70 | 70 | ||
71 | 1: ldi r23, BPS-1 ;----- Bit transferring loop | 71 | 1: ldi r23, BPS-1 ;----- Bit transferring loop |
72 | 2: dec r23 ;Wait for a bit time | 72 | 2: dec r23 ;Wait for a bit time |
73 | brne 2b ;/ | 73 | brne 2b ;/ |
74 | brcs 3f ;MISO = bit to be sent | 74 | brcs 3f ;MISO = bit to be sent |
75 | OUT_1 ; | 75 | OUT_1 ; |
76 | 3: brcc 4f ; | 76 | 3: brcc 4f ; |
77 | OUT_0 ;/ | 77 | OUT_0 ;/ |
78 | 4: lsr r24 ;Get next bit into C | 78 | 4: lsr r24 ;Get next bit into C |
79 | dec r25 ;All bits sent? | 79 | dec r25 ;All bits sent? |
80 | brne 1b ; no, coutinue | 80 | brne 1b ; no, coutinue |
81 | 81 | ||
82 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section | 82 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section |
83 | ret | 83 | ret |
84 | .endfunc | 84 | .endfunc |
85 | 85 | ||
86 | 86 | ||
87 | 87 | ||
88 | ;---------------------------------------------------------------------------; | 88 | ;---------------------------------------------------------------------------; |
89 | ; Receive a byte | 89 | ; Receive a byte |
90 | ; | 90 | ; |
91 | ;Prototype: uint8_t rcvr (void); | 91 | ;Prototype: uint8_t rcvr (void); |
92 | ;Size: 19 words | 92 | ;Size: 19 words |
93 | 93 | ||
94 | .global rcvr | 94 | .global rcvr |
95 | .func rcvr | 95 | .func rcvr |
96 | rcvr: | 96 | rcvr: |
97 | in r0, _SFR_IO_ADDR(SREG) ;Save flags | 97 | in r0, _SFR_IO_ADDR(SREG) ;Save flags |
98 | 98 | ||
99 | ldi r24, 0x80 ;Receiving shift reg | 99 | ldi r24, 0x80 ;Receiving shift reg |
100 | cli ;Start critical section | 100 | cli ;Start critical section |
101 | 101 | ||
102 | 1: SKIP_IN_1 ;Wait for idle | 102 | 1: SKIP_IN_1 ;Wait for idle |
103 | rjmp 1b | 103 | rjmp 1b |
104 | 2: SKIP_IN_0 ;Wait for start bit | 104 | 2: SKIP_IN_0 ;Wait for start bit |
105 | rjmp 2b | 105 | rjmp 2b |
106 | ldi r25, BPS/2 ;Wait for half bit time | 106 | ldi r25, BPS/2 ;Wait for half bit time |
107 | 3: dec r25 | 107 | 3: dec r25 |
108 | brne 3b | 108 | brne 3b |
109 | 109 | ||
110 | 4: ldi r25, BPS ;----- Bit receiving loop | 110 | 4: ldi r25, BPS ;----- Bit receiving loop |
111 | 5: dec r25 ;Wait for a bit time | 111 | 5: dec r25 ;Wait for a bit time |
112 | brne 5b ;/ | 112 | brne 5b ;/ |
113 | lsr r24 ;Next bit | 113 | lsr r24 ;Next bit |
114 | SKIP_IN_0 ;Get a data bit into r24.7 | 114 | SKIP_IN_0 ;Get a data bit into r24.7 |
115 | ori r24, 0x80 | 115 | ori r24, 0x80 |
116 | brcc 4b ;All bits received? no, continue | 116 | brcc 4b ;All bits received? no, continue |
117 | 117 | ||
118 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section | 118 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section |
119 | ret | 119 | ret |
120 | .endfunc | 120 | .endfunc |
121 | 121 | ||
122 | 122 | ||
123 | ; Not wait for start bit. This should be called after detecting start bit. | 123 | ; Not wait for start bit. This should be called after detecting start bit. |
124 | .global recv | 124 | .global recv |
125 | .func recv | 125 | .func recv |
126 | recv: | 126 | recv: |
127 | in r0, _SFR_IO_ADDR(SREG) ;Save flags | 127 | in r0, _SFR_IO_ADDR(SREG) ;Save flags |
128 | 128 | ||
129 | ldi r24, 0x80 ;Receiving shift reg | 129 | ldi r24, 0x80 ;Receiving shift reg |
130 | cli ;Start critical section | 130 | cli ;Start critical section |
131 | 131 | ||
132 | ;1: SKIP_IN_1 ;Wait for idle | 132 | ;1: SKIP_IN_1 ;Wait for idle |
133 | ; rjmp 1b | 133 | ; rjmp 1b |
134 | ;2: SKIP_IN_0 ;Wait for start bit | 134 | ;2: SKIP_IN_0 ;Wait for start bit |
135 | ; rjmp 2b | 135 | ; rjmp 2b |
136 | ldi r25, BPS/2 ;Wait for half bit time | 136 | ldi r25, BPS/2 ;Wait for half bit time |
137 | 3: dec r25 | 137 | 3: dec r25 |
138 | brne 3b | 138 | brne 3b |
139 | 139 | ||
140 | 4: ldi r25, BPS ;----- Bit receiving loop | 140 | 4: ldi r25, BPS ;----- Bit receiving loop |
141 | 5: dec r25 ;Wait for a bit time | 141 | 5: dec r25 ;Wait for a bit time |
142 | brne 5b ;/ | 142 | brne 5b ;/ |
143 | lsr r24 ;Next bit | 143 | lsr r24 ;Next bit |
144 | SKIP_IN_0 ;Get a data bit into r24.7 | 144 | SKIP_IN_0 ;Get a data bit into r24.7 |
145 | ori r24, 0x80 | 145 | ori r24, 0x80 |
146 | brcc 4b ;All bits received? no, continue | 146 | brcc 4b ;All bits received? no, continue |
147 | 147 | ||
148 | ldi r25, BPS/2 ;Wait for half bit time | 148 | ldi r25, BPS/2 ;Wait for half bit time |
149 | 6: dec r25 | 149 | 6: dec r25 |
150 | brne 6b | 150 | brne 6b |
151 | 7: SKIP_IN_1 ;Wait for stop bit | 151 | 7: SKIP_IN_1 ;Wait for stop bit |
152 | rjmp 7b | 152 | rjmp 7b |
153 | 153 | ||
154 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section | 154 | out _SFR_IO_ADDR(SREG), r0 ;End of critical section |
155 | ret | 155 | ret |
156 | .endfunc | 156 | .endfunc |
diff --git a/tmk_core/protocol/iwrap/suart.h b/tmk_core/protocol/iwrap/suart.h index 72725b998..7d92be069 100644 --- a/tmk_core/protocol/iwrap/suart.h +++ b/tmk_core/protocol/iwrap/suart.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef SUART | 1 | #ifndef SUART |
2 | #define SUART | 2 | #define SUART |
3 | 3 | ||
4 | void xmit(uint8_t); | 4 | void xmit(uint8_t); |
5 | uint8_t rcvr(void); | 5 | uint8_t rcvr(void); |
6 | uint8_t recv(void); | 6 | uint8_t recv(void); |
7 | 7 | ||
8 | #endif /* SUART */ | 8 | #endif /* SUART */ |
diff --git a/tmk_core/protocol/iwrap/wd.h b/tmk_core/protocol/iwrap/wd.h index 99058f033..12395bf69 100644 --- a/tmk_core/protocol/iwrap/wd.h +++ b/tmk_core/protocol/iwrap/wd.h | |||
@@ -1,159 +1,159 @@ | |||
1 | /* This is from http://www.mtcnet.net/~henryvm/wdt/ */ | 1 | /* This is from http://www.mtcnet.net/~henryvm/wdt/ */ |
2 | #ifndef _AVR_WD_H_ | 2 | #ifndef _AVR_WD_H_ |
3 | #define _AVR_WD_H_ | 3 | #define _AVR_WD_H_ |
4 | 4 | ||
5 | #include <avr/io.h> | 5 | #include <avr/io.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | Copyright (c) 2009, Curt Van Maanen | 8 | Copyright (c) 2009, Curt Van Maanen |
9 | 9 | ||
10 | Permission to use, copy, modify, and/or distribute this software for any | 10 | Permission to use, copy, modify, and/or distribute this software for any |
11 | purpose with or without fee is hereby granted, provided that the above | 11 | purpose with or without fee is hereby granted, provided that the above |
12 | copyright notice and this permission notice appear in all copies. | 12 | copyright notice and this permission notice appear in all copies. |
13 | 13 | ||
14 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 14 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
15 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 15 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
16 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 16 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
17 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | 17 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
18 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | 18 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
19 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 19 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
20 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 20 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
21 | 21 | ||
22 | 22 | ||
23 | include usage- | 23 | include usage- |
24 | #include "wd.h" //if in same directory as project | 24 | #include "wd.h" //if in same directory as project |
25 | #include <avr/wd.h> //if wd.h is in avr directory | 25 | #include <avr/wd.h> //if wd.h is in avr directory |
26 | 26 | ||
27 | set watchdog modes and prescale | 27 | set watchdog modes and prescale |
28 | 28 | ||
29 | usage- | 29 | usage- |
30 | WD_SET(mode,[timeout]); //prescale always set | 30 | WD_SET(mode,[timeout]); //prescale always set |
31 | 31 | ||
32 | modes- | 32 | modes- |
33 | WD_OFF disabled | 33 | WD_OFF disabled |
34 | WD_RST normal reset mode | 34 | WD_RST normal reset mode |
35 | WD_IRQ interrupt only mode (if supported) | 35 | WD_IRQ interrupt only mode (if supported) |
36 | WD_RST_IRQ interrupt+reset mode (if supported) | 36 | WD_RST_IRQ interrupt+reset mode (if supported) |
37 | 37 | ||
38 | timeout- | 38 | timeout- |
39 | WDTO_15MS default if no timeout provided | 39 | WDTO_15MS default if no timeout provided |
40 | WDTO_30MS | 40 | WDTO_30MS |
41 | WDTO_60MS | 41 | WDTO_60MS |
42 | WDTO_120MS | 42 | WDTO_120MS |
43 | WDTO_250MS | 43 | WDTO_250MS |
44 | WDTO_500MS | 44 | WDTO_500MS |
45 | WDTO_1S | 45 | WDTO_1S |
46 | WDTO_2S | 46 | WDTO_2S |
47 | WDTO_4S (if supported) | 47 | WDTO_4S (if supported) |
48 | WDTO_8S (if supported) | 48 | WDTO_8S (if supported) |
49 | 49 | ||
50 | examples- | 50 | examples- |
51 | WD_SET(WD_RST,WDTO_1S); //reset mode, 1s timeout | 51 | WD_SET(WD_RST,WDTO_1S); //reset mode, 1s timeout |
52 | WD_SET(WD_OFF); //watchdog disabled (if not fused on) | 52 | WD_SET(WD_OFF); //watchdog disabled (if not fused on) |
53 | WD_SET(WD_RST); //reset mode, 15ms (default timeout) | 53 | WD_SET(WD_RST); //reset mode, 15ms (default timeout) |
54 | WD_SET(WD_IRQ,WDTO_120MS); //interrupt only mode, 120ms timeout | 54 | WD_SET(WD_IRQ,WDTO_120MS); //interrupt only mode, 120ms timeout |
55 | WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout | 55 | WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout |
56 | 56 | ||
57 | 57 | ||
58 | for enhanced watchdogs, if the watchdog is not being used WDRF should be | 58 | for enhanced watchdogs, if the watchdog is not being used WDRF should be |
59 | cleared on every power up or reset, along with disabling the watchdog- | 59 | cleared on every power up or reset, along with disabling the watchdog- |
60 | WD_DISABLE(); //clear WDRF, then turn off watchdog | 60 | WD_DISABLE(); //clear WDRF, then turn off watchdog |
61 | 61 | ||
62 | */ | 62 | */ |
63 | 63 | ||
64 | //reset registers to the same name (MCUCSR) | 64 | //reset registers to the same name (MCUCSR) |
65 | #if !defined(MCUCSR) | 65 | #if !defined(MCUCSR) |
66 | #define MCUCSR MCUSR | 66 | #define MCUCSR MCUSR |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | //watchdog registers to the same name (WDTCSR) | 69 | //watchdog registers to the same name (WDTCSR) |
70 | #if !defined(WDTCSR) | 70 | #if !defined(WDTCSR) |
71 | #define WDTCSR WDTCR | 71 | #define WDTCSR WDTCR |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | //if enhanced watchdog, define irq values, create disable macro | 74 | //if enhanced watchdog, define irq values, create disable macro |
75 | #if defined(WDIF) | 75 | #if defined(WDIF) |
76 | #define WD_IRQ 0xC0 | 76 | #define WD_IRQ 0xC0 |
77 | #define WD_RST_IRQ 0xC8 | 77 | #define WD_RST_IRQ 0xC8 |
78 | #define WD_DISABLE() do{ \ | 78 | #define WD_DISABLE() do{ \ |
79 | MCUCSR &= ~(1<<WDRF); \ | 79 | MCUCSR &= ~(1<<WDRF); \ |
80 | WD_SET(WD_OFF); \ | 80 | WD_SET(WD_OFF); \ |
81 | }while(0) | 81 | }while(0) |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | //all watchdogs | 84 | //all watchdogs |
85 | #define WD_RST 8 | 85 | #define WD_RST 8 |
86 | #define WD_OFF 0 | 86 | #define WD_OFF 0 |
87 | 87 | ||
88 | //prescale values | 88 | //prescale values |
89 | #define WDTO_15MS 0 | 89 | #define WDTO_15MS 0 |
90 | #define WDTO_30MS 1 | 90 | #define WDTO_30MS 1 |
91 | #define WDTO_60MS 2 | 91 | #define WDTO_60MS 2 |
92 | #define WDTO_120MS 3 | 92 | #define WDTO_120MS 3 |
93 | #define WDTO_250MS 4 | 93 | #define WDTO_250MS 4 |
94 | #define WDTO_500MS 5 | 94 | #define WDTO_500MS 5 |
95 | #define WDTO_1S 6 | 95 | #define WDTO_1S 6 |
96 | #define WDTO_2S 7 | 96 | #define WDTO_2S 7 |
97 | 97 | ||
98 | //prescale values for avrs with WDP3 | 98 | //prescale values for avrs with WDP3 |
99 | #if defined(WDP3) | 99 | #if defined(WDP3) |
100 | #define WDTO_4S 0x20 | 100 | #define WDTO_4S 0x20 |
101 | #define WDTO_8S 0x21 | 101 | #define WDTO_8S 0x21 |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | //watchdog reset | 104 | //watchdog reset |
105 | #define WDR() __asm__ __volatile__("wdr") | 105 | #define WDR() __asm__ __volatile__("wdr") |
106 | 106 | ||
107 | //avr reset using watchdog | 107 | //avr reset using watchdog |
108 | #define WD_AVR_RESET() do{ \ | 108 | #define WD_AVR_RESET() do{ \ |
109 | __asm__ __volatile__("cli"); \ | 109 | __asm__ __volatile__("cli"); \ |
110 | WD_SET_UNSAFE(WD_RST); \ | 110 | WD_SET_UNSAFE(WD_RST); \ |
111 | while(1); \ | 111 | while(1); \ |
112 | }while(0) | 112 | }while(0) |
113 | 113 | ||
114 | /*set the watchdog- | 114 | /*set the watchdog- |
115 | 1. save SREG | 115 | 1. save SREG |
116 | 2. turn off irq's | 116 | 2. turn off irq's |
117 | 3. reset watchdog timer | 117 | 3. reset watchdog timer |
118 | 4. enable watchdog change | 118 | 4. enable watchdog change |
119 | 5. write watchdog value | 119 | 5. write watchdog value |
120 | 6. restore SREG (restoring irq status) | 120 | 6. restore SREG (restoring irq status) |
121 | */ | 121 | */ |
122 | #define WD_SET(val,...) \ | 122 | #define WD_SET(val,...) \ |
123 | __asm__ __volatile__( \ | 123 | __asm__ __volatile__( \ |
124 | "in __tmp_reg__,__SREG__" "\n\t" \ | 124 | "in __tmp_reg__,__SREG__" "\n\t" \ |
125 | "cli" "\n\t" \ | 125 | "cli" "\n\t" \ |
126 | "wdr" "\n\t" \ | 126 | "wdr" "\n\t" \ |
127 | "sts %[wdreg],%[wden]" "\n\t" \ | 127 | "sts %[wdreg],%[wden]" "\n\t" \ |
128 | "sts %[wdreg],%[wdval]" "\n\t" \ | 128 | "sts %[wdreg],%[wdval]" "\n\t" \ |
129 | "out __SREG__,__tmp_reg__" "\n\t" \ | 129 | "out __SREG__,__tmp_reg__" "\n\t" \ |
130 | : \ | 130 | : \ |
131 | : [wdreg] "M" (&WDTCSR), \ | 131 | : [wdreg] "M" (&WDTCSR), \ |
132 | [wden] "r" ((uint8_t)(0x18)), \ | 132 | [wden] "r" ((uint8_t)(0x18)), \ |
133 | [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0))) \ | 133 | [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0))) \ |
134 | : "r0" \ | 134 | : "r0" \ |
135 | ) | 135 | ) |
136 | 136 | ||
137 | /*set the watchdog when I bit in SREG known to be clear- | 137 | /*set the watchdog when I bit in SREG known to be clear- |
138 | 1. reset watchdog timer | 138 | 1. reset watchdog timer |
139 | 2. enable watchdog change | 139 | 2. enable watchdog change |
140 | 5. write watchdog value | 140 | 5. write watchdog value |
141 | */ | 141 | */ |
142 | #define WD_SET_UNSAFE(val,...) \ | 142 | #define WD_SET_UNSAFE(val,...) \ |
143 | __asm__ __volatile__( \ | 143 | __asm__ __volatile__( \ |
144 | "wdr" "\n\t" \ | 144 | "wdr" "\n\t" \ |
145 | "sts %[wdreg],%[wden]" "\n\t" \ | 145 | "sts %[wdreg],%[wden]" "\n\t" \ |
146 | "sts %[wdreg],%[wdval]" "\n\t" \ | 146 | "sts %[wdreg],%[wdval]" "\n\t" \ |
147 | : \ | 147 | : \ |
148 | : [wdreg] "M" (&WDTCSR), \ | 148 | : [wdreg] "M" (&WDTCSR), \ |
149 | [wden] "r" ((uint8_t)(0x18)), \ | 149 | [wden] "r" ((uint8_t)(0x18)), \ |
150 | [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0))) \ | 150 | [wdval] "r" ((uint8_t)(val|(__VA_ARGS__+0))) \ |
151 | ) | 151 | ) |
152 | 152 | ||
153 | 153 | ||
154 | //for compatibility with avr/wdt.h | 154 | //for compatibility with avr/wdt.h |
155 | #define wdt_enable(val) WD_SET(WD_RST,val) | 155 | #define wdt_enable(val) WD_SET(WD_RST,val) |
156 | #define wdt_disable() WD_SET(WD_OFF) | 156 | #define wdt_disable() WD_SET(WD_OFF) |
157 | 157 | ||
158 | 158 | ||
159 | #endif /* _AVR_WD_H_ */ | 159 | #endif /* _AVR_WD_H_ */ |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml index 72f3ff04c..02e7063c6 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml | |||
@@ -1,161 +1,161 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="CDC Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.128_4" force-caption="true" workspace-name="lufa_cdc_128kb_4kb_"> | 2 | <project caption="CDC Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.128_4" force-caption="true" workspace-name="lufa_cdc_128kb_4kb_"> |
3 | <require idref="lufa.bootloaders.cdc"/> | 3 | <require idref="lufa.bootloaders.cdc"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8"/> | 5 | <generator value="as5_8"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="none"/> | 8 | <config name="lufa.drivers.board.name" value="none"/> |
9 | 9 | ||
10 | <config name="config.compiler.optimization.level" value="size"/> | 10 | <config name="config.compiler.optimization.level" value="size"/> |
11 | 11 | ||
12 | <build type="define" name="F_CPU" value="16000000UL"/> | 12 | <build type="define" name="F_CPU" value="16000000UL"/> |
13 | <build type="define" name="F_USB" value="16000000UL"/> | 13 | <build type="define" name="F_USB" value="16000000UL"/> |
14 | 14 | ||
15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> | 15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> |
16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> | 16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> |
17 | 17 | ||
18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> | 18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> |
19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> | 20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> |
21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> | 22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> |
23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
24 | </project> | 24 | </project> |
25 | 25 | ||
26 | <project caption="CDC Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.64_4" force-caption="true" workspace-name="lufa_cdc_64kb_4kb_"> | 26 | <project caption="CDC Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.64_4" force-caption="true" workspace-name="lufa_cdc_64kb_4kb_"> |
27 | <require idref="lufa.bootloaders.cdc"/> | 27 | <require idref="lufa.bootloaders.cdc"/> |
28 | <require idref="lufa.boards.dummy.avr8"/> | 28 | <require idref="lufa.boards.dummy.avr8"/> |
29 | <generator value="as5_8"/> | 29 | <generator value="as5_8"/> |
30 | 30 | ||
31 | <device-support value="at90usb647"/> | 31 | <device-support value="at90usb647"/> |
32 | <config name="lufa.drivers.board.name" value="none"/> | 32 | <config name="lufa.drivers.board.name" value="none"/> |
33 | 33 | ||
34 | <config name="config.compiler.optimization.level" value="size"/> | 34 | <config name="config.compiler.optimization.level" value="size"/> |
35 | 35 | ||
36 | <build type="define" name="F_CPU" value="16000000UL"/> | 36 | <build type="define" name="F_CPU" value="16000000UL"/> |
37 | <build type="define" name="F_USB" value="16000000UL"/> | 37 | <build type="define" name="F_USB" value="16000000UL"/> |
38 | 38 | ||
39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> | 39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> |
40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> | 40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> |
41 | 41 | ||
42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> | 42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> |
43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> | 44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> |
45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> | 46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> |
47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
48 | </project> | 48 | </project> |
49 | 49 | ||
50 | <project caption="CDC Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.32_4" force-caption="true" workspace-name="lufa_cdc_32kb_4kb_"> | 50 | <project caption="CDC Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.32_4" force-caption="true" workspace-name="lufa_cdc_32kb_4kb_"> |
51 | <require idref="lufa.bootloaders.cdc"/> | 51 | <require idref="lufa.bootloaders.cdc"/> |
52 | <require idref="lufa.boards.dummy.avr8"/> | 52 | <require idref="lufa.boards.dummy.avr8"/> |
53 | <generator value="as5_8"/> | 53 | <generator value="as5_8"/> |
54 | 54 | ||
55 | <device-support value="atmega32u4"/> | 55 | <device-support value="atmega32u4"/> |
56 | <config name="lufa.drivers.board.name" value="none"/> | 56 | <config name="lufa.drivers.board.name" value="none"/> |
57 | 57 | ||
58 | <config name="config.compiler.optimization.level" value="size"/> | 58 | <config name="config.compiler.optimization.level" value="size"/> |
59 | 59 | ||
60 | <build type="define" name="F_CPU" value="16000000UL"/> | 60 | <build type="define" name="F_CPU" value="16000000UL"/> |
61 | <build type="define" name="F_USB" value="16000000UL"/> | 61 | <build type="define" name="F_USB" value="16000000UL"/> |
62 | 62 | ||
63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> | 63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> |
64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> | 64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> |
65 | 65 | ||
66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> | 66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> |
67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> | 68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> |
69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> | 70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> |
71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
72 | </project> | 72 | </project> |
73 | 73 | ||
74 | <project caption="CDC Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.16_4" force-caption="true" workspace-name="lufa_cdc_16kb_4kb_"> | 74 | <project caption="CDC Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.16_4" force-caption="true" workspace-name="lufa_cdc_16kb_4kb_"> |
75 | <require idref="lufa.bootloaders.cdc"/> | 75 | <require idref="lufa.bootloaders.cdc"/> |
76 | <require idref="lufa.boards.dummy.avr8"/> | 76 | <require idref="lufa.boards.dummy.avr8"/> |
77 | <generator value="as5_8"/> | 77 | <generator value="as5_8"/> |
78 | 78 | ||
79 | <device-support value="atmega16u2"/> | 79 | <device-support value="atmega16u2"/> |
80 | <config name="lufa.drivers.board.name" value="none"/> | 80 | <config name="lufa.drivers.board.name" value="none"/> |
81 | 81 | ||
82 | <config name="config.compiler.optimization.level" value="size"/> | 82 | <config name="config.compiler.optimization.level" value="size"/> |
83 | 83 | ||
84 | <build type="define" name="F_CPU" value="16000000UL"/> | 84 | <build type="define" name="F_CPU" value="16000000UL"/> |
85 | <build type="define" name="F_USB" value="16000000UL"/> | 85 | <build type="define" name="F_USB" value="16000000UL"/> |
86 | 86 | ||
87 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> | 87 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> |
88 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> | 88 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> |
89 | 89 | ||
90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> | 90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> |
91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> | 92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> |
93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
94 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> | 94 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> |
95 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 95 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
96 | </project> | 96 | </project> |
97 | 97 | ||
98 | <project caption="CDC Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.8_4" force-caption="true" workspace-name="lufa_cdc_8kb_4kb_"> | 98 | <project caption="CDC Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.cdc.avr8.8_4" force-caption="true" workspace-name="lufa_cdc_8kb_4kb_"> |
99 | <require idref="lufa.bootloaders.cdc"/> | 99 | <require idref="lufa.bootloaders.cdc"/> |
100 | <require idref="lufa.boards.dummy.avr8"/> | 100 | <require idref="lufa.boards.dummy.avr8"/> |
101 | <generator value="as5_8"/> | 101 | <generator value="as5_8"/> |
102 | 102 | ||
103 | <device-support value="atmega8u2"/> | 103 | <device-support value="atmega8u2"/> |
104 | <config name="lufa.drivers.board.name" value="none"/> | 104 | <config name="lufa.drivers.board.name" value="none"/> |
105 | 105 | ||
106 | <config name="config.compiler.optimization.level" value="size"/> | 106 | <config name="config.compiler.optimization.level" value="size"/> |
107 | 107 | ||
108 | <build type="define" name="F_CPU" value="16000000UL"/> | 108 | <build type="define" name="F_CPU" value="16000000UL"/> |
109 | <build type="define" name="F_USB" value="16000000UL"/> | 109 | <build type="define" name="F_USB" value="16000000UL"/> |
110 | 110 | ||
111 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> | 111 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> |
112 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> | 112 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> |
113 | 113 | ||
114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> | 114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> |
115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
116 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> | 116 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> |
117 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 117 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
118 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> | 118 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> |
119 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 119 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
120 | </project> | 120 | </project> |
121 | 121 | ||
122 | <module type="application" id="lufa.bootloaders.cdc" caption="CDC Bootloader"> | 122 | <module type="application" id="lufa.bootloaders.cdc" caption="CDC Bootloader"> |
123 | <info type="description" value="summary"> | 123 | <info type="description" value="summary"> |
124 | CDC Class Bootloader, capable of reprogramming a device using avrdude or other AVR109 protocol compliant software when plugged into a host. | 124 | CDC Class Bootloader, capable of reprogramming a device using avrdude or other AVR109 protocol compliant software when plugged into a host. |
125 | </info> | 125 | </info> |
126 | 126 | ||
127 | <info type="gui-flag" value="move-to-root"/> | 127 | <info type="gui-flag" value="move-to-root"/> |
128 | 128 | ||
129 | <info type="keyword" value="Technology"> | 129 | <info type="keyword" value="Technology"> |
130 | <keyword value="Bootloaders"/> | 130 | <keyword value="Bootloaders"/> |
131 | <keyword value="USB Device"/> | 131 | <keyword value="USB Device"/> |
132 | </info> | 132 | </info> |
133 | 133 | ||
134 | <device-support-alias value="lufa_avr8"/> | 134 | <device-support-alias value="lufa_avr8"/> |
135 | <device-support-alias value="lufa_xmega"/> | 135 | <device-support-alias value="lufa_xmega"/> |
136 | <device-support-alias value="lufa_uc3"/> | 136 | <device-support-alias value="lufa_uc3"/> |
137 | 137 | ||
138 | <build type="include-path" value="."/> | 138 | <build type="include-path" value="."/> |
139 | <build type="c-source" value="BootloaderCDC.c"/> | 139 | <build type="c-source" value="BootloaderCDC.c"/> |
140 | <build type="header-file" value="BootloaderCDC.h"/> | 140 | <build type="header-file" value="BootloaderCDC.h"/> |
141 | <build type="c-source" value="Descriptors.c"/> | 141 | <build type="c-source" value="Descriptors.c"/> |
142 | <build type="header-file" value="Descriptors.h"/> | 142 | <build type="header-file" value="Descriptors.h"/> |
143 | <build type="c-source" value="BootloaderAPI.c"/> | 143 | <build type="c-source" value="BootloaderAPI.c"/> |
144 | <build type="header-file" value="BootloaderAPI.h"/> | 144 | <build type="header-file" value="BootloaderAPI.h"/> |
145 | <build type="asm-source" value="BootloaderAPITable.S"/> | 145 | <build type="asm-source" value="BootloaderAPITable.S"/> |
146 | 146 | ||
147 | <build type="module-config" subtype="path" value="Config"/> | 147 | <build type="module-config" subtype="path" value="Config"/> |
148 | <build type="header-file" value="Config/LUFAConfig.h"/> | 148 | <build type="header-file" value="Config/LUFAConfig.h"/> |
149 | <build type="header-file" value="Config/AppConfig.h"/> | 149 | <build type="header-file" value="Config/AppConfig.h"/> |
150 | 150 | ||
151 | <build type="distribute" subtype="user-file" value="doxyfile"/> | 151 | <build type="distribute" subtype="user-file" value="doxyfile"/> |
152 | <build type="distribute" subtype="user-file" value="BootloaderCDC.txt"/> | 152 | <build type="distribute" subtype="user-file" value="BootloaderCDC.txt"/> |
153 | <build type="distribute" subtype="user-file" value="LUFA CDC Bootloader.inf"/> | 153 | <build type="distribute" subtype="user-file" value="LUFA CDC Bootloader.inf"/> |
154 | 154 | ||
155 | <require idref="lufa.common"/> | 155 | <require idref="lufa.common"/> |
156 | <require idref="lufa.platform"/> | 156 | <require idref="lufa.platform"/> |
157 | <require idref="lufa.drivers.usb"/> | 157 | <require idref="lufa.drivers.usb"/> |
158 | <require idref="lufa.drivers.board"/> | 158 | <require idref="lufa.drivers.board"/> |
159 | <require idref="lufa.drivers.board.leds"/> | 159 | <require idref="lufa.drivers.board.leds"/> |
160 | </module> | 160 | </module> |
161 | </asf> | 161 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml index 6f3312b76..f56aba69f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml | |||
@@ -1,156 +1,156 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="DFU Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.128_4" force-caption="true" workspace-name="lufa_dfu_128kb_4kb_"> | 2 | <project caption="DFU Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.128_4" force-caption="true" workspace-name="lufa_dfu_128kb_4kb_"> |
3 | <require idref="lufa.bootloaders.dfu"/> | 3 | <require idref="lufa.bootloaders.dfu"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8"/> | 5 | <generator value="as5_8"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="none"/> | 8 | <config name="lufa.drivers.board.name" value="none"/> |
9 | 9 | ||
10 | <config name="config.compiler.optimization.level" value="size"/> | 10 | <config name="config.compiler.optimization.level" value="size"/> |
11 | 11 | ||
12 | <build type="define" name="F_CPU" value="16000000UL"/> | 12 | <build type="define" name="F_CPU" value="16000000UL"/> |
13 | <build type="define" name="F_USB" value="16000000UL"/> | 13 | <build type="define" name="F_USB" value="16000000UL"/> |
14 | 14 | ||
15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> | 15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> |
16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> | 16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> |
17 | 17 | ||
18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> | 18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> |
19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> | 20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> |
21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> | 22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> |
23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
24 | </project> | 24 | </project> |
25 | 25 | ||
26 | <project caption="DFU Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.64_4" force-caption="true" workspace-name="lufa_dfu_64kb_4kb_"> | 26 | <project caption="DFU Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.64_4" force-caption="true" workspace-name="lufa_dfu_64kb_4kb_"> |
27 | <require idref="lufa.bootloaders.dfu"/> | 27 | <require idref="lufa.bootloaders.dfu"/> |
28 | <require idref="lufa.boards.dummy.avr8"/> | 28 | <require idref="lufa.boards.dummy.avr8"/> |
29 | <generator value="as5_8"/> | 29 | <generator value="as5_8"/> |
30 | 30 | ||
31 | <device-support value="at90usb647"/> | 31 | <device-support value="at90usb647"/> |
32 | <config name="lufa.drivers.board.name" value="none"/> | 32 | <config name="lufa.drivers.board.name" value="none"/> |
33 | 33 | ||
34 | <config name="config.compiler.optimization.level" value="size"/> | 34 | <config name="config.compiler.optimization.level" value="size"/> |
35 | 35 | ||
36 | <build type="define" name="F_CPU" value="16000000UL"/> | 36 | <build type="define" name="F_CPU" value="16000000UL"/> |
37 | <build type="define" name="F_USB" value="16000000UL"/> | 37 | <build type="define" name="F_USB" value="16000000UL"/> |
38 | 38 | ||
39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> | 39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> |
40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> | 40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> |
41 | 41 | ||
42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> | 42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> |
43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> | 44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> |
45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> | 46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> |
47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
48 | </project> | 48 | </project> |
49 | 49 | ||
50 | <project caption="DFU Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.32_4" force-caption="true" workspace-name="lufa_dfu_32kb_4kb_"> | 50 | <project caption="DFU Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.32_4" force-caption="true" workspace-name="lufa_dfu_32kb_4kb_"> |
51 | <require idref="lufa.bootloaders.dfu"/> | 51 | <require idref="lufa.bootloaders.dfu"/> |
52 | <require idref="lufa.boards.dummy.avr8"/> | 52 | <require idref="lufa.boards.dummy.avr8"/> |
53 | <generator value="as5_8"/> | 53 | <generator value="as5_8"/> |
54 | 54 | ||
55 | <device-support value="atmega32u4"/> | 55 | <device-support value="atmega32u4"/> |
56 | <config name="lufa.drivers.board.name" value="none"/> | 56 | <config name="lufa.drivers.board.name" value="none"/> |
57 | 57 | ||
58 | <config name="config.compiler.optimization.level" value="size"/> | 58 | <config name="config.compiler.optimization.level" value="size"/> |
59 | 59 | ||
60 | <build type="define" name="F_CPU" value="16000000UL"/> | 60 | <build type="define" name="F_CPU" value="16000000UL"/> |
61 | <build type="define" name="F_USB" value="16000000UL"/> | 61 | <build type="define" name="F_USB" value="16000000UL"/> |
62 | 62 | ||
63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> | 63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> |
64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> | 64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> |
65 | 65 | ||
66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> | 66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> |
67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> | 68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> |
69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> | 70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> |
71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
72 | </project> | 72 | </project> |
73 | 73 | ||
74 | <project caption="DFU Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.16_4" force-caption="true" workspace-name="lufa_dfu_16kb_4kb_"> | 74 | <project caption="DFU Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.16_4" force-caption="true" workspace-name="lufa_dfu_16kb_4kb_"> |
75 | <require idref="lufa.bootloaders.dfu"/> | 75 | <require idref="lufa.bootloaders.dfu"/> |
76 | <require idref="lufa.boards.dummy.avr8"/> | 76 | <require idref="lufa.boards.dummy.avr8"/> |
77 | <generator value="as5_8"/> | 77 | <generator value="as5_8"/> |
78 | 78 | ||
79 | <device-support value="atmega16u2"/> | 79 | <device-support value="atmega16u2"/> |
80 | <config name="lufa.drivers.board.name" value="none"/> | 80 | <config name="lufa.drivers.board.name" value="none"/> |
81 | 81 | ||
82 | <build type="define" name="F_CPU" value="16000000UL"/> | 82 | <build type="define" name="F_CPU" value="16000000UL"/> |
83 | <build type="define" name="F_USB" value="16000000UL"/> | 83 | <build type="define" name="F_USB" value="16000000UL"/> |
84 | 84 | ||
85 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> | 85 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> |
86 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> | 86 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> |
87 | 87 | ||
88 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> | 88 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> |
89 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 89 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> | 90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> |
91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> | 92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> |
93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
94 | </project> | 94 | </project> |
95 | 95 | ||
96 | <project caption="DFU Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.8_4" force-caption="true" workspace-name="lufa_dfu_8kb_4kb_"> | 96 | <project caption="DFU Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.dfu.avr8.8_4" force-caption="true" workspace-name="lufa_dfu_8kb_4kb_"> |
97 | <require idref="lufa.bootloaders.dfu"/> | 97 | <require idref="lufa.bootloaders.dfu"/> |
98 | <require idref="lufa.boards.dummy.avr8"/> | 98 | <require idref="lufa.boards.dummy.avr8"/> |
99 | <generator value="as5_8"/> | 99 | <generator value="as5_8"/> |
100 | 100 | ||
101 | <device-support value="atmega8u2"/> | 101 | <device-support value="atmega8u2"/> |
102 | <config name="lufa.drivers.board.name" value="none"/> | 102 | <config name="lufa.drivers.board.name" value="none"/> |
103 | 103 | ||
104 | <build type="define" name="F_CPU" value="16000000UL"/> | 104 | <build type="define" name="F_CPU" value="16000000UL"/> |
105 | <build type="define" name="F_USB" value="16000000UL"/> | 105 | <build type="define" name="F_USB" value="16000000UL"/> |
106 | 106 | ||
107 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> | 107 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> |
108 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> | 108 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> |
109 | 109 | ||
110 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> | 110 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> |
111 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 111 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
112 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> | 112 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> |
113 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 113 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> | 114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> |
115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
116 | </project> | 116 | </project> |
117 | 117 | ||
118 | <module type="application" id="lufa.bootloaders.dfu" caption="DFU Bootloader"> | 118 | <module type="application" id="lufa.bootloaders.dfu" caption="DFU Bootloader"> |
119 | <info type="description" value="summary"> | 119 | <info type="description" value="summary"> |
120 | DFU Class Bootloader, capable of reprogramming a device using the Atmel FLIP or other AVR DFU programming software when plugged into a host. | 120 | DFU Class Bootloader, capable of reprogramming a device using the Atmel FLIP or other AVR DFU programming software when plugged into a host. |
121 | </info> | 121 | </info> |
122 | 122 | ||
123 | <info type="gui-flag" value="move-to-root"/> | 123 | <info type="gui-flag" value="move-to-root"/> |
124 | 124 | ||
125 | <info type="keyword" value="Technology"> | 125 | <info type="keyword" value="Technology"> |
126 | <keyword value="Bootloaders"/> | 126 | <keyword value="Bootloaders"/> |
127 | <keyword value="USB Device"/> | 127 | <keyword value="USB Device"/> |
128 | </info> | 128 | </info> |
129 | 129 | ||
130 | <device-support-alias value="lufa_avr8"/> | 130 | <device-support-alias value="lufa_avr8"/> |
131 | <device-support-alias value="lufa_xmega"/> | 131 | <device-support-alias value="lufa_xmega"/> |
132 | <device-support-alias value="lufa_uc3"/> | 132 | <device-support-alias value="lufa_uc3"/> |
133 | 133 | ||
134 | <build type="include-path" value="."/> | 134 | <build type="include-path" value="."/> |
135 | <build type="c-source" value="BootloaderDFU.c"/> | 135 | <build type="c-source" value="BootloaderDFU.c"/> |
136 | <build type="header-file" value="BootloaderDFU.h"/> | 136 | <build type="header-file" value="BootloaderDFU.h"/> |
137 | <build type="c-source" value="Descriptors.c"/> | 137 | <build type="c-source" value="Descriptors.c"/> |
138 | <build type="header-file" value="Descriptors.h"/> | 138 | <build type="header-file" value="Descriptors.h"/> |
139 | <build type="c-source" value="BootloaderAPI.c"/> | 139 | <build type="c-source" value="BootloaderAPI.c"/> |
140 | <build type="header-file" value="BootloaderAPI.h"/> | 140 | <build type="header-file" value="BootloaderAPI.h"/> |
141 | <build type="asm-source" value="BootloaderAPITable.S"/> | 141 | <build type="asm-source" value="BootloaderAPITable.S"/> |
142 | 142 | ||
143 | <build type="module-config" subtype="path" value="Config"/> | 143 | <build type="module-config" subtype="path" value="Config"/> |
144 | <build type="header-file" value="Config/LUFAConfig.h"/> | 144 | <build type="header-file" value="Config/LUFAConfig.h"/> |
145 | <build type="header-file" value="Config/AppConfig.h"/> | 145 | <build type="header-file" value="Config/AppConfig.h"/> |
146 | 146 | ||
147 | <build type="distribute" subtype="user-file" value="doxyfile"/> | 147 | <build type="distribute" subtype="user-file" value="doxyfile"/> |
148 | <build type="distribute" subtype="user-file" value="BootloaderDFU.txt"/> | 148 | <build type="distribute" subtype="user-file" value="BootloaderDFU.txt"/> |
149 | 149 | ||
150 | <require idref="lufa.common"/> | 150 | <require idref="lufa.common"/> |
151 | <require idref="lufa.platform"/> | 151 | <require idref="lufa.platform"/> |
152 | <require idref="lufa.drivers.usb"/> | 152 | <require idref="lufa.drivers.usb"/> |
153 | <require idref="lufa.drivers.board"/> | 153 | <require idref="lufa.drivers.board"/> |
154 | <require idref="lufa.drivers.board.leds"/> | 154 | <require idref="lufa.drivers.board.leds"/> |
155 | </module> | 155 | </module> |
156 | </asf> | 156 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml index 9394b1353..c67b9419e 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml | |||
@@ -1,123 +1,123 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="HID Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.128_4" force-caption="true" workspace-name="lufa_hid_128kb_4kb_"> | 2 | <project caption="HID Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.128_4" force-caption="true" workspace-name="lufa_hid_128kb_4kb_"> |
3 | <require idref="lufa.bootloaders.hid"/> | 3 | <require idref="lufa.bootloaders.hid"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8"/> | 5 | <generator value="as5_8"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="none"/> | 8 | <config name="lufa.drivers.board.name" value="none"/> |
9 | 9 | ||
10 | <config name="config.compiler.optimization.level" value="size"/> | 10 | <config name="config.compiler.optimization.level" value="size"/> |
11 | 11 | ||
12 | <build type="define" name="F_CPU" value="16000000UL"/> | 12 | <build type="define" name="F_CPU" value="16000000UL"/> |
13 | <build type="define" name="F_USB" value="16000000UL"/> | 13 | <build type="define" name="F_USB" value="16000000UL"/> |
14 | 14 | ||
15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> | 15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> |
16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> | 16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> |
17 | </project> | 17 | </project> |
18 | 18 | ||
19 | <project caption="HID Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.64_4" force-caption="true" workspace-name="lufa_hid_64kb_4kb_"> | 19 | <project caption="HID Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.64_4" force-caption="true" workspace-name="lufa_hid_64kb_4kb_"> |
20 | <require idref="lufa.bootloaders.hid"/> | 20 | <require idref="lufa.bootloaders.hid"/> |
21 | <require idref="lufa.boards.dummy.avr8"/> | 21 | <require idref="lufa.boards.dummy.avr8"/> |
22 | <generator value="as5_8"/> | 22 | <generator value="as5_8"/> |
23 | 23 | ||
24 | <device-support value="at90usb647"/> | 24 | <device-support value="at90usb647"/> |
25 | <config name="lufa.drivers.board.name" value="none"/> | 25 | <config name="lufa.drivers.board.name" value="none"/> |
26 | 26 | ||
27 | <config name="config.compiler.optimization.level" value="size"/> | 27 | <config name="config.compiler.optimization.level" value="size"/> |
28 | 28 | ||
29 | <build type="define" name="F_CPU" value="16000000UL"/> | 29 | <build type="define" name="F_CPU" value="16000000UL"/> |
30 | <build type="define" name="F_USB" value="16000000UL"/> | 30 | <build type="define" name="F_USB" value="16000000UL"/> |
31 | 31 | ||
32 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> | 32 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> |
33 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> | 33 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> |
34 | </project> | 34 | </project> |
35 | 35 | ||
36 | <project caption="HID Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.32_4" force-caption="true" workspace-name="lufa_hid_32kb_4kb_"> | 36 | <project caption="HID Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.32_4" force-caption="true" workspace-name="lufa_hid_32kb_4kb_"> |
37 | <require idref="lufa.bootloaders.hid"/> | 37 | <require idref="lufa.bootloaders.hid"/> |
38 | <require idref="lufa.boards.dummy.avr8"/> | 38 | <require idref="lufa.boards.dummy.avr8"/> |
39 | <generator value="as5_8"/> | 39 | <generator value="as5_8"/> |
40 | 40 | ||
41 | <device-support value="atmega32u4"/> | 41 | <device-support value="atmega32u4"/> |
42 | <config name="lufa.drivers.board.name" value="none"/> | 42 | <config name="lufa.drivers.board.name" value="none"/> |
43 | 43 | ||
44 | <config name="config.compiler.optimization.level" value="size"/> | 44 | <config name="config.compiler.optimization.level" value="size"/> |
45 | 45 | ||
46 | <build type="define" name="F_CPU" value="16000000UL"/> | 46 | <build type="define" name="F_CPU" value="16000000UL"/> |
47 | <build type="define" name="F_USB" value="16000000UL"/> | 47 | <build type="define" name="F_USB" value="16000000UL"/> |
48 | 48 | ||
49 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> | 49 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> |
50 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> | 50 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> |
51 | </project> | 51 | </project> |
52 | 52 | ||
53 | <project caption="HID Bootloader - 16KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.16_2" force-caption="true" workspace-name="lufa_hid_16kb_2kb_"> | 53 | <project caption="HID Bootloader - 16KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.16_2" force-caption="true" workspace-name="lufa_hid_16kb_2kb_"> |
54 | <require idref="lufa.bootloaders.hid"/> | 54 | <require idref="lufa.bootloaders.hid"/> |
55 | <require idref="lufa.boards.dummy.avr8"/> | 55 | <require idref="lufa.boards.dummy.avr8"/> |
56 | <generator value="as5_8"/> | 56 | <generator value="as5_8"/> |
57 | 57 | ||
58 | <device-support value="atmega16u2"/> | 58 | <device-support value="atmega16u2"/> |
59 | <config name="lufa.drivers.board.name" value="none"/> | 59 | <config name="lufa.drivers.board.name" value="none"/> |
60 | 60 | ||
61 | <config name="config.compiler.optimization.level" value="size"/> | 61 | <config name="config.compiler.optimization.level" value="size"/> |
62 | 62 | ||
63 | <build type="define" name="F_CPU" value="16000000UL"/> | 63 | <build type="define" name="F_CPU" value="16000000UL"/> |
64 | <build type="define" name="F_USB" value="16000000UL"/> | 64 | <build type="define" name="F_USB" value="16000000UL"/> |
65 | 65 | ||
66 | <build type="define" name="BOOT_START_ADDR" value="0x3800"/> | 66 | <build type="define" name="BOOT_START_ADDR" value="0x3800"/> |
67 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/> | 67 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/> |
68 | </project> | 68 | </project> |
69 | 69 | ||
70 | <project caption="HID Bootloader - 8KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.8_2" force-caption="true" workspace-name="lufa_hid_8kb_2kb_"> | 70 | <project caption="HID Bootloader - 8KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.8_2" force-caption="true" workspace-name="lufa_hid_8kb_2kb_"> |
71 | <require idref="lufa.bootloaders.hid"/> | 71 | <require idref="lufa.bootloaders.hid"/> |
72 | <require idref="lufa.boards.dummy.avr8"/> | 72 | <require idref="lufa.boards.dummy.avr8"/> |
73 | <generator value="as5_8"/> | 73 | <generator value="as5_8"/> |
74 | 74 | ||
75 | <device-support value="atmega8u2"/> | 75 | <device-support value="atmega8u2"/> |
76 | <config name="lufa.drivers.board.name" value="none"/> | 76 | <config name="lufa.drivers.board.name" value="none"/> |
77 | 77 | ||
78 | <config name="config.compiler.optimization.level" value="size"/> | 78 | <config name="config.compiler.optimization.level" value="size"/> |
79 | 79 | ||
80 | <build type="define" name="F_CPU" value="16000000UL"/> | 80 | <build type="define" name="F_CPU" value="16000000UL"/> |
81 | <build type="define" name="F_USB" value="16000000UL"/> | 81 | <build type="define" name="F_USB" value="16000000UL"/> |
82 | 82 | ||
83 | <build type="define" name="BOOT_START_ADDR" value="0x1800"/> | 83 | <build type="define" name="BOOT_START_ADDR" value="0x1800"/> |
84 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/> | 84 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/> |
85 | </project> | 85 | </project> |
86 | 86 | ||
87 | <module type="application" id="lufa.bootloaders.hid" caption="HID Bootloader"> | 87 | <module type="application" id="lufa.bootloaders.hid" caption="HID Bootloader"> |
88 | <info type="description" value="summary"> | 88 | <info type="description" value="summary"> |
89 | HID Class Bootloader, capable of reprogramming a device via a custom cross-platform command line utility when plugged into a host. | 89 | HID Class Bootloader, capable of reprogramming a device via a custom cross-platform command line utility when plugged into a host. |
90 | </info> | 90 | </info> |
91 | 91 | ||
92 | <info type="gui-flag" value="move-to-root"/> | 92 | <info type="gui-flag" value="move-to-root"/> |
93 | 93 | ||
94 | <info type="keyword" value="Technology"> | 94 | <info type="keyword" value="Technology"> |
95 | <keyword value="Bootloaders"/> | 95 | <keyword value="Bootloaders"/> |
96 | <keyword value="USB Device"/> | 96 | <keyword value="USB Device"/> |
97 | </info> | 97 | </info> |
98 | 98 | ||
99 | <device-support-alias value="lufa_avr8"/> | 99 | <device-support-alias value="lufa_avr8"/> |
100 | <device-support-alias value="lufa_xmega"/> | 100 | <device-support-alias value="lufa_xmega"/> |
101 | <device-support-alias value="lufa_uc3"/> | 101 | <device-support-alias value="lufa_uc3"/> |
102 | 102 | ||
103 | <build type="include-path" value="."/> | 103 | <build type="include-path" value="."/> |
104 | <build type="c-source" value="BootloaderHID.c"/> | 104 | <build type="c-source" value="BootloaderHID.c"/> |
105 | <build type="header-file" value="BootloaderHID.h"/> | 105 | <build type="header-file" value="BootloaderHID.h"/> |
106 | <build type="c-source" value="Descriptors.c"/> | 106 | <build type="c-source" value="Descriptors.c"/> |
107 | <build type="header-file" value="Descriptors.h"/> | 107 | <build type="header-file" value="Descriptors.h"/> |
108 | 108 | ||
109 | <build type="module-config" subtype="path" value="Config"/> | 109 | <build type="module-config" subtype="path" value="Config"/> |
110 | <build type="header-file" value="Config/LUFAConfig.h"/> | 110 | <build type="header-file" value="Config/LUFAConfig.h"/> |
111 | 111 | ||
112 | <build type="distribute" subtype="user-file" value="doxyfile"/> | 112 | <build type="distribute" subtype="user-file" value="doxyfile"/> |
113 | <build type="distribute" subtype="user-file" value="BootloaderHID.txt"/> | 113 | <build type="distribute" subtype="user-file" value="BootloaderHID.txt"/> |
114 | <build type="distribute" subtype="directory" value="HostLoaderApp"/> | 114 | <build type="distribute" subtype="directory" value="HostLoaderApp"/> |
115 | <build type="distribute" subtype="directory" value="HostLoaderApp_Python"/> | 115 | <build type="distribute" subtype="directory" value="HostLoaderApp_Python"/> |
116 | 116 | ||
117 | <require idref="lufa.common"/> | 117 | <require idref="lufa.common"/> |
118 | <require idref="lufa.platform"/> | 118 | <require idref="lufa.platform"/> |
119 | <require idref="lufa.drivers.usb"/> | 119 | <require idref="lufa.drivers.usb"/> |
120 | <require idref="lufa.drivers.board"/> | 120 | <require idref="lufa.drivers.board"/> |
121 | <require idref="lufa.drivers.board.leds"/> | 121 | <require idref="lufa.drivers.board.leds"/> |
122 | </module> | 122 | </module> |
123 | </asf> | 123 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S index 6844d4b01..91fc94966 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S | |||
@@ -1,102 +1,102 @@ | |||
1 | /* | 1 | /* |
2 | LUFA Library | 2 | LUFA Library |
3 | Copyright (C) Dean Camera, 2014. | 3 | Copyright (C) Dean Camera, 2014. |
4 | 4 | ||
5 | dean [at] fourwalledcubicle [dot] com | 5 | dean [at] fourwalledcubicle [dot] com |
6 | www.lufa-lib.org | 6 | www.lufa-lib.org |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* | 9 | /* |
10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) | 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) |
11 | 11 | ||
12 | Permission to use, copy, modify, distribute, and sell this | 12 | Permission to use, copy, modify, distribute, and sell this |
13 | software and its documentation for any purpose is hereby granted | 13 | software and its documentation for any purpose is hereby granted |
14 | without fee, provided that the above copyright notice appear in | 14 | without fee, provided that the above copyright notice appear in |
15 | all copies and that both that the copyright notice and this | 15 | all copies and that both that the copyright notice and this |
16 | permission notice and warranty disclaimer appear in supporting | 16 | permission notice and warranty disclaimer appear in supporting |
17 | documentation, and that the name of the author not be used in | 17 | documentation, and that the name of the author not be used in |
18 | advertising or publicity pertaining to distribution of the | 18 | advertising or publicity pertaining to distribution of the |
19 | software without specific, written prior permission. | 19 | software without specific, written prior permission. |
20 | 20 | ||
21 | The author disclaims all warranties with regard to this | 21 | The author disclaims all warranties with regard to this |
22 | software, including all implied warranties of merchantability | 22 | software, including all implied warranties of merchantability |
23 | and fitness. In no event shall the author be liable for any | 23 | and fitness. In no event shall the author be liable for any |
24 | special, indirect or consequential damages or any damages | 24 | special, indirect or consequential damages or any damages |
25 | whatsoever resulting from loss of use, data or profits, whether | 25 | whatsoever resulting from loss of use, data or profits, whether |
26 | in an action of contract, negligence or other tortious action, | 26 | in an action of contract, negligence or other tortious action, |
27 | arising out of or in connection with the use or performance of | 27 | arising out of or in connection with the use or performance of |
28 | this software. | 28 | this software. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #if AUX_BOOT_SECTION_SIZE > 0 | 31 | #if AUX_BOOT_SECTION_SIZE > 0 |
32 | #warning Using a AUX bootloader section in addition to the defined bootloader space (see documentation). | 32 | #warning Using a AUX bootloader section in addition to the defined bootloader space (see documentation). |
33 | 33 | ||
34 | ; Trampoline to jump over the AUX bootloader section to the start of the bootloader, | 34 | ; Trampoline to jump over the AUX bootloader section to the start of the bootloader, |
35 | ; on devices where an AUX bootloader section is used. | 35 | ; on devices where an AUX bootloader section is used. |
36 | .section .boot_aux_trampoline, "ax" | 36 | .section .boot_aux_trampoline, "ax" |
37 | .global Boot_AUX_Trampoline | 37 | .global Boot_AUX_Trampoline |
38 | Boot_AUX_Trampoline: | 38 | Boot_AUX_Trampoline: |
39 | jmp BOOT_START_ADDR | 39 | jmp BOOT_START_ADDR |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | ; Trampolines to actual API implementations if the target address is outside the | 42 | ; Trampolines to actual API implementations if the target address is outside the |
43 | ; range of a rjmp instruction (can happen with large bootloader sections) | 43 | ; range of a rjmp instruction (can happen with large bootloader sections) |
44 | .section .apitable_trampolines, "ax" | 44 | .section .apitable_trampolines, "ax" |
45 | .global BootloaderAPI_Trampolines | 45 | .global BootloaderAPI_Trampolines |
46 | BootloaderAPI_Trampolines: | 46 | BootloaderAPI_Trampolines: |
47 | 47 | ||
48 | BootloaderAPI_ErasePage_Trampoline: | 48 | BootloaderAPI_ErasePage_Trampoline: |
49 | jmp BootloaderAPI_ErasePage | 49 | jmp BootloaderAPI_ErasePage |
50 | BootloaderAPI_WritePage_Trampoline: | 50 | BootloaderAPI_WritePage_Trampoline: |
51 | jmp BootloaderAPI_WritePage | 51 | jmp BootloaderAPI_WritePage |
52 | BootloaderAPI_FillWord_Trampoline: | 52 | BootloaderAPI_FillWord_Trampoline: |
53 | jmp BootloaderAPI_FillWord | 53 | jmp BootloaderAPI_FillWord |
54 | BootloaderAPI_ReadSignature_Trampoline: | 54 | BootloaderAPI_ReadSignature_Trampoline: |
55 | jmp BootloaderAPI_ReadSignature | 55 | jmp BootloaderAPI_ReadSignature |
56 | BootloaderAPI_ReadFuse_Trampoline: | 56 | BootloaderAPI_ReadFuse_Trampoline: |
57 | jmp BootloaderAPI_ReadFuse | 57 | jmp BootloaderAPI_ReadFuse |
58 | BootloaderAPI_ReadLock_Trampoline: | 58 | BootloaderAPI_ReadLock_Trampoline: |
59 | jmp BootloaderAPI_ReadLock | 59 | jmp BootloaderAPI_ReadLock |
60 | BootloaderAPI_WriteLock_Trampoline: | 60 | BootloaderAPI_WriteLock_Trampoline: |
61 | jmp BootloaderAPI_WriteLock | 61 | jmp BootloaderAPI_WriteLock |
62 | BootloaderAPI_UNUSED1: | 62 | BootloaderAPI_UNUSED1: |
63 | ret | 63 | ret |
64 | BootloaderAPI_UNUSED2: | 64 | BootloaderAPI_UNUSED2: |
65 | ret | 65 | ret |
66 | BootloaderAPI_UNUSED3: | 66 | BootloaderAPI_UNUSED3: |
67 | ret | 67 | ret |
68 | BootloaderAPI_UNUSED4: | 68 | BootloaderAPI_UNUSED4: |
69 | ret | 69 | ret |
70 | BootloaderAPI_UNUSED5: | 70 | BootloaderAPI_UNUSED5: |
71 | ret | 71 | ret |
72 | 72 | ||
73 | 73 | ||
74 | 74 | ||
75 | ; API function jump table | 75 | ; API function jump table |
76 | .section .apitable_jumptable, "ax" | 76 | .section .apitable_jumptable, "ax" |
77 | .global BootloaderAPI_JumpTable | 77 | .global BootloaderAPI_JumpTable |
78 | BootloaderAPI_JumpTable: | 78 | BootloaderAPI_JumpTable: |
79 | 79 | ||
80 | rjmp BootloaderAPI_ErasePage_Trampoline | 80 | rjmp BootloaderAPI_ErasePage_Trampoline |
81 | rjmp BootloaderAPI_WritePage_Trampoline | 81 | rjmp BootloaderAPI_WritePage_Trampoline |
82 | rjmp BootloaderAPI_FillWord_Trampoline | 82 | rjmp BootloaderAPI_FillWord_Trampoline |
83 | rjmp BootloaderAPI_ReadSignature_Trampoline | 83 | rjmp BootloaderAPI_ReadSignature_Trampoline |
84 | rjmp BootloaderAPI_ReadFuse_Trampoline | 84 | rjmp BootloaderAPI_ReadFuse_Trampoline |
85 | rjmp BootloaderAPI_ReadLock_Trampoline | 85 | rjmp BootloaderAPI_ReadLock_Trampoline |
86 | rjmp BootloaderAPI_WriteLock_Trampoline | 86 | rjmp BootloaderAPI_WriteLock_Trampoline |
87 | rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1 | 87 | rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1 |
88 | rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2 | 88 | rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2 |
89 | rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3 | 89 | rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3 |
90 | rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4 | 90 | rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4 |
91 | rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5 | 91 | rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5 |
92 | 92 | ||
93 | 93 | ||
94 | 94 | ||
95 | ; Bootloader table signatures and information | 95 | ; Bootloader table signatures and information |
96 | .section .apitable_signatures, "ax" | 96 | .section .apitable_signatures, "ax" |
97 | .global BootloaderAPI_Signatures | 97 | .global BootloaderAPI_Signatures |
98 | BootloaderAPI_Signatures: | 98 | BootloaderAPI_Signatures: |
99 | 99 | ||
100 | .long BOOT_START_ADDR ; Start address of the bootloader | 100 | .long BOOT_START_ADDR ; Start address of the bootloader |
101 | .word 0xDF30 ; Signature for the MS class bootloader, V1 | 101 | .word 0xDF30 ; Signature for the MS class bootloader, V1 |
102 | .word 0xDCFB ; Signature for a LUFA class bootloader | 102 | .word 0xDCFB ; Signature for a LUFA class bootloader |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml index f1d550d1e..700ffa26f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml | |||
@@ -1,156 +1,156 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="Mass Storage Bootloader - 128KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.128_8" force-caption="true" workspace-name="lufa_ms_128kb_8kb_"> | 2 | <project caption="Mass Storage Bootloader - 128KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.128_8" force-caption="true" workspace-name="lufa_ms_128kb_8kb_"> |
3 | <require idref="lufa.bootloaders.mass_storage"/> | 3 | <require idref="lufa.bootloaders.mass_storage"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8"/> | 5 | <generator value="as5_8"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="none"/> | 8 | <config name="lufa.drivers.board.name" value="none"/> |
9 | 9 | ||
10 | <config name="config.compiler.optimization.level" value="size"/> | 10 | <config name="config.compiler.optimization.level" value="size"/> |
11 | 11 | ||
12 | <build type="define" name="F_CPU" value="16000000UL"/> | 12 | <build type="define" name="F_CPU" value="16000000UL"/> |
13 | <build type="define" name="F_USB" value="16000000UL"/> | 13 | <build type="define" name="F_USB" value="16000000UL"/> |
14 | 14 | ||
15 | <build type="define" name="BOOT_START_ADDR" value="0x1E000"/> | 15 | <build type="define" name="BOOT_START_ADDR" value="0x1E000"/> |
16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/> | 16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/> |
17 | 17 | ||
18 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/> | 18 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/> |
19 | 19 | ||
20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> | 20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> |
21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> | 22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> |
23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
24 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> | 24 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> |
25 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 25 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
26 | </project> | 26 | </project> |
27 | 27 | ||
28 | <project caption="Mass Storage Bootloader - 64KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.64_8" force-caption="true" workspace-name="lufa_ms_64kb_8kb_"> | 28 | <project caption="Mass Storage Bootloader - 64KB FLASH / 8KB Boot - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.64_8" force-caption="true" workspace-name="lufa_ms_64kb_8kb_"> |
29 | <require idref="lufa.bootloaders.mass_storage"/> | 29 | <require idref="lufa.bootloaders.mass_storage"/> |
30 | <require idref="lufa.boards.dummy.avr8"/> | 30 | <require idref="lufa.boards.dummy.avr8"/> |
31 | <generator value="as5_8"/> | 31 | <generator value="as5_8"/> |
32 | 32 | ||
33 | <device-support value="at90usb647"/> | 33 | <device-support value="at90usb647"/> |
34 | <config name="lufa.drivers.board.name" value="none"/> | 34 | <config name="lufa.drivers.board.name" value="none"/> |
35 | 35 | ||
36 | <config name="config.compiler.optimization.level" value="size"/> | 36 | <config name="config.compiler.optimization.level" value="size"/> |
37 | 37 | ||
38 | <build type="define" name="F_CPU" value="16000000UL"/> | 38 | <build type="define" name="F_CPU" value="16000000UL"/> |
39 | <build type="define" name="F_USB" value="16000000UL"/> | 39 | <build type="define" name="F_USB" value="16000000UL"/> |
40 | 40 | ||
41 | <build type="define" name="BOOT_START_ADDR" value="0xE000"/> | 41 | <build type="define" name="BOOT_START_ADDR" value="0xE000"/> |
42 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/> | 42 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/> |
43 | 43 | ||
44 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/> | 44 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="0"/> |
45 | 45 | ||
46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> | 46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> |
47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
48 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> | 48 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> |
49 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 49 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
50 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> | 50 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> |
51 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 51 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
52 | </project> | 52 | </project> |
53 | 53 | ||
54 | <project caption="Mass Storage Bootloader - 32KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.32_4" force-caption="true" workspace-name="lufa_ms_32kb_4kb_"> | 54 | <project caption="Mass Storage Bootloader - 32KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.32_4" force-caption="true" workspace-name="lufa_ms_32kb_4kb_"> |
55 | <require idref="lufa.bootloaders.mass_storage"/> | 55 | <require idref="lufa.bootloaders.mass_storage"/> |
56 | <require idref="lufa.boards.dummy.avr8"/> | 56 | <require idref="lufa.boards.dummy.avr8"/> |
57 | <generator value="as5_8"/> | 57 | <generator value="as5_8"/> |
58 | 58 | ||
59 | <device-support value="atmega32u4"/> | 59 | <device-support value="atmega32u4"/> |
60 | <config name="lufa.drivers.board.name" value="none"/> | 60 | <config name="lufa.drivers.board.name" value="none"/> |
61 | 61 | ||
62 | <config name="config.compiler.optimization.level" value="size"/> | 62 | <config name="config.compiler.optimization.level" value="size"/> |
63 | 63 | ||
64 | <build type="define" name="F_CPU" value="16000000UL"/> | 64 | <build type="define" name="F_CPU" value="16000000UL"/> |
65 | <build type="define" name="F_USB" value="16000000UL"/> | 65 | <build type="define" name="F_USB" value="16000000UL"/> |
66 | 66 | ||
67 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> | 67 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> |
68 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> | 68 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> |
69 | 69 | ||
70 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/> | 70 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/> |
71 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x6810"/> | 71 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x6810"/> |
72 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x6800"/> | 72 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x6800"/> |
73 | <build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/> | 73 | <build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/> |
74 | 74 | ||
75 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> | 75 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> |
76 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 76 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
77 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> | 77 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> |
78 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 78 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
79 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> | 79 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> |
80 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 80 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
81 | </project> | 81 | </project> |
82 | 82 | ||
83 | <project caption="Mass Storage Bootloader - 16KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.16_4" force-caption="true" workspace-name="lufa_ms_16kb_4kb_"> | 83 | <project caption="Mass Storage Bootloader - 16KB FLASH / 4KB Boot (2KB AUX) - AVR8 Architecture" id="lufa.bootloaders.mass_storage.avr8.16_4" force-caption="true" workspace-name="lufa_ms_16kb_4kb_"> |
84 | <require idref="lufa.bootloaders.mass_storage"/> | 84 | <require idref="lufa.bootloaders.mass_storage"/> |
85 | <require idref="lufa.boards.dummy.avr8"/> | 85 | <require idref="lufa.boards.dummy.avr8"/> |
86 | <generator value="as5_8"/> | 86 | <generator value="as5_8"/> |
87 | 87 | ||
88 | <device-support value="atmega16u2"/> | 88 | <device-support value="atmega16u2"/> |
89 | <config name="lufa.drivers.board.name" value="none"/> | 89 | <config name="lufa.drivers.board.name" value="none"/> |
90 | 90 | ||
91 | <config name="config.compiler.optimization.level" value="size"/> | 91 | <config name="config.compiler.optimization.level" value="size"/> |
92 | 92 | ||
93 | <build type="define" name="F_CPU" value="16000000UL"/> | 93 | <build type="define" name="F_CPU" value="16000000UL"/> |
94 | <build type="define" name="F_USB" value="16000000UL"/> | 94 | <build type="define" name="F_USB" value="16000000UL"/> |
95 | 95 | ||
96 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> | 96 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> |
97 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> | 97 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> |
98 | 98 | ||
99 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/> | 99 | <build type="define" name="AUX_BOOT_SECTION_SIZE" value="2048"/> |
100 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x2810"/> | 100 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux=0x2810"/> |
101 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x2800"/> | 101 | <build type="linker-config" subtype="flags" value="--section-start=.boot_aux_trampoline=0x2800"/> |
102 | <build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/> | 102 | <build type="linker-config" subtype="flags" value="--undefined=Boot_AUX_Trampoline"/> |
103 | 103 | ||
104 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> | 104 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> |
105 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 105 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
106 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> | 106 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> |
107 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 107 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
108 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> | 108 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> |
109 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 109 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
110 | </project> | 110 | </project> |
111 | 111 | ||
112 | <module type="application" id="lufa.bootloaders.mass_storage" caption="Mass Storage Bootloader"> | 112 | <module type="application" id="lufa.bootloaders.mass_storage" caption="Mass Storage Bootloader"> |
113 | <info type="description" value="summary"> | 113 | <info type="description" value="summary"> |
114 | Mass Storage Class Bootloader, capable of reprogramming a device via binary BIN files copied to the virtual FAT12 file-system it creates when plugged into a host. | 114 | Mass Storage Class Bootloader, capable of reprogramming a device via binary BIN files copied to the virtual FAT12 file-system it creates when plugged into a host. |
115 | </info> | 115 | </info> |
116 | 116 | ||
117 | <info type="gui-flag" value="move-to-root"/> | 117 | <info type="gui-flag" value="move-to-root"/> |
118 | 118 | ||
119 | <info type="keyword" value="Technology"> | 119 | <info type="keyword" value="Technology"> |
120 | <keyword value="Bootloaders"/> | 120 | <keyword value="Bootloaders"/> |
121 | <keyword value="USB Device"/> | 121 | <keyword value="USB Device"/> |
122 | </info> | 122 | </info> |
123 | 123 | ||
124 | <device-support-alias value="lufa_avr8"/> | 124 | <device-support-alias value="lufa_avr8"/> |
125 | <device-support-alias value="lufa_xmega"/> | 125 | <device-support-alias value="lufa_xmega"/> |
126 | <device-support-alias value="lufa_uc3"/> | 126 | <device-support-alias value="lufa_uc3"/> |
127 | 127 | ||
128 | <build type="include-path" value="."/> | 128 | <build type="include-path" value="."/> |
129 | <build type="c-source" value="BootloaderMassStorage.c"/> | 129 | <build type="c-source" value="BootloaderMassStorage.c"/> |
130 | <build type="header-file" value="BootloaderMassStorage.h"/> | 130 | <build type="header-file" value="BootloaderMassStorage.h"/> |
131 | <build type="c-source" value="Descriptors.c"/> | 131 | <build type="c-source" value="Descriptors.c"/> |
132 | <build type="header-file" value="Descriptors.h"/> | 132 | <build type="header-file" value="Descriptors.h"/> |
133 | <build type="c-source" value="BootloaderAPI.c"/> | 133 | <build type="c-source" value="BootloaderAPI.c"/> |
134 | <build type="header-file" value="BootloaderAPI.h"/> | 134 | <build type="header-file" value="BootloaderAPI.h"/> |
135 | <build type="asm-source" value="BootloaderAPITable.S"/> | 135 | <build type="asm-source" value="BootloaderAPITable.S"/> |
136 | 136 | ||
137 | <build type="module-config" subtype="path" value="Config"/> | 137 | <build type="module-config" subtype="path" value="Config"/> |
138 | <build type="header-file" value="Config/LUFAConfig.h"/> | 138 | <build type="header-file" value="Config/LUFAConfig.h"/> |
139 | <build type="header-file" value="Config/AppConfig.h"/> | 139 | <build type="header-file" value="Config/AppConfig.h"/> |
140 | 140 | ||
141 | <build type="include-path" value="Lib"/> | 141 | <build type="include-path" value="Lib"/> |
142 | <build type="header-file" value="Lib/VirtualFAT.h"/> | 142 | <build type="header-file" value="Lib/VirtualFAT.h"/> |
143 | <build type="c-source" value="Lib/VirtualFAT.c"/> | 143 | <build type="c-source" value="Lib/VirtualFAT.c"/> |
144 | <build type="header-file" value="Lib/SCSI.h"/> | 144 | <build type="header-file" value="Lib/SCSI.h"/> |
145 | <build type="c-source" value="Lib/SCSI.c"/> | 145 | <build type="c-source" value="Lib/SCSI.c"/> |
146 | 146 | ||
147 | <build type="distribute" subtype="user-file" value="doxyfile"/> | 147 | <build type="distribute" subtype="user-file" value="doxyfile"/> |
148 | <build type="distribute" subtype="user-file" value="BootloaderMassStorage.txt"/> | 148 | <build type="distribute" subtype="user-file" value="BootloaderMassStorage.txt"/> |
149 | 149 | ||
150 | <require idref="lufa.common"/> | 150 | <require idref="lufa.common"/> |
151 | <require idref="lufa.platform"/> | 151 | <require idref="lufa.platform"/> |
152 | <require idref="lufa.drivers.usb"/> | 152 | <require idref="lufa.drivers.usb"/> |
153 | <require idref="lufa.drivers.board"/> | 153 | <require idref="lufa.drivers.board"/> |
154 | <require idref="lufa.drivers.board.leds"/> | 154 | <require idref="lufa.drivers.board.leds"/> |
155 | </module> | 155 | </module> |
156 | </asf> | 156 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile index 91bb4038e..a0edb2c4f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile | |||
@@ -1,68 +1,68 @@ | |||
1 | # | 1 | # |
2 | # LUFA Library | 2 | # LUFA Library |
3 | # Copyright (C) Dean Camera, 2014. | 3 | # Copyright (C) Dean Camera, 2014. |
4 | # | 4 | # |
5 | # dean [at] fourwalledcubicle [dot] com | 5 | # dean [at] fourwalledcubicle [dot] com |
6 | # www.lufa-lib.org | 6 | # www.lufa-lib.org |
7 | # | 7 | # |
8 | # -------------------------------------- | 8 | # -------------------------------------- |
9 | # LUFA Project Makefile. | 9 | # LUFA Project Makefile. |
10 | # -------------------------------------- | 10 | # -------------------------------------- |
11 | 11 | ||
12 | # Run "make help" for target help. | 12 | # Run "make help" for target help. |
13 | 13 | ||
14 | MCU = at90usb1287 | 14 | MCU = at90usb1287 |
15 | ARCH = AVR8 | 15 | ARCH = AVR8 |
16 | BOARD = USBKEY | 16 | BOARD = USBKEY |
17 | F_CPU = 8000000 | 17 | F_CPU = 8000000 |
18 | F_USB = $(F_CPU) | 18 | F_USB = $(F_CPU) |
19 | OPTIMIZATION = s | 19 | OPTIMIZATION = s |
20 | TARGET = BootloaderMassStorage | 20 | TARGET = BootloaderMassStorage |
21 | SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) | 21 | SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) |
22 | LUFA_PATH = ../../LUFA | 22 | LUFA_PATH = ../../LUFA |
23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) | 23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) |
24 | LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) | 24 | LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) |
25 | 25 | ||
26 | # Flash size and bootloader section sizes of the target, in KB. These must | 26 | # Flash size and bootloader section sizes of the target, in KB. These must |
27 | # match the target's total FLASH size and the bootloader size set in the | 27 | # match the target's total FLASH size and the bootloader size set in the |
28 | # device's fuses. | 28 | # device's fuses. |
29 | FLASH_SIZE_KB = 128 | 29 | FLASH_SIZE_KB = 128 |
30 | BOOT_SECTION_SIZE_KB = 8 | 30 | BOOT_SECTION_SIZE_KB = 8 |
31 | 31 | ||
32 | # Bootloader address calculation formulas | 32 | # Bootloader address calculation formulas |
33 | # Do not modify these macros, but rather modify the dependent values above. | 33 | # Do not modify these macros, but rather modify the dependent values above. |
34 | CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) ) | 34 | CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) ) |
35 | BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 ) | 35 | BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 ) |
36 | BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) ) | 36 | BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) ) |
37 | 37 | ||
38 | # Bootloader linker section flags for relocating the API table sections to | 38 | # Bootloader linker section flags for relocating the API table sections to |
39 | # known FLASH addresses - these should not normally be user-edited. | 39 | # known FLASH addresses - these should not normally be user-edited. |
40 | BOOT_SECTION_LD_FLAG = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2)) | 40 | BOOT_SECTION_LD_FLAG = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2)) |
41 | BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96) | 41 | BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96) |
42 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable, BootloaderAPI_JumpTable, 32) | 42 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable, BootloaderAPI_JumpTable, 32) |
43 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8) | 43 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8) |
44 | 44 | ||
45 | # Check if the bootloader needs an AUX section, located before the real bootloader section to store some of the | 45 | # Check if the bootloader needs an AUX section, located before the real bootloader section to store some of the |
46 | # bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 6KB but the maximum | 46 | # bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 6KB but the maximum |
47 | # bootloader section size is 4KB. The actual usable application space will be reduced by 6KB for these devices. | 47 | # bootloader section size is 4KB. The actual usable application space will be reduced by 6KB for these devices. |
48 | ifeq ($(BOOT_SECTION_SIZE_KB),8) | 48 | ifeq ($(BOOT_SECTION_SIZE_KB),8) |
49 | CC_FLAGS += -DAUX_BOOT_SECTION_SIZE=0 | 49 | CC_FLAGS += -DAUX_BOOT_SECTION_SIZE=0 |
50 | else | 50 | else |
51 | AUX_BOOT_SECTION_SIZE_KB = (6 - $(BOOT_SECTION_SIZE_KB)) | 51 | AUX_BOOT_SECTION_SIZE_KB = (6 - $(BOOT_SECTION_SIZE_KB)) |
52 | 52 | ||
53 | CC_FLAGS += -DAUX_BOOT_SECTION_SIZE='($(AUX_BOOT_SECTION_SIZE_KB) * 1024)' | 53 | CC_FLAGS += -DAUX_BOOT_SECTION_SIZE='($(AUX_BOOT_SECTION_SIZE_KB) * 1024)' |
54 | LD_FLAGS += -Wl,--section-start=.boot_aux=$(call BOOT_SEC_OFFSET, (($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024 - 16)) | 54 | LD_FLAGS += -Wl,--section-start=.boot_aux=$(call BOOT_SEC_OFFSET, (($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024 - 16)) |
55 | LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .boot_aux_trampoline, Boot_AUX_Trampoline, ($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024) | 55 | LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .boot_aux_trampoline, Boot_AUX_Trampoline, ($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024) |
56 | endif | 56 | endif |
57 | 57 | ||
58 | # Default target | 58 | # Default target |
59 | all: | 59 | all: |
60 | 60 | ||
61 | # Include LUFA build script makefiles | 61 | # Include LUFA build script makefiles |
62 | include $(LUFA_PATH)/Build/lufa_core.mk | 62 | include $(LUFA_PATH)/Build/lufa_core.mk |
63 | include $(LUFA_PATH)/Build/lufa_sources.mk | 63 | include $(LUFA_PATH)/Build/lufa_sources.mk |
64 | include $(LUFA_PATH)/Build/lufa_build.mk | 64 | include $(LUFA_PATH)/Build/lufa_build.mk |
65 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk | 65 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk |
66 | include $(LUFA_PATH)/Build/lufa_doxygen.mk | 66 | include $(LUFA_PATH)/Build/lufa_doxygen.mk |
67 | include $(LUFA_PATH)/Build/lufa_avrdude.mk | 67 | include $(LUFA_PATH)/Build/lufa_avrdude.mk |
68 | include $(LUFA_PATH)/Build/lufa_atprogram.mk | 68 | include $(LUFA_PATH)/Build/lufa_atprogram.mk |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S index ec499b74e..88c51da82 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S | |||
@@ -1,91 +1,91 @@ | |||
1 | /* | 1 | /* |
2 | LUFA Library | 2 | LUFA Library |
3 | Copyright (C) Dean Camera, 2014. | 3 | Copyright (C) Dean Camera, 2014. |
4 | 4 | ||
5 | dean [at] fourwalledcubicle [dot] com | 5 | dean [at] fourwalledcubicle [dot] com |
6 | www.lufa-lib.org | 6 | www.lufa-lib.org |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* | 9 | /* |
10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) | 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) |
11 | 11 | ||
12 | Permission to use, copy, modify, distribute, and sell this | 12 | Permission to use, copy, modify, distribute, and sell this |
13 | software and its documentation for any purpose is hereby granted | 13 | software and its documentation for any purpose is hereby granted |
14 | without fee, provided that the above copyright notice appear in | 14 | without fee, provided that the above copyright notice appear in |
15 | all copies and that both that the copyright notice and this | 15 | all copies and that both that the copyright notice and this |
16 | permission notice and warranty disclaimer appear in supporting | 16 | permission notice and warranty disclaimer appear in supporting |
17 | documentation, and that the name of the author not be used in | 17 | documentation, and that the name of the author not be used in |
18 | advertising or publicity pertaining to distribution of the | 18 | advertising or publicity pertaining to distribution of the |
19 | software without specific, written prior permission. | 19 | software without specific, written prior permission. |
20 | 20 | ||
21 | The author disclaims all warranties with regard to this | 21 | The author disclaims all warranties with regard to this |
22 | software, including all implied warranties of merchantability | 22 | software, including all implied warranties of merchantability |
23 | and fitness. In no event shall the author be liable for any | 23 | and fitness. In no event shall the author be liable for any |
24 | special, indirect or consequential damages or any damages | 24 | special, indirect or consequential damages or any damages |
25 | whatsoever resulting from loss of use, data or profits, whether | 25 | whatsoever resulting from loss of use, data or profits, whether |
26 | in an action of contract, negligence or other tortious action, | 26 | in an action of contract, negligence or other tortious action, |
27 | arising out of or in connection with the use or performance of | 27 | arising out of or in connection with the use or performance of |
28 | this software. | 28 | this software. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | ; Trampolines to actual API implementations if the target address is outside the | 31 | ; Trampolines to actual API implementations if the target address is outside the |
32 | ; range of a rjmp instruction (can happen with large bootloader sections) | 32 | ; range of a rjmp instruction (can happen with large bootloader sections) |
33 | .section .apitable_trampolines, "ax" | 33 | .section .apitable_trampolines, "ax" |
34 | .global BootloaderAPI_Trampolines | 34 | .global BootloaderAPI_Trampolines |
35 | BootloaderAPI_Trampolines: | 35 | BootloaderAPI_Trampolines: |
36 | 36 | ||
37 | BootloaderAPI_ErasePage_Trampoline: | 37 | BootloaderAPI_ErasePage_Trampoline: |
38 | jmp BootloaderAPI_ErasePage | 38 | jmp BootloaderAPI_ErasePage |
39 | BootloaderAPI_WritePage_Trampoline: | 39 | BootloaderAPI_WritePage_Trampoline: |
40 | jmp BootloaderAPI_WritePage | 40 | jmp BootloaderAPI_WritePage |
41 | BootloaderAPI_FillWord_Trampoline: | 41 | BootloaderAPI_FillWord_Trampoline: |
42 | jmp BootloaderAPI_FillWord | 42 | jmp BootloaderAPI_FillWord |
43 | BootloaderAPI_ReadSignature_Trampoline: | 43 | BootloaderAPI_ReadSignature_Trampoline: |
44 | jmp BootloaderAPI_ReadSignature | 44 | jmp BootloaderAPI_ReadSignature |
45 | BootloaderAPI_ReadFuse_Trampoline: | 45 | BootloaderAPI_ReadFuse_Trampoline: |
46 | jmp BootloaderAPI_ReadFuse | 46 | jmp BootloaderAPI_ReadFuse |
47 | BootloaderAPI_ReadLock_Trampoline: | 47 | BootloaderAPI_ReadLock_Trampoline: |
48 | jmp BootloaderAPI_ReadLock | 48 | jmp BootloaderAPI_ReadLock |
49 | BootloaderAPI_WriteLock_Trampoline: | 49 | BootloaderAPI_WriteLock_Trampoline: |
50 | jmp BootloaderAPI_WriteLock | 50 | jmp BootloaderAPI_WriteLock |
51 | BootloaderAPI_UNUSED1: | 51 | BootloaderAPI_UNUSED1: |
52 | ret | 52 | ret |
53 | BootloaderAPI_UNUSED2: | 53 | BootloaderAPI_UNUSED2: |
54 | ret | 54 | ret |
55 | BootloaderAPI_UNUSED3: | 55 | BootloaderAPI_UNUSED3: |
56 | ret | 56 | ret |
57 | BootloaderAPI_UNUSED4: | 57 | BootloaderAPI_UNUSED4: |
58 | ret | 58 | ret |
59 | BootloaderAPI_UNUSED5: | 59 | BootloaderAPI_UNUSED5: |
60 | ret | 60 | ret |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | ; API function jump table | 64 | ; API function jump table |
65 | .section .apitable_jumptable, "ax" | 65 | .section .apitable_jumptable, "ax" |
66 | .global BootloaderAPI_JumpTable | 66 | .global BootloaderAPI_JumpTable |
67 | BootloaderAPI_JumpTable: | 67 | BootloaderAPI_JumpTable: |
68 | 68 | ||
69 | rjmp BootloaderAPI_ErasePage_Trampoline | 69 | rjmp BootloaderAPI_ErasePage_Trampoline |
70 | rjmp BootloaderAPI_WritePage_Trampoline | 70 | rjmp BootloaderAPI_WritePage_Trampoline |
71 | rjmp BootloaderAPI_FillWord_Trampoline | 71 | rjmp BootloaderAPI_FillWord_Trampoline |
72 | rjmp BootloaderAPI_ReadSignature_Trampoline | 72 | rjmp BootloaderAPI_ReadSignature_Trampoline |
73 | rjmp BootloaderAPI_ReadFuse_Trampoline | 73 | rjmp BootloaderAPI_ReadFuse_Trampoline |
74 | rjmp BootloaderAPI_ReadLock_Trampoline | 74 | rjmp BootloaderAPI_ReadLock_Trampoline |
75 | rjmp BootloaderAPI_WriteLock_Trampoline | 75 | rjmp BootloaderAPI_WriteLock_Trampoline |
76 | rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1 | 76 | rjmp BootloaderAPI_UNUSED1 ; UNUSED ENTRY 1 |
77 | rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2 | 77 | rjmp BootloaderAPI_UNUSED2 ; UNUSED ENTRY 2 |
78 | rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3 | 78 | rjmp BootloaderAPI_UNUSED3 ; UNUSED ENTRY 3 |
79 | rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4 | 79 | rjmp BootloaderAPI_UNUSED4 ; UNUSED ENTRY 4 |
80 | rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5 | 80 | rjmp BootloaderAPI_UNUSED5 ; UNUSED ENTRY 5 |
81 | 81 | ||
82 | 82 | ||
83 | 83 | ||
84 | ; Bootloader table signatures and information | 84 | ; Bootloader table signatures and information |
85 | .section .apitable_signatures, "ax" | 85 | .section .apitable_signatures, "ax" |
86 | .global BootloaderAPI_Signatures | 86 | .global BootloaderAPI_Signatures |
87 | BootloaderAPI_Signatures: | 87 | BootloaderAPI_Signatures: |
88 | 88 | ||
89 | .long BOOT_START_ADDR ; Start address of the bootloader | 89 | .long BOOT_START_ADDR ; Start address of the bootloader |
90 | .word 0xDF20 ; Signature for the Printer class bootloader | 90 | .word 0xDF20 ; Signature for the Printer class bootloader |
91 | .word 0xDCFB ; Signature for a LUFA class bootloader | 91 | .word 0xDCFB ; Signature for a LUFA class bootloader |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml index 86a56911e..b5c0c6b3a 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml | |||
@@ -1,159 +1,159 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="Printer Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.128_4" force-caption="true" workspace-name="lufa_printer_128kb_4kb_"> | 2 | <project caption="Printer Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.128_4" force-caption="true" workspace-name="lufa_printer_128kb_4kb_"> |
3 | <require idref="lufa.bootloaders.printer"/> | 3 | <require idref="lufa.bootloaders.printer"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8"/> | 5 | <generator value="as5_8"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="none"/> | 8 | <config name="lufa.drivers.board.name" value="none"/> |
9 | 9 | ||
10 | <config name="config.compiler.optimization.level" value="size"/> | 10 | <config name="config.compiler.optimization.level" value="size"/> |
11 | 11 | ||
12 | <build type="define" name="F_CPU" value="16000000UL"/> | 12 | <build type="define" name="F_CPU" value="16000000UL"/> |
13 | <build type="define" name="F_USB" value="16000000UL"/> | 13 | <build type="define" name="F_USB" value="16000000UL"/> |
14 | 14 | ||
15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> | 15 | <build type="define" name="BOOT_START_ADDR" value="0x1F000"/> |
16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> | 16 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/> |
17 | 17 | ||
18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> | 18 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FFA0"/> |
19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 19 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> | 20 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FFE0"/> |
21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 21 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> | 22 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FFF8"/> |
23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 23 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
24 | </project> | 24 | </project> |
25 | 25 | ||
26 | <project caption="Printer Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.64_4" force-caption="true" workspace-name="lufa_printer_64kb_4kb_"> | 26 | <project caption="Printer Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.64_4" force-caption="true" workspace-name="lufa_printer_64kb_4kb_"> |
27 | <require idref="lufa.bootloaders.printer"/> | 27 | <require idref="lufa.bootloaders.printer"/> |
28 | <require idref="lufa.boards.dummy.avr8"/> | 28 | <require idref="lufa.boards.dummy.avr8"/> |
29 | <generator value="as5_8"/> | 29 | <generator value="as5_8"/> |
30 | 30 | ||
31 | <device-support value="at90usb647"/> | 31 | <device-support value="at90usb647"/> |
32 | <config name="lufa.drivers.board.name" value="none"/> | 32 | <config name="lufa.drivers.board.name" value="none"/> |
33 | 33 | ||
34 | <config name="config.compiler.optimization.level" value="size"/> | 34 | <config name="config.compiler.optimization.level" value="size"/> |
35 | 35 | ||
36 | <build type="define" name="F_CPU" value="16000000UL"/> | 36 | <build type="define" name="F_CPU" value="16000000UL"/> |
37 | <build type="define" name="F_USB" value="16000000UL"/> | 37 | <build type="define" name="F_USB" value="16000000UL"/> |
38 | 38 | ||
39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> | 39 | <build type="define" name="BOOT_START_ADDR" value="0xF000"/> |
40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> | 40 | <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/> |
41 | 41 | ||
42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> | 42 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0xFFA0"/> |
43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 43 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> | 44 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0xFFE0"/> |
45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 45 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> | 46 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0xFFF8"/> |
47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 47 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
48 | </project> | 48 | </project> |
49 | 49 | ||
50 | <project caption="Printer Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.32_4" force-caption="true" workspace-name="lufa_printer_32kb_4kb_"> | 50 | <project caption="Printer Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.32_4" force-caption="true" workspace-name="lufa_printer_32kb_4kb_"> |
51 | <require idref="lufa.bootloaders.printer"/> | 51 | <require idref="lufa.bootloaders.printer"/> |
52 | <require idref="lufa.boards.dummy.avr8"/> | 52 | <require idref="lufa.boards.dummy.avr8"/> |
53 | <generator value="as5_8"/> | 53 | <generator value="as5_8"/> |
54 | 54 | ||
55 | <device-support value="atmega32u4"/> | 55 | <device-support value="atmega32u4"/> |
56 | <config name="lufa.drivers.board.name" value="none"/> | 56 | <config name="lufa.drivers.board.name" value="none"/> |
57 | 57 | ||
58 | <config name="config.compiler.optimization.level" value="size"/> | 58 | <config name="config.compiler.optimization.level" value="size"/> |
59 | 59 | ||
60 | <build type="define" name="F_CPU" value="16000000UL"/> | 60 | <build type="define" name="F_CPU" value="16000000UL"/> |
61 | <build type="define" name="F_USB" value="16000000UL"/> | 61 | <build type="define" name="F_USB" value="16000000UL"/> |
62 | 62 | ||
63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> | 63 | <build type="define" name="BOOT_START_ADDR" value="0x7000"/> |
64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> | 64 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/> |
65 | 65 | ||
66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> | 66 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x7FA0"/> |
67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 67 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> | 68 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x7FE0"/> |
69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 69 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> | 70 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x7FF8"/> |
71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 71 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
72 | </project> | 72 | </project> |
73 | 73 | ||
74 | <project caption="Printer Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.16_4" force-caption="true" workspace-name="lufa_printer_16kb_4kb_"> | 74 | <project caption="Printer Bootloader - 16KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.16_4" force-caption="true" workspace-name="lufa_printer_16kb_4kb_"> |
75 | <require idref="lufa.bootloaders.printer"/> | 75 | <require idref="lufa.bootloaders.printer"/> |
76 | <require idref="lufa.boards.dummy.avr8"/> | 76 | <require idref="lufa.boards.dummy.avr8"/> |
77 | <generator value="as5_8"/> | 77 | <generator value="as5_8"/> |
78 | 78 | ||
79 | <device-support value="atmega16u2"/> | 79 | <device-support value="atmega16u2"/> |
80 | <config name="lufa.drivers.board.name" value="none"/> | 80 | <config name="lufa.drivers.board.name" value="none"/> |
81 | 81 | ||
82 | <config name="config.compiler.optimization.level" value="size"/> | 82 | <config name="config.compiler.optimization.level" value="size"/> |
83 | 83 | ||
84 | <build type="define" name="F_CPU" value="16000000UL"/> | 84 | <build type="define" name="F_CPU" value="16000000UL"/> |
85 | <build type="define" name="F_USB" value="16000000UL"/> | 85 | <build type="define" name="F_USB" value="16000000UL"/> |
86 | 86 | ||
87 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> | 87 | <build type="define" name="BOOT_START_ADDR" value="0x3000"/> |
88 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> | 88 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/> |
89 | 89 | ||
90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> | 90 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x3FA0"/> |
91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 91 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> | 92 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x3FE0"/> |
93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 93 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
94 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> | 94 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x3FF8"/> |
95 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 95 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
96 | </project> | 96 | </project> |
97 | 97 | ||
98 | <project caption="Printer Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.8_4" force-caption="true" workspace-name="lufa_printer_8kb_4kb_"> | 98 | <project caption="Printer Bootloader - 8KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.printer.avr8.8_4" force-caption="true" workspace-name="lufa_printer_8kb_4kb_"> |
99 | <require idref="lufa.bootloaders.printer"/> | 99 | <require idref="lufa.bootloaders.printer"/> |
100 | <require idref="lufa.boards.dummy.avr8"/> | 100 | <require idref="lufa.boards.dummy.avr8"/> |
101 | <generator value="as5_8"/> | 101 | <generator value="as5_8"/> |
102 | 102 | ||
103 | <device-support value="atmega8u2"/> | 103 | <device-support value="atmega8u2"/> |
104 | <config name="lufa.drivers.board.name" value="none"/> | 104 | <config name="lufa.drivers.board.name" value="none"/> |
105 | 105 | ||
106 | <config name="config.compiler.optimization.level" value="size"/> | 106 | <config name="config.compiler.optimization.level" value="size"/> |
107 | 107 | ||
108 | <build type="define" name="F_CPU" value="16000000UL"/> | 108 | <build type="define" name="F_CPU" value="16000000UL"/> |
109 | <build type="define" name="F_USB" value="16000000UL"/> | 109 | <build type="define" name="F_USB" value="16000000UL"/> |
110 | 110 | ||
111 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> | 111 | <build type="define" name="BOOT_START_ADDR" value="0x1000"/> |
112 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> | 112 | <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/> |
113 | 113 | ||
114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> | 114 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_trampolines=0x1FA0"/> |
115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> | 115 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Trampolines"/> |
116 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> | 116 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_jumptable=0x1FE0"/> |
117 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> | 117 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_JumpTable"/> |
118 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> | 118 | <build type="linker-config" subtype="flags" value="--section-start=.apitable_signatures=0x1FF8"/> |
119 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> | 119 | <build type="linker-config" subtype="flags" value="--undefined=BootloaderAPI_Signatures"/> |
120 | </project> | 120 | </project> |
121 | 121 | ||
122 | <module type="application" id="lufa.bootloaders.printer" caption="Printer Bootloader"> | 122 | <module type="application" id="lufa.bootloaders.printer" caption="Printer Bootloader"> |
123 | <info type="description" value="summary"> | 123 | <info type="description" value="summary"> |
124 | Printer Class Bootloader, capable of reprogramming a device by "printing" new HEX files to the virtual Plain-Text printer it creates when plugged into a host. | 124 | Printer Class Bootloader, capable of reprogramming a device by "printing" new HEX files to the virtual Plain-Text printer it creates when plugged into a host. |
125 | </info> | 125 | </info> |
126 | 126 | ||
127 | <info type="gui-flag" value="move-to-root"/> | 127 | <info type="gui-flag" value="move-to-root"/> |
128 | 128 | ||
129 | <info type="keyword" value="Technology"> | 129 | <info type="keyword" value="Technology"> |
130 | <keyword value="Bootloaders"/> | 130 | <keyword value="Bootloaders"/> |
131 | <keyword value="USB Device"/> | 131 | <keyword value="USB Device"/> |
132 | </info> | 132 | </info> |
133 | 133 | ||
134 | <device-support-alias value="lufa_avr8"/> | 134 | <device-support-alias value="lufa_avr8"/> |
135 | <device-support-alias value="lufa_xmega"/> | 135 | <device-support-alias value="lufa_xmega"/> |
136 | <device-support-alias value="lufa_uc3"/> | 136 | <device-support-alias value="lufa_uc3"/> |
137 | 137 | ||
138 | <build type="include-path" value="."/> | 138 | <build type="include-path" value="."/> |
139 | <build type="c-source" value="BootloaderPrinter.c"/> | 139 | <build type="c-source" value="BootloaderPrinter.c"/> |
140 | <build type="header-file" value="BootloaderPrinter.h"/> | 140 | <build type="header-file" value="BootloaderPrinter.h"/> |
141 | <build type="c-source" value="Descriptors.c"/> | 141 | <build type="c-source" value="Descriptors.c"/> |
142 | <build type="header-file" value="Descriptors.h"/> | 142 | <build type="header-file" value="Descriptors.h"/> |
143 | <build type="c-source" value="BootloaderAPI.c"/> | 143 | <build type="c-source" value="BootloaderAPI.c"/> |
144 | <build type="header-file" value="BootloaderAPI.h"/> | 144 | <build type="header-file" value="BootloaderAPI.h"/> |
145 | <build type="asm-source" value="BootloaderAPITable.S"/> | 145 | <build type="asm-source" value="BootloaderAPITable.S"/> |
146 | 146 | ||
147 | <build type="module-config" subtype="path" value="Config"/> | 147 | <build type="module-config" subtype="path" value="Config"/> |
148 | <build type="header-file" value="Config/LUFAConfig.h"/> | 148 | <build type="header-file" value="Config/LUFAConfig.h"/> |
149 | 149 | ||
150 | <build type="distribute" subtype="user-file" value="doxyfile"/> | 150 | <build type="distribute" subtype="user-file" value="doxyfile"/> |
151 | <build type="distribute" subtype="user-file" value="BootloaderPrinter.txt"/> | 151 | <build type="distribute" subtype="user-file" value="BootloaderPrinter.txt"/> |
152 | 152 | ||
153 | <require idref="lufa.common"/> | 153 | <require idref="lufa.common"/> |
154 | <require idref="lufa.platform"/> | 154 | <require idref="lufa.platform"/> |
155 | <require idref="lufa.drivers.usb"/> | 155 | <require idref="lufa.drivers.usb"/> |
156 | <require idref="lufa.drivers.board"/> | 156 | <require idref="lufa.drivers.board"/> |
157 | <require idref="lufa.drivers.board.leds"/> | 157 | <require idref="lufa.drivers.board.leds"/> |
158 | </module> | 158 | </module> |
159 | </asf> | 159 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile index 0716c3bbe..0db035de3 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile +++ b/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile | |||
@@ -1,55 +1,55 @@ | |||
1 | # | 1 | # |
2 | # LUFA Library | 2 | # LUFA Library |
3 | # Copyright (C) Dean Camera, 2014. | 3 | # Copyright (C) Dean Camera, 2014. |
4 | # | 4 | # |
5 | # dean [at] fourwalledcubicle [dot] com | 5 | # dean [at] fourwalledcubicle [dot] com |
6 | # www.lufa-lib.org | 6 | # www.lufa-lib.org |
7 | # | 7 | # |
8 | # -------------------------------------- | 8 | # -------------------------------------- |
9 | # LUFA Project Makefile. | 9 | # LUFA Project Makefile. |
10 | # -------------------------------------- | 10 | # -------------------------------------- |
11 | 11 | ||
12 | # Run "make help" for target help. | 12 | # Run "make help" for target help. |
13 | 13 | ||
14 | MCU = at90usb1287 | 14 | MCU = at90usb1287 |
15 | ARCH = AVR8 | 15 | ARCH = AVR8 |
16 | BOARD = USBKEY | 16 | BOARD = USBKEY |
17 | F_CPU = 8000000 | 17 | F_CPU = 8000000 |
18 | F_USB = $(F_CPU) | 18 | F_USB = $(F_CPU) |
19 | OPTIMIZATION = s | 19 | OPTIMIZATION = s |
20 | TARGET = BootloaderPrinter | 20 | TARGET = BootloaderPrinter |
21 | SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) | 21 | SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) |
22 | LUFA_PATH = ../../LUFA | 22 | LUFA_PATH = ../../LUFA |
23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) | 23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) |
24 | LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) | 24 | LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) |
25 | 25 | ||
26 | # Flash size and bootloader section sizes of the target, in KB. These must | 26 | # Flash size and bootloader section sizes of the target, in KB. These must |
27 | # match the target's total FLASH size and the bootloader size set in the | 27 | # match the target's total FLASH size and the bootloader size set in the |
28 | # device's fuses. | 28 | # device's fuses. |
29 | FLASH_SIZE_KB = 128 | 29 | FLASH_SIZE_KB = 128 |
30 | BOOT_SECTION_SIZE_KB = 8 | 30 | BOOT_SECTION_SIZE_KB = 8 |
31 | 31 | ||
32 | # Bootloader address calculation formulas | 32 | # Bootloader address calculation formulas |
33 | # Do not modify these macros, but rather modify the dependent values above. | 33 | # Do not modify these macros, but rather modify the dependent values above. |
34 | CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) ) | 34 | CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) ) |
35 | BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 ) | 35 | BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 ) |
36 | BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) ) | 36 | BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) ) |
37 | 37 | ||
38 | # Bootloader linker section flags for relocating the API table sections to | 38 | # Bootloader linker section flags for relocating the API table sections to |
39 | # known FLASH addresses - these should not normally be user-edited. | 39 | # known FLASH addresses - these should not normally be user-edited. |
40 | BOOT_SECTION_LD_FLAG = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2)) | 40 | BOOT_SECTION_LD_FLAG = -Wl,--section-start=$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=$(strip $(2)) |
41 | BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96) | 41 | BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, .apitable_trampolines, BootloaderAPI_Trampolines, 96) |
42 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable, BootloaderAPI_JumpTable, 32) | 42 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable, BootloaderAPI_JumpTable, 32) |
43 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8) | 43 | BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8) |
44 | 44 | ||
45 | # Default target | 45 | # Default target |
46 | all: | 46 | all: |
47 | 47 | ||
48 | # Include LUFA build script makefiles | 48 | # Include LUFA build script makefiles |
49 | include $(LUFA_PATH)/Build/lufa_core.mk | 49 | include $(LUFA_PATH)/Build/lufa_core.mk |
50 | include $(LUFA_PATH)/Build/lufa_sources.mk | 50 | include $(LUFA_PATH)/Build/lufa_sources.mk |
51 | include $(LUFA_PATH)/Build/lufa_build.mk | 51 | include $(LUFA_PATH)/Build/lufa_build.mk |
52 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk | 52 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk |
53 | include $(LUFA_PATH)/Build/lufa_doxygen.mk | 53 | include $(LUFA_PATH)/Build/lufa_doxygen.mk |
54 | include $(LUFA_PATH)/Build/lufa_avrdude.mk | 54 | include $(LUFA_PATH)/Build/lufa_avrdude.mk |
55 | include $(LUFA_PATH)/Build/lufa_atprogram.mk | 55 | include $(LUFA_PATH)/Build/lufa_atprogram.mk |
diff --git a/tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile b/tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile index 9fd188c93..e839ba6b1 100644 --- a/tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile +++ b/tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile | |||
@@ -1,42 +1,42 @@ | |||
1 | # | 1 | # |
2 | # LUFA Library | 2 | # LUFA Library |
3 | # Copyright (C) Dean Camera, 2014. | 3 | # Copyright (C) Dean Camera, 2014. |
4 | # | 4 | # |
5 | # dean [at] fourwalledcubicle [dot] com | 5 | # dean [at] fourwalledcubicle [dot] com |
6 | # www.lufa-lib.org | 6 | # www.lufa-lib.org |
7 | # | 7 | # |
8 | # -------------------------------------- | 8 | # -------------------------------------- |
9 | # LUFA Project Makefile. | 9 | # LUFA Project Makefile. |
10 | # -------------------------------------- | 10 | # -------------------------------------- |
11 | 11 | ||
12 | # Run "make help" for target help. | 12 | # Run "make help" for target help. |
13 | 13 | ||
14 | MCU = at90usb1287 | 14 | MCU = at90usb1287 |
15 | ARCH = AVR8 | 15 | ARCH = AVR8 |
16 | F_CPU = 1000000 | 16 | F_CPU = 1000000 |
17 | F_USB = $(F_CPU) | 17 | F_USB = $(F_CPU) |
18 | OPTIMIZATION = s | 18 | OPTIMIZATION = s |
19 | TARGET = HID_EEPROM_Loader | 19 | TARGET = HID_EEPROM_Loader |
20 | SRC = $(TARGET).c | 20 | SRC = $(TARGET).c |
21 | LUFA_PATH = ../../../LUFA | 21 | LUFA_PATH = ../../../LUFA |
22 | CC_FLAGS = | 22 | CC_FLAGS = |
23 | LD_FLAGS = | 23 | LD_FLAGS = |
24 | OBJECT_FILES = InputEEData.o | 24 | OBJECT_FILES = InputEEData.o |
25 | 25 | ||
26 | # Default target | 26 | # Default target |
27 | all: | 27 | all: |
28 | 28 | ||
29 | # Determine the AVR sub-architecture of the build main application object file | 29 | # Determine the AVR sub-architecture of the build main application object file |
30 | FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1) | 30 | FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1) |
31 | 31 | ||
32 | # Create a linkable object file with the input binary EEPROM data stored in the FLASH section | 32 | # Create a linkable object file with the input binary EEPROM data stored in the FLASH section |
33 | InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST) | 33 | InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST) |
34 | @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\" | 34 | @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\" |
35 | avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@ | 35 | avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@ |
36 | 36 | ||
37 | # Include LUFA build script makefiles | 37 | # Include LUFA build script makefiles |
38 | include $(LUFA_PATH)/Build/lufa_core.mk | 38 | include $(LUFA_PATH)/Build/lufa_core.mk |
39 | include $(LUFA_PATH)/Build/lufa_build.mk | 39 | include $(LUFA_PATH)/Build/lufa_build.mk |
40 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk | 40 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk |
41 | include $(LUFA_PATH)/Build/lufa_doxygen.mk | 41 | include $(LUFA_PATH)/Build/lufa_doxygen.mk |
42 | include $(LUFA_PATH)/Build/lufa_hid.mk | 42 | include $(LUFA_PATH)/Build/lufa_hid.mk |
diff --git a/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml b/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml index fd65db283..e952714e1 100644 --- a/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/asf.xml | |||
@@ -1,55 +1,55 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="USB Device Template" id="lufa.templates.device.project.avr8"> | 2 | <project caption="USB Device Template" id="lufa.templates.device.project.avr8"> |
3 | <require idref="lufa.templates.device"/> | 3 | <require idref="lufa.templates.device"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8_template"/> | 5 | <generator value="as5_8_template"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="usbkey"/> | 8 | <config name="lufa.drivers.board.name" value="usbkey"/> |
9 | 9 | ||
10 | <build type="define" name="F_CPU" value="8000000UL"/> | 10 | <build type="define" name="F_CPU" value="8000000UL"/> |
11 | <build type="define" name="F_USB" value="8000000UL"/> | 11 | <build type="define" name="F_USB" value="8000000UL"/> |
12 | </project> | 12 | </project> |
13 | 13 | ||
14 | <project caption="USB Device Template" id="lufa.templates.device.project.xmega"> | 14 | <project caption="USB Device Template" id="lufa.templates.device.project.xmega"> |
15 | <require idref="lufa.templates.device"/> | 15 | <require idref="lufa.templates.device"/> |
16 | <require idref="lufa.boards.dummy.xmega"/> | 16 | <require idref="lufa.boards.dummy.xmega"/> |
17 | <generator value="as5_8_template"/> | 17 | <generator value="as5_8_template"/> |
18 | 18 | ||
19 | <device-support value="atxmega256a3bu"/> | 19 | <device-support value="atxmega256a3bu"/> |
20 | <config name="lufa.drivers.board.name" value="a3bu_xplained"/> | 20 | <config name="lufa.drivers.board.name" value="a3bu_xplained"/> |
21 | 21 | ||
22 | <build type="define" name="F_CPU" value="32000000UL"/> | 22 | <build type="define" name="F_CPU" value="32000000UL"/> |
23 | <build type="define" name="F_USB" value="48000000UL"/> | 23 | <build type="define" name="F_USB" value="48000000UL"/> |
24 | </project> | 24 | </project> |
25 | 25 | ||
26 | <module type="application" id="lufa.templates.device" caption="USB Device Template"> | 26 | <module type="application" id="lufa.templates.device" caption="USB Device Template"> |
27 | <info type="description" value="summary"> | 27 | <info type="description" value="summary"> |
28 | Template for a LUFA USB device mode application. | 28 | Template for a LUFA USB device mode application. |
29 | </info> | 29 | </info> |
30 | 30 | ||
31 | <info type="gui-flag" value="move-to-root"/> | 31 | <info type="gui-flag" value="move-to-root"/> |
32 | 32 | ||
33 | <info type="keyword" value="Technology"> | 33 | <info type="keyword" value="Technology"> |
34 | <keyword value="USB Device"/> | 34 | <keyword value="USB Device"/> |
35 | <keyword value="Template Projects"/> | 35 | <keyword value="Template Projects"/> |
36 | </info> | 36 | </info> |
37 | 37 | ||
38 | <device-support-alias value="lufa_avr8"/> | 38 | <device-support-alias value="lufa_avr8"/> |
39 | <device-support-alias value="lufa_xmega"/> | 39 | <device-support-alias value="lufa_xmega"/> |
40 | <device-support-alias value="lufa_uc3"/> | 40 | <device-support-alias value="lufa_uc3"/> |
41 | 41 | ||
42 | <build type="c-source" value="DeviceApplication.c"/> | 42 | <build type="c-source" value="DeviceApplication.c"/> |
43 | <build type="c-source" value="Descriptors.c"/> | 43 | <build type="c-source" value="Descriptors.c"/> |
44 | <build type="header-file" value="DeviceApplication.h"/> | 44 | <build type="header-file" value="DeviceApplication.h"/> |
45 | <build type="header-file" value="Descriptors.h"/> | 45 | <build type="header-file" value="Descriptors.h"/> |
46 | 46 | ||
47 | <build type="module-config" subtype="path" value=".."/> | 47 | <build type="module-config" subtype="path" value=".."/> |
48 | <build type="header-file" value="../LUFAConfig.h"/> | 48 | <build type="header-file" value="../LUFAConfig.h"/> |
49 | 49 | ||
50 | <require idref="lufa.common"/> | 50 | <require idref="lufa.common"/> |
51 | <require idref="lufa.platform"/> | 51 | <require idref="lufa.platform"/> |
52 | <require idref="lufa.drivers.usb"/> | 52 | <require idref="lufa.drivers.usb"/> |
53 | <require idref="lufa.drivers.board"/> | 53 | <require idref="lufa.drivers.board"/> |
54 | </module> | 54 | </module> |
55 | </asf> | 55 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml b/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml index c1996ec71..c3860c056 100644 --- a/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml +++ b/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml | |||
@@ -1,41 +1,41 @@ | |||
1 | <asf xmlversion="1.0"> | 1 | <asf xmlversion="1.0"> |
2 | <project caption="USB Host Template" id="lufa.templates.host.project"> | 2 | <project caption="USB Host Template" id="lufa.templates.host.project"> |
3 | <require idref="lufa.templates.host"/> | 3 | <require idref="lufa.templates.host"/> |
4 | <require idref="lufa.boards.dummy.avr8"/> | 4 | <require idref="lufa.boards.dummy.avr8"/> |
5 | <generator value="as5_8_template"/> | 5 | <generator value="as5_8_template"/> |
6 | 6 | ||
7 | <device-support value="at90usb1287"/> | 7 | <device-support value="at90usb1287"/> |
8 | <config name="lufa.drivers.board.name" value="usbkey"/> | 8 | <config name="lufa.drivers.board.name" value="usbkey"/> |
9 | 9 | ||
10 | <build type="define" name="F_CPU" value="8000000UL"/> | 10 | <build type="define" name="F_CPU" value="8000000UL"/> |
11 | <build type="define" name="F_USB" value="8000000UL"/> | 11 | <build type="define" name="F_USB" value="8000000UL"/> |
12 | </project> | 12 | </project> |
13 | 13 | ||
14 | <module type="application" id="lufa.templates.host" caption="USB Host Template"> | 14 | <module type="application" id="lufa.templates.host" caption="USB Host Template"> |
15 | <info type="description" value="summary"> | 15 | <info type="description" value="summary"> |
16 | Template for a LUFA USB host mode application. | 16 | Template for a LUFA USB host mode application. |
17 | </info> | 17 | </info> |
18 | 18 | ||
19 | <info type="gui-flag" value="move-to-root"/> | 19 | <info type="gui-flag" value="move-to-root"/> |
20 | 20 | ||
21 | <info type="keyword" value="Technology"> | 21 | <info type="keyword" value="Technology"> |
22 | <keyword value="USB Host"/> | 22 | <keyword value="USB Host"/> |
23 | <keyword value="Template Projects"/> | 23 | <keyword value="Template Projects"/> |
24 | </info> | 24 | </info> |
25 | 25 | ||
26 | <device-support-alias value="lufa_avr8"/> | 26 | <device-support-alias value="lufa_avr8"/> |
27 | <device-support-alias value="lufa_xmega"/> | 27 | <device-support-alias value="lufa_xmega"/> |
28 | <device-support-alias value="lufa_uc3"/> | 28 | <device-support-alias value="lufa_uc3"/> |
29 | 29 | ||
30 | <build type="c-source" value="HostApplication.c"/> | 30 | <build type="c-source" value="HostApplication.c"/> |
31 | <build type="header-file" value="HostApplication.h"/> | 31 | <build type="header-file" value="HostApplication.h"/> |
32 | 32 | ||
33 | <build type="module-config" subtype="path" value=".."/> | 33 | <build type="module-config" subtype="path" value=".."/> |
34 | <build type="header-file" value="../LUFAConfig.h"/> | 34 | <build type="header-file" value="../LUFAConfig.h"/> |
35 | 35 | ||
36 | <require idref="lufa.common"/> | 36 | <require idref="lufa.common"/> |
37 | <require idref="lufa.platform"/> | 37 | <require idref="lufa.platform"/> |
38 | <require idref="lufa.drivers.usb"/> | 38 | <require idref="lufa.drivers.usb"/> |
39 | <require idref="lufa.drivers.board"/> | 39 | <require idref="lufa.drivers.board"/> |
40 | </module> | 40 | </module> |
41 | </asf> | 41 | </asf> |
diff --git a/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt b/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt index 7ddfa1be3..0ae1dd678 100644 --- a/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt +++ b/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildSystem.txt | |||
@@ -1,975 +1,975 @@ | |||
1 | /** \file | 1 | /** \file |
2 | * | 2 | * |
3 | * This file contains special DoxyGen information for the generation of the main page and other special | 3 | * This file contains special DoxyGen information for the generation of the main page and other special |
4 | * documentation pages. It is not a project source file. | 4 | * documentation pages. It is not a project source file. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /** \page Page_BuildSystem The LUFA Build System | 7 | /** \page Page_BuildSystem The LUFA Build System |
8 | * | 8 | * |
9 | * \section Sec_BuildSystem_Overview Overview of the LUFA Build System | 9 | * \section Sec_BuildSystem_Overview Overview of the LUFA Build System |
10 | * The LUFA build system is an attempt at making a set of re-usable, modular build make files which | 10 | * The LUFA build system is an attempt at making a set of re-usable, modular build make files which |
11 | * can be referenced in a LUFA powered project, to minimize the amount of code required in an | 11 | * can be referenced in a LUFA powered project, to minimize the amount of code required in an |
12 | * application makefile. The system is written in GNU Make, and each module is independent of | 12 | * application makefile. The system is written in GNU Make, and each module is independent of |
13 | * one-another. | 13 | * one-another. |
14 | * | 14 | * |
15 | * For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA | 15 | * For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA |
16 | * build system, see \ref Sec_CompilingApps_Prerequisites. | 16 | * build system, see \ref Sec_CompilingApps_Prerequisites. |
17 | * | 17 | * |
18 | * To use a LUFA build system module, simply add an include to your project makefile. All user projects | 18 | * To use a LUFA build system module, simply add an include to your project makefile. All user projects |
19 | * should at a minimum include \ref Page_BuildModule_CORE for base functionality: | 19 | * should at a minimum include \ref Page_BuildModule_CORE for base functionality: |
20 | * \code | 20 | * \code |
21 | * include $(LUFA_PATH)/Build/lufa_core.mk | 21 | * include $(LUFA_PATH)/Build/lufa_core.mk |
22 | * \endcode | 22 | * \endcode |
23 | * | 23 | * |
24 | * Once included in your project makefile, the associated build module targets will be added to your | 24 | * Once included in your project makefile, the associated build module targets will be added to your |
25 | * project's build makefile targets automatically. To call a build target, run <tt>make {TARGET_NAME}</tt> | 25 | * project's build makefile targets automatically. To call a build target, run <tt>make {TARGET_NAME}</tt> |
26 | * from the command line, substituting in the appropriate target name. | 26 | * from the command line, substituting in the appropriate target name. |
27 | * | 27 | * |
28 | * \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile. | 28 | * \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile. |
29 | * | 29 | * |
30 | * Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i> | 30 | * Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i> |
31 | * be supplied in the project makefile for the module to work, and one or more optional parameters which | 31 | * be supplied in the project makefile for the module to work, and one or more optional parameters which |
32 | * may be defined and which will assume a sensible default if not. | 32 | * may be defined and which will assume a sensible default if not. |
33 | * | 33 | * |
34 | * \section SSec_BuildSystem_Modules Available Modules | 34 | * \section SSec_BuildSystem_Modules Available Modules |
35 | * | 35 | * |
36 | * The following modules are included in this LUFA release: | 36 | * The following modules are included in this LUFA release: |
37 | * | 37 | * |
38 | * \li \subpage Page_BuildModule_ATPROGRAM - Device Programming | 38 | * \li \subpage Page_BuildModule_ATPROGRAM - Device Programming |
39 | * \li \subpage Page_BuildModule_AVRDUDE - Device Programming | 39 | * \li \subpage Page_BuildModule_AVRDUDE - Device Programming |
40 | * \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking | 40 | * \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking |
41 | * \li \subpage Page_BuildModule_CORE - Core Build System Functions | 41 | * \li \subpage Page_BuildModule_CORE - Core Build System Functions |
42 | * \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis | 42 | * \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis |
43 | * \li \subpage Page_BuildModule_DFU - Device Programming | 43 | * \li \subpage Page_BuildModule_DFU - Device Programming |
44 | * \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation | 44 | * \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation |
45 | * \li \subpage Page_BuildModule_HID - Device Programming | 45 | * \li \subpage Page_BuildModule_HID - Device Programming |
46 | * \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables | 46 | * \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables |
47 | * | 47 | * |
48 | * If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps. | 48 | * If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | /** \page Page_BuildModule_BUILD The BUILD build module | 51 | /** \page Page_BuildModule_BUILD The BUILD build module |
52 | * | 52 | * |
53 | * The BUILD LUFA build system module, providing targets for the compilation, | 53 | * The BUILD LUFA build system module, providing targets for the compilation, |
54 | * assembling and linking of an application from source code into binary files | 54 | * assembling and linking of an application from source code into binary files |
55 | * suitable for programming into a target device, using the GCC compiler. | 55 | * suitable for programming into a target device, using the GCC compiler. |
56 | * | 56 | * |
57 | * To use this module in your application makefile, add the following code: | 57 | * To use this module in your application makefile, add the following code: |
58 | * \code | 58 | * \code |
59 | * include $(LUFA_PATH)/Build/lufa_build.mk | 59 | * include $(LUFA_PATH)/Build/lufa_build.mk |
60 | * \endcode | 60 | * \endcode |
61 | * | 61 | * |
62 | * \section SSec_BuildModule_BUILD_Requirements Requirements | 62 | * \section SSec_BuildModule_BUILD_Requirements Requirements |
63 | * This module requires the the architecture appropriate binaries of the GCC compiler are available in your | 63 | * This module requires the the architecture appropriate binaries of the GCC compiler are available in your |
64 | * system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio | 64 | * system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio |
65 | * 5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages. | 65 | * 5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages. |
66 | * | 66 | * |
67 | * \section SSec_BuildModule_BUILD_Targets Targets | 67 | * \section SSec_BuildModule_BUILD_Targets Targets |
68 | * | 68 | * |
69 | * <table> | 69 | * <table> |
70 | * <tr> | 70 | * <tr> |
71 | * <td><tt>size</tt></td> | 71 | * <td><tt>size</tt></td> |
72 | * <td>Display size of the compiled application FLASH and SRAM segments.</td> | 72 | * <td>Display size of the compiled application FLASH and SRAM segments.</td> |
73 | * </tr> | 73 | * </tr> |
74 | * <tr> | 74 | * <tr> |
75 | * <td><tt>symbol-sizes</tt></td> | 75 | * <td><tt>symbol-sizes</tt></td> |
76 | * <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td> | 76 | * <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td> |
77 | * </tr> | 77 | * </tr> |
78 | * <tr> | 78 | * <tr> |
79 | * <td><tt>lib</tt></td> | 79 | * <td><tt>lib</tt></td> |
80 | * <td>Build and archive all source files into a library A binary file.</td> | 80 | * <td>Build and archive all source files into a library A binary file.</td> |
81 | * </tr> | 81 | * </tr> |
82 | * <tr> | 82 | * <tr> |
83 | * <td><tt>all</tt></td> | 83 | * <td><tt>all</tt></td> |
84 | * <td>Build and link the application into ELF debug and HEX binary files.</td> | 84 | * <td>Build and link the application into ELF debug and HEX binary files.</td> |
85 | * </tr> | 85 | * </tr> |
86 | * <tr> | 86 | * <tr> |
87 | * <td><tt>elf</tt></td> | 87 | * <td><tt>elf</tt></td> |
88 | * <td>Build and link the application into an ELF debug file.</td> | 88 | * <td>Build and link the application into an ELF debug file.</td> |
89 | * </tr> | 89 | * </tr> |
90 | * <tr> | 90 | * <tr> |
91 | * <td><tt>bin</tt></td> | 91 | * <td><tt>bin</tt></td> |
92 | * <td>Build and link the application and produce a BIN binary file.</td> | 92 | * <td>Build and link the application and produce a BIN binary file.</td> |
93 | * </tr> | 93 | * </tr> |
94 | * <tr> | 94 | * <tr> |
95 | * <td><tt>hex</tt></td> | 95 | * <td><tt>hex</tt></td> |
96 | * <td>Build and link the application and produce HEX and EEP binary files.</td> | 96 | * <td>Build and link the application and produce HEX and EEP binary files.</td> |
97 | * </tr> | 97 | * </tr> |
98 | * <tr> | 98 | * <tr> |
99 | * <td><tt>lss</tt></td> | 99 | * <td><tt>lss</tt></td> |
100 | * <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td> | 100 | * <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td> |
101 | * </tr> | 101 | * </tr> |
102 | * <tr> | 102 | * <tr> |
103 | * <td><tt>clean</tt></td> | 103 | * <td><tt>clean</tt></td> |
104 | * <td>Remove all intermediary files and binary output files.</td> | 104 | * <td>Remove all intermediary files and binary output files.</td> |
105 | * </tr> | 105 | * </tr> |
106 | * <tr> | 106 | * <tr> |
107 | * <td><tt>mostlyclean</tt></td> | 107 | * <td><tt>mostlyclean</tt></td> |
108 | * <td>Remove all intermediary files but preserve any binary output files.</td> | 108 | * <td>Remove all intermediary files but preserve any binary output files.</td> |
109 | * </tr> | 109 | * </tr> |
110 | * <tr> | 110 | * <tr> |
111 | * <td><tt><i><filename></i>.s</tt></td> | 111 | * <td><tt><i><filename></i>.s</tt></td> |
112 | * <td>Create an assembly listing of a given input C/C++ source file.</td> | 112 | * <td>Create an assembly listing of a given input C/C++ source file.</td> |
113 | * </tr> | 113 | * </tr> |
114 | * </table> | 114 | * </table> |
115 | * | 115 | * |
116 | * \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters | 116 | * \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters |
117 | * | 117 | * |
118 | * <table> | 118 | * <table> |
119 | * <tr> | 119 | * <tr> |
120 | * <td><tt>TARGET</tt></td> | 120 | * <td><tt>TARGET</tt></td> |
121 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> | 121 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> |
122 | * </tr> | 122 | * </tr> |
123 | * <tr> | 123 | * <tr> |
124 | * <td><tt>ARCH</tt></td> | 124 | * <td><tt>ARCH</tt></td> |
125 | * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td> | 125 | * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td> |
126 | * </tr> | 126 | * </tr> |
127 | * <tr> | 127 | * <tr> |
128 | * <td><tt>MCU</tt></td> | 128 | * <td><tt>MCU</tt></td> |
129 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> | 129 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> |
130 | * </tr> | 130 | * </tr> |
131 | * <tr> | 131 | * <tr> |
132 | * <td><tt>SRC</tt></td> | 132 | * <td><tt>SRC</tt></td> |
133 | * <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td> | 133 | * <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td> |
134 | * </tr> | 134 | * </tr> |
135 | * <tr> | 135 | * <tr> |
136 | * <td><tt>F_USB</tt></td> | 136 | * <td><tt>F_USB</tt></td> |
137 | * <td>Speed in Hz of the input clock frequency to the target's USB controller.</td> | 137 | * <td>Speed in Hz of the input clock frequency to the target's USB controller.</td> |
138 | * </tr> | 138 | * </tr> |
139 | * <tr> | 139 | * <tr> |
140 | * <td><tt>LUFA_PATH</tt></td> | 140 | * <td><tt>LUFA_PATH</tt></td> |
141 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> | 141 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> |
142 | * </tr> | 142 | * </tr> |
143 | * </table> | 143 | * </table> |
144 | * | 144 | * |
145 | * \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters | 145 | * \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters |
146 | * | 146 | * |
147 | * <table> | 147 | * <table> |
148 | * <tr> | 148 | * <tr> |
149 | * <td><tt>BOARD</tt></td> | 149 | * <td><tt>BOARD</tt></td> |
150 | * <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td> | 150 | * <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td> |
151 | * </tr> | 151 | * </tr> |
152 | * <tr> | 152 | * <tr> |
153 | * <td><tt>OPTIMIZATION</tt></td> | 153 | * <td><tt>OPTIMIZATION</tt></td> |
154 | * <td>Optimization level to use when compiling source files (see GCC manual).</td> | 154 | * <td>Optimization level to use when compiling source files (see GCC manual).</td> |
155 | * </tr> | 155 | * </tr> |
156 | * <tr> | 156 | * <tr> |
157 | * <td><tt>C_STANDARD</tt></td> | 157 | * <td><tt>C_STANDARD</tt></td> |
158 | * <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td> | 158 | * <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td> |
159 | * </tr> | 159 | * </tr> |
160 | * <tr> | 160 | * <tr> |
161 | * <td><tt>CPP_STANDARD</tt></td> | 161 | * <td><tt>CPP_STANDARD</tt></td> |
162 | * <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td> | 162 | * <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td> |
163 | * </tr> | 163 | * </tr> |
164 | * <tr> | 164 | * <tr> |
165 | * <td><tt>DEBUG_FORMAT</tt></td> | 165 | * <td><tt>DEBUG_FORMAT</tt></td> |
166 | * <td>Format of the debug information to embed in the generated object files (see GCC manual).</td> | 166 | * <td>Format of the debug information to embed in the generated object files (see GCC manual).</td> |
167 | * </tr> | 167 | * </tr> |
168 | * <tr> | 168 | * <tr> |
169 | * <td><tt>DEBUG_LEVEL</tt></td> | 169 | * <td><tt>DEBUG_LEVEL</tt></td> |
170 | * <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td> | 170 | * <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td> |
171 | * </tr> | 171 | * </tr> |
172 | * <tr> | 172 | * <tr> |
173 | * <td><tt>F_CPU</tt></td> | 173 | * <td><tt>F_CPU</tt></td> |
174 | * <td>Speed of the processor CPU clock, in Hz.</td> | 174 | * <td>Speed of the processor CPU clock, in Hz.</td> |
175 | * </tr> | 175 | * </tr> |
176 | * <tr> | 176 | * <tr> |
177 | * <td><tt>C_FLAGS</tt></td> | 177 | * <td><tt>C_FLAGS</tt></td> |
178 | * <td>Flags to pass to the C compiler only, after the automatically generated flags.</td> | 178 | * <td>Flags to pass to the C compiler only, after the automatically generated flags.</td> |
179 | * </tr> | 179 | * </tr> |
180 | * <tr> | 180 | * <tr> |
181 | * <td><tt>CPP_FLAGS</tt></td> | 181 | * <td><tt>CPP_FLAGS</tt></td> |
182 | * <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td> | 182 | * <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td> |
183 | * </tr> | 183 | * </tr> |
184 | * <tr> | 184 | * <tr> |
185 | * <td><tt>ASM_FLAGS</tt></td> | 185 | * <td><tt>ASM_FLAGS</tt></td> |
186 | * <td>Flags to pass to the assembler only, after the automatically generated flags.</td> | 186 | * <td>Flags to pass to the assembler only, after the automatically generated flags.</td> |
187 | * </tr> | 187 | * </tr> |
188 | * <tr> | 188 | * <tr> |
189 | * <td><tt>CC_FLAGS</tt></td> | 189 | * <td><tt>CC_FLAGS</tt></td> |
190 | * <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td> | 190 | * <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td> |
191 | * </tr> | 191 | * </tr> |
192 | * <tr> | 192 | * <tr> |
193 | * <td><tt>COMPILER_PATH</tt></td> | 193 | * <td><tt>COMPILER_PATH</tt></td> |
194 | * <td>Directory where the C/C++ toolchain is located, if not available in the system <tt>PATH</tt>.</td> | 194 | * <td>Directory where the C/C++ toolchain is located, if not available in the system <tt>PATH</tt>.</td> |
195 | * </tr> | 195 | * </tr> |
196 | * <tr> | 196 | * <tr> |
197 | * <td><tt>LD_FLAGS</tt></td> | 197 | * <td><tt>LD_FLAGS</tt></td> |
198 | * <td>Flags to pass to the linker, after the automatically generated flags.</td> | 198 | * <td>Flags to pass to the linker, after the automatically generated flags.</td> |
199 | * </tr> | 199 | * </tr> |
200 | * <tr> | 200 | * <tr> |
201 | * <td><tt>LINKER_RELAXATIONS</tt></td> | 201 | * <td><tt>LINKER_RELAXATIONS</tt></td> |
202 | * <td>Enables or disables linker relaxations when linking the application binary. This can reduce the total size | 202 | * <td>Enables or disables linker relaxations when linking the application binary. This can reduce the total size |
203 | * of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible. | 203 | * of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible. |
204 | * \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you | 204 | * \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you |
205 | * receive a link error <tt>relocation truncated to fit: R_AVR_13_PCREL</tt>, disable this setting.</td> | 205 | * receive a link error <tt>relocation truncated to fit: R_AVR_13_PCREL</tt>, disable this setting.</td> |
206 | * </tr> | 206 | * </tr> |
207 | * <tr> | 207 | * <tr> |
208 | * <td><tt>OBJDIR</tt></td> | 208 | * <td><tt>OBJDIR</tt></td> |
209 | * <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used. | 209 | * <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used. |
210 | * \note When this option is enabled, all source filenames <b>must</b> be unique.</td> | 210 | * \note When this option is enabled, all source filenames <b>must</b> be unique.</td> |
211 | * </tr> | 211 | * </tr> |
212 | * <tr> | 212 | * <tr> |
213 | * <td><tt>OBJECT_FILES</tt></td> | 213 | * <td><tt>OBJECT_FILES</tt></td> |
214 | * <td>List of additional object files that should be linked into the resulting binary.</td> | 214 | * <td>List of additional object files that should be linked into the resulting binary.</td> |
215 | * </tr> | 215 | * </tr> |
216 | * </table> | 216 | * </table> |
217 | * | 217 | * |
218 | * \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables | 218 | * \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables |
219 | * | 219 | * |
220 | * <table> | 220 | * <table> |
221 | * <tr> | 221 | * <tr> |
222 | * <td><i>None</i></td> | 222 | * <td><i>None</i></td> |
223 | * </tr> | 223 | * </tr> |
224 | * </table> | 224 | * </table> |
225 | * | 225 | * |
226 | * \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros | 226 | * \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros |
227 | * | 227 | * |
228 | * <table> | 228 | * <table> |
229 | * <tr> | 229 | * <tr> |
230 | * <td><i>None</i></td> | 230 | * <td><i>None</i></td> |
231 | * </tr> | 231 | * </tr> |
232 | * </table> | 232 | * </table> |
233 | */ | 233 | */ |
234 | 234 | ||
235 | /** \page Page_BuildModule_CORE The CORE build module | 235 | /** \page Page_BuildModule_CORE The CORE build module |
236 | * | 236 | * |
237 | * The core LUFA build system module, providing common build system help and information targets. | 237 | * The core LUFA build system module, providing common build system help and information targets. |
238 | * | 238 | * |
239 | * To use this module in your application makefile, add the following code: | 239 | * To use this module in your application makefile, add the following code: |
240 | * \code | 240 | * \code |
241 | * include $(LUFA_PATH)/Build/lufa_core.mk | 241 | * include $(LUFA_PATH)/Build/lufa_core.mk |
242 | * \endcode | 242 | * \endcode |
243 | * | 243 | * |
244 | * \section SSec_BuildModule_CORE_Requirements Requirements | 244 | * \section SSec_BuildModule_CORE_Requirements Requirements |
245 | * This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt> | 245 | * This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt> |
246 | * shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.). | 246 | * shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.). |
247 | * | 247 | * |
248 | * \section SSec_BuildModule_CORE_Targets Targets | 248 | * \section SSec_BuildModule_CORE_Targets Targets |
249 | * | 249 | * |
250 | * <table> | 250 | * <table> |
251 | * <tr> | 251 | * <tr> |
252 | * <td><tt>help</tt></td> | 252 | * <td><tt>help</tt></td> |
253 | * <td>Display build system help and configuration information.</td> | 253 | * <td>Display build system help and configuration information.</td> |
254 | * </tr> | 254 | * </tr> |
255 | * <tr> | 255 | * <tr> |
256 | * <td><tt>list_targets</tt></td> | 256 | * <td><tt>list_targets</tt></td> |
257 | * <td>List all available build targets from the build system.</td> | 257 | * <td>List all available build targets from the build system.</td> |
258 | * </tr> | 258 | * </tr> |
259 | * <tr> | 259 | * <tr> |
260 | * <td><tt>list_modules</tt></td> | 260 | * <td><tt>list_modules</tt></td> |
261 | * <td>List all available build modules from the build system.</td> | 261 | * <td>List all available build modules from the build system.</td> |
262 | * </tr> | 262 | * </tr> |
263 | * <tr> | 263 | * <tr> |
264 | * <td><tt>list_mandatory</tt></td> | 264 | * <td><tt>list_mandatory</tt></td> |
265 | * <td>List all mandatory parameters required by the included modules.</td> | 265 | * <td>List all mandatory parameters required by the included modules.</td> |
266 | * </tr> | 266 | * </tr> |
267 | * <tr> | 267 | * <tr> |
268 | * <td><tt>list_optional</tt></td> | 268 | * <td><tt>list_optional</tt></td> |
269 | * <td>List all optional parameters required by the included modules.</td> | 269 | * <td>List all optional parameters required by the included modules.</td> |
270 | * </tr> | 270 | * </tr> |
271 | * <tr> | 271 | * <tr> |
272 | * <td><tt>list_provided</tt></td> | 272 | * <td><tt>list_provided</tt></td> |
273 | * <td>List all variables provided by the included modules.</td> | 273 | * <td>List all variables provided by the included modules.</td> |
274 | * </tr> | 274 | * </tr> |
275 | * <tr> | 275 | * <tr> |
276 | * <td><tt>list_macros</tt></td> | 276 | * <td><tt>list_macros</tt></td> |
277 | * <td>List all macros provided by the included modules.</td> | 277 | * <td>List all macros provided by the included modules.</td> |
278 | * </tr> | 278 | * </tr> |
279 | * </table> | 279 | * </table> |
280 | * | 280 | * |
281 | * \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters | 281 | * \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters |
282 | * | 282 | * |
283 | * <table> | 283 | * <table> |
284 | * <tr> | 284 | * <tr> |
285 | * <td><i>None</i></td> | 285 | * <td><i>None</i></td> |
286 | * </tr> | 286 | * </tr> |
287 | * </table> | 287 | * </table> |
288 | * | 288 | * |
289 | * \section SSec_BuildModule_CORE_OptionalParams Optional Parameters | 289 | * \section SSec_BuildModule_CORE_OptionalParams Optional Parameters |
290 | * | 290 | * |
291 | * <table> | 291 | * <table> |
292 | * <tr> | 292 | * <tr> |
293 | * <td><i>None</i></td> | 293 | * <td><i>None</i></td> |
294 | * </tr> | 294 | * </tr> |
295 | * </table> | 295 | * </table> |
296 | * | 296 | * |
297 | * \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables | 297 | * \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables |
298 | * | 298 | * |
299 | * <table> | 299 | * <table> |
300 | * <tr> | 300 | * <tr> |
301 | * <td><i>None</i></td> | 301 | * <td><i>None</i></td> |
302 | * </tr> | 302 | * </tr> |
303 | * </table> | 303 | * </table> |
304 | * | 304 | * |
305 | * \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros | 305 | * \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros |
306 | * | 306 | * |
307 | * <table> | 307 | * <table> |
308 | * <tr> | 308 | * <tr> |
309 | * <td><i>None</i></td> | 309 | * <td><i>None</i></td> |
310 | * </tr> | 310 | * </tr> |
311 | * </table> | 311 | * </table> |
312 | */ | 312 | */ |
313 | 313 | ||
314 | /** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module | 314 | /** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module |
315 | * | 315 | * |
316 | * The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an | 316 | * The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an |
317 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. | 317 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. |
318 | * | 318 | * |
319 | * To use this module in your application makefile, add the following code: | 319 | * To use this module in your application makefile, add the following code: |
320 | * \code | 320 | * \code |
321 | * include $(LUFA_PATH)/Build/lufa_atprogram.mk | 321 | * include $(LUFA_PATH)/Build/lufa_atprogram.mk |
322 | * \endcode | 322 | * \endcode |
323 | * | 323 | * |
324 | * \section SSec_BuildModule_ATPROGRAM_Requirements Requirements | 324 | * \section SSec_BuildModule_ATPROGRAM_Requirements Requirements |
325 | * This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b> | 325 | * This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b> |
326 | * variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x | 326 | * variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x |
327 | * inside the application install folder's "\atbackend" subdirectory. | 327 | * inside the application install folder's "\atbackend" subdirectory. |
328 | * | 328 | * |
329 | * \section SSec_BuildModule_ATPROGRAM_Targets Targets | 329 | * \section SSec_BuildModule_ATPROGRAM_Targets Targets |
330 | * | 330 | * |
331 | * <table> | 331 | * <table> |
332 | * <tr> | 332 | * <tr> |
333 | * <td><tt>atprogram</tt></td> | 333 | * <td><tt>atprogram</tt></td> |
334 | * <td>Program the device FLASH memory with the application's executable data.</td> | 334 | * <td>Program the device FLASH memory with the application's executable data.</td> |
335 | * </tr> | 335 | * </tr> |
336 | * <tr> | 336 | * <tr> |
337 | * <td><tt>atprogram-ee</tt></td> | 337 | * <td><tt>atprogram-ee</tt></td> |
338 | * <td>Program the device EEPROM memory with the application's EEPROM data.</td> | 338 | * <td>Program the device EEPROM memory with the application's EEPROM data.</td> |
339 | * </tr> | 339 | * </tr> |
340 | * </table> | 340 | * </table> |
341 | * | 341 | * |
342 | * \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters | 342 | * \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters |
343 | * | 343 | * |
344 | * <table> | 344 | * <table> |
345 | * <tr> | 345 | * <tr> |
346 | * <td><tt>MCU</tt></td> | 346 | * <td><tt>MCU</tt></td> |
347 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> | 347 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> |
348 | * </tr> | 348 | * </tr> |
349 | * <tr> | 349 | * <tr> |
350 | * <td><tt>TARGET</tt></td> | 350 | * <td><tt>TARGET</tt></td> |
351 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> | 351 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> |
352 | * </tr> | 352 | * </tr> |
353 | * </table> | 353 | * </table> |
354 | * | 354 | * |
355 | * \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters | 355 | * \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters |
356 | * | 356 | * |
357 | * <table> | 357 | * <table> |
358 | * <tr> | 358 | * <tr> |
359 | * <td><tt>ATPROGRAM_PROGRAMMER</tt></td> | 359 | * <td><tt>ATPROGRAM_PROGRAMMER</tt></td> |
360 | * <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td> | 360 | * <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td> |
361 | * </tr> | 361 | * </tr> |
362 | * <tr> | 362 | * <tr> |
363 | * <td><tt>ATPROGRAM_INTERFACE</tt></td> | 363 | * <td><tt>ATPROGRAM_INTERFACE</tt></td> |
364 | * <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td> | 364 | * <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td> |
365 | * </tr> | 365 | * </tr> |
366 | * <tr> | 366 | * <tr> |
367 | * <td><tt>ATPROGRAM_PORT</tt></td> | 367 | * <td><tt>ATPROGRAM_PORT</tt></td> |
368 | * <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td> | 368 | * <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td> |
369 | * </tr> | 369 | * </tr> |
370 | * </table> | 370 | * </table> |
371 | * | 371 | * |
372 | * \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables | 372 | * \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables |
373 | * | 373 | * |
374 | * <table> | 374 | * <table> |
375 | * <tr> | 375 | * <tr> |
376 | * <td><i>None</i></td> | 376 | * <td><i>None</i></td> |
377 | * </tr> | 377 | * </tr> |
378 | * </table> | 378 | * </table> |
379 | * | 379 | * |
380 | * \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros | 380 | * \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros |
381 | * | 381 | * |
382 | * <table> | 382 | * <table> |
383 | * <tr> | 383 | * <tr> |
384 | * <td><i>None</i></td> | 384 | * <td><i>None</i></td> |
385 | * </tr> | 385 | * </tr> |
386 | * </table> | 386 | * </table> |
387 | */ | 387 | */ |
388 | 388 | ||
389 | /** \page Page_BuildModule_AVRDUDE The AVRDUDE build module | 389 | /** \page Page_BuildModule_AVRDUDE The AVRDUDE build module |
390 | * | 390 | * |
391 | * The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an | 391 | * The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an |
392 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. | 392 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. |
393 | * | 393 | * |
394 | * To use this module in your application makefile, add the following code: | 394 | * To use this module in your application makefile, add the following code: |
395 | * \code | 395 | * \code |
396 | * include $(LUFA_PATH)/Build/lufa_avrdude.mk | 396 | * include $(LUFA_PATH)/Build/lufa_avrdude.mk |
397 | * \endcode | 397 | * \endcode |
398 | * | 398 | * |
399 | * \section SSec_BuildModule_AVRDUDE_Requirements Requirements | 399 | * \section SSec_BuildModule_AVRDUDE_Requirements Requirements |
400 | * This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b> | 400 | * This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b> |
401 | * variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for | 401 | * variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for |
402 | * Windows (<a>http://winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's | 402 | * Windows (<a>http://winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's |
403 | * source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager. | 403 | * source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager. |
404 | * | 404 | * |
405 | * \section SSec_BuildModule_AVRDUDE_Targets Targets | 405 | * \section SSec_BuildModule_AVRDUDE_Targets Targets |
406 | * | 406 | * |
407 | * <table> | 407 | * <table> |
408 | * <tr> | 408 | * <tr> |
409 | * <td><tt>avrdude</tt></td> | 409 | * <td><tt>avrdude</tt></td> |
410 | * <td>Program the device FLASH memory with the application's executable data.</td> | 410 | * <td>Program the device FLASH memory with the application's executable data.</td> |
411 | * </tr> | 411 | * </tr> |
412 | * <tr> | 412 | * <tr> |
413 | * <td><tt>avrdude-ee</tt></td> | 413 | * <td><tt>avrdude-ee</tt></td> |
414 | * <td>Program the device EEPROM memory with the application's EEPROM data.</td> | 414 | * <td>Program the device EEPROM memory with the application's EEPROM data.</td> |
415 | * </tr> | 415 | * </tr> |
416 | * </table> | 416 | * </table> |
417 | * | 417 | * |
418 | * \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters | 418 | * \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters |
419 | * | 419 | * |
420 | * <table> | 420 | * <table> |
421 | * <tr> | 421 | * <tr> |
422 | * <td><tt>MCU</tt></td> | 422 | * <td><tt>MCU</tt></td> |
423 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> | 423 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> |
424 | * </tr> | 424 | * </tr> |
425 | * <tr> | 425 | * <tr> |
426 | * <td><tt>TARGET</tt></td> | 426 | * <td><tt>TARGET</tt></td> |
427 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> | 427 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> |
428 | * </tr> | 428 | * </tr> |
429 | * </table> | 429 | * </table> |
430 | * | 430 | * |
431 | * \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters | 431 | * \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters |
432 | * | 432 | * |
433 | * <table> | 433 | * <table> |
434 | * <tr> | 434 | * <tr> |
435 | * <td><tt>AVRDUDE_PROGRAMMER</tt></td> | 435 | * <td><tt>AVRDUDE_PROGRAMMER</tt></td> |
436 | * <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td> | 436 | * <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td> |
437 | * </tr> | 437 | * </tr> |
438 | * <tr> | 438 | * <tr> |
439 | * <td><tt>AVRDUDE_PORT</tt></td> | 439 | * <td><tt>AVRDUDE_PORT</tt></td> |
440 | * <td>Name of the communication port to use when when programming with the connected tool (e.g. <tt>COM2</tt>, <tt>/dev/ttyUSB0</tt> or <tt>usb</tt>).</td> | 440 | * <td>Name of the communication port to use when when programming with the connected tool (e.g. <tt>COM2</tt>, <tt>/dev/ttyUSB0</tt> or <tt>usb</tt>).</td> |
441 | * </tr> | 441 | * </tr> |
442 | * <tr> | 442 | * <tr> |
443 | * <td><tt>AVRDUDE_FLAGS</tt></td> | 443 | * <td><tt>AVRDUDE_FLAGS</tt></td> |
444 | * <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td> | 444 | * <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td> |
445 | * </tr> | 445 | * </tr> |
446 | * </table> | 446 | * </table> |
447 | * | 447 | * |
448 | * \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables | 448 | * \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables |
449 | * | 449 | * |
450 | * <table> | 450 | * <table> |
451 | * <tr> | 451 | * <tr> |
452 | * <td><i>None</i></td> | 452 | * <td><i>None</i></td> |
453 | * </tr> | 453 | * </tr> |
454 | * </table> | 454 | * </table> |
455 | * | 455 | * |
456 | * \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros | 456 | * \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros |
457 | * | 457 | * |
458 | * <table> | 458 | * <table> |
459 | * <tr> | 459 | * <tr> |
460 | * <td><i>None</i></td> | 460 | * <td><i>None</i></td> |
461 | * </tr> | 461 | * </tr> |
462 | * </table> | 462 | * </table> |
463 | */ | 463 | */ |
464 | 464 | ||
465 | /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module | 465 | /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module |
466 | * | 466 | * |
467 | * The CPPCHECK programming utility LUFA build system module, providing targets to statically | 467 | * The CPPCHECK programming utility LUFA build system module, providing targets to statically |
468 | * analyze C and C++ source code for errors and performance/style issues. | 468 | * analyze C and C++ source code for errors and performance/style issues. |
469 | * | 469 | * |
470 | * To use this module in your application makefile, add the following code: | 470 | * To use this module in your application makefile, add the following code: |
471 | * \code | 471 | * \code |
472 | * include $(LUFA_PATH)/Build/lufa_cppcheck.mk | 472 | * include $(LUFA_PATH)/Build/lufa_cppcheck.mk |
473 | * \endcode | 473 | * \endcode |
474 | * | 474 | * |
475 | * \section SSec_BuildModule_CPPCHECK_Requirements Requirements | 475 | * \section SSec_BuildModule_CPPCHECK_Requirements Requirements |
476 | * This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b> | 476 | * This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b> |
477 | * variable. The <tt>cppcheck</tt> utility is distributed through the project's home page | 477 | * variable. The <tt>cppcheck</tt> utility is distributed through the project's home page |
478 | * (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via | 478 | * (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via |
479 | * the project's source code or through the package manager. | 479 | * the project's source code or through the package manager. |
480 | * | 480 | * |
481 | * \section SSec_BuildModule_CPPCHECK_Targets Targets | 481 | * \section SSec_BuildModule_CPPCHECK_Targets Targets |
482 | * | 482 | * |
483 | * <table> | 483 | * <table> |
484 | * <tr> | 484 | * <tr> |
485 | * <td><tt>cppcheck</tt></td> | 485 | * <td><tt>cppcheck</tt></td> |
486 | * <td>Statically analyze the project source code for issues.</td> | 486 | * <td>Statically analyze the project source code for issues.</td> |
487 | * </tr> | 487 | * </tr> |
488 | * <tr> | 488 | * <tr> |
489 | * <td><tt>cppcheck-config</tt></td> | 489 | * <td><tt>cppcheck-config</tt></td> |
490 | * <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td> | 490 | * <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td> |
491 | * </tr> | 491 | * </tr> |
492 | * </table> | 492 | * </table> |
493 | * | 493 | * |
494 | * \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters | 494 | * \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters |
495 | * | 495 | * |
496 | * <table> | 496 | * <table> |
497 | * <tr> | 497 | * <tr> |
498 | * <td><tt>SRC</tt></td> | 498 | * <td><tt>SRC</tt></td> |
499 | * <td>List of source files to statically analyze.</td> | 499 | * <td>List of source files to statically analyze.</td> |
500 | * </tr> | 500 | * </tr> |
501 | * </table> | 501 | * </table> |
502 | * | 502 | * |
503 | * \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters | 503 | * \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters |
504 | * | 504 | * |
505 | * <table> | 505 | * <table> |
506 | * <tr> | 506 | * <tr> |
507 | * <td><tt>CPPCHECK_INCLUDES</tt></td> | 507 | * <td><tt>CPPCHECK_INCLUDES</tt></td> |
508 | * <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td> | 508 | * <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td> |
509 | * </tr> | 509 | * </tr> |
510 | * <tr> | 510 | * <tr> |
511 | * <td><tt>CPPCHECK_EXCLUDES</tt></td> | 511 | * <td><tt>CPPCHECK_EXCLUDES</tt></td> |
512 | * <td>Paths or path fragments to exclude when analyzing.</td> | 512 | * <td>Paths or path fragments to exclude when analyzing.</td> |
513 | * </tr> | 513 | * </tr> |
514 | * <tr> | 514 | * <tr> |
515 | * <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td> | 515 | * <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td> |
516 | * <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td> | 516 | * <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td> |
517 | * </tr> | 517 | * </tr> |
518 | * <tr> | 518 | * <tr> |
519 | * <td><tt>CPPCHECK_ENABLE</tt></td> | 519 | * <td><tt>CPPCHECK_ENABLE</tt></td> |
520 | * <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td> | 520 | * <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td> |
521 | * </tr> | 521 | * </tr> |
522 | * <tr> | 522 | * <tr> |
523 | * <td><tt>CPPCHECK_SUPPRESS</tt></td> | 523 | * <td><tt>CPPCHECK_SUPPRESS</tt></td> |
524 | * <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td> | 524 | * <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td> |
525 | * </tr> | 525 | * </tr> |
526 | * <tr> | 526 | * <tr> |
527 | * <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td> | 527 | * <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td> |
528 | * <td>Set to <b>Y</b> to fail the analysis job with an error exit code if warnings are found, <b>N</b> to continue without failing.</td> | 528 | * <td>Set to <b>Y</b> to fail the analysis job with an error exit code if warnings are found, <b>N</b> to continue without failing.</td> |
529 | * </tr> | 529 | * </tr> |
530 | * <tr> | 530 | * <tr> |
531 | * <td><tt>CPPCHECK_QUIET</tt></td> | 531 | * <td><tt>CPPCHECK_QUIET</tt></td> |
532 | * <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td> | 532 | * <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td> |
533 | * </tr> | 533 | * </tr> |
534 | * <tr> | 534 | * <tr> |
535 | * <td><tt>CPPCHECK_FLAGS</tt></td> | 535 | * <td><tt>CPPCHECK_FLAGS</tt></td> |
536 | * <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td> | 536 | * <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td> |
537 | * </tr> | 537 | * </tr> |
538 | * </table> | 538 | * </table> |
539 | * | 539 | * |
540 | * \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables | 540 | * \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables |
541 | * | 541 | * |
542 | * <table> | 542 | * <table> |
543 | * <tr> | 543 | * <tr> |
544 | * <td><i>None</i></td> | 544 | * <td><i>None</i></td> |
545 | * </tr> | 545 | * </tr> |
546 | * </table> | 546 | * </table> |
547 | * | 547 | * |
548 | * \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros | 548 | * \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros |
549 | * | 549 | * |
550 | * <table> | 550 | * <table> |
551 | * <tr> | 551 | * <tr> |
552 | * <td><i>None</i></td> | 552 | * <td><i>None</i></td> |
553 | * </tr> | 553 | * </tr> |
554 | * </table> | 554 | * </table> |
555 | */ | 555 | */ |
556 | 556 | ||
557 | /** \page Page_BuildModule_DFU The DFU build module | 557 | /** \page Page_BuildModule_DFU The DFU build module |
558 | * | 558 | * |
559 | * The DFU programming utility LUFA build system module, providing targets to reprogram an | 559 | * The DFU programming utility LUFA build system module, providing targets to reprogram an |
560 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. | 560 | * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. |
561 | * This module requires a DFU class bootloader to be running in the target, compatible with | 561 | * This module requires a DFU class bootloader to be running in the target, compatible with |
562 | * the DFU bootloader protocol as published by Atmel. | 562 | * the DFU bootloader protocol as published by Atmel. |
563 | * | 563 | * |
564 | * To use this module in your application makefile, add the following code: | 564 | * To use this module in your application makefile, add the following code: |
565 | * \code | 565 | * \code |
566 | * include $(LUFA_PATH)/Build/lufa_dfu.mk | 566 | * include $(LUFA_PATH)/Build/lufa_dfu.mk |
567 | * \endcode | 567 | * \endcode |
568 | * | 568 | * |
569 | * \section SSec_BuildModule_DFU_Requirements Requirements | 569 | * \section SSec_BuildModule_DFU_Requirements Requirements |
570 | * This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open | 570 | * This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open |
571 | * source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be | 571 | * source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be |
572 | * available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility | 572 | * available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility |
573 | * can be installed via the project's source code or through the package manager. | 573 | * can be installed via the project's source code or through the package manager. |
574 | * | 574 | * |
575 | * \section SSec_BuildModule_DFU_Targets Targets | 575 | * \section SSec_BuildModule_DFU_Targets Targets |
576 | * | 576 | * |
577 | * <table> | 577 | * <table> |
578 | * <tr> | 578 | * <tr> |
579 | * <td><tt>dfu</tt></td> | 579 | * <td><tt>dfu</tt></td> |
580 | * <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td> | 580 | * <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td> |
581 | * </tr> | 581 | * </tr> |
582 | * <tr> | 582 | * <tr> |
583 | * <td><tt>dfu-ee</tt></td> | 583 | * <td><tt>dfu-ee</tt></td> |
584 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td> | 584 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td> |
585 | * </tr> | 585 | * </tr> |
586 | * <tr> | 586 | * <tr> |
587 | * <td><tt>flip</tt></td> | 587 | * <td><tt>flip</tt></td> |
588 | * <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td> | 588 | * <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td> |
589 | * </tr> | 589 | * </tr> |
590 | * <tr> | 590 | * <tr> |
591 | * <td><tt>flip-ee</tt></td> | 591 | * <td><tt>flip-ee</tt></td> |
592 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td> | 592 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td> |
593 | * </tr> | 593 | * </tr> |
594 | * </table> | 594 | * </table> |
595 | * | 595 | * |
596 | * \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters | 596 | * \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters |
597 | * | 597 | * |
598 | * <table> | 598 | * <table> |
599 | * <tr> | 599 | * <tr> |
600 | * <td><tt>MCU</tt></td> | 600 | * <td><tt>MCU</tt></td> |
601 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> | 601 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> |
602 | * </tr> | 602 | * </tr> |
603 | * <tr> | 603 | * <tr> |
604 | * <td><tt>TARGET</tt></td> | 604 | * <td><tt>TARGET</tt></td> |
605 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> | 605 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> |
606 | * </tr> | 606 | * </tr> |
607 | * </table> | 607 | * </table> |
608 | * | 608 | * |
609 | * \section SSec_BuildModule_DFU_OptionalParams Optional Parameters | 609 | * \section SSec_BuildModule_DFU_OptionalParams Optional Parameters |
610 | * | 610 | * |
611 | * <table> | 611 | * <table> |
612 | * <tr> | 612 | * <tr> |
613 | * <td><i>None</i></td> | 613 | * <td><i>None</i></td> |
614 | * </tr> | 614 | * </tr> |
615 | * </table> | 615 | * </table> |
616 | * | 616 | * |
617 | * \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables | 617 | * \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables |
618 | * | 618 | * |
619 | * <table> | 619 | * <table> |
620 | * <tr> | 620 | * <tr> |
621 | * <td><i>None</i></td> | 621 | * <td><i>None</i></td> |
622 | * </tr> | 622 | * </tr> |
623 | * </table> | 623 | * </table> |
624 | * | 624 | * |
625 | * \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros | 625 | * \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros |
626 | * | 626 | * |
627 | * <table> | 627 | * <table> |
628 | * <tr> | 628 | * <tr> |
629 | * <td><i>None</i></td> | 629 | * <td><i>None</i></td> |
630 | * </tr> | 630 | * </tr> |
631 | * </table> | 631 | * </table> |
632 | */ | 632 | */ |
633 | 633 | ||
634 | /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module | 634 | /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module |
635 | * | 635 | * |
636 | * The DOXYGEN code documentation utility LUFA build system module, providing targets to generate | 636 | * The DOXYGEN code documentation utility LUFA build system module, providing targets to generate |
637 | * project HTML and other format documentation from a set of source files that include special | 637 | * project HTML and other format documentation from a set of source files that include special |
638 | * Doxygen comments. | 638 | * Doxygen comments. |
639 | * | 639 | * |
640 | * To use this module in your application makefile, add the following code: | 640 | * To use this module in your application makefile, add the following code: |
641 | * \code | 641 | * \code |
642 | * include $(LUFA_PATH)/Build/lufa_doxygen.mk | 642 | * include $(LUFA_PATH)/Build/lufa_doxygen.mk |
643 | * \endcode | 643 | * \endcode |
644 | * | 644 | * |
645 | * \section SSec_BuildModule_DOXYGEN_Requirements Requirements | 645 | * \section SSec_BuildModule_DOXYGEN_Requirements Requirements |
646 | * This module requires the <tt>doxygen</tt> utility from the Doxygen website | 646 | * This module requires the <tt>doxygen</tt> utility from the Doxygen website |
647 | * (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix | 647 | * (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix |
648 | * systems the <tt>doxygen</tt> utility can be installed via the project's source code or through | 648 | * systems the <tt>doxygen</tt> utility can be installed via the project's source code or through |
649 | * the package manager. | 649 | * the package manager. |
650 | * | 650 | * |
651 | * \section SSec_BuildModule_DOXYGEN_Targets Targets | 651 | * \section SSec_BuildModule_DOXYGEN_Targets Targets |
652 | * | 652 | * |
653 | * <table> | 653 | * <table> |
654 | * <tr> | 654 | * <tr> |
655 | * <td><tt>doxygen</tt></td> | 655 | * <td><tt>doxygen</tt></td> |
656 | * <td>Generate project documentation.</td> | 656 | * <td>Generate project documentation.</td> |
657 | * </tr> | 657 | * </tr> |
658 | * <tr> | 658 | * <tr> |
659 | * <td><tt>doxygen_create</tt></td> | 659 | * <td><tt>doxygen_create</tt></td> |
660 | * <td>Create a new Doxygen configuration file using the latest template.</td> | 660 | * <td>Create a new Doxygen configuration file using the latest template.</td> |
661 | * </tr> | 661 | * </tr> |
662 | * <tr> | 662 | * <tr> |
663 | * <td><tt>doxygen_upgrade</tt></td> | 663 | * <td><tt>doxygen_upgrade</tt></td> |
664 | * <td>Upgrade an existing Doxygen configuration file to the latest template</td> | 664 | * <td>Upgrade an existing Doxygen configuration file to the latest template</td> |
665 | * </tr> | 665 | * </tr> |
666 | * </table> | 666 | * </table> |
667 | * | 667 | * |
668 | * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters | 668 | * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters |
669 | * | 669 | * |
670 | * <table> | 670 | * <table> |
671 | * <tr> | 671 | * <tr> |
672 | * <td><tt>LUFA_PATH</tt></td> | 672 | * <td><tt>LUFA_PATH</tt></td> |
673 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> | 673 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> |
674 | * </tr> | 674 | * </tr> |
675 | * </table> | 675 | * </table> |
676 | * | 676 | * |
677 | * \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters | 677 | * \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters |
678 | * | 678 | * |
679 | * <table> | 679 | * <table> |
680 | * <tr> | 680 | * <tr> |
681 | * <td><tt>DOXYGEN_CONF</tt></td> | 681 | * <td><tt>DOXYGEN_CONF</tt></td> |
682 | * <td>Name and path of the base Doxygen configuration file for the project.</td> | 682 | * <td>Name and path of the base Doxygen configuration file for the project.</td> |
683 | * </tr> | 683 | * </tr> |
684 | * <tr> | 684 | * <tr> |
685 | * <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td> | 685 | * <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td> |
686 | * <td>Set to <b>Y</b> to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, <b>N</b> to continue without failing.</td> | 686 | * <td>Set to <b>Y</b> to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, <b>N</b> to continue without failing.</td> |
687 | * </tr> | 687 | * </tr> |
688 | * <tr> | 688 | * <tr> |
689 | * <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td> | 689 | * <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td> |
690 | * <td>Extra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. <tt>QUIET=YES</tt>).</td> | 690 | * <td>Extra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. <tt>QUIET=YES</tt>).</td> |
691 | * </tr> | 691 | * </tr> |
692 | * </table> | 692 | * </table> |
693 | * | 693 | * |
694 | * \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables | 694 | * \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables |
695 | * | 695 | * |
696 | * <table> | 696 | * <table> |
697 | * <tr> | 697 | * <tr> |
698 | * <td><i>None</i></td> | 698 | * <td><i>None</i></td> |
699 | * </tr> | 699 | * </tr> |
700 | * </table> | 700 | * </table> |
701 | * | 701 | * |
702 | * \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros | 702 | * \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros |
703 | * | 703 | * |
704 | * <table> | 704 | * <table> |
705 | * <tr> | 705 | * <tr> |
706 | * <td><i>None</i></td> | 706 | * <td><i>None</i></td> |
707 | * </tr> | 707 | * </tr> |
708 | * </table> | 708 | * </table> |
709 | */ | 709 | */ |
710 | 710 | ||
711 | /** \page Page_BuildModule_HID The HID build module | 711 | /** \page Page_BuildModule_HID The HID build module |
712 | * | 712 | * |
713 | * The HID programming utility LUFA build system module, providing targets to reprogram an | 713 | * The HID programming utility LUFA build system module, providing targets to reprogram an |
714 | * Atmel processor's FLASH memory with a project's compiled binary output file. This module | 714 | * Atmel processor's FLASH memory with a project's compiled binary output file. This module |
715 | * requires a HID class bootloader to be running in the target, using a protocol compatible | 715 | * requires a HID class bootloader to be running in the target, using a protocol compatible |
716 | * with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>). | 716 | * with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>). |
717 | * | 717 | * |
718 | * To use this module in your application makefile, add the following code: | 718 | * To use this module in your application makefile, add the following code: |
719 | * \code | 719 | * \code |
720 | * include $(LUFA_PATH)/Build/lufa_hid.mk | 720 | * include $(LUFA_PATH)/Build/lufa_hid.mk |
721 | * \endcode | 721 | * \endcode |
722 | * | 722 | * |
723 | * \section SSec_BuildModule_HID_Requirements Requirements | 723 | * \section SSec_BuildModule_HID_Requirements Requirements |
724 | * This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID | 724 | * This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID |
725 | * class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC | 725 | * class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC |
726 | * (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b> | 726 | * (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b> |
727 | * variable. | 727 | * variable. |
728 | * | 728 | * |
729 | * \section SSec_BuildModule_HID_Targets Targets | 729 | * \section SSec_BuildModule_HID_Targets Targets |
730 | * | 730 | * |
731 | * <table> | 731 | * <table> |
732 | * <tr> | 732 | * <tr> |
733 | * <td><tt>hid</tt></td> | 733 | * <td><tt>hid</tt></td> |
734 | * <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td> | 734 | * <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td> |
735 | * </tr> | 735 | * </tr> |
736 | * <tr> | 736 | * <tr> |
737 | * <td><tt>hid-ee</tt></td> | 737 | * <td><tt>hid-ee</tt></td> |
738 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and | 738 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and |
739 | * a temporary AVR application programmed into the target's FLASH. | 739 | * a temporary AVR application programmed into the target's FLASH. |
740 | * \note This will erase the currently loaded application in the target.</td> | 740 | * \note This will erase the currently loaded application in the target.</td> |
741 | * </tr> | 741 | * </tr> |
742 | * <tr> | 742 | * <tr> |
743 | * <td><tt>teensy</tt></td> | 743 | * <td><tt>teensy</tt></td> |
744 | * <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td> | 744 | * <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td> |
745 | * </tr> | 745 | * </tr> |
746 | * <tr> | 746 | * <tr> |
747 | * <td><tt>teensy-ee</tt></td> | 747 | * <td><tt>teensy-ee</tt></td> |
748 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and | 748 | * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and |
749 | * a temporary AVR application programmed into the target's FLASH. | 749 | * a temporary AVR application programmed into the target's FLASH. |
750 | * \note This will erase the currently loaded application in the target.</td> | 750 | * \note This will erase the currently loaded application in the target.</td> |
751 | * </tr> | 751 | * </tr> |
752 | * </table> | 752 | * </table> |
753 | * | 753 | * |
754 | * \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters | 754 | * \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters |
755 | * | 755 | * |
756 | * <table> | 756 | * <table> |
757 | * <tr> | 757 | * <tr> |
758 | * <td><tt>MCU</tt></td> | 758 | * <td><tt>MCU</tt></td> |
759 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> | 759 | * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td> |
760 | * </tr> | 760 | * </tr> |
761 | * <tr> | 761 | * <tr> |
762 | * <td><tt>TARGET</tt></td> | 762 | * <td><tt>TARGET</tt></td> |
763 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> | 763 | * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td> |
764 | * </tr> | 764 | * </tr> |
765 | * </table> | 765 | * </table> |
766 | * | 766 | * |
767 | * \section SSec_BuildModule_HID_OptionalParams Optional Parameters | 767 | * \section SSec_BuildModule_HID_OptionalParams Optional Parameters |
768 | * | 768 | * |
769 | * <table> | 769 | * <table> |
770 | * <tr> | 770 | * <tr> |
771 | * <td><i>None</i></td> | 771 | * <td><i>None</i></td> |
772 | * </tr> | 772 | * </tr> |
773 | * </table> | 773 | * </table> |
774 | * | 774 | * |
775 | * \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables | 775 | * \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables |
776 | * | 776 | * |
777 | * <table> | 777 | * <table> |
778 | * <tr> | 778 | * <tr> |
779 | * <td><i>None</i></td> | 779 | * <td><i>None</i></td> |
780 | * </tr> | 780 | * </tr> |
781 | * </table> | 781 | * </table> |
782 | * | 782 | * |
783 | * \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros | 783 | * \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros |
784 | * | 784 | * |
785 | * <table> | 785 | * <table> |
786 | * <tr> | 786 | * <tr> |
787 | * <td><i>None</i></td> | 787 | * <td><i>None</i></td> |
788 | * </tr> | 788 | * </tr> |
789 | * </table> | 789 | * </table> |
790 | */ | 790 | */ |
791 | 791 | ||
792 | /** \page Page_BuildModule_SOURCES The SOURCES build module | 792 | /** \page Page_BuildModule_SOURCES The SOURCES build module |
793 | * | 793 | * |
794 | * The SOURCES LUFA build system module, providing variables listing the various LUFA source files | 794 | * The SOURCES LUFA build system module, providing variables listing the various LUFA source files |
795 | * required to be build by a project for a given LUFA module. This module gives a way to reference | 795 | * required to be build by a project for a given LUFA module. This module gives a way to reference |
796 | * LUFA source files symbolically, so that changes to the library structure do not break the library | 796 | * LUFA source files symbolically, so that changes to the library structure do not break the library |
797 | * makefile. | 797 | * makefile. |
798 | * | 798 | * |
799 | * To use this module in your application makefile, add the following code: | 799 | * To use this module in your application makefile, add the following code: |
800 | * \code | 800 | * \code |
801 | * include $(LUFA_PATH)/Build/lufa_sources.mk | 801 | * include $(LUFA_PATH)/Build/lufa_sources.mk |
802 | * \endcode | 802 | * \endcode |
803 | * | 803 | * |
804 | * \section SSec_BuildModule_SOURCES_Requirements Requirements | 804 | * \section SSec_BuildModule_SOURCES_Requirements Requirements |
805 | * None. | 805 | * None. |
806 | * | 806 | * |
807 | * \section SSec_BuildModule_SOURCES_Targets Targets | 807 | * \section SSec_BuildModule_SOURCES_Targets Targets |
808 | * | 808 | * |
809 | * <table> | 809 | * <table> |
810 | * <tr> | 810 | * <tr> |
811 | * <td><i>None</i></td> | 811 | * <td><i>None</i></td> |
812 | * </tr> | 812 | * </tr> |
813 | * </table> | 813 | * </table> |
814 | * | 814 | * |
815 | * \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters | 815 | * \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters |
816 | * | 816 | * |
817 | * <table> | 817 | * <table> |
818 | * <tr> | 818 | * <tr> |
819 | * <td><tt>LUFA_PATH</tt></td> | 819 | * <td><tt>LUFA_PATH</tt></td> |
820 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> | 820 | * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td> |
821 | * </tr> | 821 | * </tr> |
822 | * <tr> | 822 | * <tr> |
823 | * <td><tt>ARCH</tt></td> | 823 | * <td><tt>ARCH</tt></td> |
824 | * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td> | 824 | * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td> |
825 | * </tr> | 825 | * </tr> |
826 | * </table> | 826 | * </table> |
827 | * | 827 | * |
828 | * \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters | 828 | * \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters |
829 | * | 829 | * |
830 | * <table> | 830 | * <table> |
831 | * <tr> | 831 | * <tr> |
832 | * <td><i>None</i></td> | 832 | * <td><i>None</i></td> |
833 | * </tr> | 833 | * </tr> |
834 | * </table> | 834 | * </table> |
835 | * | 835 | * |
836 | * \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables | 836 | * \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables |
837 | * | 837 | * |
838 | * <table> | 838 | * <table> |
839 | * <tr> | 839 | * <tr> |
840 | * <td><tt>LUFA_SRC_USB</tt></td> | 840 | * <td><tt>LUFA_SRC_USB</tt></td> |
841 | * <td>List of LUFA USB driver source files.</td> | 841 | * <td>List of LUFA USB driver source files.</td> |
842 | * </tr> | 842 | * </tr> |
843 | * <tr> | 843 | * <tr> |
844 | * <td><tt>LUFA_SRC_USBCLASS</tt></td> | 844 | * <td><tt>LUFA_SRC_USBCLASS</tt></td> |
845 | * <td>List of LUFA USB Class driver source files.</td> | 845 | * <td>List of LUFA USB Class driver source files.</td> |
846 | * </tr> | 846 | * </tr> |
847 | * <tr> | 847 | * <tr> |
848 | * <td><tt>LUFA_SRC_TEMPERATURE</tt></td> | 848 | * <td><tt>LUFA_SRC_TEMPERATURE</tt></td> |
849 | * <td>List of LUFA temperature sensor driver source files.</td> | 849 | * <td>List of LUFA temperature sensor driver source files.</td> |
850 | * </tr> | 850 | * </tr> |
851 | * <tr> | 851 | * <tr> |
852 | * <td><tt>LUFA_SRC_SERIAL</tt></td> | 852 | * <td><tt>LUFA_SRC_SERIAL</tt></td> |
853 | * <td>List of LUFA Serial U(S)ART driver source files.</td> | 853 | * <td>List of LUFA Serial U(S)ART driver source files.</td> |
854 | * </tr> | 854 | * </tr> |
855 | * <tr> | 855 | * <tr> |
856 | * <td><tt>LUFA_SRC_TWI</tt></td> | 856 | * <td><tt>LUFA_SRC_TWI</tt></td> |
857 | * <td>List of LUFA TWI driver source files.</td> | 857 | * <td>List of LUFA TWI driver source files.</td> |
858 | * </tr> | 858 | * </tr> |
859 | * <tr> | 859 | * <tr> |
860 | * <td><tt>LUFA_SRC_PLATFORM</tt></td> | 860 | * <td><tt>LUFA_SRC_PLATFORM</tt></td> |
861 | * <td>List of LUFA architecture specific platform management source files.</td> | 861 | * <td>List of LUFA architecture specific platform management source files.</td> |
862 | * </tr> | 862 | * </tr> |
863 | * </table> | 863 | * </table> |
864 | * | 864 | * |
865 | * \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros | 865 | * \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros |
866 | * | 866 | * |
867 | * <table> | 867 | * <table> |
868 | * <tr> | 868 | * <tr> |
869 | * <td><i>None</i></td> | 869 | * <td><i>None</i></td> |
870 | * </tr> | 870 | * </tr> |
871 | * </table> | 871 | * </table> |
872 | */ | 872 | */ |
873 | 873 | ||
874 | /** \page Page_BuildTroubleshooting Troubleshooting Information | 874 | /** \page Page_BuildTroubleshooting Troubleshooting Information |
875 | * | 875 | * |
876 | * LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and surrounding binaries. This can sometimes lead to problems compiling applications if one of these | 876 | * LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and surrounding binaries. This can sometimes lead to problems compiling applications if one of these |
877 | * features is buggy in the version of the tools used in a build environment. Missing utilities and incorrectly set makefile configuration options can also result in different | 877 | * features is buggy in the version of the tools used in a build environment. Missing utilities and incorrectly set makefile configuration options can also result in different |
878 | * errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions. | 878 | * errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions. |
879 | * | 879 | * |
880 | * <table> | 880 | * <table> |
881 | * <tr> | 881 | * <tr> |
882 | * <th>Problem</th> | 882 | * <th>Problem</th> |
883 | * <th>Resolution</th> | 883 | * <th>Resolution</th> |
884 | * </tr> | 884 | * </tr> |
885 | * <tr> | 885 | * <tr> |
886 | * <td>Error "<b><tt>relocation truncated to fit: R_AVR_13_PCREL against symbol <i>{X}</i></tt></b>" shown when compiling.</td> | 886 | * <td>Error "<b><tt>relocation truncated to fit: R_AVR_13_PCREL against symbol <i>{X}</i></tt></b>" shown when compiling.</td> |
887 | * <td>Try compiling with the setting <tt>LINKER_RELAXATIONS=N</tt> in your LUFA Build System 2.0 makefile, or remove the line <tt>-Wl,--relax</tt> | 887 | * <td>Try compiling with the setting <tt>LINKER_RELAXATIONS=N</tt> in your LUFA Build System 2.0 makefile, or remove the line <tt>-Wl,--relax</tt> |
888 | * from other makefiles. Alternatively, make sure you have the latest version of the Atmel Toolchain installed for your system.</td> | 888 | * from other makefiles. Alternatively, make sure you have the latest version of the Atmel Toolchain installed for your system.</td> |
889 | * </tr> | 889 | * </tr> |
890 | * <tr> | 890 | * <tr> |
891 | * <td>Error "<b><tt>error: ld terminated with signal 11 [Segmentation fault]</tt></b>" shown when compiling.</td> | 891 | * <td>Error "<b><tt>error: ld terminated with signal 11 [Segmentation fault]</tt></b>" shown when compiling.</td> |
892 | * <td>Try compiling with the setting <tt>DEBUG_LEVEL=2</tt> in your LUFA Build System 2.0 makefile, or make sure you are using <tt>binutils</tt> version 2.22 or later.</td> | 892 | * <td>Try compiling with the setting <tt>DEBUG_LEVEL=2</tt> in your LUFA Build System 2.0 makefile, or make sure you are using <tt>binutils</tt> version 2.22 or later.</td> |
893 | * </tr> | 893 | * </tr> |
894 | * <tr> | 894 | * <tr> |
895 | * <td>Error "<b><tt>EMERGENCY ABORT: INFINITE RECURSION DETECTED</tt></b>" shown when compiling.</td> | 895 | * <td>Error "<b><tt>EMERGENCY ABORT: INFINITE RECURSION DETECTED</tt></b>" shown when compiling.</td> |
896 | * <td>Make sure you are using an up to date version of GNU Make when compiling. This error is a safety system added to the mid-level makefiles, to prevent an issue with | 896 | * <td>Make sure you are using an up to date version of GNU Make when compiling. This error is a safety system added to the mid-level makefiles, to prevent an issue with |
897 | * GNU make or other variants of Make causing an infinitely recursive build.</td> | 897 | * GNU make or other variants of Make causing an infinitely recursive build.</td> |
898 | * </tr> | 898 | * </tr> |
899 | * <tr> | 899 | * <tr> |
900 | * <td>Error "<b><tt>Unsupported architecture "<i>{X}</i>"</tt></b>" shown when compiling.</td> | 900 | * <td>Error "<b><tt>Unsupported architecture "<i>{X}</i>"</tt></b>" shown when compiling.</td> |
901 | * <td>Ensure your makefile's <tt>ARCH</tt> setting is set to one of the architecture names (case-sensitive) supported by the version of LUFA you are compiling against.</td> | 901 | * <td>Ensure your makefile's <tt>ARCH</tt> setting is set to one of the architecture names (case-sensitive) supported by the version of LUFA you are compiling against.</td> |
902 | * </tr> | 902 | * </tr> |
903 | * <tr> | 903 | * <tr> |
904 | * <td>Error "<b><tt>Makefile <i>{X}</i> value not set</tt></b>" shown when compiling.</td> | 904 | * <td>Error "<b><tt>Makefile <i>{X}</i> value not set</tt></b>" shown when compiling.</td> |
905 | * <td>The specified Makefile value was not configured in your project's makefile or on the command line, and the nominated setting is required by one or more LUFA | 905 | * <td>The specified Makefile value was not configured in your project's makefile or on the command line, and the nominated setting is required by one or more LUFA |
906 | * build system modules. Define the value in your project makefile and try again.</td> | 906 | * build system modules. Define the value in your project makefile and try again.</td> |
907 | * </tr> | 907 | * </tr> |
908 | * <tr> | 908 | * <tr> |
909 | * <td>Error "<b><tt>Makefile <i>{X}</i> option cannot be blank</tt></b>" shown when compiling.</td> | 909 | * <td>Error "<b><tt>Makefile <i>{X}</i> option cannot be blank</tt></b>" shown when compiling.</td> |
910 | * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to an empty value. For the nominated configuration | 910 | * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to an empty value. For the nominated configuration |
911 | * option, an empty value is not allowed. Define the nominated setting to a correct non-blank value and try again.</td> | 911 | * option, an empty value is not allowed. Define the nominated setting to a correct non-blank value and try again.</td> |
912 | * </tr> | 912 | * </tr> |
913 | * <tr> | 913 | * <tr> |
914 | * <td>Error "<b><tt>Makefile <i>{X}</i> option must be Y or N</tt></b>" shown when compiling.</td> | 914 | * <td>Error "<b><tt>Makefile <i>{X}</i> option must be Y or N</tt></b>" shown when compiling.</td> |
915 | * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to a value other than a Y (for "Yes") or "N" (for "No"). | 915 | * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to a value other than a Y (for "Yes") or "N" (for "No"). |
916 | * This configuration option is required to be one of the aforementioned boolean values, and other values are invalid. Set this option to either Y or N and try again.</td> | 916 | * This configuration option is required to be one of the aforementioned boolean values, and other values are invalid. Set this option to either Y or N and try again.</td> |
917 | * </tr> | 917 | * </tr> |
918 | * <tr> | 918 | * <tr> |
919 | * <td>Error "<b><tt>Unknown input source file formats: <i>{X}</i></tt></b>" shown when compiling.</td> | 919 | * <td>Error "<b><tt>Unknown input source file formats: <i>{X}</i></tt></b>" shown when compiling.</td> |
920 | * <td>The nominated source files, specified in your project's makefile in the <tt>SRC</tt> configuration option, has an extension that the LUFA build system does not | 920 | * <td>The nominated source files, specified in your project's makefile in the <tt>SRC</tt> configuration option, has an extension that the LUFA build system does not |
921 | * recognise. The file extensions are case sensitive, and must be one of the supported formats (<tt>*.c</tt>, <tt>*.cpp</tt> or <tt>*.S</tt>).</td> | 921 | * recognise. The file extensions are case sensitive, and must be one of the supported formats (<tt>*.c</tt>, <tt>*.cpp</tt> or <tt>*.S</tt>).</td> |
922 | * </tr> | 922 | * </tr> |
923 | * <tr> | 923 | * <tr> |
924 | * <td>Error "<b><tt>Cannot build with OBJDIR parameter set - one or more object file name is not unique</tt></b>" shown when compiling.</td> | 924 | * <td>Error "<b><tt>Cannot build with OBJDIR parameter set - one or more object file name is not unique</tt></b>" shown when compiling.</td> |
925 | * <td>When a project is built with a non-empty <tt>OBJDIR</tt> object directory name set, all input source files must have unique names, excluding extension and path. | 925 | * <td>When a project is built with a non-empty <tt>OBJDIR</tt> object directory name set, all input source files must have unique names, excluding extension and path. |
926 | * This means that input files that are named identically and differ only by their path or extension are invalid when this mode is used.</td> | 926 | * This means that input files that are named identically and differ only by their path or extension are invalid when this mode is used.</td> |
927 | * </tr> | 927 | * </tr> |
928 | * <tr> | 928 | * <tr> |
929 | * <td>Error "<b><tt>Source file does not exist: <i>{X}</i></tt></b>" shown when compiling.</td> | 929 | * <td>Error "<b><tt>Source file does not exist: <i>{X}</i></tt></b>" shown when compiling.</td> |
930 | * <td>The nominated input source file, specified in the user project's <tt>SRC</tt> parameter, could not be found. Ensure the source file exists and the absolute or | 930 | * <td>The nominated input source file, specified in the user project's <tt>SRC</tt> parameter, could not be found. Ensure the source file exists and the absolute or |
931 | * relative path given in the user project makefile is correct and try again.</td> | 931 | * relative path given in the user project makefile is correct and try again.</td> |
932 | * </tr> | 932 | * </tr> |
933 | * <tr> | 933 | * <tr> |
934 | * <td>Error "<b><tt>Doxygen configuration file <i>{X}</i> does not exist</tt></b>" shown when upgrading a Doxygen configuration file.</td> | 934 | * <td>Error "<b><tt>Doxygen configuration file <i>{X}</i> does not exist</tt></b>" shown when upgrading a Doxygen configuration file.</td> |
935 | * <td>The nominated Doxygen configuration file, specified in the user project's <tt>DOXYGEN_CONF</tt> parameter, could not be found. Ensure the configuration file exists | 935 | * <td>The nominated Doxygen configuration file, specified in the user project's <tt>DOXYGEN_CONF</tt> parameter, could not be found. Ensure the configuration file exists |
936 | * and the absolute or relative path given in the user project makefile is correct and try again, or run the appropriate makefile target to generate a new configuration | 936 | * and the absolute or relative path given in the user project makefile is correct and try again, or run the appropriate makefile target to generate a new configuration |
937 | * file.</td> | 937 | * file.</td> |
938 | * </tr> | 938 | * </tr> |
939 | * <tr> | 939 | * <tr> |
940 | * <td>Error "<b><tt>avr-gcc: error: unrecognized option '<i>{X}</i>'</tt></b>" shown when compiling.</td> | 940 | * <td>Error "<b><tt>avr-gcc: error: unrecognized option '<i>{X}</i>'</tt></b>" shown when compiling.</td> |
941 | * <td>An unrecognised option was supplied to the compiler, usually in the <tt>C_FLAGS</tt>, <tt>CPP_FLAGS</tt>, <tt>ASM_FLAGS</tt> or <tt>CC_FLAGS</tt> configuration | 941 | * <td>An unrecognised option was supplied to the compiler, usually in the <tt>C_FLAGS</tt>, <tt>CPP_FLAGS</tt>, <tt>ASM_FLAGS</tt> or <tt>CC_FLAGS</tt> configuration |
942 | * options. The nominated compiler switch may be invalid, or unsupported by the version of AVR-GCC on the host system. Remove the unrecognised flag if invalid, or | 942 | * options. The nominated compiler switch may be invalid, or unsupported by the version of AVR-GCC on the host system. Remove the unrecognised flag if invalid, or |
943 | * upgrade to the latest AVR-GCC. If the option is a valid linker option, use the prefix "-Wl," to ensure it is passed to the linker correctly.</td> | 943 | * upgrade to the latest AVR-GCC. If the option is a valid linker option, use the prefix "-Wl," to ensure it is passed to the linker correctly.</td> |
944 | * </tr> | 944 | * </tr> |
945 | * <tr> | 945 | * <tr> |
946 | * <td>Error "<b><tt>makefile:{X}: {Y}.mk: No such file or directory</tt></b>" shown when make is invoked.</td> | 946 | * <td>Error "<b><tt>makefile:{X}: {Y}.mk: No such file or directory</tt></b>" shown when make is invoked.</td> |
947 | * <td>The path to the nominated makefile module was incorrect. This usually indicates that the makefile <tt>LUFA_PATH</tt> option is not set to a valid relative or | 947 | * <td>The path to the nominated makefile module was incorrect. This usually indicates that the makefile <tt>LUFA_PATH</tt> option is not set to a valid relative or |
948 | * absolute path to the LUFA library core.</td> | 948 | * absolute path to the LUFA library core.</td> |
949 | * </tr> | 949 | * </tr> |
950 | * <tr> | 950 | * <tr> |
951 | * <td>Error "<b><tt>fatal error: LUFAConfig.h: No such file or directory</tt></b>" shown when compiling.</td> | 951 | * <td>Error "<b><tt>fatal error: LUFAConfig.h: No such file or directory</tt></b>" shown when compiling.</td> |
952 | * <td>The <tt>USE_LUFA_CONFIG_HEADER</tt> compile time option was set in the user project makefile, but the user supplied <tt>LUFAConfig.h</tt> header could not be | 952 | * <td>The <tt>USE_LUFA_CONFIG_HEADER</tt> compile time option was set in the user project makefile, but the user supplied <tt>LUFAConfig.h</tt> header could not be |
953 | * found. Ensure that the directory that contains this configuration file is correctly passed to the compiler via the -I switch in the makefile <tt>CC_FLAGS</tt> | 953 | * found. Ensure that the directory that contains this configuration file is correctly passed to the compiler via the -I switch in the makefile <tt>CC_FLAGS</tt> |
954 | * parameter.</td> | 954 | * parameter.</td> |
955 | * </tr> | 955 | * </tr> |
956 | * <tr> | 956 | * <tr> |
957 | * <td>Error "<b><tt>ld.exe: section .apitable_trampolines loaded at <i>{X}</i> overlaps section .text</tt></b>" shown when compiling a bootloader.</td> | 957 | * <td>Error "<b><tt>ld.exe: section .apitable_trampolines loaded at <i>{X}</i> overlaps section .text</tt></b>" shown when compiling a bootloader.</td> |
958 | * <td>The bootloader is compiling too large for the given <tt>FLASH_SIZE_KB</tt> and <tt>BOOT_SECTION_SIZE_KB</tt> parameters set in the bootloader makefile. This | 958 | * <td>The bootloader is compiling too large for the given <tt>FLASH_SIZE_KB</tt> and <tt>BOOT_SECTION_SIZE_KB</tt> parameters set in the bootloader makefile. This |
959 | * usually indicates that these values are incorrect for the specified device the bootloader is targeting. If these values are correct, a newer version of the | 959 | * usually indicates that these values are incorrect for the specified device the bootloader is targeting. If these values are correct, a newer version of the |
960 | * compiler may need to be used to ensure that the bootloader is built within the section size constraints of the target device.</td> | 960 | * compiler may need to be used to ensure that the bootloader is built within the section size constraints of the target device.</td> |
961 | * </tr> | 961 | * </tr> |
962 | * <tr> | 962 | * <tr> |
963 | * <td>Error "<b><tt>unknown MCU '<i>{X}</i>' specified</tt></b>" shown when compiling.</td> | 963 | * <td>Error "<b><tt>unknown MCU '<i>{X}</i>' specified</tt></b>" shown when compiling.</td> |
964 | * <td>The specified microcontroller device model name set in the user application's makefile as the <tt>MCU</tt> parameter is incorrect, or unsupported by the | 964 | * <td>The specified microcontroller device model name set in the user application's makefile as the <tt>MCU</tt> parameter is incorrect, or unsupported by the |
965 | * version of the compiler being used. Make sure the model name is correct, or upgrade to the latest Atmel Toolchain to obtain newer device support.</td> | 965 | * version of the compiler being used. Make sure the model name is correct, or upgrade to the latest Atmel Toolchain to obtain newer device support.</td> |
966 | * </tr> | 966 | * </tr> |
967 | * <tr> | 967 | * <tr> |
968 | * <td>Error "<b><tt>undefined reference to `<i>{X}</i>'</tt></b>" shown when compiling.</td> | 968 | * <td>Error "<b><tt>undefined reference to `<i>{X}</i>'</tt></b>" shown when compiling.</td> |
969 | * <td>This is usually caused by a missing source file in the user application's <tt>SRC</tt> configuration parameter. If the indicated symbol is one from the LUFA | 969 | * <td>This is usually caused by a missing source file in the user application's <tt>SRC</tt> configuration parameter. If the indicated symbol is one from the LUFA |
970 | * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).</td> | 970 | * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).</td> |
971 | * </tr> | 971 | * </tr> |
972 | * </table> | 972 | * </table> |
973 | * | 973 | * |
974 | * For troubleshooting other errors you encounter, please see \ref Sec_ProjectHelp. | 974 | * For troubleshooting other errors you encounter, please see \ref Sec_ProjectHelp. |
975 | */ | 975 | */ |