The attached project 1070.class_allocation.zip was created to test C++ classes being allocated static storage allocation in main. The project was created in CCS 5.5.0.00077 with MSP430 compiler v4.2.3, targetting a MSP430F5529. The program runs correctly, but in the debugger the contents of the classes ADC0 to ADC3 are displayed incorrectly in the debugger as shown in the following screenshot:
The debug variable view incorrectly reports that the address of ADC0 ADC1, ADC2 and ADC3 are all 0xB748 (which is the address of the main function in flash) rather than the actual address in RAM (0x2f12, 0x2f16, 0x2f1a, 0x2f1e).
In the expression window when a cast was used to manually display the contents of address 0x2f16 (where ADC1 is in RAM) as cast to the type ADCon the debugger displayed the correct result.
The attached .zip file also contains debug_server.log which is the debug server logging. The debug server logging contains the following:
Therefore, the problem appears to be that the CCS 5.5 debugger is unable to resolve the address of ADC0 to ADC3 based upon the debug information created by MSP430 compiler v4.2.3. Not sure if the problem is CCS 5.5 or the compiler.0x000007FC 9552078 3 MSP430 GEL I: Evaluation of "ADC0" completed - Value: unknown Location: Compound Location (Address 0xb748 (0)) Type (class ADCon)
0x000007FC 9552093 3 MSP430 GEL I: Evaluation of "ADC1" completed - Value: unknown Location: Compound Location (Address 0xb748 (0)) Type (class ADCon)
0x000007FC 9552093 3 MSP430 GEL I: Evaluation of "ADC2" completed - Value: unknown Location: Compound Location (Address 0xb748 (0)) Type (class ADCon)
0x000007FC 9552093 3 MSP430 GEL I: Evaluation of "ADC3" completed - Value: unknown Location: Compound Location (Address 0xb748 (0)) Type (class ADCon)