• Me again, I have tried setting the module (flashed with old hex before) in DFU mode by submitting

    E.setFlags({unsafeFlash:1});
    var f=require("Flash");
    f.erasePage(0x7f000);
    E.reboot();
    

    But the IDE was unable to find a device in DFU mode. So this didn't seem to work.
    I then tried the VDD->D0 option and couldn't get it to work: neither IDE nor nRF-Connect see the device in DFU mode.

    Another thing I have noticed: I have uploaded a script to let the device advertise like a OpenHaystack beacon – works good until I power it off and on: the device falls back into "Espruino mode" no matter if uploaded to RAM or Flash.

    Can it be that the old hex does not work the way Espruinos work today?

  • I then tried the VDD->D0 option and couldn't get it to work: neither IDE nor nRF-Connect see the device in DFU mode.

    If you are still talking about http://www.espruino.com/nRF52832DK then D0 is the wrong one. In general you need to press BTN1 to get to DFU. Only on mdbt42q this button is mapped to D0. On this board it is a real button.

    However as the erasePage code did not work I checked board definition and bad news is that there is no DFU bootloader :-(
    https://github.com/espruino/Espruino/blob/master/boards/NRF52832DK.py#L28

    So I was wrong, unfortunately you cannot update it over BLE. So building from source is the best option.

    In Linux or WSL that is part of Windows it is quite easy, something like

    git clone https://github.com/espruino/Espruino
    cd Espruino
    . scripts/provision.sh NRF52832DK
    make BOARD=NRF52832DK RELEASE=1
    

    I just tried it on Debian bullseye and I had to also run

    sudo apt-get install python-is-python3
    sudo apt-get install python3-pip
    
About

Avatar for DanDyse @DanDyse started