Some packed structs were not displayed in "watch" window
Hi all,
i'm actually hunting a problem which occured after the change from Crossworks 2.0.10 to 2.1 ... some parts of my memory seems to be overwritten. For getting behind this, i need to check / debug most of my structures in RAM.
I have a lot of packed structures to save memory, like this:
// Definition der APS - 40 bit
struct __attribute__ ((__packed__))
{
unsigned int start:1, // Flag für Startblock einer Kette
active:1, // Flag für APS aktiv - gilt nur für Startblock
nxt_block:12, // Nummer des Folgeblocks
op_type:5, // Operator type
op_address:12, // Operator Address
mark:1; // Merker (für Garbage Collection)
unsigned char command:6;
} fblock[anz_fblocks];
My problem is, that some of these structures are displayed correctly in the "watch" window, while others are NOT correctly displayed here. Instead of seeing all the members of the struct above in the watch, i just see this:
fblock 0x80089fff
One other struct with exactly the same size (!) is displayed correctly:
struct __attribute__ ((__packed__))
{
unsigned int timer:16, // Sekunden-Downtimer
def:16; // Ladewert des Timer in Sekunden
unsigned char act:1, // Aktueller Ausgang des Delay
in:1, // Eingang des Delay. Bei einer Flanke 0->1 wird der Timer gestartet
lastin:1, // Merker für letzten Zustand für Flankendetektion
offwarn:1, // Warnt 20 Sekunden vor Erlöschen durch kurzes Ausmachen des Lichts für 1s
lact:1, // Wert des letzten Durchlaufs zur Flankendetektion, wird nach jedem APS-Lauf aus .act übernommen
reset:1; // Rücksetzeingang, wenn "1" wird im nächsten APS-Lauf der Delay zurückgesetzt
} delay[anz_delays];
The memory allocation of these structs:
0x00218a88 delay
0x00218bc8 fblock
0x0021b3c8 groupname
Does anyone have an idea why the "fblock" struct is not displayed correctly in the watch window - and how i may solve this problem? Using unpacked structs is not possible due to insufficient RAM capacity.
Please sign in to leave a comment.
Comments
1 comment