This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2202: Programming a MSP430G2202 with Energia

Part Number: MSP430G2202
Other Parts Discussed in Thread: ENERGIA

Hello,

Accordin to the thread I am replying-to, a TI employee told community that in order to compile to a MSP430G2202 chip we should copy configuration file from a 2231 and make minor tweaks to it in order for it to appear in Energia. However, this does not work because the G2202 chip does not have an ADC inside, and Energia is coded in such a way that if no ADC exists then the whole Energia build will collapse.

/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c: In function 'analogFrequency':
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:109:3: error: 'analog_div' undeclared (first use in this function)
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:109:3: note: each undeclared identifier is reported only once for each function it appears in
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:120:2: error: 'analog_period' undeclared (first use in this function)
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c: In function 'analogResolution':
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:126:2: error: 'analog_res' undeclared (first use in this function)
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c: In function 'analogWrite':
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:142:28: error: 'analog_res' undeclared (first use in this function)
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:172:43: error: 'analog_period' undeclared (first use in this function)
/home/microjoe/.energia15/packages/energia/hardware/msp430/1.0.3/cores/msp430/wiring_analog.c:175:60: error: 'analog_div' undeclared (first use in this function)

Indeed, the analog_div is declared inside some #ifdefs that do not consider the case when there is no ADC available. So the proposed solution by TI representative is not working. What is the solution to use Energia with a device that do not have ADC inside ? Can Energia be tweaked so that calls to analogRead will do nothing if no ADC is present or something else?

Best regards,

Romain.

**Attention** This is a public forum