separate feather and pca10056
This commit is contained in:
parent
3432182d2b
commit
0c96088b25
23
src/Makefile
23
src/Makefile
@ -267,12 +267,11 @@ all:
|
|||||||
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
|
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
|
||||||
@echo Making feather52840 board
|
@echo Making feather52840 board
|
||||||
@echo ----------------------
|
@echo ----------------------
|
||||||
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e feather52840
|
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e feather52840
|
||||||
|
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
|
||||||
#@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
|
@echo Making pca10056 board
|
||||||
#@echo Making Metro52 board
|
@echo --------------------
|
||||||
#@echo --------------------
|
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e pca10056
|
||||||
#@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e metro52
|
|
||||||
|
|
||||||
#target for printing all targets
|
#target for printing all targets
|
||||||
help:
|
help:
|
||||||
@ -310,10 +309,10 @@ feather52840: $(BUILD_DIRECTORIES) $(OBJECTS)
|
|||||||
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize
|
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize
|
||||||
|
|
||||||
# Target for Metro nrf52 board
|
# Target for Metro nrf52 board
|
||||||
metro52: OUTPUT_FILENAME := metro52_bootloader
|
pca10056: OUTPUT_FILENAME := pca10056_bootloader
|
||||||
metro52: FINAL_BIN_DIR := ../bin/metro52/$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION)
|
pca10056: FINAL_BIN_DIR := ../bin/pca10056/$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION)
|
||||||
metro52: CFLAGS += -DBOARD_METRO52
|
pca10056: CFLAGS += -DBOARD_PCA10056
|
||||||
metro52: $(BUILD_DIRECTORIES) $(OBJECTS)
|
pca10056: $(BUILD_DIRECTORIES) $(OBJECTS)
|
||||||
@echo Linking target: $(OUTPUT_FILENAME).out
|
@echo Linking target: $(OUTPUT_FILENAME).out
|
||||||
$(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
$(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||||
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize
|
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize
|
||||||
@ -370,8 +369,8 @@ flash_feather52840: feather52840
|
|||||||
@echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex
|
@echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex
|
||||||
nrfjprog --program $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex -f nrf52 --chiperase --reset
|
nrfjprog --program $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex -f nrf52 --chiperase --reset
|
||||||
|
|
||||||
flash_metro52: BOOTLOADER_WITH_SD_NAME := metro52_bootloader_$(BOOTLOADER_SD_SUFFIX)
|
flash_pca10056: BOOTLOADER_WITH_SD_NAME := pca10056_bootloader_$(BOOTLOADER_SD_SUFFIX)
|
||||||
flash_metro52: metro52
|
flash_pca10056: pca10056
|
||||||
@echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex
|
@echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex
|
||||||
nrfjprog --program $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex -f nrf52 --chiperase --reset
|
nrfjprog --program $(OUTPUT_BINARY_DIRECTORY)/$(BOOTLOADER_WITH_SD_NAME).hex -f nrf52 --chiperase --reset
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
#if defined BOARD_FEATHER52840
|
#if defined BOARD_FEATHER52840
|
||||||
#include "feather52840.h"
|
#include "feather52840.h"
|
||||||
#elif defined BOARD_METRO52
|
#elif defined BOARD_PCA10056
|
||||||
#include "metro52.h"
|
#include "pca10056.h"
|
||||||
#else
|
#else
|
||||||
#error No boards defined
|
#error No boards defined
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,38 +34,35 @@
|
|||||||
*/
|
*/
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
#ifndef METRO52_H
|
#ifndef PCA10056_H
|
||||||
#define METRO52_H
|
#define PCA10056_H
|
||||||
|
|
||||||
// Note: FRST and LED2 are on the same pin, so can't be used together
|
|
||||||
// LED2 will be disabled since it is less critical
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* LED
|
/* LED
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
#define LEDS_NUMBER 2
|
#define LEDS_NUMBER 2
|
||||||
#define LED_1 29
|
#define LED_1 13
|
||||||
#define LED_2 22
|
#define LED_2 14
|
||||||
#define LED_STATE_ON 1
|
#define LED_STATE_ON 0
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* BUTTON
|
/* BUTTON
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
#define BUTTONS_NUMBER 2
|
#define BUTTONS_NUMBER 2
|
||||||
#define BUTTON_1 18
|
#define BUTTON_1 11
|
||||||
#define BUTTON_2 22
|
#define BUTTON_2 12
|
||||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* UART
|
/* UART
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
#define RX_PIN_NUMBER 23
|
#define RX_PIN_NUMBER 8
|
||||||
#define TX_PIN_NUMBER 8
|
#define TX_PIN_NUMBER 6
|
||||||
#define CTS_PIN_NUMBER 0
|
#define CTS_PIN_NUMBER 7
|
||||||
#define RTS_PIN_NUMBER 0
|
#define RTS_PIN_NUMBER 5
|
||||||
#define HWFC false
|
#define HWFC false
|
||||||
|
|
||||||
// Used as model string in OTA mode
|
// Used as model string in OTA mode
|
||||||
#define DIS_MODEL "Bluefruit Metro 52"
|
#define DIS_MODEL "Nordic PCA10056"
|
||||||
|
|
||||||
#endif // METRO52_H
|
#endif // PCA10056_H
|
Loading…
Reference in New Issue
Block a user