Experimental Buttonless DFU worked correctly when compiled with keil, but the same example compiled in eclipse by gcc is not switching to bootloader mode. value 0x01 is updated at control point.
Experimental Buttonless DFU worked correctly when compiled with keil, but the same example compiled in eclipse by gcc is not switching to bootloader mode. value 0x01 is updated at control point.
Keil and GCC have different stack handling, are you sure your linker file has the correct memory size (RAM) for the device you are using?
Hi Roger, Thanks a tonne. That might be it, but I'm unable to check the memory size in the linker file. How does one do that? Below is my linker file:
/* Linker script to configure memory regions. */
SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys)
MEMORY { FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000 RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x6018 }
SECTIONS { .fs_data : { PROVIDE(__start_fs_data = .); KEEP(*(.fs_data)) PROVIDE(__stop_fs_data = .); } > RAM } INSERT AFTER .data;
INCLUDE "nrf5x_common.ld"
Thanks a tonne!
@raju: Would you issue similar to this: devzone.nordicsemi.com/.../
Thank you Hung Bui, it was same problem, I edited the linker file and it worked
/* Linker script to configure memory regions. */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
RAM (rwx) : ORIGIN = 0x20001fe8, LENGTH = 0x6018
/** Location of bootloader setting in flash. */
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x1000
}
SECTIONS
{
/* Place the bootloader settings page in flash. */
.bootloaderSettings(NOLOAD) :
{
} > BOOTLOADER_SETTINGS
.fs_data :
{
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
} > RAM
} INSERT AFTER .data;
INCLUDE "nrf5x_common.ld"
Bootloader origin is specified by BOOTLOADER_SETTINGS_ADDRESS in nrf_dfu_types.h