Unknown function at 0xED9F60002

Hi,

I am trying to run SDK example project on my SES. I am using SDK 17.1.0 and my Dev board is nrf52832. I am using PCA10040 and S132 softdevices. 

When I am building my program, it works fine and builds without any error. But when I enter into debug I am getting error as "unknown function at 0x00000A60" and when I am click play I am getting error as "unknown function at 0xED9F6002". This problem was encountered when I am running code from my project or "ble_app_blinky" programs in SDK v17.1.0. 

Please let me know if anything is wrong in configurations or anything needed to modify in order to resolve the issue.

Thanks in Advance.

Regards,

Mushtakh

  • Hello Mushtakh,

    If you see that the debugger stops in 0x0A60, it means that it is the hardfault handler that has triggered. This is in general a bit difficult to handle. There is a hardfault handler that you can add to your application. Please refer to the ble_app_hrs_freertos example on how to enable this. You need to enable it from sdk_config.h (by adding the hardfault-related definitions from the ble_app_freertos example), and then you need to add (the path to) some header files, and a couple of .c files.

    However, you can start by trying to figure out when the hardfault handler is reached. Try setting breakpoints to check if they are reached or not. You can also use the log to help pinpointing when it happens.

    Another hint is to look at the r15(pc) and r14(lr) registers when the hardfault occured.I can't tell from your screenshot what they are, but if you'd scroll a bit down in the box to the bottom right, it will show you.

    This register in itself doesn't say much, and the r15 probably says 0xED9F6002. This is obviously a mistake, since this is outside the flash, but something has made the nRF think that it should execute whatever is in this address, which caused the hardfault. The r14(lr) is the link register. This will tell you the address of the function that called the address in r15. 

    You can use a tool called addr2line to figure out what function this was. Take whatever the r14 says, and use the command:

    arm-none-eabi-addr2line -e <path to .elf file in your build folder> <0xaddress in r14 register>

    You need to install the gnu arm embedded toolchain on your computer, and make sure that it is in the environment path of your computer in order to use the addr2line tool.

    Please also note that you need to use the address from your latest log output. If you rebuild your application, the functions may end up in different addresses, and the r14/r15 may change.

    Is there a way for me to reproduce what you are seeing using just an nRF52832 DK? Or do you need an external sensor in order to replicate the issue?

    Best regards,

    Edvin

  • Hi Edwin,

    Thank you for your response. 

    1. In case of 0xA60, this error shows as soon as I click on debug, program didn't even reach to main(); function. I am using. I have tried ble_app_blinky example from the SDK. This is also resulting in the same. 

  • This is the result I am getting when I  run any example code from the SDK. I feel there's nothing wrong with the code or application as it is failing with all the examples from the SDK as well.

    I guess there is some issue with configurations that I am missing. Please let me know of you need any further details.

    Thank you

Related