This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 2a9184f Fix build errors in BSP
2a9184f is described below
commit 2a9184fc8210954d1b05d1aa3caf00e3bfff4613
Author: Fabio Utzig <[email protected]>
AuthorDate: Fri Mar 9 17:05:11 2018 -0300
Fix build errors in BSP
Fixes issues building the bootloader, with not peripherals enabled
(non used var warning) or UART include erros when no UART is enabled.
---
hw/bsp/ble400/src/hal_bsp.c | 3 +++
hw/bsp/bmd200/src/hal_bsp.c | 3 +++
hw/bsp/bmd300eval/src/hal_bsp.c | 16 +++++++++-------
hw/bsp/nrf51-arduino_101/src/hal_bsp.c | 3 +++
hw/bsp/nrf51dk-16kbram/src/hal_bsp.c | 3 +++
hw/bsp/nrf52840pdk/src/hal_bsp.c | 9 +++++++++
hw/bsp/rb-blend2/src/hal_bsp.c | 2 ++
hw/bsp/rb-nano2/src/hal_bsp.c | 2 ++
hw/bsp/vbluno51/src/hal_bsp.c | 3 +++
9 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/hw/bsp/ble400/src/hal_bsp.c b/hw/bsp/ble400/src/hal_bsp.c
index dbea6bc..45e9445 100644
--- a/hw/bsp/ble400/src/hal_bsp.c
+++ b/hw/bsp/ble400/src/hal_bsp.c
@@ -31,8 +31,11 @@
#include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_i2c.h"
+
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#if MYNEWT_VAL(ADC_0)
#include <adc_nrf51/adc_nrf51.h>
diff --git a/hw/bsp/bmd200/src/hal_bsp.c b/hw/bsp/bmd200/src/hal_bsp.c
index dbea6bc..45e9445 100644
--- a/hw/bsp/bmd200/src/hal_bsp.c
+++ b/hw/bsp/bmd200/src/hal_bsp.c
@@ -31,8 +31,11 @@
#include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_i2c.h"
+
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#if MYNEWT_VAL(ADC_0)
#include <adc_nrf51/adc_nrf51.h>
diff --git a/hw/bsp/bmd300eval/src/hal_bsp.c b/hw/bsp/bmd300eval/src/hal_bsp.c
index 7ffbfaf..b7d9fa1 100644
--- a/hw/bsp/bmd300eval/src/hal_bsp.c
+++ b/hw/bsp/bmd300eval/src/hal_bsp.c
@@ -181,6 +181,8 @@ hal_bsp_init(void)
{
int rc;
+ (void)rc;
+
/* Make sure system clocks have started */
hal_system_clock_start();
@@ -210,13 +212,13 @@ hal_bsp_init(void)
#endif
#if MYNEWT_VAL(ADC_0)
-rc = os_dev_create((struct os_dev *) &os_bsp_adc0,
- "adc0",
- OS_DEV_INIT_KERNEL,
- OS_DEV_INIT_PRIO_DEFAULT,
- nrf52_adc_dev_init,
- &os_bsp_adc0_config);
-assert(rc == 0);
+ rc = os_dev_create((struct os_dev *) &os_bsp_adc0,
+ "adc0",
+ OS_DEV_INIT_KERNEL,
+ OS_DEV_INIT_PRIO_DEFAULT,
+ nrf52_adc_dev_init,
+ &os_bsp_adc0_config);
+ assert(rc == 0);
#endif
#if MYNEWT_VAL(PWM_0)
diff --git a/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
b/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
index 55b646c..6d5005a 100644
--- a/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
+++ b/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
@@ -33,8 +33,11 @@
#include "nrf51_bitfields.h"
#include "hal/hal_spi.h"
#include "os/os_dev.h"
+
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#if MYNEWT_VAL(ADC_0)
#include <adc_nrf51/adc_nrf51.h>
diff --git a/hw/bsp/nrf51dk-16kbram/src/hal_bsp.c
b/hw/bsp/nrf51dk-16kbram/src/hal_bsp.c
index e286f6a..6cff522 100644
--- a/hw/bsp/nrf51dk-16kbram/src/hal_bsp.c
+++ b/hw/bsp/nrf51dk-16kbram/src/hal_bsp.c
@@ -31,8 +31,11 @@
#include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_i2c.h"
+
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#if MYNEWT_VAL(ADC_0)
#include <adc_nrf51/adc_nrf51.h>
diff --git a/hw/bsp/nrf52840pdk/src/hal_bsp.c b/hw/bsp/nrf52840pdk/src/hal_bsp.c
index 8f3d752..61fc7ff 100644
--- a/hw/bsp/nrf52840pdk/src/hal_bsp.c
+++ b/hw/bsp/nrf52840pdk/src/hal_bsp.c
@@ -32,8 +32,15 @@
#include "hal/hal_watchdog.h"
#include "hal/hal_i2c.h"
#include "mcu/nrf52_hal.h"
+#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1)
#include "uart/uart.h"
+#endif
+#if MYNEWT_VAL(UART_0)
#include "uart_hal/uart_hal.h"
+#endif
+#if MYNEWT_VAL(UART_1)
+#include "uart_bitbang/uart_bitbang.h"
+#endif
#include "os/os_dev.h"
#include "bsp.h"
#if MYNEWT_VAL(ADC_0)
@@ -192,6 +199,8 @@ hal_bsp_init(void)
{
int rc;
+ (void)rc;
+
/* Make sure system clocks have started */
hal_system_clock_start();
diff --git a/hw/bsp/rb-blend2/src/hal_bsp.c b/hw/bsp/rb-blend2/src/hal_bsp.c
index ee5b1f0..605a82f 100644
--- a/hw/bsp/rb-blend2/src/hal_bsp.c
+++ b/hw/bsp/rb-blend2/src/hal_bsp.c
@@ -192,6 +192,8 @@ hal_bsp_init(void)
{
int rc;
+ (void)rc;
+
/* Make sure system clocks have started */
hal_system_clock_start();
diff --git a/hw/bsp/rb-nano2/src/hal_bsp.c b/hw/bsp/rb-nano2/src/hal_bsp.c
index 046c923..1da7de5 100644
--- a/hw/bsp/rb-nano2/src/hal_bsp.c
+++ b/hw/bsp/rb-nano2/src/hal_bsp.c
@@ -183,6 +183,8 @@ hal_bsp_init(void)
{
int rc;
+ (void)rc;
+
/* Make sure system clocks have started */
hal_system_clock_start();
diff --git a/hw/bsp/vbluno51/src/hal_bsp.c b/hw/bsp/vbluno51/src/hal_bsp.c
index b44de78..77c0a15 100644
--- a/hw/bsp/vbluno51/src/hal_bsp.c
+++ b/hw/bsp/vbluno51/src/hal_bsp.c
@@ -31,8 +31,11 @@
#include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_i2c.h"
+
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#if MYNEWT_VAL(ADC_0)
#include <adc_nrf51/adc_nrf51.h>
--
To stop receiving notification emails like this one, please contact
[email protected].