tp-freeforall/prod

x2xx MCUs do not have ADC12ENC in header file

andresv opened this issue · 7 comments

tos/chips/msp430/adc12/HplAdc12P uses ADC12ENC, however for example msp430f2418 has just ENC in header definition.

/* ADC12CTL0 */

define ADC12SC (0x001) /* ADC12 Start Conversion */

define ENC (0x002) /* ADC12 Enable Conversion */

define ADC12TOVIE (0x004) /* ADC12 Timer Overflow interrupt enable */

So this should be somehow universally sorted out.

what toolchain are you using?

In particular what version of msp430mcu do you have installed?

Toolchain is taken sometime ago from: http://tinyprod.net/repos/debian/README-46.html

apt-show-versions msp430mcu-46
msp430mcu-46/msp430-46 upgradeable from 20120406-LTS20120406+20120502 to 20120406-LTS20120406+20120502-tinyprod

how about "dpkg -l msp430mcu-46"

The above shows you what versions are available.

but given what you have shouldn't make a difference. I'll figure it out. thanks.

Also a test case that I can compile would be helpful. I need the test case to fail.

The above should fix it for all ADC12 cpus that don't define ADC12ENC.

Try it out and let me know. And I'll close the issue.

Got 2 more undefined symbols:

`ADC12CONSEQ0' undeclared (first use in this function)
`ADC12CONSEQ1' undeclared (first use in this function)

In msp430f2418.h they are defined as:

#define CONSEQ0             (0x0002)    /* ADC12 Conversion Sequence Select 0 */
#define CONSEQ1             (0x0004)    /* ADC12 Conversion Sequence Select 1 */

that's why it would have been good to have a test case i can run.