2014-05-29 03:17 AM
Hello,
I'm usingCosmic STM8 32K Special Edition Free license
v. 4.3.11 under STVD IDE. MCU: STM8L151 I'm trying to place 4 bytes with specific values into absolute memory address. I found in manual and even on cosmic web FAQ this help:http://www.cosmic-software.com/faq/faq3.php
So I did exactly same, but in flash there are only zeros, so it seems it doesn't work. Compiler and Linker doesn't produce any warning or error. Here is part in my code:&sharppragma section const {chanid}const unsigned char variable1 = 0x56;
const unsigned char variable2 = 0x57;
const unsigned char variable3 = 0x58;
const unsigned char variable4 = 0x59;
&sharppragma section const {} And here is part in LKF (I'm using custom mode in linker options):+seg .chanid -b 0xfd00 Am I something missing? #cosmic-linker
2014-06-02 05:22 AM
2014-06-03 05:14 AM
Oh yes, there was a problem:
_variable1 ******** *** removed from Debug\driving.o *** _variable2 ******** *** removed from Debug\driving.o *** _variable3 ******** *** removed from Debug\driving.o *** _variable4 ******** *** removed from Debug\driving.o *** I had to add argument -k to lkf because in Compiler options I have +split argument: +seg .chanid -b 0xfd00 -k So now it works and I see that values in flash. Thanks for kick in :)