Files
templates/c/set-protocol/ports/stm32g474-usb-boot/boot_port.h

22 lines
849 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Контракт аппаратного USB-загрузчика: доступ к образу, запрос перезапуска и операции Flash.
* Его реализация зависит от семейства MCU, тогда как последовательность обновления задаётся
* общим set_boot.
*/
#ifndef G474_BOOT_PORT_H
#define G474_BOOT_PORT_H
#include "set_boot.h"
/* STM32G474xB (128 KB), single-bank mode, normal bank mapping. */
#define G474_APP_BASE 0x08010000UL
#define G474_APP_SIZE 0x00010000UL
#define G474_META_BASE 0x0800F000UL
#define G474_BOOT_REQUEST 0x1003U
extern const setp_boot_ops g474_boot_ops;
bool g474_app_valid(void);
bool g474_boot_requested(void);
void g474_request_boot(uint32_t now);
void g474_reset_poll(uint32_t now);
void g474_jump_app(void);
#endif