Arduino on Xcode Project — Official Thread

avenue33:

matti157:
thanks for this project!! :slight_smile: :slight_smile:

the site is currently in maintenance, when he comes back online?

The maintenance only concerns the download section.

Weebly limits the size of the file to 5 MB, and both the documentation and the installation package are larger than that.

I'm currently assessing alternatives to Weebly.

I'm sorry, I need the latest version
you can load it on google drive, skydrive, mega, etc. ....?
thank you!

the software works perfectly, but I commented several rows in arduino robot that blocked compilation. Is this normal?

thank you very much!

matti157:
the software works perfectly, but I commented several rows in arduino robot that blocked compilation. Is this normal?

thank you very much!

Yes, it is.

Actually, it depends on which lines you have commented. For example, commenting an #include "library_name.h" may raise an error if the library is required.

Best method is trials and errors!

The next release of the User Manual is going to be an iBook available on the iBookStore.

Discover the preview!

The iBook has been submitted and is currently under review and awaiting validation.

Please find a new release of embedXcode

embedXcode • Jun 30, 2013 release 55 • User Manual as E-Book

The User Manual is now a free e-book to be available on the iBookStore, allowing a much lighter installation package. The iBook is awaiting validation.

Dealing with iBooks Author has been especially painful and slow, due to my old Mac.

As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• Tutorial: http://embedxcode.weebly.com/tutorial

Today I've downloaded and installed the release 55 of your package for Xcode (release 4.6.3) on a MBP with Mountain Lion installed (rev. 10.8.4). I'm using Arduino IDE 1.0.5 without any problems.

I've followed instructions in Zulkarnine video's, but when I try to compile the default project, I got a lot of errors. It seems like Xcode doesn't find Arduino libraries or some project files.

The first error is on line 38 of LocalLibrary.h:

#include "WProgram.h"

'WProgram.h' file not found

but Xcode does not report any error on lines 24, 30 and 32 with the same code.

Then, trying building the project, I got a lot of errors on file ArduinoRobot.cpp, where Xcode reports a lot of "XXXX was not declared in this scope" on line 6, 8, 18, 19, 22 and 25, as you can see in attached image

If I comment those lines, Xcode reports the same errors in Sensors.cpp

Any ideas or suggestions for me?
Thanks for your time and your work.

Which release of Arduino are you using: 1.0.x or 1.5.x?

Edit the main makefile and change the line

EXCLUDE_LIBS = Firmata WiFi Esplora OneWire

into

EXCLUDE_LIBS = Firmata WiFi Esplora OneWire Robot_Control Robot_Control/utility Robot_Motor

Those folders include the libraries for the Arduino Robot.

riccardobianchi:
Today I've downloaded and installed the release 55 of your package for Xcode (release 4.6.3) on a MBP with Mountain Lion installed (rev. 10.8.4). I'm using Arduino IDE 1.0.5 without any problems.

Thank you for the details. I'm using the same software configuration.

riccardobianchi:
I've followed instructions in Zulkarnine video's, but when I try to compile the default project, I got a lot of errors. It seems like Xcode doesn't find Arduino libraries or some project files.

The first error is on line 38 of LocalLibrary.h:

#include "WProgram.h"

'WProgram.h' file not found

but Xcode does not report any error on lines 24, 30 and 32 with the same code.

Lines 38 et sq. are only called if the Arduino release is prior to 1.0, i.e. 23:

#elif defined(ARDUINO) && (ARDUINO < 100)  // Arduino 23 specific
#include "WProgram.h"

I don't experience any error with the pre-processing statements with the same software configuration.

riccardobianchi:
Then, trying building the project, I got a lot of errors on file ArduinoRobot.cpp, where Xcode reports a lot of "XXXX was not declared in this scope" on line 6, 8, 18, 19, 22 and 25, as you can see in attached image

If I comment those lines, Xcode reports the same errors in Sensors.cpp

Any ideas or suggestions for me?
Thanks for your time and your work.

Please refer to my previous post for the solution.

Thank you very much for your answer!

The error in LocalLibrary.h is still present, but is not a problem.

Now all things works fine.
Is it possible to modify makefile for all future new projects?

Sure, I plan to release a new version with the fix.

I'm still waiting for the e-book to be validated...

Please find a new release of embedXcode

embedXcode • Jul 02, 2013 release 56 • Stability enhancement for Arduino Robot

The following line in the main makefile excludes the libraries of the Arduino Robot.

EXCLUDE_LIBS = Firmata WiFi Esplora OneWire Robot_Control Robot_Control/utility Robot_Motor

The User Manual as an e-book is still under review for « quality assurance ».

As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial

Enjoy :slight_smile:

Hi avenue33,
There is something wrong when preparing the project with ver.57. The "External Build Tool Configuration" seems to be unchanged after the first preparation.

Please find a new release of embedXcode.

• embedXcode • Jul 06, 2013 release 57 • Elapsed time for build and link
• embedXcode • Jul 08, 2013 release 58 • Management of file names with space
• embedXcode • Jul 10, 2013 release 59 • Stability enhancement for Doxygen

Interim release 57 includes a measure for the elapsed time of building and linking.

Release 58 features modifications to manage projects even if they include a space in their name or in their paths.

However, it is strongly recommended not to use space in project and folder names.

Release 59 improves stability for Doxygen by avoiding unrecognised characters. For example, © is changed to (c). Doxygen is the tool used for writing [urlhttp://embedxcode.weebly.com/self-document-the-project.html]documentation[/url], directly from the code into PDF, HTML and native Xcode help file formats.

jimaobian, thank you for noticing me. Could you please check this new release solves the issue you reported?

I want to thanks all contributors and stress the importance of your help to continue this project, as Xcode 5 and OS X Mavericks are to require updating my old Mac.

As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial

Enjoy

I am having difficulties to use User Library files with EmbedXCode.
I set the path in Arduino preferences (Arduino 1.5b2 finds the libs I add, letting me thing I've done this correctly)
Bascialy, when I include a file with #include <SdFat.h> for example, it does not find it.
Also and it may be related to my problem, when I add .cpp and .h files in a subfolder in my project, they do not get compiled either.

Anyone a clue ?

EDIT : Found the problem to be a space in the arduino sketchbook folder...

rderimay:
EDIT : Found the problem to be a space in the arduino sketchbook folder...

Thank you for reporting the issue and for sharing the cause...

Space in project, library, sketchbook folder names aren't recommended, as for the Arduino IDE. I've been working very hard on last releases the manage a volume name with a space...

Anyway, avoid names with space as much as possible!

Now I am facing another problem when compiling.
I want to use the SdFat Library (Google Code Archive - Long-term storage for Google Code Project Hosting.)
They define a const (uint8_t const SD_CHIP_SELECT_PIN) at 2 different places (once in SdSpi.h and once in Sd2Card.h)
Their examples compile without problems in Arduino IDE but not in EmbedXCode.

Any clue ???

Thanks !

Strange!

If the same constant is defined twice, it should normally raise an error.

I haven't found the SD_CHIP_SELECT_PIN definition in Sd2Card.h, only in SdSpi.h.

Now, be cautious with the Arduino 1.5 libraries.

Arduino 1.5 is still in beta and the libraries use a very new structure.

avenue33:
Strange!

If the same constant is defined twice, it should normally raise an error.

I haven't found the SD_CHIP_SELECT_PIN definition in Sd2Card.h, only in SdSpi.h.

Now, be cautious with the Arduino 1.5 libraries.

Arduino 1.5 is still in beta and the libraries use a very new structure.

Yes, but I have to use a DUE and so, I have to use 1.5, which is sometimes a pita...
Line 65, you will find

uint8_t const SD_CHIP_SELECT_PIN = SS_PIN;

SdSpi.h line 65 = uint8_t const SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN;

But on Sd2Card?

The User Manual for embedXcode as a free e-book is now available.

(link)

Enjoy :slight_smile: