Hi,
I just installed embedXCode and have it successfully uploading my Star Wars Astromech control program to an Arduino Mega 2560. I have several libraries to run servos and LEDs in real time. The code sense works fine for all of these libraries. However, I cannot get the basic Arduino commands to use code sense (such as Serial.println("Gripper Arm DeActivated")

.
Additionally, it doesn't seem to recognize procedures if they are defined after the procedure that calls them. I was able to reorder the code to get the sketch to compile. However, this isn't normal behavior. I should be able to declare a function at the end of the file that gets called from the main loop without getting a build error.
For example, using the Arduino IDE this code works and compiles just fine. But in embedXCode I get a "swapPS3NavControllers was not declared in this scope" error.
void onInitPS3(){
Serial.print(F("\r\nGot to onInitPS3"));
String btAddress = getLastConnectedBtMAC();
PS3Nav->setLedOn(LED1);
isPS3NavigatonInitialized = true;
badPS3Data = 0;
//sfx.playTrack("T12 OGG");
trigger.trigger(23);
#ifdef SHADOW_DEBUG
output += "\r\nBT Address of Last connected Device when Primary PS3 Connected: ";
output += btAddress;
if (btAddress == PS3MoveNavigatonPrimaryMAC){
output += "\r\nWe have our primary controller connected.\r\n";
}else{
output += "\r\nWe have a controller connected, but it is not designated as \"primary\".\r\n";
}
#endif
}
void onInitPS3Nav2(){
String btAddress = getLastConnectedBtMAC();
PS3Nav2->setLedOn(LED1);
isSecondaryPS3NavigatonInitialized = true;
badPS3Data = 0;
//sfx.playTrack("T12 OGG");
//TODO:Fix the error when uncommenting line below
if (btAddress == PS3MoveNavigatonPrimaryMAC) swapPS3NavControllers();///<-------Error on this line !!
#ifdef SHADOW_DEBUG
output += "\r\nBT Address of Last connected Device when Secondary PS3 Connected: ";
output += btAddress;
if (btAddress == PS3MoveNavigatonPrimaryMAC){
output += "\r\nWe have our primary controller connecting out of order. Swapping locations\r\n";
}else{
output += "\r\nWe have a secondary controller connected.\r\n";
}
#endif
}
void swapPS3NavControllers(){
PS3BT* temp = PS3Nav;
PS3Nav = PS3Nav2;
PS3Nav2 = temp;
//Correct the status for Initialization
boolean tempStatus = isPS3NavigatonInitialized;
isPS3NavigatonInitialized = isSecondaryPS3NavigatonInitialized;
isSecondaryPS3NavigatonInitialized = tempStatus;
//Must relink the correct onInit calls
PS3Nav->attachOnInit(onInitPS3);
PS3Nav2->attachOnInit(onInitPS3Nav2);
}
I have gone through all of the help files from the embedXCode website about reindexing and manual setup and updating the makefile. I don't know if it matters, but all of the example screen shots show the Arduino icon on the project .ino file while my .ino file has a C++ icon.
Any help would be greatly appreciated. I have spent five days mucking around with this and can't seem to make it work as expected.