Skip to content

Commit

Permalink
Fixing memory issues with new SD
Browse files Browse the repository at this point in the history
- Bumping RAM and FLASH storage to JLink requested values
- Removing DEBUG stop in DEBUG mode on_error
- Requiring new soft device
- Tested in all available chips
  • Loading branch information
charlesportwoodii committed Nov 1, 2019
1 parent 89f7f03 commit 92e8e98
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion boards/Makefile.boards
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGETS := nrf52840_xxaa
OUTPUT_DIRECTORY := _build

DEBUG ?= 0
SD_REQ := 0xB6
SD_REQ := 0xCA

GIT_VERSION := $(shell git describe --always --tags)
BOARD_DIST := $(BOARD)_bootloader-$(GIT_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion boards/secure_bootloader_gcc_nrf52.ld
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0xE0000, LENGTH = 0x11000 /** 68KB **/
RAM (rwx) : ORIGIN = 0x20002A98, LENGTH = 0x3D568
RAM (rwx) : ORIGIN = 0x20002AE8, LENGTH = 0x3D518
uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4
bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
uicr_mbr_params_page (r) : ORIGIN = 0x00000FFC, LENGTH = 0x4
Expand Down
2 changes: 1 addition & 1 deletion boards/secure_bootloader_gcc_nrf52_debug.ld
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0xE0000, LENGTH = 0x186A0 /** 100KB **/
RAM (rwx) : ORIGIN = 0x20002A98, LENGTH = 0x3D568
RAM (rwx) : ORIGIN = 0x20002AE8, LENGTH = 0x3D518
uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4
bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
uicr_mbr_params_page (r) : ORIGIN = 0x00000FFC, LENGTH = 0x4
Expand Down
6 changes: 3 additions & 3 deletions include/sdk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6008,7 +6008,7 @@
// </h>
//==========================================================

// <h> Misc Bootloader settings
// <h> Misc Bootloader settings

//==========================================================
// <q> NRF_BL_DEBUG_PORT_DISABLE - Disable access to the chip via the debug port.
Expand All @@ -6024,7 +6024,7 @@
#define NRF_BL_DEBUG_PORT_DISABLE 0
#endif

// <o> NRF_BL_FW_COPY_PROGRESS_STORE_STEP - Number of pages copied after which progress in the settings page is updated.
// <o> NRF_BL_FW_COPY_PROGRESS_STORE_STEP - Number of pages copied after which progress in the settings page is updated.
// <i> Progress stored in the settings page allows the bootloader to resume
// <i> copying the new firmware in case of interruption (reset).
// <i> If the value is small, then the resume point is more accurate. However,
Expand All @@ -6034,7 +6034,7 @@
#define NRF_BL_FW_COPY_PROGRESS_STORE_STEP 8
#endif

// <o> NRF_BL_RESET_DELAY_MS - Time to wait before resetting the bootloader.
// <o> NRF_BL_RESET_DELAY_MS - Time to wait before resetting the bootloader.
// <i> Time (in ms) to wait before resetting the bootloader after DFU has been completed or aborted. This allows more time for e.g. disconnecting the BLE link or writing logs.

#ifndef NRF_BL_RESET_DELAY_MS
Expand Down
6 changes: 3 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ static void do_reset(void)
// To allow the buffer to be flushed by the host.
nrf_delay_ms(100);
#endif
#ifdef NRF_DFU_DEBUG_VERSION
NRF_BREAKPOINT_COND;
#endif

nrf_delay_ms(NRF_BL_RESET_DELAY_MS);

NVIC_SystemReset();
}

Expand Down

0 comments on commit 92e8e98

Please sign in to comment.