feat: linker support for firmware in external flash (#5290)
This commit is contained in:
@@ -31,8 +31,12 @@
|
||||
#include "hal/watchdog_driver.h"
|
||||
|
||||
#define FLASHSIZE 0x200000
|
||||
#define FLASH_PAGESIZE 256
|
||||
#define BOOTLOADER_SIZE 0x20000
|
||||
#define FIRMWARE_ADDRESS 0x08000000
|
||||
#define FIRMWARE_LEN(fsize) (fsize - BOOTLOADER_SIZE)
|
||||
#define FIRMWARE_MAX_LEN (FLASHSIZE - BOOTLOADER_SIZE)
|
||||
#define APP_START_ADDRESS (uint32_t)(FIRMWARE_ADDRESS + BOOTLOADER_SIZE)
|
||||
|
||||
#define MB *1024*1024
|
||||
#define LUA_MEM_EXTRA_MAX (2 MB) // max allowed memory usage for Lua bitmaps (in bytes)
|
||||
@@ -52,14 +56,6 @@ void boardOff();
|
||||
#define LEN_CPU_UID (3*8+2)
|
||||
void getCPUUniqueID(char * s);
|
||||
|
||||
// Flash Write driver
|
||||
#define FLASH_PAGESIZE 256
|
||||
void unlockFlash();
|
||||
void lockFlash();
|
||||
void flashWrite(uint32_t * address, const uint32_t * buffer);
|
||||
uint32_t isFirmwareStart(const uint8_t * buffer);
|
||||
uint32_t isBootloaderStart(const uint8_t * buffer);
|
||||
|
||||
// SDRAM driver
|
||||
extern "C" void SDRAM_Init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user