February 1, 2010 - 9:37pm
Guest |
I am working with the STM8S105S4, Optimization: Size, level 0
Variable definitions below
EXT bit some_bit_flag1
EXT u8, u16 .. more variables
EXT bit someother_bit_flag
EXT u8,u16 more stuff
EXT bit more_bit_flags
1) When I look at the memory map, the number of bits called out is equal to the number of bits defined in the global variables
2) The memory map ( *** DATA MEORY *** ) has all bits starting at address 0 as expected
The variable map later in the xxx.MAP printout has the bit variable at a location not in the bit map data memory - not expected
3) When I run the code and set the someother_bit_flag is does not set the variable memory.
I can look at all the bit map memory - no change
I can look at the address called out in the SBIT command - no change
Testing preformed
The initial some_bit_flag has:
C Code: some_bit_flag1 = SET;
disassembler: BSET 0h,#0
This location matches the memory map location from the xxx.MAP output file B:00000000H PUBLIC
This bit variable functions correctly.
A later bit field definition has:
C Code someother_bit_flag = SET;
disassembler BSET 1c00h, #0
This location matches the memory map call out for the bit variable B:00001CH PUBLIC
However, does not the memory map call out for the bit variables location
BIT 000000H.0 000005H.4 INSECTION ?EBT?MAIN
000005H.4 000000H.4 *** GAP ***
Question:
Any suggestions to why the bit field definition may be doing this. If I change the variable type to u8 it properly locates in memory and can be updated - it works correctly. This is happening on several bit variables. I hope this is enough information to help in offering suggestions.
JimBow
|
Just some more useful information on the above post.
* Rkit-STM8 is at version 2.26.09.0317
JimBow
Hi JimBow,
This has been corrected in a patch few months ago. You can download it from our downloads page here
Regards,
Bruno
Bruno,
Thanks for the reminder. I had downloaded this a month ago and then had installed the new Ride7 release in Jan 2010 and must have killed my previous patch upgrade. Either way all is well - now the bit variables are in the proper memory location and work fine.
As usual the tec support is great and fast. Much appreciated.
Jim Bow
Hi Jim,
We are glad you appreciate our help :cool:
Bruno.