Hi,
I started with the Blinky example and have added peer_manager to the project by referencing the hrs example. Everything is building, but on init() I am getting a hard fault with the following stack trace:
The exact line is in page_identity
if (p_page_addr[FDS_PAGE_TAG_WORD_0] != FDS_PAGE_TAG_MAGIC)
The value of p_page_addr is 0x00040000
I double checked my flash_placement file and it is the same as the hrs file:
<!DOCTYPE Linker_Placement_File> <Root name="Flash Section Placement"> <MemorySegment name="$(FLASH_NAME:FLASH)"> <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START:)" /> <ProgramSection alignment="4" load="Yes" name=".init" /> <ProgramSection alignment="4" load="Yes" name=".init_rodata" /> <ProgramSection alignment="4" load="Yes" name=".text" /> <ProgramSection alignment="4" load="Yes" name=".dtors" /> <ProgramSection alignment="4" load="Yes" name=".ctors" /> <ProgramSection alignment="4" load="Yes" name=".rodata" /> <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" /> <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" /> <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" /> <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" /> <ProgramSection alignment="4" keep="Yes" load="Yes" runin=".fs_data_run" name=".fs_data" /> </MemorySegment> <MemorySegment name="$(RAM_NAME:RAM);SRAM"> <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START:$(SRAM_START:))" /> <ProgramSection alignment="4" load="No" name=".fast_run" /> <ProgramSection alignment="4" load="No" name=".data_run" /> <ProgramSection alignment="4" load="No" name=".tdata_run" /> <ProgramSection alignment="4" load="No" keep="Yes" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" /> <ProgramSection alignment="4" load="No" name=".bss" /> <ProgramSection alignment="4" load="No" name=".tbss" /> <ProgramSection alignment="4" load="No" name=".non_init" /> <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" /> <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack" /> <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" /> </MemorySegment> <MemorySegment name="$(FLASH2_NAME:FLASH2)"> <ProgramSection alignment="4" load="Yes" name=".text2" /> <ProgramSection alignment="4" load="Yes" name=".rodata2" /> <ProgramSection alignment="4" load="Yes" runin=".data2_run" name=".data2" /> </MemorySegment> <MemorySegment name="$(RAM2_NAME:RAM2)"> <ProgramSection alignment="4" load="No" name=".data2_run" /> <ProgramSection alignment="4" load="No" name=".bss2" /> </MemorySegment> </Root>
I also double checked my sdk_config and it is the same as the hrs example:
// <e> FDS_ENABLED - fds - Flash data storage module //========================================================== #ifndef FDS_ENABLED #define FDS_ENABLED 1 #endif #if FDS_ENABLED // <o> FDS_OP_QUEUE_SIZE - Size of the internal queue. #ifndef FDS_OP_QUEUE_SIZE #define FDS_OP_QUEUE_SIZE 4 #endif // <o> FDS_CHUNK_QUEUE_SIZE - Determines how many @ref fds_record_chunk_t structures can be buffered at any time. #ifndef FDS_CHUNK_QUEUE_SIZE #define FDS_CHUNK_QUEUE_SIZE 8 #endif // <o> FDS_MAX_USERS - Maximum number of callbacks that can be registered. #ifndef FDS_MAX_USERS #define FDS_MAX_USERS 8 #endif // <o> FDS_VIRTUAL_PAGES - Number of virtual flash pages to use. // <i> One of the virtual pages is reserved by the system for garbage collection. // <i> Therefore, the minimum is two virtual pages: one page to store data and // <i> one page to be used by the system for garbage collection. The total amount // <i> of flash memory that is used by FDS amounts to @ref FDS_VIRTUAL_PAGES // <i> @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes. #ifndef FDS_VIRTUAL_PAGES #define FDS_VIRTUAL_PAGES 3 #endif
Any help would be appreciated