IMHO, I think we shouldn't mimic Arduino bad habits —or not so good habits— when using a real IDE as Visual Studio, Xcode, NetBeans or alike
I hear what you say but actually I think the Arduino design is for users who don't want the complexities of .cpp/.h and #includes. The objective with the Visual Studio plugin was to be 100% compatible with Arduino ensuring a 100% identical program output. That said, more advanced users should find your xcode solution to be excellent
Splendid, just suggest him this challenge: building an Arduino plug-in for NetBeans!
Can you believe it. 10 years old, already installed netbeans and has no interest in learning how to make an led light up with an Arduino. Doh!
HaakonStorm:
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.
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.
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!
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.
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 .
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.
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
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
include $(MAKEFILE_PATH)/Arduino23.mk
to
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!
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.
Elijahg:
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.
Elijahg:
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.
Elijahg:
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.
Elijahg:
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.
Elijahg:
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.
Elijahg:
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.
It is yes, but it's always best to write code that handles unexpected or unusual conditions rather than just failing
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.
Elijahg:
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.
That's strange, AVRDUDE_PORT is defined in Avrdude.mk by:
Board_port is pulled from the config file fine, but "$(firstword $(wildcard $(BOARD_PORT)))" seems to return nothing, making AVRDUDE_PORT blank. Without $(firstword $(wildcard it works fine.
However, for some reason USER_LIBS_LIST is always "0" in the debug info. Any ideas? The only way to get non-core libraries to compile is to enter their full path into the source.pde. Thanks!