mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1390 from openmv/rp2_jump_to_boot
RP2: Support jump to bootloader command.
This commit is contained in:
commit
62716f09e7
@ -86,6 +86,12 @@ extern unsigned char *OMV_UNIQUE_ID_ADDR;
|
|||||||
// USB IRQn.
|
// USB IRQn.
|
||||||
#define OMV_USB_IRQN (USBCTRL_IRQ_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).
|
// Linker script constants (see the linker script template port/x.ld.S).
|
||||||
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
||||||
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
||||||
|
|||||||
@ -86,6 +86,12 @@ extern unsigned char *OMV_UNIQUE_ID_ADDR;
|
|||||||
// USB IRQn.
|
// USB IRQn.
|
||||||
#define OMV_USB_IRQN (USBCTRL_IRQ_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).
|
// Linker script constants (see the linker script template port/x.ld.S).
|
||||||
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc
|
||||||
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
|
||||||
|
|||||||
@ -47,6 +47,7 @@
|
|||||||
#include "hardware/rtc.h"
|
#include "hardware/rtc.h"
|
||||||
#include "hardware/structs/rosc.h"
|
#include "hardware/structs/rosc.h"
|
||||||
#include "pico/unique_id.h"
|
#include "pico/unique_id.h"
|
||||||
|
#include "pico/bootrom.h"
|
||||||
|
|
||||||
#include "omv_boardconfig.h"
|
#include "omv_boardconfig.h"
|
||||||
#include "framebuffer.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)
|
void exec_boot_script(const char *path, bool interruptible)
|
||||||
{
|
{
|
||||||
nlr_buf_t nlr;
|
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