Reboot to DFU? #4222
Replies: 1 comment
-
Posted at 2023-07-21 by Ivor I've not tried/done it from espruino... but in my nrf code the steps to get to DFU are:
Posted at 2023-07-24 by @gfwilliams I'm not 100% sure if the bootloader in Espruino supports looking at that register but it's worth a try... There's nothing built in to Espruino though I'm afraid, but if it works maybe we should add it! Posted at 2023-07-24 by @fanoush
Well, I proposed that previously but so far your argument was that it is dangerous - someone with access to console can remotely update your device so something physical (holding button) to enter DFU is safer. Some watches uses also value 1 in GPREGRET to trigger DFU so in my custom builds I have one liner
but I agree that it is somewhat dangerous. Posted at 2023-07-24 by DanTheMan827 If it’s not enabled by default, I think it should definitely be behind an ifdef, or maybe enabled some other way. Maybe a DFU update that flips a byte flag somewhere? It’s hard though, because you’re trying to secure functionality through a repl console that should ultimately be password protected by the user… I get what you’re saying though Posted at 2023-07-24 by @gfwilliams
Yes, I know... I'm just getting worn down over time :) I guess there's an argument that it is now possible via the CLI to actually rewrite the bootloader from Espruino (once you disable the write-protect), so in a way if you really wanted to screw it up from the REPL you could. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-07-21 by DanTheMan827
I’m looking for a way to reboot into DFU mode without having to hold the button.
Is this possible? I’ve tried poking various 32-bit values into the address that should be GPREGRET, but it immediately reboots with all three LEDs on, and then back into espruino.
0x4000051c is the address I’ve been using, but I’m not so sure that’s correct.
Beta Was this translation helpful? Give feedback.
All reactions