mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
RP2: Support jump to bootloader command.
* Add picotool binary. * Support jump to bootloader command. * MSC interface is disabled on jump to boot.
This commit is contained in:
parent
9f8db9b745
commit
a076fc79b8
@ -86,6 +86,12 @@ extern unsigned char *OMV_UNIQUE_ID_ADDR;
|
||||
// USB IRQn.
|
||||
#define OMV_USB_IRQN (USBCTRL_IRQ_IRQn)
|
||||
|
||||
// Jump to bootloader function.
|
||||
#ifndef LINKER_SCRIPT
|
||||
void pico_reset_to_bootloader(void);
|
||||
#endif
|
||||
#define MICROPY_RESET_TO_BOOTLOADER pico_reset_to_bootloader
|
||||
|
||||
// Linker script constants (see the linker script template port/x.ld.S).
|
||||
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
||||
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
||||
|
@ -86,6 +86,12 @@ extern unsigned char *OMV_UNIQUE_ID_ADDR;
|
||||
// USB IRQn.
|
||||
#define OMV_USB_IRQN (USBCTRL_IRQ_IRQn)
|
||||
|
||||
// Jump to bootloader function.
|
||||
#ifndef LINKER_SCRIPT
|
||||
void pico_reset_to_bootloader(void);
|
||||
#endif
|
||||
#define MICROPY_RESET_TO_BOOTLOADER pico_reset_to_bootloader
|
||||
|
||||
// Linker script constants (see the linker script template port/x.ld.S).
|
||||
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
||||
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "hardware/rtc.h"
|
||||
#include "hardware/structs/rosc.h"
|
||||
#include "pico/unique_id.h"
|
||||
#include "pico/bootrom.h"
|
||||
|
||||
#include "omv_boardconfig.h"
|
||||
#include "framebuffer.h"
|
||||
@ -86,6 +87,11 @@ void __fatal_error()
|
||||
}
|
||||
}
|
||||
|
||||
void pico_reset_to_bootloader(void)
|
||||
{
|
||||
reset_usb_boot(0, 1);
|
||||
}
|
||||
|
||||
void exec_boot_script(const char *path, bool interruptible)
|
||||
{
|
||||
nlr_buf_t nlr;
|
||||
|
BIN
tools/picotool
Executable file
BIN
tools/picotool
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user