update segger project, cleanup

This commit is contained in:
hathach 2019-01-31 21:39:02 +07:00
parent 7279bd9b32
commit 3737d4bc12
4 changed files with 18 additions and 19 deletions

View File

@ -204,6 +204,7 @@ endif
IPATH += $(SRC_PATH) IPATH += $(SRC_PATH)
IPATH += $(SRC_PATH)/cmsis/include IPATH += $(SRC_PATH)/cmsis/include
IPATH += $(SRC_PATH)/usb IPATH += $(SRC_PATH)/usb
IPATH += $(SRC_PATH)/boards
IPATH += $(TUSB_PATH) IPATH += $(TUSB_PATH)
# nrfx # nrfx
@ -265,7 +266,7 @@ CFLAGS += -DDFU_APP_DATA_RESERVED=7*4096
CFLAGS += -DUF2_VERSION='"$(GIT_VERSION) $(GIT_SUBMODULE_VERSIONS) $(SD_NAME) $(SD_VERSION)"' CFLAGS += -DUF2_VERSION='"$(GIT_VERSION) $(GIT_SUBMODULE_VERSIONS) $(SD_NAME) $(SD_VERSION)"'
CFLAGS += -DBOARD_$(shell echo $(BOARD) | tr '[:lower:]' '[:upper:]') CFLAGS += -DBOARD_$(shell echo $(BOARD) | tr '[:lower:]' '[:upper:]')
CFLAGS += -DBOARD_HEADER_FILE='"boards/$(BOARD).h"' CFLAGS += -DBOARD_HEADER_FILE='"$(BOARD).h"'
ifneq ($(IS_52832),) ifneq ($(IS_52832),)
CFLAGS += -DNRF52 CFLAGS += -DNRF52

View File

@ -46,17 +46,9 @@
#define BOOTLOADER_SETTINGS_ADDRESS 0x0007F000 /**< The field specifies the page location of the bootloader settings address. */ #define BOOTLOADER_SETTINGS_ADDRESS 0x0007F000 /**< The field specifies the page location of the bootloader settings address. */
#define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x0007E000 /**< The field specifies the page location of the mbr params page address. */ #define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x0007E000 /**< The field specifies the page location of the mbr params page address. */
#elif defined(NRF52840_XXAA) #elif defined(NRF52840_XXAA)
// Increase bootloader size to application data region for easy debugging
#ifdef DEBUG_SIZE_EXPAND
#define BOOTLOADER_REGION_START (0x000F4000 - CODE_PAGE_SIZE*7)
#define DFU_APP_DATA_RESERVED 0
#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. */ #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_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. */ #define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x000FE000 /**< The field specifies the page location of the mbr params page address. */

View File

@ -18,10 +18,12 @@
arm_target_debug_interface_type="ADIv5" arm_target_debug_interface_type="ADIv5"
arm_target_device_name="nRF52840_xxAA" arm_target_device_name="nRF52840_xxAA"
arm_target_interface_type="SWD" arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;NO_VTOR_CONFIG;MK_BOOTLOADER_VERSION=0x06010000;CONFIG_GPIO_AS_PINRESET;BLE_STACK_SUPPORT_REQD;SWI_DISABLE0;SOFTDEVICE_PRESENT;FLOAT_ABI_HARD;CFG_TUSB_DEBUG=2;UF2_VERSION=&quot;Segger&quot;" c_preprocessor_definitions="__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;NO_VTOR_CONFIG;MK_BOOTLOADER_VERSION=0x06010000;CONFIG_GPIO_AS_PINRESET;BLE_STACK_SUPPORT_REQD;SWI_DISABLE0;SOFTDEVICE_PRESENT;FLOAT_ABI_HARD;CFG_TUSB_DEBUG=2;UF2_VERSION=&quot;Segger&quot;"
c_user_include_directories="../;../usb;../cmsis/include;$(tusbDir);$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(sdDir)/include;$(sdDir)/include/nrf52;$(sdk11Dir)/drivers_nrf/pstorage;$(sdk11Dir)/ble/common/;$(sdk11Dir)/ble/ble_services/ble_dfu;$(sdk11Dir)/ble/ble_services/ble_dis;$(sdk11Dir)/libraries/bootloader_dfu;$(sdk11Dir)/libraries/bootloader_dfu/hci_transport;$(sdk11Dir)/libraries/util;$(sdkDir)/toolchain/cmsis/include;$(sdkDir)/device;$(sdkDir)/toolchain;$(sdkDir)/drivers_nrf/hal;$(sdkDir)/drivers_nrf/systick;$(sdkDir)/drivers_nrf/uart;$(sdkDir)/drivers_nrf/usbd;$(sdkDir)/drivers_nrf/common;$(sdkDir)/drivers_nrf/delay;$(sdkDir)/drivers_nrf/power;$(sdkDir)/drivers_nrf/clock;$(sdkDir)/libraries/util;$(sdkDir)/libraries/timer;$(sdkDir)/libraries/scheduler;$(sdkDir)/libraries/crc16;$(sdkDir)/libraries/util;$(sdkDir)/libraries/hci/config;$(sdkDir)/libraries/uart;$(sdkDir)/libraries/hci;$(sdkDir)/external/fprintf;$(sdkDir)/libraries/strerror;$(sdkDir)/libraries/atomic;$(sdkDir)/libraries/balloc;$(sdkDir)/libraries/experimental_log/src;$(sdkDir)/libraries/experimental_log;$(sdkDir)/libraries/experimental_section_vars;$(sdkDir)/libraries/experimental_memobj" c_user_include_directories="../;../usb;../boards;../cmsis/include;$(tusbDir);$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(sdDir)/include;$(sdDir)/include/nrf52;$(sdk11Dir)/drivers_nrf/pstorage;$(sdk11Dir)/ble/common/;$(sdk11Dir)/ble/ble_services/ble_dfu;$(sdk11Dir)/ble/ble_services/ble_dis;$(sdk11Dir)/libraries/bootloader_dfu;$(sdk11Dir)/libraries/bootloader_dfu/hci_transport;$(sdk11Dir)/libraries/util;$(sdkDir)/toolchain/cmsis/include;$(sdkDir)/device;$(sdkDir)/toolchain;$(sdkDir)/drivers_nrf/hal;$(sdkDir)/drivers_nrf/systick;$(sdkDir)/drivers_nrf/uart;$(sdkDir)/drivers_nrf/usbd;$(sdkDir)/drivers_nrf/common;$(sdkDir)/drivers_nrf/delay;$(sdkDir)/drivers_nrf/power;$(sdkDir)/drivers_nrf/clock;$(sdkDir)/libraries/util;$(sdkDir)/libraries/timer;$(sdkDir)/libraries/scheduler;$(sdkDir)/libraries/crc16;$(sdkDir)/libraries/util;$(sdkDir)/libraries/hci/config;$(sdkDir)/libraries/uart;$(sdkDir)/libraries/hci;$(sdkDir)/external/fprintf;$(sdkDir)/libraries/strerror;$(sdkDir)/libraries/atomic;$(sdkDir)/libraries/balloc;$(sdkDir)/libraries/experimental_log/src;$(sdkDir)/libraries/experimental_log;$(sdkDir)/libraries/experimental_section_vars;$(sdkDir)/libraries/experimental_memobj"
debug_register_definition_file="$(ProjectDir)/nrf52840_Registers.xml" debug_register_definition_file="$(ProjectDir)/nrf52840_Registers.xml"
debug_target_connection="J-Link" debug_target_connection="J-Link"
gcc_enable_all_warnings="No"
gcc_entry_point="Reset_Handler" gcc_entry_point="Reset_Handler"
linker_memory_map_file="$(ProjectDir)/nRF52840_xxAA_MemoryMap.xml" linker_memory_map_file="$(ProjectDir)/nRF52840_xxAA_MemoryMap.xml"
linker_section_placement_file="$(ProjectDir)/flash_placement.xml" linker_section_placement_file="$(ProjectDir)/flash_placement.xml"
@ -327,6 +329,7 @@
<configuration <configuration
Name="Feather52840" Name="Feather52840"
build_exclude_from_build="Yes" /> build_exclude_from_build="Yes" />
<configuration Name="PCA10056" build_exclude_from_build="Yes" />
</file> </file>
<file file_name="../../lib/nrfx/mdk/ses_startup_nrf52840.s"> <file file_name="../../lib/nrfx/mdk/ses_startup_nrf52840.s">
<configuration <configuration
@ -349,6 +352,7 @@
<configuration <configuration
Name="Feather52840" Name="Feather52840"
build_exclude_from_build="Yes" /> build_exclude_from_build="Yes" />
<configuration Name="PCA10056" build_exclude_from_build="Yes" />
</file> </file>
<file file_name="../../lib/nrfx/mdk/system_nrf52.h" /> <file file_name="../../lib/nrfx/mdk/system_nrf52.h" />
<file file_name="../../lib/nrfx/mdk/system_nrf52840.c"> <file file_name="../../lib/nrfx/mdk/system_nrf52840.c">
@ -370,16 +374,19 @@
</folder> </folder>
<configuration <configuration
Name="Feather52840" Name="Feather52840"
c_preprocessor_definitions="NRF52840_XXAA;MK_DIS_FIRMWARE=&quot;s140 6.1.1 r0&quot;;S140;BOARD_PCA10056" c_preprocessor_definitions="NRF52840_XXAA;MK_DIS_FIRMWARE=&quot;s140 6.1.1 r0&quot;;S140;BOARD_FEATHER_NRF52840_EXPRESS;BOARD_HEADER_FILE=&quot;feather_nrf52840_express.h&quot;"
linker_memory_map_file="nRF52840_xxAA_MemoryMap.xml" /> linker_memory_map_file="nRF52840_xxAA_MemoryMap.xml" />
<configuration <configuration
Name="Feather52832" Name="Feather52832"
c_preprocessor_definitions="NRF52832_XXAA;MK_DIS_FIRMWARE=&quot;s132 6.1.1 r0&quot;;S132;BOARD_FEATHER_NRF52832" c_preprocessor_definitions="NRF52832_XXAA;MK_DIS_FIRMWARE=&quot;s132 6.1.1 r0&quot;;S132;BOARD_FEATHER_NRF52832;BOARD_HEADER_FILE=&quot;feather_nrf52832.h&quot;"
linker_memory_map_file="nRF52832_xxAA_MemoryMap.xml" /> linker_memory_map_file="nRF52832_xxAA_MemoryMap.xml" />
<configuration
Name="PCA10056"
c_preprocessor_definitions="NRF52840_XXAA;MK_DIS_FIRMWARE=&quot;s140 6.1.1 r0&quot;;S140;BOARD_PCA10056;BOARD_HEADER_FILE=&quot;pca10056.h&quot;"
gcc_optimization_level="Debug"
linker_memory_map_file="nRF52840_xxAA_MemoryMap.xml" />
</project> </project>
<configuration <configuration Name="Feather52840" />
Name="Feather52840"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="DEBUG_SIZE_EXPAND" />
<configuration Name="Feather52832" /> <configuration Name="Feather52832" />
<configuration Name="PCA10056" />
</solution> </solution>

View File

@ -1,7 +1,6 @@
<!DOCTYPE Board_Memory_Definition_File> <!DOCTYPE Board_Memory_Definition_File>
<root name="nRF52840_xxAA"> <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="0x000ED000" size="0x11000" access="ReadOnly" />
<MemorySegment name="BOOTLOADER_SETTINGS" start="0x000FF000" size="0x1000" 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="MBR_PARAMS_PAGE" start="0x000FE000" size="0x1000" access="ReadOnly" />
<MemorySegment name="UICR_BOOTLOADER" start="0x10001014" size="0x04" access="ReadOnly" /> <MemorySegment name="UICR_BOOTLOADER" start="0x10001014" size="0x04" access="ReadOnly" />