Can't get nrf51 example to work

Sysprogs forums Forums VisualGDB Can't get nrf51 example to work

This topic contains 3 replies, has 2 voices, and was last updated by  support 2 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11873

    elims
    Participant

    Hi,

    I’m currently evaluating VisualGDB as a IDE for all my µC needs. So far the tests with my FRDM-K64F board worked very well. However, I cant’ get the nrf51 tutorial to work. I’m using a RedBear BLE Nano board and a Segger J-Link. Following your guide with all defaults and just one exception: I’m using LEDBlink without BSP and manually specify Pin 19 for the LED. Everything compiles well, however the LED is not blinking. If I halt I can observe the registers and Pin 19 is neither set as output, nor on. Setting a breakpoint does not work either. I do get the following error: Quit (expect signal SIGINT when the program is resumed) VisualGDB was unable to update the breakpoint skip count.

    That is the output of the GDB output:

    SEGGER J-Link GDB Server V6.16j Command Line Version

    JLinkARM.dll V6.16j (DLL compiled Jul 24 2017 18:42:23)

    Command line: -select USB -device nRF51822_XXAA -if SWD -speed auto
    —–GDB Server start settings—–
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    Generate logfile: off
    Verify download: off
    Init regs on start: off
    Silent mode: off
    Single run mode: off
    Target connection timeout: 0 ms
    ——J-Link related settings——
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ——Target related settings——
    Target device: nRF51822_XXAA
    Target interface: SWD
    Target interface speed: auto
    Target endian: little

    Connecting to J-Link…
    J-Link is connected.
    Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
    Hardware: V8.00
    S/N: 268003312
    OEM: SEGGER-EDU
    Feature(s): FlashBP, GDB
    Checking target voltage…
    Target voltage: 3.28 V
    Listening on TCP/IP port 2331
    Connecting to target…Connected to target
    Waiting for GDB connection…Connected to 127.0.0.1
    Reading all registers
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 4 bytes @ address 0x000006CE (Data = 0x4916E7FD)
    Read 2 bytes @ address 0x000006CE (Data = 0xE7FD)
    Received monitor command: reset
    Resetting target
    Downloading 16224 bytes @ address 0x00000000
    Downloading 16160 bytes @ address 0x00003F60
    Downloading 16224 bytes @ address 0x00007E80
    Downloading 16224 bytes @ address 0x0000BDE0
    Downloading 16224 bytes @ address 0x0000FD40
    Downloading 16128 bytes @ address 0x00013CA0
    Downloading 13408 bytes @ address 0x00017BA0
    Downloading 192 bytes @ address 0x0001B000
    Downloading 4872 bytes @ address 0x0001B0C0
    Downloading 4 bytes @ address 0x0001C3C8
    Downloading 4 bytes @ address 0x0001C3CC
    Downloading 4 bytes @ address 0x0001C3D0
    Writing register (PC = 0x0001C0C0)
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 2 bytes @ address 0x0001C248 (Data = 0x2013)
    Read 4 bytes @ address 0x0001C0C0 (Data = 0x68024813)
    Received monitor command: reset
    Resetting target
    Read 4 bytes @ address 0x20003FFC (Data = 0x0060FFB8)
    Downloading 4 bytes @ address 0x20003FFC
    Reading all registers
    Read 4 bytes @ address 0x000006D0 (Data = 0x4C174916)
    Read 2 bytes @ address 0x000006D0 (Data = 0x4916)
    Read 4 bytes @ address 0xFFFFFFFE (Data = 0x4C174916)
    Read 2 bytes @ address 0xFFFFFFFE (Data = 0x0000)
    Read 4 bytes @ address 0xFFFFFFFE (Data = 0x4C170000)
    Read 2 bytes @ address 0xFFFFFFFE (Data = 0x0000)
    Read 4 bytes @ address 0x20003FFC (Data = 0x3D5218D5)
    Setting breakpoint @ address 0x0001C248, Size = 2, BPHandle = 0x0001
    Starting target CPU…

    Thanks for your help!

    #11882

    support
    Keymaster

    Hi,

    Most likely your board is not compatible with the original Nordic boards and requires some adjustments to the code (e.g. changing clock parameters or GPIO numbers for other functions). If you are not sure, we would advise getting one of the supported Nordic boards, getting the code to work there and then moving over to the custom board.

    #11986

    elims
    Participant

    Hi,

     

    I now got the nrf51-DK and it works with both, the internal debugger, as well as a external j-link. Could you kindly guide me into the right direction for getting my custom board to work?

     

    Thank you!

    #11991

    support
    Keymaster

    Hi,

    nRF5x projects store board configuration in pcaXXXX.h files included from boards.h. Hence to port your project to a custom board, you would need to copy one of those files, adjust its contents to reflect the differences between your board and the original board and modify boards.h so that it will include your modified file instead (e.g. by adding a new BOARD_xxxx macro and checking for it in boards.h).

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.