1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00

Allow the use of EEPROM_IN_RAM on MCUs.

If the MCU also supports PERSISTENT ram (not erased on a warm boot) it
allows testing of config changes without wearing out your flash.

e.g.

linker script
-------------
comment out __config_start/__config_end

target.c
--------
PERSISTENT uint8_t eepromData[EEPROM_SIZE]; // persistent, so it
survives warm boots.

target.h
--------
extern uint8_t eepromData[EEPROM_SIZE];

SITL actually keeps the EEPROM in a FILE, loaded into RAM using
alternate FLASH_* implementation.
This commit is contained in:
Dominic Clifton 2018-11-24 16:37:36 +01:00
parent 13389970c4
commit e83ba0db0e
8 changed files with 61 additions and 32 deletions

View file

@ -225,6 +225,10 @@ uint8_t getMotorCount() {
return 4;
}
size_t getEEPROMStorageSize() {
return 0;
}
void setPrintfSerialPort(struct serialPort_s) {}