Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ota s10 patch #4

Open
wants to merge 2 commits into
base: release_4.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Build Tools.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ Note: The bootloader .hex file gets merged with the SoftDevice .hex file since t
- `metro52_bootloader_v050_s132_v201.hex` - Intel hex file containing the Metro nRF52 bootloader ans S132 (v2.0.1) SD, for use when flashing with Adalink or a JLink

> `.zip` files are used for OTA updates and are provided for testing purposes, but shouldn't be made available to customers since OTA bootloader and SD updates are a high risk operation.

# To make on windows machine
- Run command line in src/dualbank or src/singlebank
- Run "..\..\Build Tools\make" feather52 for generating files (hex, bin and zip) for the bootloader
- Run "..\..\Build Tools\make" genpkg OUTPUT_FILENAME=feather52_bootloader for generating DFU ready zip file including correpsonding softdevice
Binary file modified bin/feather52/5.1.0/dual/feather52_bootloader_5.1.0_s132_dual.bin
Binary file not shown.
2,440 changes: 1,215 additions & 1,225 deletions bin/feather52/5.1.0/dual/feather52_bootloader_5.1.0_s132_dual.hex

Large diffs are not rendered by default.

Binary file modified bin/feather52_bootloader_5.1.0_s132_dual.bin
Binary file not shown.
2,730 changes: 1,371 additions & 1,359 deletions bin/feather52_bootloader_5.1.0_s132_dual.hex

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ enum { BLE_CONN_CFG_HIGH_BANDWIDTH = 1 };
#define DFU_SERVICE_HANDLE 0x000C /**< Handle of DFU service when DFU service is first service initialized. */
#define BLE_HANDLE_MAX 0xFFFF /**< Max handle value is BLE. */

#define DEVICE_NAME "AdaDFU" // limit of 8 chars /**< Name of device. Will be included in the advertising data. */
#define DIS_MANUFACTURER "Adafruit Industries"
#define DEVICE_NAME "NudgeDFU" // limit of 8 chars /**< Name of device. Will be included in the advertising data. */
#define DIS_MANUFACTURER "DnaNudge Ltd"
// DIS_MODEL is defined in boards.h

// TODO Update when upgrade bootloader
Expand Down Expand Up @@ -1125,7 +1125,7 @@ uint32_t dfu_transport_ble_update_start(void)
APP_ERROR_CHECK(err_code);

// Increase the BLE address by one when advertising openly.
addr.addr[0] += 1;
// addr.addr[0] += 1;

err_code = sd_ble_gap_addr_set(&addr);
APP_ERROR_CHECK(err_code);
Expand Down
2 changes: 2 additions & 0 deletions src/dfu_ble_svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ void SVC_Handler(void)

uint32_t dfu_ble_peer_data_get(dfu_ble_peer_data_t * p_peer_data)
{
return NRF_ERROR_INVALID_DATA;

uint16_t crc;

if (p_peer_data == NULL)
Expand Down
12 changes: 6 additions & 6 deletions src/make_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,14 @@ default: all

#building all targets
all:
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
@$(MAKE) -s -f $(MAKEFILE_NAME) -e clean
@echo Making Feather52 board
@echo ----------------------
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e feather52
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e clean
@$(MAKE) -s -f $(MAKEFILE_NAME) -e feather52
@$(MAKE) -s -f $(MAKEFILE_NAME) -e clean
@echo Making Metro52 board
@echo --------------------
@$(MAKE) -s -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e metro52
@$(MAKE) -s -f $(MAKEFILE_NAME) -e metro52

#target for printing all targets
help:
Expand Down Expand Up @@ -320,7 +320,7 @@ feather52: CFLAGS += -DBOARD_FEATHER52
feather52: $(BUILD_DIRECTORIES) $(OBJECTS)
@echo Linking target: $(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) -e finalize

# Target for Metro nrf52 board
metro52: OUTPUT_FILENAME := metro52_bootloader
Expand All @@ -329,7 +329,7 @@ metro52: CFLAGS += -DBOARD_METRO52
metro52: $(BUILD_DIRECTORIES) $(OBJECTS)
@echo Linking target: $(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) -e finalize

## Create build directories
$(BUILD_DIRECTORIES):
Expand Down