This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Update to S310 V2.0.1 can't debugg

Hello,

i want to update the softdevice S310 V1.0.0 to version V2.0.1. My applicatio based on SDK 6.1. With S310 V1.0.0 all works fine. But i can't update to S310 V2.0.1. I use Eclipse with GCC compiler.

I have adjusted the Flash size as described in "s310_nrf51422_2.0.1_migration-document" document and copy the new header files from S310 V2.0.1 into my project. The application don't run at all. I can't set a breakpoint at the start of the main function. Did I forget something? Is the softdevice S310 V2.0.1 just compatible with SDK 7.0 or higher?

  • Are you calling sd_ble_enable() after SOFDEVICE_HANDLER_INIT()? As I recall this wasn't necessary with the v1.x S310, but with v2.x this initialization is the same as the S110. This section of code was typically surrounded by "#ifdef S110 ... #endif" in the v6.1 SDK example S310 projects, e.g. main.c in ble_app_hrs.

  • yes, i call sd_ble_enable() after SOFDEVICE_HANDLER_INIT(). The application does not run, i can't reach my breakpoint at the beginning from the main function.

    GDB Server output: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

    Downloading 16080 bytes @ address 0x0001D000

    Downloading 16080 bytes @ address 0x00020ED0

    Downloading 10792 bytes @ address 0x00024DA0

    Downloading 8 bytes @ address 0x000277C8

    Downloading 136 bytes @ address 0x000277D0

    Writing register (PC = 0x00021c05)

    Read 4 bytes @ address 0x00021C04 (Data = 0x480A2103)

    Read 2 bytes @ address 0x0001D460 (Data = 0xF7FF)

    Read 2 bytes @ address 0x0001D460 (Data = 0xF7FF)

    Read 2 bytes @ address 0x0001D460 (Data = 0xF7FF)

    Setting breakpoint @ address 0x0001D460, Size = 2, BPHandle = 0x0001

    Starting target CPU...

    ...Target halted (PC = 0xFFFFFFFE)

    Reading all registers

    Removing breakpoint @ address 0x0001D460, Size = 2

    Read 4 bytes @ address 0xFFFFFFFE (Data = 0x5F8ACD5B)

    Read 4 bytes @ address 0x000007BC (Data = 0x00001000)

    Reading 64 bytes @ address 0x00000780

    Read 4 bytes @ address 0x00000C00 (Data = 0xFFFFFFFF)

    Read 4 bytes @ address 0xFFFFFFFF (Data = 0xFFFFFFFF)

    Read 4 bytes @ address 0xE7F8461C (Data = 0x00000000)

    Read 4 bytes @ address 0xE7F8461C (Data = 0x00000000)

  • Hi Frederic, I don't use that tool chain so I can't help you with the loader output. Your question about the new s310 and 6.1 SDK is a good one. I moved to the v7.0.1 SDK and v2.0.0 s310 at the same time and never attempted to use the new s310 with the old SDK. Perhaps you have a solid reason for sticking with the old SDK, but the v7.1.0 SDK does contain some example s310 projects. It may be time to take the plunge!

  • The new S310 can be used in SDK 6.1 by following the migration guide you mentioned, and from you description it sounds like you have done all the necessary steps.

    I tried here on my end with the ble_ant_app_hrm from SDK 6.1 compiled with gcc for s310 v.2.0.1. It worked after replacing the API headers, adjusted flash size, and added the sd_ble_enable call().

    For debugging part, did you remember to set compiler option -g3, and also remove -O3? This is something at least I've missed before as I'm used to the makefile.common used in most of the SDK 6 examples.

  • Hi Vidar, yes i already use compiler option -g3 -O0 to debug my software. If i program the S310 V1.0.0 with the corresponding header files and RAM/ROM areas all works fine. If i program the S310 V2.0.1 with the corresponding header files and RAM/ROM areas the application don't run at all. I don't now what i'm doing wrong.

Related