Hello,
Software is not working, If I define the extern variables in a particular file (ex. main.c) but it works If I define the same variable in different file (ex: test.c). Also if I initialize with 0 its not working but If I initialize with particular value it works. Also I did compare both working and non working .map files and it appears that non working build map file shows that address are not continuous even though no static variables are defined in that file.
I defined MSThreshold, IGDThreshold, MSChecksum as Unsigned 16 bit value. I did load the release build symbols into target debugged the release build software and it appears that MSChecksum is not 16bit value the lowest 16bit values are different and why it shows two 16bit values in the memory location and in the map file shows 0x0084bc is MSThreshold, 0x0084bd is IGDThreshold, 0x0084be is MSChecksum and 0x0084bf is not found in the memory map file.
test.h:
extern Uint16 MSThreshold;
extern Uint16 IGDThreshold;
extern Uint16 MSChecksum;
main.c: (not working)
#include "test.h"
Uint16 MSThreshold = 300;
Uint16 IGDThreshold = 46;
Uint16 MSChecksum = 300;
test.c ( working)
#include "test.h"
Uint16 MSThreshold = 300;
Uint16 IGDThreshold = 46;
Uint16 MSChecksum = 300;
Memory view:-
0x0084BC MSThreshold
0x0084BC 012C
0x0084BD IGDThreshold
0x0084BD 002E
0x0084BE MSChecksum
0x0084BE 012C 7503
CCS: 6.2
Compiler version 3.2.
Is there any specific reason why CCS generates builds differently ? Is there memory alignment issue?. Please advise.
Thanks,
Ramesh G