unable to add nus service to DFU example.

joice_markose gravatar image

asked 2017-10-10 16:14:03 +0100

updated 2017-10-11 07:23:15 +0100

I am using softdevice132, sdk 14.0, pca10040 dk, when i add nus service to the dfu example, it is not working. there were also some warning about iram start address, which i changed accordingly in the linker file and nrf_sdh_ble.c

MEMORY { FLASH (rx) : ORIGIN = 0x23000, LENGTH = 0x55000 RAM (rwx) : ORIGIN = 0x20002100, LENGTH = 0xFFF0 }

in nrf_sdh_ble

define RAM_START 0x20002100

i have also changed the vs_uuid count to 2. the log messages are enabled, but now nothing is showing on my terminal :(

LED 3 is continuously glowing. should i change gatts attribute table? or is there anything else that i am missing?

edit retag flag offensive close delete report spam



Have you debug and find what is the cause ? You may need to change the optimization level to 0 to be able to debug.Please follow this guide.

Hung Bui ( 2017-10-11 10:41:17 +0100 )editconvert to answer

hi thank you,

i am using gcc on linux, how can i set optimization level ? also i'm using sdk14, i couldn't find

"#ifndef DEBUG NVIC_SystemReset();


in app_error.c

sorry for asking such silly doubts ;( where can i found more information about debugging in gcc/linux ?

madblue ( 2017-10-12 16:58:30 +0100 )editconvert to answer

Please add a breakpoint inside APP_ERROR_HANDLER(), make sure you defined DEBUG in the CFLAGS in makefile.

Optimization level can be changed by selecting ASMFLAG, by default it's -g3 please set it to g0

You can find information about debuging in gcc/linux using search tool, such as Google search.

Hung Bui ( 2017-10-13 09:54:41 +0100 )editconvert to answer

Hi Hung Bui ,

Thanks for the support, now it is working. :)

madblue ( 2017-10-25 10:55:35 +0100 )editconvert to answer