rename boards

feather52832 to feather_nrf52832
feather52840 to feather_nrf52840
This commit is contained in:
hathach 2018-08-11 10:50:21 +07:00
parent 4846bde987
commit 971619aa7e
5 changed files with 28 additions and 24 deletions

View File

@ -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

View File

@ -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 )

View File

@ -16,12 +16,12 @@
#include <stdint.h>
#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

View File

@ -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

View File

@ -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