Add shared emulator services, waveform generation and STM32 USB boot ports

This commit is contained in:
2026-09-28 11:54:17 +03:00
parent 80ba17d77d
commit b7af25a434
56 changed files with 3627 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#ifndef F407_BOOT_IMAGE_H
#define F407_BOOT_IMAGE_H
#include "boot_port.h"
#include <string.h>
static inline bool f407_vectors_valid(const uint8_t *image, uint32_t size)
{
uint32_t sp, pc;
if (size < 8 || size > F407_APP_SIZE) return false;
memcpy(&sp, image, 4);
memcpy(&pc, image + 4, 4);
return !(sp & 7) &&
((sp > 0x20000000UL && sp <= 0x20020000UL) ||
(sp > 0x10000000UL && sp <= 0x10010000UL)) &&
(pc & 1) && (pc & ~1UL) >= F407_APP_BASE &&
(pc & ~1UL) < F407_APP_BASE + size;
}
#endif