2010-05-14 01:06 AM
How to arrange the variables at EEPROM using COSMIC ?
2011-05-17 06:08 AM
@eeprom tEGD tsEGD;
@eeprom tEYD tsEYD; Regards, Luca (Cosmic)2011-05-17 06:08 AM
Hi Luca,
I tried to declare the variables as you mentioned. But I got some error messages as attachment.#error clnk Debug\A101VW01.lkf:1 symbol _FLASH_CR2 not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepstr.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eeprom.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepwrp.o )
#error clnk Debug\A101VW01.lkf:1 symbol _FLASH_NCR2 not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepstr.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eeprom.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepwrp.o ) #error clnk Debug\A101VW01.lkf:1 symbol _FLASH_IAPSR not defined ((C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepstr.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eeprom.o (C:\Program Files (x86)\COSMIC\CXSTM8_16K\Lib\libm0.sm8)eepwrp.o Regards, Boltnut2011-05-17 06:08 AM
2011-05-17 06:08 AM
Hi Bruno,
Thanks for your help. It fixed my linkage issue.2011-05-17 06:08 AM
Hi Bruno,
As you suggested, I tried to add the FLASH section for solving the linker issue. Unfortunately, its behavior is wrong even linkage issue was fixed. Could you give me more suggestion ? Therefore I changed back original declartion. It can work fine. EXTERN tEGD tsEGD @0x4000; EXTERN tEYD tsEYD @0x4020;/* Unlock Data memory */
FLASH_Unlock(FLASH_MEMTYPE_DATA);if (fDown)
{ if (tsEGD.bBrightness > BRIGHTNESS_MIN) tsEGD.bBrightness--; } else { if (tsEGD.bBrightness < BRIGHTNESS_MAX) tsEGD.bBrightness++; } /* Lock Data memory */ FLASH_Lock(FLASH_MEMTYPE_DATA);