[riot-notifications] [RIOT-OS/RIOT] riotboot: implement serial flasher (#15493)

benpicco notifications at github.com
Sun Nov 22 22:06:16 CET 2020


@benpicco commented on this pull request.



> + * @author      Benjamin Valentin <benpicco at googlemail.com>
+ * @}
+ */
+
+#include <string.h>
+#include "cpu.h"
+#include "riotboot/hdr.h"
+
+__attribute__((weak))
+void usb_board_reset_in_bootloader(void)
+{
+    uint32_t *magic = (void*)RIOTBOOT_MAGIC_ADDR;
+
+    irq_disable();
+    *magic = RIOTBOOT_MAGIC;
+    NVIC_SystemReset();

I'm just a bit afraid that this might mess with the magic address - some arch code does quit a bit of cleanup in `pm_reboot()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15493#discussion_r528404349
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201122/0e5d7b63/attachment.htm>


More information about the notifications mailing list