AnsweredAssumed Answered

Cosmic Linker - absolute memory address problem

Question asked by Ck-befra on May 29, 2014
Latest reply on Jun 3, 2014 by Ck-befra
Hello,
I'm using Cosmic 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:
Cosmic FAQ absolute addressing

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:
#pragma section const {chanid}
                const unsigned char variable1 = 0x56;
                const unsigned char variable2 = 0x57;
                const unsigned char variable3 = 0x58;
                const unsigned char variable4 = 0x59;
#pragma section const {}


And here is part in LKF (I'm using custom mode in linker options):
+seg .chanid -b 0xfd00


Am I something missing?

Outcomes