From 971619aa7e261175f70228e6cae5782ac30cdcff Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 11 Aug 2018 10:50:21 +0700 Subject: [PATCH] rename boards feather52832 to feather_nrf52832 feather52840 to feather_nrf52840 --- Makefile | 20 +++++++++++-------- README.md | 20 +++++++++---------- src/boards.h | 8 ++++---- .../{feather52832.h => feather_nrf52832.h} | 2 +- ...ther52840.h => feather_nrf52840_express.h} | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) rename src/boards/{feather52832.h => feather_nrf52832.h} (95%) rename src/boards/{feather52840.h => feather_nrf52840_express.h} (95%) diff --git a/Makefile b/Makefile index 2885dbc..70f1781 100644 --- a/Makefile +++ b/Makefile @@ -87,16 +87,16 @@ remduplicates = $(strip $(if $1,$(firstword $1) $(call remduplicates,$(filter-ou #********************************* BOARD_LIST = $(sort $(subst .h,,$(subst src/boards/,,$(wildcard src/boards/*.h)))) -NRF52840_BOARDLIST = pca10056 feather52840 -IS_NRF52840 = $(findstring $(BOARD),$(NRF52840_BOARDLIST)) +NRF52840_BOARDLIST = pca10056 feather_nrf52840_express +IS_NRF52840 = $(filter $(BOARD),$(NRF52840_BOARDLIST)) -ifeq ($(findstring $(MAKECMDGOALS),all-board all-release),) +ifeq ($(filter $(MAKECMDGOALS),all-board all-release),) ifeq ($(BOARD),) $(info You must provide a BOARD parameter with 'BOARD=') $(info Supported boards are: $(BOARD_LIST)) $(error BOARD not defined) else - ifeq ($(findstring $(BOARD),$(BOARD_LIST)),) + ifeq ($(filter $(BOARD),$(BOARD_LIST)),) $(error Invalid BOARD specified) endif endif @@ -221,7 +221,6 @@ IPATH += $(SDK11_PATH)/ble/common IPATH += $(SDK11_PATH)/ble/ble_services/ble_dfu IPATH += $(SDK11_PATH)/ble/ble_services/ble_dis - IPATH += $(SDK_PATH)/libraries/timer IPATH += $(SDK_PATH)/libraries/scheduler IPATH += $(SDK_PATH)/libraries/crc16 @@ -354,11 +353,16 @@ endif all: $(BUILD)/$(OUTPUT_FILENAME).out size # TODO auto rule using BOARD_LIST +_make_board = $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=$1 $2 +_make_all_board = $(call _make_board,pca10056,clean all) + # build all the boards all-board: - $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52832 clean all - $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52840 clean all - $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=pca10056 clean all + $(_make_all_board) + +# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52832 clean all +# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52840 clean all +# $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=pca10056 clean all all-release: $(MAKE) -s -f $(MAKEFILE_LIST) -e BOARD=feather52832 clean all release diff --git a/README.md b/README.md index 8184d17..8c71a2b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains the bootloader for Adafruit nRF52 series and other popular boards - [Bluefruit Feather nRF52832](https://www.adafruit.com/product/3406) -- Bluefruit Feather nRF52840 +- Bluefruit Feather nRF52840 Express - Nordic nRF52840DK PCA10056 This bootloader is meant to use with [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil), a folk of [Nordic nrfutil](https://github.com/NordicSemiconductor/pc-nrfutil). To install @@ -34,11 +34,11 @@ You can burn and/or upgrade bootloader with either jlink or dfu (serial) to a sp To flash version `6.1.0r0` using jlink - $ make BOARD=feather52840 VERSION=6.1.0r0 flash + $ make BOARD=feather_nrf52840_express VERSION=6.1.0r0 flash To upgrade with dfu serial - $ make BOARD=feather52840 VERSION=6.1.0r0 dfu-flash + $ make BOARD=feather_nrf52840_express VERSION=6.1.0r0 dfu-flash Note: bootloader is downgradable, since the binary release is merged of bootloader and Softdevice, you could freely "upgrade" to any version you like. @@ -55,25 +55,25 @@ Prerequisite To build - $ make BOARD=feather52840 all + $ make BOARD=feather_nrf52840_express all To flash bootloader - $ make BOARD=feather52840 flash + $ make BOARD=feather_nrf52840_express flash To flash SoftDevice (chip erase) - $ make BOARD=feather52840 sd + $ make BOARD=feather_nrf52840_express sd To erase chip - $ make BOARD=feather52840 erase + $ make BOARD=feather_nrf52840_express erase For the list of supported boards, try to type make without `BOARD=` $ make You must provide a BOARD parameter with 'BOARD=' - Supported boards are: feather52832 feather52840 pca10056 + Supported boards are: feather_nrf52840_express feather_nrf52840_express pca10056 Makefile:90: *** BOARD not defined. Stop ### Common makefile problems @@ -82,7 +82,7 @@ For the list of supported boards, try to type make without `BOARD=` If you get the following error ... - $ make BOARD=feather52840 all + $ make BOARD=feather_nrf52840_express all Compiling file: main.c /bin/sh: /usr/bin/arm-none-eabi-gcc: No such file or directory make: *** [_build/main.o] Error 127 @@ -112,5 +112,5 @@ For better debugging you can also use [SES](https://www.segger.com/products/deve The project file is located at `src/segger/Adafruit_nRF52_Bootloader.emProject`. > **Note**: SES only flashes the bootloader when you click download, you need to -flash Softdevice beforehand if you haven't done so ( use `make BOARD=feather52840 sd` +flash Softdevice beforehand if you haven't done so ( use `make BOARD=feather_nrf52840_express sd` mentioned above ) diff --git a/src/boards.h b/src/boards.h index 0c6560a..b8ecd7e 100644 --- a/src/boards.h +++ b/src/boards.h @@ -16,12 +16,12 @@ #include #include "nrf_gpio.h" -#if defined BOARD_FEATHER52840 - #include "boards/feather52840.h" +#if defined BOARD_FEATHER_NRF52840_EXPRESS + #include "boards/feather_nrf52840_express.h" +#elif defined BOARD_FEATHER_NRF52832 + #include "boards/feather_nrf52832.h" #elif defined BOARD_PCA10056 #include "boards/pca10056.h" -#elif defined BOARD_FEATHER52832 - #include "boards/feather52832.h" #else #error No boards defined #endif diff --git a/src/boards/feather52832.h b/src/boards/feather_nrf52832.h similarity index 95% rename from src/boards/feather52832.h rename to src/boards/feather_nrf52832.h index fc5f1d6..00abc90 100644 --- a/src/boards/feather52832.h +++ b/src/boards/feather_nrf52832.h @@ -7,7 +7,7 @@ Software License Agreement (BSD License) - Copyright (c) ${year}, Adafruit Industries (adafruit.com) + Copyright (c) 2018, Adafruit Industries (adafruit.com) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/boards/feather52840.h b/src/boards/feather_nrf52840_express.h similarity index 95% rename from src/boards/feather52840.h rename to src/boards/feather_nrf52840_express.h index 5478c39..ea092b5 100644 --- a/src/boards/feather52840.h +++ b/src/boards/feather_nrf52840_express.h @@ -7,7 +7,7 @@ Software License Agreement (BSD License) - Copyright (c) ${year}, Adafruit Industries (adafruit.com) + Copyright (c) 2018, Adafruit Industries (adafruit.com) All rights reserved. Redistribution and use in source and binary forms, with or without