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

    I did some more investigations, trying a Nordic PCA10006 board which had SWD pins that I could solder onto the Raspberry Pi. I noticed it has the 256k flash, 16k ram variant (opposed to the 128k I originally thought). So I compiled with ram set to 16k, modifying boards/NRF51822DK.py and also setting variables to 100.

    The same thing happened - espruino programmed OK first time

    Info : SWD IDCODE 0x0bb11477
    Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    target state: halted
    target halted due to debug-request, current mode: Handler HardFault
    xPSR: 0xc1000003 pc: 0xfffffffe msp: 0xffffffd8
    Info : nRF51822-QFAA(build code: E0) 256kB Flash
    verified 210504 bytes in 4.054331s (50.704 KiB/s)
    ** Verified OK **

    ...then the next time

    Info : SWD IDCODE 0x0bb11477
    Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    Error: timed out while waiting for target halted
    TARGET: nrf51.cpu - Not halted

    Fortunately I was able to connect the JLink programmer to this board, and was able to reflash it. So I will assume that the problem is down to openocd or the GPIO bit bang. Not sure why it flashed OK with the Adafruit code running but not with Espruino.

    Having said that, I didn't get any device adverts appearing on my phone. Is it feasible for Espruino to run in a 16k RAM variant? I think the soft device uses about 8k which might not leave much for the JS interpreter. Developing on the board with JLink would be much easier.

    Colin

About

Avatar for ColinP @ColinP started