Cleanup defaults for alternative config storage.

* Provide defaults for EEPROM_SIZE.
* __config_start/end.
This commit is contained in:
Dominic Clifton 2019-06-06 11:26:56 +02:00
parent e83ba0db0e
commit 2c4b8eaec3
2 changed files with 11 additions and 7 deletions

View File

@ -144,12 +144,6 @@
extern uint32_t SystemCoreClock;
#ifdef EEPROM_IN_FILE
extern uint8_t eepromData[EEPROM_SIZE];
#define __config_start (*eepromData)
#define __config_end (*ARRAYEND(eepromData))
#endif
typedef enum
{
Mode_TEST = 0x0,

View File

@ -338,7 +338,17 @@
#undef USE_ESCSERIAL
#endif
#if !defined(EEPROM_IN_RAM) && !defined(EEPROM_IN_FILE)
#if defined(EEPROM_IN_RAM) || defined(EEPROM_IN_FILE)
#ifndef EEPROM_SIZE
#define EEPROM_SIZE 4096
#endif
extern uint8_t eepromData[EEPROM_SIZE];
#define __config_start (*eepromData)
#define __config_end (*ARRAYEND(eepromData))
#else
#ifndef EEPROM_IN_FLASH
#define EEPROM_IN_FLASH
#endif
extern uint8_t __config_start; // configured via linker script when building binaries.
extern uint8_t __config_end;
#endif