add pca10059
This commit is contained in:
		
							
								
								
									
										28
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								Makefile
									
									
									
									
									
								
							| @@ -48,7 +48,7 @@ NRFUTIL = adafruit-nrfutil | |||||||
| ifneq ($(JLINK),) | ifneq ($(JLINK),) | ||||||
| NRFJPROG = nrfjprog -s $(JLINK) | NRFJPROG = nrfjprog -s $(JLINK) | ||||||
| else | else | ||||||
| NRFJPROG = nrfjprog  | NRFJPROG = nrfjprog | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifeq ($(OS),Windows_NT) | ifeq ($(OS),Windows_NT) | ||||||
| @@ -62,7 +62,7 @@ MK := mkdir | |||||||
| RM := rm -rf | RM := rm -rf | ||||||
|  |  | ||||||
| ifeq ("$(V)","2") | ifeq ("$(V)","2") | ||||||
| QUIET :=  | QUIET := | ||||||
| else | else | ||||||
| QUIET := @ | QUIET := @ | ||||||
| endif | endif | ||||||
| @@ -87,7 +87,7 @@ remduplicates = $(strip $(if $1,$(firstword $1) $(call remduplicates,$(filter-ou | |||||||
| #********************************* | #********************************* | ||||||
| BOARD_LIST = $(sort $(subst .h,,$(subst src/boards/,,$(wildcard src/boards/*.h)))) | BOARD_LIST = $(sort $(subst .h,,$(subst src/boards/,,$(wildcard src/boards/*.h)))) | ||||||
|  |  | ||||||
| NRF52840_BOARDLIST = pca10056 feather_nrf52840_express | NRF52840_BOARDLIST = pca10056 pca10059 feather_nrf52840_express | ||||||
| IS_NRF52840 = $(filter $(BOARD),$(NRF52840_BOARDLIST)) | IS_NRF52840 = $(filter $(BOARD),$(NRF52840_BOARDLIST)) | ||||||
|  |  | ||||||
| ifeq ($(filter $(MAKECMDGOALS),all-board all-release),) | ifeq ($(filter $(MAKECMDGOALS),all-board all-release),) | ||||||
| @@ -250,7 +250,7 @@ CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 | |||||||
|  |  | ||||||
| # keep every function in separate section. This will allow linker to dump unused functions | # keep every function in separate section. This will allow linker to dump unused functions | ||||||
| CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing | CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing | ||||||
| CFLAGS += -fno-builtin --short-enums  | CFLAGS += -fno-builtin --short-enums | ||||||
|  |  | ||||||
| # Defined Symbol (MACROS) | # Defined Symbol (MACROS) | ||||||
| CFLAGS += -DMK_BOOTLOADER_VERSION=0x0$(SD_VER1)0$(SD_VER2)0$(SD_VER3)0$(SD_VER4)UL | CFLAGS += -DMK_BOOTLOADER_VERSION=0x0$(SD_VER1)0$(SD_VER2)0$(SD_VER3)0$(SD_VER4)UL | ||||||
| @@ -383,10 +383,10 @@ ifeq ($(VERSION),) | |||||||
| flash: $(BUILD)/$(OUTPUT_FILENAME).hex | flash: $(BUILD)/$(OUTPUT_FILENAME).hex | ||||||
| 	@echo Flashing: $< | 	@echo Flashing: $< | ||||||
| 	$(NRFJPROG) --program $< --sectoranduicrerase -f nrf52 --reset | 	$(NRFJPROG) --program $< --sectoranduicrerase -f nrf52 --reset | ||||||
|      |  | ||||||
| dfu-flash: $(BUILD)/$(MERGED_FNAME).zip | dfu-flash: $(BUILD)/$(MERGED_FNAME).zip | ||||||
| 	@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0) | 	@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0) | ||||||
| 	$(NRFUTIL) --verbose dfu serial --package $< -p $(SERIAL) -b 115200 --singlebank	 | 	$(NRFUTIL) --verbose dfu serial --package $< -p $(SERIAL) -b 115200 --singlebank | ||||||
|  |  | ||||||
| else | else | ||||||
|  |  | ||||||
| @@ -400,16 +400,16 @@ endif | |||||||
| flash: | flash: | ||||||
| 	@echo Flashing: $(VERSION_FPATH).hex | 	@echo Flashing: $(VERSION_FPATH).hex | ||||||
| 	$(NRFJPROG) --program $(VERSION_FPATH).hex --chiperase -f nrf52 --reset | 	$(NRFJPROG) --program $(VERSION_FPATH).hex --chiperase -f nrf52 --reset | ||||||
| 	 |  | ||||||
| dfu-flash: | dfu-flash: | ||||||
| 	@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0) | 	@:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0) | ||||||
| 	$(NRFUTIL) --verbose dfu serial --package $(VERSION_FPATH).zip -p $(SERIAL) -b 115200 --singlebank		 | 	$(NRFUTIL) --verbose dfu serial --package $(VERSION_FPATH).zip -p $(SERIAL) -b 115200 --singlebank | ||||||
| 	 |  | ||||||
| endif | endif | ||||||
| 	 |  | ||||||
| sd: | sd: | ||||||
| 	@echo Flashing: $(SD_HEX) | 	@echo Flashing: $(SD_HEX) | ||||||
| 	$(NRFJPROG) --program $(SD_HEX) -f nrf52 --chiperase  --reset	 | 	$(NRFJPROG) --program $(SD_HEX) -f nrf52 --chiperase  --reset | ||||||
|  |  | ||||||
| erase: | erase: | ||||||
| 	@echo Erasing chip | 	@echo Erasing chip | ||||||
| @@ -423,7 +423,7 @@ $(BUILD): | |||||||
|  |  | ||||||
| clean: | clean: | ||||||
| 	@$(RM) $(BUILD) | 	@$(RM) $(BUILD) | ||||||
| 	 |  | ||||||
| # Create objects from C SRC files | # Create objects from C SRC files | ||||||
| $(BUILD)/%.o: %.c | $(BUILD)/%.o: %.c | ||||||
| 	@echo CC $(notdir $<) | 	@echo CC $(notdir $<) | ||||||
| @@ -433,7 +433,7 @@ $(BUILD)/%.o: %.c | |||||||
| $(BUILD)/%.o: %.S | $(BUILD)/%.o: %.S | ||||||
| 	@echo AS $(notdir $<) | 	@echo AS $(notdir $<) | ||||||
| 	$(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< | 	$(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< | ||||||
| 	 |  | ||||||
| # Link | # Link | ||||||
| $(BUILD)/$(OUTPUT_FILENAME).out: $(BUILD) $(OBJECTS) | $(BUILD)/$(OUTPUT_FILENAME).out: $(BUILD) $(OBJECTS) | ||||||
| 	@echo LD $(OUTPUT_FILENAME).out | 	@echo LD $(OUTPUT_FILENAME).out | ||||||
| @@ -467,7 +467,7 @@ $(BUILD)/$(MERGED_FNAME).hex: $(BUILD)/$(OUTPUT_FILENAME).hex | |||||||
| genpkg: $(BUILD)/$(MERGED_FNAME).zip | genpkg: $(BUILD)/$(MERGED_FNAME).zip | ||||||
|  |  | ||||||
| $(BUILD)/$(MERGED_FNAME).zip: $(BUILD)/$(OUTPUT_FILENAME).hex | $(BUILD)/$(MERGED_FNAME).zip: $(BUILD)/$(OUTPUT_FILENAME).hex | ||||||
| 	@$(NRFUTIL) dfu genpkg --dev-type 0x0052 --dev-revision $(DFU_DEV_REV) --bootloader $< --softdevice $(SD_HEX) $@  | 	@$(NRFUTIL) dfu genpkg --dev-type 0x0052 --dev-revision $(DFU_DEV_REV) --bootloader $< --softdevice $(SD_HEX) $@ | ||||||
|  |  | ||||||
| # Create SD+bootloader combo with hex & dfu package at release folder | # Create SD+bootloader combo with hex & dfu package at release folder | ||||||
| release: combinehex genpkg | release: combinehex genpkg | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -5,6 +5,7 @@ This is a CDC/DFU/UF2 bootloader for Adafruit nRF52 boards and Nordic developmen | |||||||
| - [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406) | - [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406) | ||||||
| - Adafruit Feather nRF52840 Express | - Adafruit Feather nRF52840 Express | ||||||
| - Nordic nRF52840DK PCA10056 | - Nordic nRF52840DK PCA10056 | ||||||
|  | - Nordic nRF52840DK PCA10059 ("Dongle") | ||||||
|  |  | ||||||
| UF2 is an easy-to-use bootloader that appears as a flash drive. You can just copy `.uf2`-format | UF2 is an easy-to-use bootloader that appears as a flash drive. You can just copy `.uf2`-format | ||||||
| application images to the flash drive to load new firmware. | application images to the flash drive to load new firmware. | ||||||
| @@ -57,7 +58,11 @@ There are two pins, `DFU` and `FRST` that bootloader will check upon reset/power | |||||||
|  |  | ||||||
| On the Nordic PCA10056 DK board, `DFU` is connected to **Button1**, and `FRST` is connected to **Button2**. | On the Nordic PCA10056 DK board, `DFU` is connected to **Button1**, and `FRST` is connected to **Button2**. | ||||||
| So holding down **Button1** while clicking **RESET** will put the board into USB bootloader mode, with UF2 and CDC support. | So holding down **Button1** while clicking **RESET** will put the board into USB bootloader mode, with UF2 and CDC support. | ||||||
| Holding down **Button2** while clicking **RESE**T will put the board into OTA (over-the-air) bootloader mode. | Holding down **Button2** while clicking **RESET** will put the board into OTA (over-the-air) bootloader mode. | ||||||
|  |  | ||||||
|  | On the Nordic PCA10059 Dongle board, `DFU` is connected to the white button. | ||||||
|  | `FRST` is connected to pin 1.10. Ground it to pull `FRST` low, as if you had pushed an `FRST`  button. | ||||||
|  | There is an adjacent ground pad. | ||||||
|  |  | ||||||
| For other boards, please check the board definition for details. | For other boards, please check the board definition for details. | ||||||
|  |  | ||||||
| @@ -92,6 +97,9 @@ bin/feather_nrf52840_express | |||||||
|  |  | ||||||
| bin/pca10056: | bin/pca10056: | ||||||
|   6.1.0r0 |   6.1.0r0 | ||||||
|  |  | ||||||
|  | bin/pca10059: | ||||||
|  |   6.1.0r0 | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										1783
									
								
								bin/pca10059/6.1.0r0/pca10059_bootloader_s140_6.1.0r0.hex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1783
									
								
								bin/pca10059/6.1.0r0/pca10059_bootloader_s140_6.1.0r0.hex
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								bin/pca10059/6.1.0r0/pca10059_bootloader_s140_6.1.0r0.zip
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/pca10059/6.1.0r0/pca10059_bootloader_s140_6.1.0r0.zip
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -22,6 +22,8 @@ | |||||||
|   #include "boards/feather_nrf52832.h" |   #include "boards/feather_nrf52832.h" | ||||||
| #elif defined BOARD_PCA10056 | #elif defined BOARD_PCA10056 | ||||||
|   #include "boards/pca10056.h" |   #include "boards/pca10056.h" | ||||||
|  | #elif defined BOARD_PCA10059 | ||||||
|  |   #include "boards/pca10059.h" | ||||||
| #else | #else | ||||||
|   #error No boards defined |   #error No boards defined | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /**************************************************************************/ | /**************************************************************************/ | ||||||
| /*! | /*! | ||||||
|     @file     feather52.h |     @file     feather_nrf52832.h | ||||||
|     @author   hathach |     @author   hathach | ||||||
|  |  | ||||||
|     @section LICENSE |     @section LICENSE | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /**************************************************************************/ | /**************************************************************************/ | ||||||
| /*! | /*! | ||||||
|     @file     feather52.h |     @file     feather_nrf52840_express.h | ||||||
|     @author   hathach |     @author   hathach | ||||||
|  |  | ||||||
|     @section LICENSE |     @section LICENSE | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /**************************************************************************/ | /**************************************************************************/ | ||||||
| /*! | /*! | ||||||
|     @file     metro52.h |     @file     pca10056.h | ||||||
|     @author   hathach |     @author   hathach | ||||||
|  |  | ||||||
|     @section LICENSE |     @section LICENSE | ||||||
|   | |||||||
							
								
								
									
										72
									
								
								src/boards/pca10059.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/boards/pca10059.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | |||||||
|  | /**************************************************************************/ | ||||||
|  | /*! | ||||||
|  |     @file     pca10059.h | ||||||
|  |     @author   hathach | ||||||
|  |  | ||||||
|  |     @section LICENSE | ||||||
|  |  | ||||||
|  |     Software License Agreement (BSD License) | ||||||
|  |  | ||||||
|  |     Copyright (c) 2018, Adafruit Industries (adafruit.com) | ||||||
|  |     All rights reserved. | ||||||
|  |  | ||||||
|  |     Redistribution and use in source and binary forms, with or without | ||||||
|  |     modification, are permitted provided that the following conditions are met: | ||||||
|  |     1. Redistributions of source code must retain the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer. | ||||||
|  |     2. Redistributions in binary form must reproduce the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer in the | ||||||
|  |     documentation and/or other materials provided with the distribution. | ||||||
|  |     3. Neither the name of the copyright holders nor the | ||||||
|  |     names of its contributors may be used to endorse or promote products | ||||||
|  |     derived from this software without specific prior written permission. | ||||||
|  |  | ||||||
|  |     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY | ||||||
|  |     EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||||||
|  |     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  |     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY | ||||||
|  |     DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  |     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  |     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  |     ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  |     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  |     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  | */ | ||||||
|  | /**************************************************************************/ | ||||||
|  |  | ||||||
|  | #ifndef PCA10059_H | ||||||
|  | #define PCA10059_H | ||||||
|  |  | ||||||
|  | /*------------------------------------------------------------------*/ | ||||||
|  | /* LED | ||||||
|  |  *------------------------------------------------------------------*/ | ||||||
|  | #define LEDS_NUMBER    2 | ||||||
|  | // LED_RED | ||||||
|  | #define LED_1          6 | ||||||
|  | // LED_BLUE | ||||||
|  | #define LED_2          12 | ||||||
|  | #define LED_STATE_ON   0 | ||||||
|  |  | ||||||
|  | /*------------------------------------------------------------------*/ | ||||||
|  | /* BUTTON | ||||||
|  |  *------------------------------------------------------------------*/ | ||||||
|  | #define BUTTONS_NUMBER 2 | ||||||
|  |  | ||||||
|  | #define BUTTON_1       (1 << 5 | 6) | ||||||
|  | #define BUTTON_2       (1 << 5 | 10) | ||||||
|  | #define BUTTON_PULL    NRF_GPIO_PIN_PULLUP | ||||||
|  |  | ||||||
|  | /*------------------------------------------------------------------*/ | ||||||
|  | /* UART | ||||||
|  |  *------------------------------------------------------------------*/ | ||||||
|  | #define RX_PIN_NUMBER  20 | ||||||
|  | #define TX_PIN_NUMBER  17 | ||||||
|  | #define CTS_PIN_NUMBER 15 | ||||||
|  | #define RTS_PIN_NUMBER 13 | ||||||
|  | #define HWFC           false | ||||||
|  |  | ||||||
|  | // Used as model string in OTA mode | ||||||
|  | #define DIS_MANUFACTURER  "Nordic" | ||||||
|  | #define DIS_MODEL         "PCA10059" | ||||||
|  |  | ||||||
|  | #endif // PCA10059_H | ||||||
		Reference in New Issue
	
	Block a user