You are reading a single comment by @ColinP and its replies. Click here to read the full conversation.
  • Hello,

    Following up to my own posts:

    I realised the JLink had an unpopulated connector, and sure enough it carries signals. So I was able to solder the Adafruit board onto the JLink connector and reflash the Adafruit firmware, and the board worked. Phew! So I'm going to assume that the pi openocd stuff isn't working reliably and put it aside for now.

    I built from a clean github clone:

    NRF51822DK=1 RELEASE=1 make

    I'm not getting any advertisements from the device however. JLink seems to report that it is flashing ~120kbytes, which is slightly more than the size reported by 'size' for the espruino elf file. I suspect this doesn't include the soft device.

    JLink flash report:

    Cortex-M0 identified.
    Target interface speed: 100 kHz
    J-Link>loadfile espruino_1v84.60_nrf51822.hex
    Downloading file [espruino_1v84.60_nrf51822.hex]...Info: J-Link: Flash download: Flash programming performed for 1 range (120832 bytes)
    Info: J-Link: Flash download: Total time needed: 19.748s (Prepare: 0.562s, Compare: 0.875s, Erase: 2.307s, Program: 15.940s, Verify: 0.005s, Restore: 0.057s)
    O.K.

    I tried manually loading the soft device - looks like it was already flashed - looks like JLink skips programming matching parts which explains the size.

    loadfile s110_nrf51_8.0.0_softdevice.hex
    Downloading file [s110_nrf51_8.0.0_softdevice.hex]...Info­: J-Link: Flash download: Flash download into internal flash skipped. Flash contents already match

    ...and tried manually flashing the .bin file just to be sure (.text segment starts at 0x18000 I believe)

    espruino_1v84.60_nrf51822.elf: file format elf32-littlearm
    SYMBOL TABLE:
    00018000 l d .text 00000000 .text

    J-Link>loadbin espruino_1v84.60_nrf51822.bin 0x18000
    Halting CPU for downloading file.
    Downloading file [espruino_1v84.60_nrf51822.bin]...Info: J-Link: Flash download: Flash programming performed for 2 ranges (113664 bytes)
    Info: J-Link: Flash download: Total time needed: 18.553s (Prepare: 0.678s, Compare: 0.192s, Erase: 2.630s, Program: 14.971s, Verify: 0.021s, Restore: 0.058s)
    O.K.
    J-Link>r
    Reset delay: 0 ms
    Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
    J-Link>g (I believe runs the CPU)

    I might have to begin debugging to see why there are no advertisements. Very strange that the same build did advertise yesterday!

About

Avatar for ColinP @ColinP started