add Debug Size++ ses config for easy debugging

This commit is contained in:
hathach 2018-04-17 22:12:31 +07:00
parent a672badbb2
commit 6127ca3b6d
4 changed files with 20 additions and 1 deletions

View File

@ -66,7 +66,13 @@
#elif defined(NRF52840_XXAA)
#ifdef DEBUG_SIZE_EXPAND
// Increase bootloader size for easy debugging
#define BOOTLOADER_REGION_START 0x000E4000
#else
#define BOOTLOADER_REGION_START 0x000F4000 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */
#endif
#define BOOTLOADER_SETTINGS_ADDRESS 0x000FF000 /**< The field specifies the page location of the bootloader settings address. */
#define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x000FE000 /**< The field specifies the page location of the mbr params page address. */

View File

@ -101,7 +101,12 @@ enum { BLE_CONN_CFG_HIGH_BANDWIDTH = 1 };
// Adafruit for factory reset
#define APPDATA_ADDR_START (BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED)
#ifdef DEBUG_SIZE_EXPAND
STATIC_ASSERT( APPDATA_ADDR_START == 0xDD000);
#else
STATIC_ASSERT( APPDATA_ADDR_START == 0xED000);
#endif
void adafruit_factory_reset(void);
volatile bool _freset_erased_complete = false;

View File

@ -1,6 +1,7 @@
<!DOCTYPE Board_Memory_Definition_File>
<root name="nRF52840_xxAA">
<MemorySegment name="FLASH" start="0x000F4000" size="0xA000" access="ReadOnly" />
<!--MemorySegment name="FLASH" start="0x000F4000" size="0xA000" access="ReadOnly" -->
<MemorySegment name="FLASH" start="0x000E4000" size="0x1A000" access="ReadOnly" />
<MemorySegment name="BOOTLOADER_SETTINGS" start="0x000FF000" size="0x1000" access="ReadOnly" />
<MemorySegment name="MBR_PARAMS_PAGE" start="0x000FE000" size="0x1000" access="ReadOnly" />
<MemorySegment name="UICR_BOOTLOADER" start="0x10001014" size="0x04" access="ReadOnly" />

View File

@ -127,6 +127,9 @@
<configuration
Name="Release Single"
build_exclude_from_build="Yes" />
<configuration
Name="Debug Size++"
build_exclude_from_build="Yes" />
</file>
<file file_name="../../lib/sdk11/components/libraries/bootloader_dfu/dfu_init.h" />
<file file_name="../../lib/sdk11/components/libraries/bootloader_dfu/dfu_init_template.c" />
@ -249,6 +252,9 @@
</folder>
</folder>
</folder>
<configuration
Name="Debug Size++"
c_preprocessor_definitions="DEBUG_SIZE_EXPAND" />
</project>
<configuration
Name="Debug Single"
@ -263,4 +269,5 @@
gcc_optimization_level="Level 1" />
<configuration Name="Debug Dual" />
<configuration Name="Release Dual" />
<configuration Name="Debug Size++" />
</solution>