diff --git a/Makefile b/Makefile index b952016..a5859c0 100644 --- a/Makefile +++ b/Makefile @@ -56,10 +56,11 @@ endif MK := mkdir RM := rm -rf +# Verbose mode (V=). 0: default, 1: print out CFLAG, LDFLAG 2: print all compile command ifeq ("$(V)","2") -QUIET := +QUIET = else -QUIET := @ +QUIET = @ endif GNU_PREFIX = arm-none-eabi @@ -335,6 +336,8 @@ $(info CFLAGS $(CFLAGS)) $(info ) $(info LDFLAGS $(LDFLAGS)) $(info ) +$(info ASMFLAGS $(ASMFLAGS)) +$(info ) endif .phony: all clean size flash sd erase @@ -438,12 +441,12 @@ $(BUILD)/%.o: %.c # Assemble files $(BUILD)/%.o: %.S @echo AS $(notdir $<) - @$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< + $(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< # Link $(BUILD)/$(OUTPUT_FILENAME)-nosd.out: $(BUILD) $(OBJECTS) @echo LD $(OUTPUT_FILENAME)-nosd.out - $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $@ + $(QUIET)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $@ size: $(BUILD)/$(OUTPUT_FILENAME)-nosd.out -@echo '' diff --git a/src/boards/feather_nrf52832.h b/src/boards/feather_nrf52832.h index 99cd55f..be4671a 100644 --- a/src/boards/feather_nrf52832.h +++ b/src/boards/feather_nrf52832.h @@ -40,32 +40,32 @@ /*------------------------------------------------------------------*/ /* LED *------------------------------------------------------------------*/ -#define LEDS_NUMBER 2 -#define LED_PRIMARY_PIN 17 // Red -#define LED_SECONDARY_PIN 19 // Blue -#define LED_STATE_ON 1 +#define LEDS_NUMBER 2 +#define LED_PRIMARY_PIN 17 // Red +#define LED_SECONDARY_PIN 19 // Blue +#define LED_STATE_ON 1 /*------------------------------------------------------------------*/ /* BUTTON *------------------------------------------------------------------*/ -#define BUTTONS_NUMBER 2 -#define BUTTON_1 20 -#define BUTTON_2 22 -#define BUTTON_PULL NRF_GPIO_PIN_PULLUP +#define BUTTONS_NUMBER 2 +#define BUTTON_1 20 +#define BUTTON_2 22 +#define BUTTON_PULL NRF_GPIO_PIN_PULLUP /*------------------------------------------------------------------*/ /* UART *------------------------------------------------------------------*/ -#define RX_PIN_NUMBER 8 -#define TX_PIN_NUMBER 6 -#define CTS_PIN_NUMBER 7 -#define RTS_PIN_NUMBER 5 -#define HWFC false +#define RX_PIN_NUMBER 8 +#define TX_PIN_NUMBER 6 +#define CTS_PIN_NUMBER 0 +#define RTS_PIN_NUMBER 0 +#define HWFC false // Used as model string in OTA mode -#define DIS_MANUFACTURER "Adafruit Industries" -#define DIS_MODEL "Bluefruit Feather nRF52832" +#define DIS_MANUFACTURER "Adafruit Industries" +#define DIS_MODEL "Bluefruit Feather nRF52832" -#define PRODUCT_NAME "Adafruit Bluefruit Feather nRF52832" +#define PRODUCT_NAME "Adafruit Bluefruit Feather nRF52832" #endif // _FEATHER52832_H diff --git a/src/boards/feather_nrf52840_express.h b/src/boards/feather_nrf52840_express.h index 05ecfc7..3206046 100644 --- a/src/boards/feather_nrf52840_express.h +++ b/src/boards/feather_nrf52840_express.h @@ -42,35 +42,35 @@ /*------------------------------------------------------------------*/ /* LED *------------------------------------------------------------------*/ -#define LEDS_NUMBER 2 -#define LED_PRIMARY_PIN _PINNUM(1, 15) -#define LED_SECONDARY_PIN _PINNUM(1, 10) -#define LED_NEOPIXEL 16 -#define BOARD_RGB_BRIGHTNESS 0x040404 -#define LED_STATE_ON 1 +#define LEDS_NUMBER 2 +#define LED_PRIMARY_PIN _PINNUM(1, 15) +#define LED_SECONDARY_PIN _PINNUM(1, 10) +#define LED_NEOPIXEL 16 +#define BOARD_RGB_BRIGHTNESS 0x040404 +#define LED_STATE_ON 1 /*------------------------------------------------------------------*/ /* BUTTON *------------------------------------------------------------------*/ -#define BUTTONS_NUMBER 2 -#define BUTTON_1 _PINNUM(0, 15) -#define BUTTON_2 _PINNUM(0, 19) -#define BUTTON_PULL NRF_GPIO_PIN_PULLUP +#define BUTTONS_NUMBER 2 +#define BUTTON_1 _PINNUM(0, 15) +#define BUTTON_2 _PINNUM(0, 19) +#define BUTTON_PULL NRF_GPIO_PIN_PULLUP /*------------------------------------------------------------------*/ /* UART *------------------------------------------------------------------*/ -#define RX_PIN_NUMBER 8 -#define TX_PIN_NUMBER 6 -#define CTS_PIN_NUMBER 7 -#define RTS_PIN_NUMBER 5 -#define HWFC false +#define RX_PIN_NUMBER 8 +#define TX_PIN_NUMBER 6 +#define CTS_PIN_NUMBER 0 +#define RTS_PIN_NUMBER 0 +#define HWFC false // Used as model string in OTA mode -#define DIS_MANUFACTURER "Adafruit Industries" -#define DIS_MODEL "Bluefruit Feather nRF52840 Express" +#define DIS_MANUFACTURER "Adafruit Industries" +#define DIS_MODEL "Bluefruit Feather nRF52840 Express" -#define PRODUCT_NAME "Adafruit Feather nRF52840 Express" -#define VOLUME_LABEL "FTHR840BOOT" +#define PRODUCT_NAME "Adafruit Feather nRF52840 Express" +#define VOLUME_LABEL "FTHR840BOOT" #endif // _FEATHER52840_H diff --git a/src/boards/pca10056.h b/src/boards/pca10056.h index c49ba36..f09cd2a 100644 --- a/src/boards/pca10056.h +++ b/src/boards/pca10056.h @@ -40,30 +40,30 @@ /*------------------------------------------------------------------*/ /* LED *------------------------------------------------------------------*/ -#define LEDS_NUMBER 2 -#define LED_PRIMARY_PIN 13 +#define LEDS_NUMBER 2 +#define LED_PRIMARY_PIN 13 #define LED_SECONDARY_PIN 14 -#define LED_STATE_ON 0 +#define LED_STATE_ON 0 /*------------------------------------------------------------------*/ /* BUTTON *------------------------------------------------------------------*/ -#define BUTTONS_NUMBER 2 -#define BUTTON_1 11 -#define BUTTON_2 12 -#define BUTTON_PULL NRF_GPIO_PIN_PULLUP +#define BUTTONS_NUMBER 2 +#define BUTTON_1 11 +#define BUTTON_2 12 +#define BUTTON_PULL NRF_GPIO_PIN_PULLUP /*------------------------------------------------------------------*/ /* UART *------------------------------------------------------------------*/ -#define RX_PIN_NUMBER 8 -#define TX_PIN_NUMBER 6 -#define CTS_PIN_NUMBER 7 -#define RTS_PIN_NUMBER 5 -#define HWFC false +#define RX_PIN_NUMBER 8 +#define TX_PIN_NUMBER 6 +#define CTS_PIN_NUMBER 0 +#define RTS_PIN_NUMBER 0 +#define HWFC false // Used as model string in OTA mode -#define DIS_MANUFACTURER "Nordic" -#define DIS_MODEL "PCA10056" +#define DIS_MANUFACTURER "Nordic" +#define DIS_MODEL "PCA10056" #endif // PCA10056_H diff --git a/src/sdk_config.h b/src/sdk_config.h index d6780ac..62cd86f 100644 --- a/src/sdk_config.h +++ b/src/sdk_config.h @@ -43,17 +43,19 @@ #ifndef SDK_CONFIG_H #define SDK_CONFIG_H +#include "boards.h" + //========================================================== // HCI_SLIP_ENABLED - hci_slip - SLIP protocol implementation used by HCI //========================================================== #define HCI_SLIP_ENABLED 1 #define HCI_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud115200 -#define HCI_UART_FLOW_CONTROL 0 -#define HCI_UART_RX_PIN 8 -#define HCI_UART_TX_PIN 6 -#define HCI_UART_RTS_PIN 5 -#define HCI_UART_CTS_PIN 7 +#define HCI_UART_FLOW_CONTROL HWFC +#define HCI_UART_RX_PIN RX_PIN_NUMBER +#define HCI_UART_TX_PIN TX_PIN_NUMBER +#define HCI_UART_CTS_PIN CTS_PIN_NUMBER +#define HCI_UART_RTS_PIN RTS_PIN_NUMBER #define HCI_TRANSPORT_ENABLED 1 #define HCI_MAX_PACKET_SIZE_IN_BITS 8000