123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
-
-
-
- #pragma once
- #include <stdint.h>
- #include "bootapp.h"
- #include "config.h"
- #define XFLASH_SIZE 0x40000ul
- #define DUMP_MAGIC 0x55525547ul
- struct dump_header_t
- {
-
-
- uint32_t magic;
- uint8_t regs_present;
- uint8_t crash_reason;
- uint32_t pc;
- uint16_t sp;
- };
- struct dump_data_t
- {
-
- uint8_t regs[RAMSTART];
- uint8_t sram[RAMSIZE];
- };
- struct dump_t
- {
- struct dump_header_t header;
-
-
- struct dump_data_t __attribute__((aligned(256))) data;
- };
- #define DUMP_OFFSET ((XFLASH_SIZE - sizeof(dump_t)) & ~0xFFFul)
- #define MMU_BOOTLOADER_UPDATE_OFFSET (DUMP_OFFSET - 32768)
- #define MMU_FW_UPDATE_OFFSET (MMU_BOOTLOADER_UPDATE_OFFSET - 32768)
- #define LANG_OFFSET 0x0
- #define LANG_SIZE (MMU_FW_UPDATE_OFFSET - LANG_OFFSET)
- #define DUMP_SIZE (XFLASH_SIZE - DUMP_OFFSET)
|