Pages: 1 ... 8 9 [10] 11 12 ... 46   Go Down
Author Topic: Arduino on Xcode Project — Official Thread  (Read 146328 times)
0 Members and 2 Guests are viewing this topic.
France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow! I just recently found the mpIDE app and the mpide xcode project, and wanted to try this with my UNO. I'm getting some strange
errors so far. I got as far as a clean compile, but uploader returns with error 2 (programmer not responding). I might be
doing something wrong.
I experienced the same error.

Just add the -F flag to AVRDUDE_COM_OPTS:
Code:
AVRDUDE_COM_OPTS  = -q -V -F -p $(MCU)
Logged


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

The original structure of the makefiles in mpideXcode was limiting further development (because it was depending on the sole MPIDE application for both Arduino and chipKIT boards) and wasn't flexible enough (with one single file for all).

Now, the new makefiles suite uses Arduino IDE and chipKIT MPIDE for their corresponding boards. Adding a new platform only requires adding a new makefile specific to that platform.

So the new name for the project is embedXcode!
Logged


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

Hi,

just read all the posts of this thread - So you all don't have any problems with the output from Serial.println();? I just cloned tims Arduino-With-XCode project and also tested some other projects but I don't get any logs in xcode. The rate is set to 9600 bps Serial.begin(9600); Did I miss something to get the output?

Oh, and thanks for all the help getting a projet to work in xcode!
« Last Edit: February 12, 2012, 01:52:51 pm by Robhuhn » Logged

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

Actually, the output from Serial.println() goes to a separate Terminal window.

I can't manage to get it on the Xcode debug window.

Someone has found a trick but I can't replicate it.
Logged


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

avenue33 -

Can't you simply associate the .pde extension with the Xcode app in order for it to appear as a C++ Source file inside of Xcode?
Logged

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

I've just added to release 1 an Installation Guide.

As usual, the repository is rei-vilo/embedXcode
Logged


Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ave33 et. al.

Awesome work! Just stumbled upon this. Tried to get a project working as per the pdf instructions, there appear to be a couple of snags. I don't have a "Libraries" folder in my ~/Documents/Arduino folder. Also, some funny business with the Build and Make targets- at first glance, it looks like the location that is expected for the arduino_pins.h is incorrect, and the script ends up making empty .h and .c files for it? Build and Make fail because of this.

I have to run, but will give this a good look later and report back. The thought of being able to use XCode for this is too cool.

Note- The Serial target works just fine, puts up a Terminal window that does communicate with the Arduino.

Dave
Logged

Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, yeah, I'm using the Arduino 1.0. Is the project template compatible with this?

Dave
Logged

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

Thank you for the accolade.

Just add a Libraries folder into your sketchbook folder.

I know there are too many targets. Build includes Clean and so compile everything from scratch, while Make only compile updated files for faster answer. Build = Clean + Make, as in Borland Turbo Pascal smiley-wink .

Arduino 1.0 ins't supported yet. Among the main reasons:
  • Based on feed-back from the forum, Arduino 1.0 doesn't seem to be stable enough.
  • chipKIT UNO32 IDE is still 0023 based, as other boards.

So I rather prefer to wait before updating the project and template.

Nothing worse than addressing two different and incompatible releases!

Has the Installation Guide helped you?

Feel free to participate. I've listed the open issues on the GitHub repository.
« Last Edit: February 29, 2012, 01:32:13 pm by avenue33 » Logged


Oakland California
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,

Thanks for the fast reply. No prob, I'll be happy to go back to 0023 if I can use XCode as the IDE smiley-wink

My board of choice is the Teensy right now, maybe I can figure out how to make it one of the board options...

Cheers,

Dave
Logged

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

New releases add Arduino 1.0 support.

embedXcode • Mar 06, 2012 release 4 - Arduino 1.0 support
mpideXcode • Mar 06, 2012 release 7 - Arduino 1.0 support

Code is here and documentation there.

Next step is to add Wiring, if I find a Wiring S board to test the upload.
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately your template doesn't seem to work for me without quite a few tweaks. I have Arduino 1.0. I've followed all the steps in your guide, but I firstly get an error in Step1.mk "Error: no application found". That's because in Step1.mk ARDUINO_APP = /Applications/Arduino23.app when it should be just Arduino.app.

Upon fixing that, I then get
Quote
grep: /Applications/Arduino23.app/Contents/Resources/Java/hardware/arduino/boards.txt: No such file or directory
Sometimes I get an error that the compiler can't locate "pins_arduino.h". Doing the following fixes both errors.
In Step1.mk, change
Quote
include $(MAKEFILE_PATH)/Arduino23.mk
to
Quote
include $(MAKEFILE_PATH)/Arduino1.mk

Also, inside Arduino1.mk "APP_HEADER = WProgram.h" appears to be wrong, as Arduino 1.0 uses Arduino.h.
APPLICATION_PATH in the same file assumes the Arduino 1.0 is called "Arduino1.app" also. Most people won't have a number in their Arduino app name, it'll just be the default Arduino.app. CORE_LIB_PATH should have a lower case "Arduino" in the path, as it's lower case in the filesystem (in Arduino 1.0 at least). Currently, this won't work on case sensitive filesystems. USER_LIB_PATH should have a lower case "libraries".

If leaving the target on All, an error "/bin/sh: Builds/nil: No such file or directory" occurs. After using other targets, the Builds folder is created so the error goes away. A Builds folder should be in the file template.

main.cpp in the project template should be Arduino.h not WProgram.h. Same in the C++ and Library file templates.


Another thing, why do you force people to enter their name and email address to access the files through Google Docs? Why did you remove everything from GitHub? Makes it rather difficult to see what changes have been made... Don't get me wrong, it's great that you're helping out with your template, just seems you're trying to hide it from everyone!
« Last Edit: March 11, 2012, 09:52:54 pm by Elijahg » Logged

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

Elijahg,

Thank you very much for the detailed feed-back on the template.

I'm working on the points you mention.

I've been obliged to implement this indirect download mode due to unpleasant experience with other projects, not to mention cooperation on GitHub close to nil.

« Last Edit: March 12, 2012, 01:02:21 am by avenue33 » Logged


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

Unfortunately your template doesn't seem to work for me without quite a few tweaks. I have Arduino 1.0. I've followed all the steps in your guide, but I firstly get an error in Step1.mk "Error: no application found". That's because in Step1.mk ARDUINO_APP = /Applications/Arduino23.app when it should be just Arduino.app.

Upon fixing that, I then get
Sometimes I get an error that the compiler can't locate "pins_arduino.h". Doing the following fixes both errors.
In Step1.mk, change

Fixed. Arduino.mk now points to Arduino.app.

Also, inside Arduino1.mk "APP_HEADER = WProgram.h" appears to be wrong, as Arduino 1.0 uses Arduino.h.
APPLICATION_PATH in the same file assumes the Arduino 1.0 is called "Arduino1.app" also.

Fixed.

Most people won't have a number in their Arduino app name, it'll just be the default Arduino.app.

Fixed.
Arduino.mk addresses Arduino.app.
Arduino1.mk and Arduino23.mk makefiles are supplied for convenience.

CORE_LIB_PATH should have a lower case "Arduino" in the path, as it's lower case in the filesystem (in Arduino 1.0 at least). Currently, this won't work on case sensitive filesystems. USER_LIB_PATH should have a lower case "libraries".

Fixed for SketchBook/Library or library.
Fixed for /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino
By default, OS X is case insensitive.

If leaving the target on All, an error "/bin/sh: Builds/nil: No such file or directory" occurs. After using other targets, the Builds folder is created so the error goes away. A Builds folder should be in the file template.

Fixed.

main.cpp in the project template should be Arduino.h not WProgram.h. Same in the C++ and Library file templates.

Actually, the #include in main.cpp is used to activate code-sense.
Fixed in the Library file template.

I hope to release the updated version soon.

Thanks again for the detailed feed-back.

Feel free to explore Xcode 4.3-related issues!
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By default, OS X is case insensitive.
It is yes, but it's always best to write code that handles unexpected or unusual conditions rather than just failing smiley

Quote
Actually, the #include in main.cpp is used to activate code-sense.
Fixed in the Library file template.

With WProgram.h included in main.cpp code sense doesn't work for me. If I change it to Arduino.h it works right away. The default .pde file includes WProgram.h too when it should again just include Arduino.h

There's a small problem with uploading too, for some reason the port for AVRdude to use gets lost somewhere. Changing AVRDUDE_PORT in Avrdude.mk to $(BOARD_PORT) fixes that.

Quote
Thanks again for the detailed feed-back.
No problem, thanks for the template!
Logged

Pages: 1 ... 8 9 [10] 11 12 ... 46   Go Up
Jump to: