diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-29 09:03:15 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-29 09:03:15 +0000 |
commit | b6467d97b03fbedb1bd430a0914998b6d6298b31 (patch) | |
tree | 284e5f2d99ac112de11015c4a8e923ddf30d282f /os | |
parent | 46abfd539f96a3aff27b6b38bf9e24b92c0d3917 (diff) | |
download | ChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.tar.gz ChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.tar.bz2 ChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.zip |
New makefiles in Kinetis demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7827 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/mk/startup_k20x.mk | 11 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/mk/startup_kl2x.mk | 11 | ||||
-rw-r--r-- | os/hal/ports/KINETIS/LLD/ext_lld.c | 6 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/mk/port_k20x.mk | 16 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/mk/port_kl2x.mk | 16 |
5 files changed, 26 insertions, 34 deletions
diff --git a/os/common/ports/ARMCMx/compilers/GCC/mk/startup_k20x.mk b/os/common/ports/ARMCMx/compilers/GCC/mk/startup_k20x.mk new file mode 100644 index 000000000..23ab9ff11 --- /dev/null +++ b/os/common/ports/ARMCMx/compilers/GCC/mk/startup_k20x.mk @@ -0,0 +1,11 @@ +# List of the ChibiOS generic K20x startup and CMSIS files.
+STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
+ $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c
+
+STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s
+
+STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/K20x \
+ $(CHIBIOS)/os/ext/CMSIS/include \
+ $(CHIBIOS)/os/ext/CMSIS/KINETIS
+
+STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld
diff --git a/os/common/ports/ARMCMx/compilers/GCC/mk/startup_kl2x.mk b/os/common/ports/ARMCMx/compilers/GCC/mk/startup_kl2x.mk new file mode 100644 index 000000000..33d004eec --- /dev/null +++ b/os/common/ports/ARMCMx/compilers/GCC/mk/startup_kl2x.mk @@ -0,0 +1,11 @@ +# List of the ChibiOS generic KL2x startup and CMSIS files.
+STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
+ $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c
+
+STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s
+
+STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/KL2x \
+ $(CHIBIOS)/os/ext/CMSIS/include \
+ $(CHIBIOS)/os/ext/CMSIS/KINETIS
+
+STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld
diff --git a/os/hal/ports/KINETIS/LLD/ext_lld.c b/os/hal/ports/KINETIS/LLD/ext_lld.c index 5e2ae19e0..8bd85403e 100644 --- a/os/hal/ports/KINETIS/LLD/ext_lld.c +++ b/os/hal/ports/KINETIS/LLD/ext_lld.c @@ -135,12 +135,13 @@ static void ext_lld_exti_irq_disable(void) { * Generic interrupt handler.
*/
static inline void irq_handler(PORT_TypeDef * const port, const unsigned port_width, const uint8_t *channel_map) {
+ unsigned pin;
uint32_t isfr = port->ISFR;
/* Clear all pending interrupts on this port. */
port->ISFR = 0xFFFFFFFF;
- for (unsigned pin = 0; pin < port_width; pin++) {
+ for (pin = 0; pin < port_width; pin++) {
if (isfr & (1 << pin)) {
expchannel_t channel = channel_map[pin];
EXTD1.config->channels[channel].cb(&EXTD1, channel);
@@ -246,12 +247,13 @@ void ext_lld_init(void) { * @notapi
*/
void ext_lld_start(EXTDriver *extp) {
+ expchannel_t channel;
if (extp->state == EXT_STOP)
ext_lld_exti_irq_enable();
/* Configuration of automatic channels.*/
- for (expchannel_t channel = 0; channel < EXT_MAX_CHANNELS; channel++) {
+ for (channel = 0; channel < EXT_MAX_CHANNELS; channel++) {
uint32_t mode = extp->config->channels[channel].mode;
PORT_TypeDef *port = extp->config->channels[channel].port;
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_k20x.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_k20x.mk deleted file mode 100644 index abce7f6ca..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_k20x.mk +++ /dev/null @@ -1,16 +0,0 @@ -# List of the ChibiOS/RT Cortex-M4 K20x port files.
-PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
- $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \
- $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \
- $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v7m.c
-
-PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
- $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s
-
-PORTINC = $(CHIBIOS)/os/ext/CMSIS/include \
- $(CHIBIOS)/os/ext/CMSIS/KINETIS \
- $(CHIBIOS)/os/common/ports/ARMCMx/devices/K20x \
- $(CHIBIOS)/os/rt/ports/ARMCMx \
- $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC
-
-PORTLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_kl2x.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_kl2x.mk deleted file mode 100644 index 177f92cd3..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_kl2x.mk +++ /dev/null @@ -1,16 +0,0 @@ -# List of the ChibiOS/RT Cortex-M0+ KL2x port files.
-PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
- $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \
- $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \
- $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v6m.c
-
-PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s \
- $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s
-
-PORTINC = $(CHIBIOS)/os/ext/CMSIS/include \
- $(CHIBIOS)/os/ext/CMSIS/KINETIS \
- $(CHIBIOS)/os/common/ports/ARMCMx/devices/KL2x \
- $(CHIBIOS)/os/rt/ports/ARMCMx \
- $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC
-
-PORTLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld
|