123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #pragma once
- #include <stdint.h>
- #include "bootapp.h"
- #include "config.h"
- #define XFLASH_SIZE 0x40000ul
- #define LANG_OFFSET 0x0
- #ifndef XFLASH_DUMP
- #define LANG_SIZE XFLASH_SIZE
- #else
- #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 DUMP_SIZE (XFLASH_SIZE - DUMP_OFFSET)
- #define LANG_SIZE DUMP_OFFSET
- #endif
|