HI all,
We've recently moved to SDK 11.0 and it certainly has not been a painless migration, especially when using GCC.
Setup: GCC 5.2.1 on Linux Mint with nrf51 xxAA on a custom board
So, When using the peer manager, I'm not able to run with -Os flag with GCC, it gets into hard fault somewhere. Its fine with O1 or O2. I'm guessing some memory isn't allocated in an aligned manner. Please help me solve this as we prefer using Os as its lighter on the OTA update.
I had a similar problem where the following statement caused hard fault
if (p_page_addr[FDS_PAGE_TAG_WORD_0] != FDS_PAGE_TAG_MAGIC)
which is line number 183 in fds.c. This got resolved when I copied that this part of linker script from another post in Devzone
SECTIONS
{
.fs_data :
{
. = ALIGN(4);
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
. = ALIGN(4);
__data_end__ = .;
} > RAM
} INSERT AFTER .data;
Also things like the linker script being faulty in the SoftDevice section of the SDK makes ,me feel that again GCC is being treated as a second class citizen. There is not enough testing and verification with GCC before releasing the SDK.
Thanks!