8000 mkr1000; fix build for bootloader/blinky. · runtimeco/mynewt_arduino_zero@979a6e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 979a6e5

Browse files
author
Marko Kiiskila
committed
mkr1000; fix build for bootloader/blinky.
1 parent 3d64a50 commit 979a6e5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hw/bsp/arduino_mkr1000/src/hal_bsp.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#include <assert.h>
2020
#include <stddef.h>
2121
#include <inttypes.h>
22+
#include "syscfg/syscfg.h"
2223
#include "hal/hal_bsp.h"
2324
#include "bsp/bsp.h"
2425
#include <os/os_cputime.h>
25-
#include "syscfg/syscfg.h"
2626
#include "sysinit/sysinit.h"
2727
#include "hal/hal_flash.h"
2828
#include "mcu/samd21.h"
@@ -117,6 +117,8 @@ static struct samd21_spi_config ext_spi_cfg = {
117117
};
118118
#endif
119119

120+
#if MYNEWT_VAL(UART_0)
121+
#if !MYNEWT_VAL(BOOT_LOADER) || MYNEWT_VAL(BOOT_SERIAL)
120122
static const struct samd21_uart_config uart_cfgs[] = {
121123
[0] = {
122124
.suc_sercom = SERCOM5,
@@ -130,6 +132,8 @@ static const struct samd21_uart_config uart_cfgs[] = {
130132
.suc_pad3 = PINMUX_PB23D_SERCOM5_PAD3
131133
}
132134
};
135+
#endif
136+
#endif
133137

134138
/*
135139
* What memory to include in coredump.
@@ -184,8 +188,9 @@ hal_bsp_init(void)
184188
#if MYNEWT_VAL(TIMER_0) || MYNEWT_VAL(TIMER_1) || MYNEWT_VAL(TIMER_2)
185189
struct samd21_timer_cfg tmr_cfg;
186190
#endif
191+
(void)rc;
187192

188-
#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(BOOT_SERIAL)
193+
#if MYNEWT_VAL(UART_0)
189194
rc = os_dev_create((struct os_dev *) &hal_uart0, "uart0",
190195
OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&uart_cfgs[0]);
191196
SYSINIT_PANIC_ASSERT(rc == 0);

0 commit comments

Comments
 (0)
0