Pages: 1 2 3 [4] 5 6 ... 45   Go Down
Author Topic: Arduino on Xcode Project — Official Thread  (Read 134282 times)
0 Members and 1 Guest are viewing this topic.
Antwerp, Belgium
Offline Offline
Jr. Member
**
Karma: 2
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hi Avenue33 and gianmarco

if you get this:
make: *** No rule to make target `/Applications/Arduino.app/Contents/Resources/Java/hardware/Sanguino/cores/arduino/pins_arduino.o', needed by `bin/core.a'.  Stop.

It means you are trying to compile for sanguino and he can't find a file in the Sanguino folder. In this case you would need to have the sanguino sources in your arduino app. You can find instructions about that here: http://sanguino.cc/

Also, if you are not trying to build for Sanguino, you should change the build setting in XCode to make it build for your specific board. I have put the instructions on how to do that in the Readme inside the XCode project:
https://github.com/timknapen/Arduino-With-XCode/blob/master/Arduino/ArduinoOnXCode4_2/README

And maybe you didn't download the specific project for XCode4 on github. It is called "ArduinoOnXCode4_2" , I just re-uploaded that.
The one called "ArduinoOnXcode/" is the template for XCode 3.2

let me know if it still fails, I can't test on Lion right now because I'm out of the country.

best,
tim
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't understand git… smiley-sad

Neither do I, even with the nice Git front client installed on my MacBook smiley-wink .
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Tim,
I've downloaded the correct project, tried to compile it (after verifying that the current board is UNO) and still an error appears inside Arduino.h: This header seems not available.

Code:
#include "pins_arduino.h"
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try

Code:
#include <pins_arduino.h>
instead of
Code:
#include "pins_arduino.h"
The same problem arises with Eclipse.
Logged


Antwerp, Belgium
Offline Offline
Jr. Member
**
Karma: 2
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

are you using the new Arduino app (arduino 1.0) ? My projects are not updated to that version yet. Will try to do it as soon as possible.

For now, it is only tested with Arduino app 0022 like it says in the readme: https://github.com/timknapen/Arduino-With-XCode/blob/master/README

best,
tim.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Tim: yes, I'm new to C and Arduino and and I downloaded the last version last week.
Having the project for the last version would be great


@avenue33: unfortunately, nothing has changed smiley-cry
Logged

Antwerp, Belgium
Offline Offline
Jr. Member
**
Karma: 2
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, the newest version (1.0) has changed quite a bit I think.

An example from the release notes of Arduino 1.0:
Quote
The WProgram.h file, which provides declarations for the Arduino API,
  has been renamed to Arduino.h. ...

Your problem is probably related to that.

Just download the 0022 version and see if that works for now. I'll get the a working project with the new Arduino version up on github after next week.

best,
tim.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Tim, I'll take a look at that trying to solve this issue. I hope so.

Thanks, I'll let you know smiley
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Tim,

On Xcode 4.2.1 running on Mac OS X 10.7.2 with Arduino 0022, I have the following error message

Code:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin//avr-ar: bin/core.a: No such file or directory

I haven't installed the FTDIUSBSerialDriver_10_4_10_5_10_6 since it isn't required on OS X.

Any clue?

* Log.txt (76.46 KB - downloaded 22 times.)
Logged


Antwerp, Belgium
Offline Offline
Jr. Member
**
Karma: 2
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Avenue,

I think that's a big "whoops" on my part...
there is one "/" too many in

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin//avr-ar: bin/core.a: No such file or directory

so my guess is that the AVRDUDE_DIR variable in the makefile is wrong. It was
Code:
AVRDUDE_DIR = /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/
and I changed it to
Code:
AVRDUDE_DIR = /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin

You can adjust it yourself or get the updated one from github.

let me know if it works, I can't test on Lion right now.

best,
tim
« Last Edit: December 14, 2011, 02:23:41 pm by timKnapen » Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Never mind about the oops!

Code:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar: bin/core.a: No such file or directory

Unfortunately, the bin/core.a remains orphan.



Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Trying to get things going. I am running...

- Lion 10.7.2
- Xcode 4.2.1
- Arduino Version 0022
- timknapen-Arduino-With-XCode-08ce0ae
- Duemilanove 168 (also have a Mega and a few clones)

Sample project builds and upload fine. I started a project that uses the Wire library and get...
Quote
bin/core.a(Wire.o): In function `TwoWire::send(unsigned char)':
Wire.cpp:(.text._ZN7TwoWire4sendEh+0x3c): undefined reference to `twi_transmit'
plus a couple more similar errors. It appears twi.h can't be found. I've tried changing #includes from angle brackets to quotes (and visa versa), moving the twi.c and twi.h out of the "utility" folder and into the same folder as wire.h and wire.cpp, changing stuff in the compat folder (#include "util/twi.h" to #include "utility/twi.h", etc, etc, etc.

Boy there are a bunch of copies of the include files inside the Arduino app. One thing I noticed about the "starter folder" from GitHIb: There references to "arduino" and "libraries" in the project tree were bad (red) so I deleted them and re-added them from the  Arduino app. Was this the right thing to do?

Chasing my tail... Any ideas?
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The bin/core.a seems to be a source of troubles...

I hope timKnapen could consolidate all the feed-back, fix the issues and release a new version!

Good luck timKnapen smiley
Logged


Antwerp, Belgium
Offline Offline
Jr. Member
**
Karma: 2
Posts: 64
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

haha thanks Avenue,

I am following this conversation, but I am traveling without a computer that runs Lion. I'll be able to fix all these issues in two weeks.

Also thank Swany and gianmarcoodorizzi for all the great feedback!

best,
tim.
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 638
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Bonjour Tim,

No problem.

I've played with the Visual Micro, an Arduino plug-in for Microsoft Visual Studio and it's really nice.

Back to Xcode, the 4.2 release looks really buggy: I had many "Xcode has crashed" messages when I was coding some plain C++.

I'm considering downgrading to the previous stable release Xcode 3. Other candidates are Eclipse and NetBeans. Both have a dedicated Arduino plug-in available.

Since the makefile is too cumbersome, have you considered Ino? It's a command-line version of the Arduino pre-compiler / compiler. It works fine on my MacBook.

Best regards,

« Last Edit: December 18, 2011, 05:03:38 am by avenue33 » Logged


Pages: 1 2 3 [4] 5 6 ... 45   Go Up
Jump to: