feat: linker support for firmware in external flash (#5290)
This commit is contained in:
@@ -41,8 +41,12 @@ void rotaryEncoderCheck();
|
||||
#else
|
||||
#define FLASHSIZE 0x80000 // 512k
|
||||
#endif
|
||||
#define FLASH_PAGESIZE 256
|
||||
#define BOOTLOADER_SIZE 0x8000
|
||||
#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 LUA_MEM_MAX (0) // max allowed memory usage for complete Lua (in bytes), 0 means unlimited
|
||||
|
||||
@@ -71,14 +75,6 @@ enum {
|
||||
PCBREV_X7_40 = 1,
|
||||
};
|
||||
|
||||
// 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);
|
||||
|
||||
// Pulses driver
|
||||
#define INTERNAL_MODULE_ON() gpio_set(INTMODULE_PWR_GPIO)
|
||||
#define INTERNAL_MODULE_OFF() gpio_clear(INTMODULE_PWR_GPIO)
|
||||
|
||||
Reference in New Issue
Block a user