Cosmic Linker - absolute memory address problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-29 3:17 AM
Posted on May 29, 2014 at 12:17
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
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-02 5:22 AM
Posted on June 02, 2014 at 14:22 what do you get in the map file?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-03 5:14 AM
Posted on June 03, 2014 at 14:14
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 :)