Closed brendanvanbreda closed 6 years ago
To get single-reset behavior on Arduino-generated binaries you will need to set USE_SINGLE_RESET to 1, and also modify:
#define SINGLE_RESET() (*((uint32_t *)0x20B4) == 0x87eeb07c)
to
#define SINGLE_RESET() 1
Let me know if it didn't work!
Awesome thanx @mmoskal worked as expected.
Is it possible to have a key combination to enter into bootloader mode?
You could probably quite easily modify the bootloader to support that - just configure the pin as input with a pull up (or pulldown, depending on how your button is wired) and return at the beginning of check_start_application()
when your button is pressed.
I am attempting to build a custom binary release for a custom board, with reference about the reset procedure.
When looking through uf2.h
If this value is set to 0, should the expected result be that the bootloader will become active on a single reset ?
As when working in maker.makecode with the Arduino Zero it makes use of a single reset to enable the bootloader. In comparison to when converting a .bin file from Arduino to a .UF2 it would still require a second reset. This occures between uploads of the UF2 file from the different sources.