This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 EEPROM Emulation conversion to Keil

Hi All

Before I start, a quick note as to why I am trying to do this - I have tried using the standard STM libs and definitions, but found them to be not as well written and easy to follow as the ones supplied by Keil, the same applies to the examples, so i have a working project, written around the Keil definitions etc, which I now need to add EEPROM emulation or Flash storage of a few variables. What I dont want to have to do is convert the whole project over to ST, just because I cant figure out how to add this!

I have included the ST eeprom.c but get a few errors, some of the functions it calls are not found, but I guess I can locate these in the ST Lib files. However what I cant find are PAGE_SIZE (which I cant even 'find in files' in the ST demo, which does compile) so i am very confused and not sure best which way to turn.

My warnings and errors are as follows:


eeprom.c(63): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(72): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(82): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(89): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(136): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(143): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(153): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(160): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(193): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(227): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(234): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(283): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(355): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(355): warning: #188-D: enumerated type mixed with another type
eeprom.c(364): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(364): warning: #188-D: enumerated type mixed with another type
eeprom.c(373): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(373): warning: #188-D: enumerated type mixed with another type
eeprom.c(396): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(476): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(488): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(488): warning: #188-D: enumerated type mixed with another type
eeprom.c(495): warning: #188-D: enumerated type mixed with another type
eeprom.c(537): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(542): error: #20: identifier "PAGE_SIZE" is undefined
eeprom.c(553): warning: #223-D: function "FLASH_ProgramHalfWord" declared implicitly
eeprom.c(553): warning: #188-D: enumerated type mixed with another type
eeprom.c(590): warning: #223-D: function "FLASH_ErasePage" declared implicitly
eeprom.c(590): warning: #188-D: enumerated type mixed with another type
eeprom.c(598): warning: #188-D: enumerated type mixed with another type

which isn't so bad as its essentially the same few many times, its as I add more ST demo code that I have problems.

Any help or suggestions would be very much appreciated, please try to refrain from the pointed "isn't it obvious" style answers, I am new to ARM, and the reason I ask is because I am stuck and need some help - I hope to reciprocate in the near future :-)