2013-08-22 08:18 PM
My application builds fine until I add the @eeprom keyword to a declaration. Now I get the following linker errors:
#error clnk Debug\nos.lkf:1 symbol _FLASH_CR2 not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_32K\lib\libm0.sm8)eeprom.o )#error clnk Debug\nos.lkf:1 symbol _FLASH_NCR2 not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_32K\lib\libm0.sm8)eeprom.o )#error clnk Debug\nos.lkf:1 symbol _FLASH_IAPSR not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_32K\lib\libm0.sm8)eeprom.o )Any thoughts on this one? Cosmic has been less than responsive.2013-08-23 07:51 AM
''Less than responsive'' is being kind though all things considered I like the Cosmic compiler best of all the compilers I use.
Anyway, I bet you're using the ST include files ''stm8s.h''. They define the IO as structures. Cosmic also provides an IO file ''iostm8.h'' which, of course, does it differently with different names. Look in ''C:\Program Files\COSMIC\CXSTM8\Hstm8'' for the include file for your cpu & you'll find a line like volatile char FLASH_CR2 @0x505b; /* Flash Control Register 2 */ volatile char FLASH_NCR2 @0x505c; /* Flash Complementary Control Reg 2 */ volatile char FLASH_IAPSR @0x505f; /* Flash in-appl Prog. Status reg */ copy & paste them into one of your files. I think that's all you'll need. jdf2013-08-23 08:13 PM
Thanks John,
I was just getting around to defining my own when your response came in. I will give it a go.John2013-08-26 01:40 AM