On the msp430g2553, I have been programming the clock calibration using version 1064 of the header file, where the calibration information is declared as:
msp430g2553.h (excerpts)
----------------------------------------------------------------------
#define __MSP430_HEADER_VERSION__ 1064
#define CALDCO_1MHZ_ 0x10FE /* DCOCTL Calibration Data for 1MHz */
const_sfrb(CALDCO_1MHZ, CALDCO_1MHZ_);
#define CALBC1_1MHZ_ 0x10FF /* BCSCTL1 Calibration Data for 1MHz */
const_sfrb(CALBC1_1MHZ, CALBC1_1MHZ_);
----------------------------------------------------------------------
Compiler : gcc4.7.2 with the mspgcc backend from Sourceforge.
Now that gcc4.9 natively supports the msp430, I have built it and it seems to work : however as part of that process I upgraded to header file version 1109, available from this page: http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/1_00_00_00/index_FDS.html
specifically this archive:
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/1_00_00_00/exports/GCC_RH_20131206.zip
new msp430g2553.h (excerpts)
----------------------------------------------------------------------
#define __MSP430_HEADER_VERSION__ 1109
#define TLV_DCO_30_TAG_ 0x10F6 /* TLV TAG_DCO30 TAG */
const_sfrb(TLV_DCO_30_TAG, TLV_DCO_30_TAG_);
#define TLV_DCO_30_LEN_ 0x10F7 /* TLV TAG_DCO30 LEN */
const_sfrb(TLV_DCO_30_LEN, TLV_DCO_30_LEN_);
#define CAL_DCO_1MHZ (0x0006) /* Index for DCOCTL Calibration Data for 1MHz */
#define CAL_BC1_1MHZ (0x0007) /* Index for BCSCTL1 Calibration Data for 1MHz */
----------------------------------------------------------------------
As we can see, CALDCO_1MHZ has gone, and been replaced with a base address to the calibration page and a bunch of offsets : thus my existing MSP430 applications no longer build.
Some other CPU header files (at version 1109) still only have the old style #defines into the calibration table; the majority have both old and new styles. But the msp430g2553 has lost the old form : is this planned obsolescence in the C header files?
It's not just the msp430g2553 : of 112 header files with the comment
/************************************************************
* Calibration Data in Info Mem
************************************************************/
there seem to be 18 with missing #defines. Full list:
msp430g2113
msp430g2153
msp430g2203
msp430g2213
msp430g2233
msp430g2253
msp430g2303
msp430g2313
msp430g2333
msp430g2353
msp430g2403
msp430g2413
msp430g2433
msp430g2453
msp430g2513
msp430g2533
msp430g2553
msp430tch5e
I can't see any reference to the old style being deprecated or obsolescent : just silently dropped...
What gives? Is the old style obsolete and I missed the announcement?
Or were the header files carelessly updated, some variables accidentally omitted, and these will be corrected in the next release?
Or do we all need to rewrite all our applications to use the new style, or what?
For now I can work around it by e.g. locally hacking the header file, but this is hardly satisfactory.