Go Down

Topic: Arduino on Xcode Project — Official Thread (Read 153 times) previous topic - next topic


Arduino IDE 1.0.2.  Just deleted the whole thing (including sketch folder) and reinstalled.  (I think it was 1.0.1, before, they must have updated it quite recently).
embedxcode downloaded installer package from your website on 21 oct 2012 (where do I see the version?)
Same result...
I will try a little more over the weekend


Strange indeed.  This is the first time such error is reported.


Can I ask you or some other Xcode/Makefile craig again if you have some clues?
I discovered the following:

When I add in main.cpp the full path of BlinkTest.ino (i.e. #include"/Users/myname/Documents/Arduino/BlinkTest/BlinkTest/BlinkTest.ino") the test project compiles in the Arduino IDE.
The warnings are still present.  They appear in Libraries HardwareSerial.cpp, Print.cpp and Tone.cpp which are included from a previous compile (although I installed the whole Arduino.app new).
E.g. the last lines of the compiler output before the warnings are:

Code: [Select]
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 \
  -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino \
  -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp \
  -o /var/folders/gq/_c97z0614fj267w8732pn4r00000gn/T/build4731805130703822254.tmp/HardwareSerial.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':

I suspect this may be independent from the build errors in XCode, but on the other hand, I was able to avoid all warnings in previous sketches.

What I also observed:  If I insert some rubbish into the main.cpp (either within main{} or outside), it is not picked up during the build target, at all.  This can be because it lists too many other errors and parses all includes, first, but may still be a clue.

I still believe this may be some problem with errors due to function overloading which would normally work in C++ (maybe some functions are not interpreted as being part of a class ??)

If I look at the first bit that generates an error:

Code: [Select]
#ifdef __cplusplus
#include "WCharacter.h"
#include "WString.h"
#include "HardwareSerial.h"
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);

#define word(...) makeWord(__VA_ARGS__)

Which is some part of Arduino.h I get the first error in the lower line of uint16_t makeWord saying Declaration of C function 'uint16_t makeWord(byte, byte)' conflicts with and in the line above the error is Previous declaration 'uint16_t makeWord(uint16_t)' here.

I also included in Arduino1.mk the line
Code: [Select]
$(shell env>theEnvironment) and the anonymized result is attached...

Thank you anyone for your help.


I'm sorry not to be able to help you on your specific case.

I don't understand why the blink.ino file isn't inside the folder of the Xcode project:

. MyProject.xcode
. MyProject/
. . blink.ino
. . main.cpp
. . and other files


Nov 10, 2012, 04:16 pm Last Edit: Nov 11, 2012, 05:15 pm by avenue33 Reason: 1
Please find the new release of embedXcode

  • Oct 26, 2012 release 18 • Support for Arduino Due

  • Oct 28, 2012 release 19 • Support for StellarPad

  • Nov 09, 2012 release 20 • Support for Teensy 3.0

The user manual has been updated too

  • Nov 09, 2012 release 16 • Updated with new boards

Please note the Arduino 1.5, Energia for StellarPad and Teensy 3.0 softwares are in development.

I've tested build, link and upload successfully for all boards except for the Arduino Due I don't own.

Website: http://embedxcode.weebly.com
Download: http://embedxcode.weebly.com/download
User guide: http://embedxcode.weebly.com/tutorial

Enjoy ;)

Go Up