Go Down

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

matzrh

ok, I got it to work.   (The directory structure was correct, it was just as you mentioned it should be, above, btw).
The problem was that apparently from Arduino 1.0.1 (?) but definitely in 1.0.2 there is a library WiFi in the libraries path in the applications folder, which is included automatically by the makefiles (the APP_LIB_PATH directory seems to be parsed in step2.mk).
Uncommenting the BOARD_TAG and and other variables in the root makefile and running a "make build" from the Terminal gave me that clue.
(btw, is there any way to make XCode give you the verbose build output.  It would give better clues, sometimes).

The triggering error was actually
/Applications/Arduino.app/Contents/Resources/Java/libraries/WiFi/WiFiClient.cpp: In member function 'uint8_t WiFiClient::getFirstSocket()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/WiFi/WiFiClient.cpp:177: error: 'SOCK_NOT_AVAIL' was not declared in this scope
make: *** [Builds/libs/WiFi/WiFiClient.o] Error 1


SOCK_NOT_AVAIL is some preprocessor definition in a utility header from that WiFi library, which probably was not parsed.
The duplicates appeared then because it probably messed up the whole preprocessing.

I worked around this by just adding WiFi to the EXCLUDE_NAMES tag definition of step1.mk.
The build target then went straight through without any errors or warnings.

I tried to manually copy the WiFi library to the project folder and included it to all targets in XCode, but that did not work.  You probably understand why  ;) and may want to add that library to the next release (or could it not be parsed, anyway?).

Thanks for the tool, it looks great and I will now try out my real projects with it :)

avenue33

I'm glad it works for you now.


Uncommenting the BOARD_TAG and and other variables in the root makefile and running a "make build" from the Terminal gave me that clue.


The BOARD_TAG variable is defined when you select the board on Info pane.
Please refer to section 4.2. Change the Board on the User Manual.

(btw, is there any way to make XCode give you the verbose build output.  It would give better clues, sometimes).


All the build, link and upload commands as well as the error messages are available on the Issue navigator.
Please refer to section 5.4. Error Messages on the User Manual.

Xcode is a professional IDE and requires some learning. I strongly recommend Xcode 4 Unleashed by Fritz F. Anderson I bought thanks to contributions I've received.


avenue33

Please find the new release of embedXcode

   Nov 13, 2012 release 21 • Stability enhancement and better information

• Stability enhancement, especially for Arduino Due and StellarPad linking
• Better information in a more structured presentation

As always,

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

Enjoy ;)

avenue33

Please find the new release of embedXcode

   Nov 17, 2012 release 22 • New Make and Fast optimised targets

embedXcode release 22 includes two new targets: Make and Fast.



The Make and Fast targets feature an optimisation for the build of the foundation libraries.

The new targets are much faster than the corresponding Build and All targets. This is especially important for the ARM-based boards.

Learn more.

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

Enjoy ;)

davidhux

Context - OSX MountainLion, Xcode4.5.2

I have installed embeddedXcode and I can (after some messing about ) generate an Arduino (Uno) project.

I find I cannot compile it  here is the error report - the Arduino is not connected and I have not editted the code created

# embedXcode
# ----------------------------------
# Embedded Computing on Xcode 4
#
# Copyright © Rei VILO, 2010-2012
# Licence CC = BY NC SA
#

# References and contribution
# ----------------------------------
# See About folder
#


include $(MAKEFILE_PATH)/Avrdude.mk

ifneq ($(MAKECMDGOALS),boards)
    ifneq ($(MAKECMDGOALS),build)
        ifneq ($(MAKECMDGOALS),make)
            ifneq ($(MAKECMDGOALS),document)
                ifneq ($(MAKECMDGOALS),clean)
                    ifeq ($(AVRDUDE_PORT),)
                        $(error Serial port not available)
                    endif
                endif
            endif
        endif
    endif
endif

I would like to be more explicit - but I simply dont know what to say - except that I would expect it to be able to compile a 'null program'! Earlier attempts encountered other errors ( like 'init()' not defined) - but these have now gone away!

Any help will be much appreciated before I am forced to use VisualStudio!

Thank-you

Go Up