diff --git a/src/main/config/config_streamer.c b/src/main/config/config_streamer.c index 0ad3dc8a6..af7638379 100644 --- a/src/main/config/config_streamer.c +++ b/src/main/config/config_streamer.c @@ -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 diff --git a/src/main/target/SITL/target.c b/src/main/target/SITL/target.c index 0930108a2..b35332121 100644 --- a/src/main/target/SITL/target.c +++ b/src/main/target/SITL/target.c @@ -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) {