AnsweredAssumed Answered

stm8S003 constants at a fixed memory address

Question asked by b.j on Jul 27, 2012
Latest reply on Aug 1, 2012 by charles
Hello

I'm trying place constants at fixed memory address according to this link http://www.cosmic-software.com/faq/faq3.php

My code is:

#pragma section const {sver}
const uint8_t SV_HIGH=1;     
const uint8_t SV_MID=2;     
const uint8_t SV_LOW=3;     
#pragma section const{}

I added new segment into linker file:

+seg .sver -b 0x9f10

And linker returns:

#error clnk oprawa_v1.lkf:1 bad address (0x9f11) for zero page symbol _SV_MID
#error clnk oprawa_v1.lkf:1 bad address (0x9f12) for zero page symbol _SV_LOW
#error clnk oprawa_v1.lkf:1 bad address (0x9f10) for zero page symbol _SV_HIGH

Can Any One help?


Outcomes