Jump to content

Recommended Posts

Hi Everyone!
I am trying to use the AIR430 Booster pack, MSP430G2452 uC and programming it with Energia 0101E0012 on a Mac. If I simply try to compile the examples given in energia (for example, WirelessMonitorSensor), I get a compile error as follows:
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/utility/Platform.cpp: In function 'void A110x2500SpiRead(unsigned char, unsigned char*, unsigned char)':
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/utility/Platform.cpp:84:28: error: 'SPIMISO_SET_MODE' was not declared in this scope
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/utility/Platform.cpp: In function 'void A110x2500SpiWrite(unsigned char, const unsigned char*, unsigned char)':
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/utility/Platform.cpp:114:28: error: 'SPIMISO_SET_MODE' was not declared in this scope

If I write my own program that just loads the AIR430BoosFCC.h and SPI.h headers (using the Sketch/Import Library.../AIRBoostUSAFCC), I get a different error:

In file included from /Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/AIR430BoostFCC.h:29:0,
                 from test.ino:1:
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/libraries/AIR430BoostUSAFCC/utility/A110x2500Radio.h:109:10: error: 'boolean' does not name a type

The code to generate this error is:


#include <AIR430BoostFCC.h>
#include <SPI.h>
void setup()
void loop()
  Serial.println("Hello World");
Any ideas how to get this working? Thanks!
Link to post
Share on other sites

Turns out that the USI based SPI implementation was never converted to use the new pinMode_int() that set the appropriate SELx registers.


Try adding the follwoing lines to hardware/msp430/variants/launchpad/pins_energia.h just under the "#if defined(__MSP430_HAS_USI__)" together with the other XXX_SET_MODE defines.


Below is the actual patch:

diff --git a/hardware/msp430/variants/launchpad/pins_energia.h b/hardware/msp430/variants/launchpad/pins_energia.h
index 005425f..fa5f7d6 100644
--- a/hardware/msp430/variants/launchpad/pins_energia.h
+++ b/hardware/msp430/variants/launchpad/pins_energia.h
@@ -69,6 +69,9 @@ static const uint8_t DEBUG_UARTTXD = 3;  /* Transmit Data (TXD) at P1.1 */
 #define DEBUG_UART_MODULE 0x0
Link to post
Share on other sites

That did the trick, thanks!


Also, I discovered that you must include SPI.h before AIR430BoostFCC.h or it throws the compile error I showed in my hello world program above. When using the sketch/import buttons, the AIR430BoostFCC.h is included before SPI.h and gives the error. I am sure you could explain why this happens (I have not investigated it), but I thought I would let you all know!


The correct include order is:

#include <SPI.h>
#include <AIR430BoostFCC.h>

Thanks again!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...