You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • Well, you have at least button there which is one GPIO for this. Anyway, yes it is possible, it depends on bootloader code, espruino bootloader by default requires holding some button but you can disable it in your own bootloader build. Typically this is done by setting some value in GPREGRET nrf register (which survives reset) and then performing soft reset. Then in bootloader you check this value and decide.

    Requiring some interaction is there for safety so nobody can reflash your device remotely without confirmation. So if you disable this just beware and protect espruino console so it is not accessible to everyone.

    The current way to switch to bootloader is a bit tricky with timing and there is no explicit method to switch to bootloader. I think better would be to allow switching to bootloader programatically but then there could be button confirmation before accepting the firmware (e.g. if you do not hold button while sending dfu zip it would fail). Safety would be same but you could invoke update procedure in deterministic way without user needing to hold button with precise timing while calling E.reboot()


Avatar for fanoush @fanoush started