Declare eepromData for all builds that require it, rather than having

the target.c define it.
This commit is contained in:
Dominic Clifton 2019-06-12 14:39:11 +02:00 committed by mikeller
parent 9c274240d8
commit 58f43634bd
2 changed files with 9 additions and 1 deletions

View File

@ -27,6 +27,15 @@
#include "config/config_streamer.h"
#if !defined(EEPROM_IN_FLASH)
#if defined(EEPROM_IN_RAM) && defined(PERSISTENT)
PERSISTENT uint8_t eepromData[EEPROM_SIZE];
#else
uint8_t eepromData[EEPROM_SIZE];
#endif
#endif
#if defined(STM32H750xx) && !(defined(EEPROM_IN_EXTERNAL_FLASH) || defined(EEPROM_IN_RAM) || defined(EEPROM_IN_SDCARD))
#error "STM32750xx only has one flash page which contains the bootloader, no spare flash pages available, use external storage for persistent config or ram for target testing"
#endif

View File

@ -468,7 +468,6 @@ char _Min_Stack_Size;
// fake EEPROM
static FILE *eepromFd = NULL;
uint8_t eepromData[EEPROM_SIZE];
void FLASH_Unlock(void) {
if (eepromFd != NULL) {