Develop your sketches for Arduino using Xcode!
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6593998_orig.png)
Direct links:
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Hello!
This is the continuation of the thread initiated by Robert aka. Ratkins in the now read-only old forum.
I've the same problem woth Arduino Uno on Xcode :(
Please find what I've found so far:
On his blog (http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532), Robert Carlsen was pretty close to a solution. But as the last two comments suggest, the Arduino Uno differs from the Duemilanove.
Robert Atkins Says:
January 3rd, 2011 at 7:41
I'm trying to get this working on a Uno, which I believe
has different USB/serial hardware than previous Arduino models?
Anyhow, I've changed the makefile to say: PORT = /dev/tty.usbmodem*
… but I'm getting a whole series of error messages: avrdude:
stk500_2_ReceiveMessage(): timeout And it doesn't look like the
sketch is uploading to the board (rx/tx LEDs aren't flashing.)
Anybody got any hints?
Davide Says:
January 9th, 2011 at 23:39
Also I am trying to work with Xcode ArduinoUno but gives me
this error --- "rm -f main.hex main.eep main.cof main.elf \
main.map main.sym main.lss core.a \ make: *** No rule to make target
`/Applications/Arduino.app/Contents/Resources/Java/hardware/cores/arduino//pins_arduino.o',
needed by `core.a'. Stop. -- someone managed to make it work?
Also, Mattias Gunneras posted on Twitter but didn't explain how
@mattiasgunneras
Mattias Gunneras
Finally got Xcode working with the Arduino UNO. I'm looking forward to a productivity gain of about 318%.
9 Jan via Twitter for Mac Favorite Undo Retweet Reply
Good luck!
Anyhow, I've changed the makefile to say: PORT = /dev/tty.usbmodem*
minimally, you would also have to change the bitrate to 115200...
Hello,
I tried Nick's modified version of ArduinoOnXcode template (http://www.makesomecode.com/2010/07/30/programming-arduino-with-xcode/) plus all the following hints
- on Makefile, set values for the MCU, upload speed and the protocol according to file located at Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt
on Makefile, add $(ARDUINO)/WString.cpp to line 73 before $(ARDUINO)/Print.cpp
on Makefile, change line 67 from PORT = /dev/tty.usbserial* to PORT = /dev/tty.usbmodem*
It works fine :) on my Arduino Uno with Arduino 0022 IDE and Xcode 3.2.5 on Mac OS X 10.6.6 for small projects, as LED blinking and "Hello World".
However, I can't manage to use libraries :~ previously developed with Arduino 0022 IDE.
Probable cause might be a mismatch between C and C++ but I don't know how to fix it.
Any idea ?
Hi!
Here are two working :) projects
- Arduino-1: very basic
- Arduino-3: with a class for the LED
and one non-working :( project
- Arduino-4: the LED class is on a library
I'm sure it's something trivial :~ but I can't find it.
/usr/local/CrossPack-AVR/bin//avr-gcc -mmcu=atmega328p -I. -gstabs -DF_CPU=16000000L -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -Os -Wall -Wstrict-prototypes -std=gnu99 -o main.elf main.cpp -L. core.a -lm
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `global constructors keyed to myLed':
main.cpp:9: undefined reference to `LED::LED()'
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `loop':
main.cpp:31: undefined reference to `LED::blink(int, int)'
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `setup':
main.cpp:18: undefined reference to `LED::begin(int)'
main.cpp:24: undefined reference to `LED::on()'
make: *** [main.elf] Error 1
Warning! Before compiling, always launch Build > Clean or Shift-Command-K.
Any idea? Thank you for your help!
Hi!
After some research, it seems to be related to the link options.
The library LED.h LED.cpp doesn't figure on the compile line:
/usr/local/CrossPack-AVR/bin//avr-gcc -mmcu=atmega328p -I. -gstabs -DF_CPU=16000000L -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -Os -Wall -Wstrict-prototypes -std=gnu99 -o main.elf main.cpp -L. core.a -lm
Enclosed: Makefile, full build log report
What are the parameters to be changed on the Makefile, not only for this specific project for any future projects?
Thank you and best regards,
Good news, using the Makefile supplied by avenue33 I've successfully uploaded the Blink script to my Uno!
Xcode4 still won't acknowledge the existence of the template, but I guess that's just an afternoon of manual-digging. I'll post here when I have anything more to report.
Cheers, Robert.
Hi Robert,
On Xcode 3.2.5, I select File > New Project and then a window pops-up with the following options:
(https://lh5.googleusercontent.com/-CrO_3IAcjEQ/Te5cHqyQ9AI/AAAAAAAAIQk/7TwQ_dtCJV4/s600/2011-06-07%25252019.11.37.png)
Choose Other > ArduinoOnXcode.
I don't know how it runs on Xcode 4 but I guess it's similar.
I still don't manage to get my own libraries compiled, as Example-4 attached in a previous post. There's no problem with standard Arduino libraries.
Nice to hear from your progress ;)
Hi!
Please find on this GitHub repository (http://github.com/rei-vilo/Xcode-for-MPIDE-Arduino) a Xcode project for Arduino UNO.
- Xcode 4 on Mac OS X.7
- MPIDE 0022 based on Arduino IDE 0022
I tested it successfully with the Arduino UNO and the chipKIT UNO32 platforms.
The Xcode 3 template is no longer valid because Xcode 4 has changed everything about the templates.
More details on my (http://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode)website (http://website).
I'd greatly appreciate some help on Xcode 4 about templates and libraries linking.
Hi,
I have been struggling to get Arduino to work with XCode for the longest time.
Finally, it is working. even with libraries ( but for some reason not the SD library... I'm not really sure why. )
I have been recycling makefiles that other people posted on the web, but none that I found could make libraries link correctly or even include extra .cpp files in my project's src folder.
So I have been adjusting and changing makefiles so many times I have no clue where my original source came from :-s
Here is the makefile that I'm using now for working with a Makerbot Sanguino based board:
ARDUINO = /Applications/Arduino.app/Contents/Resources/Java/hardware/Sanguino/cores/arduino
LIBRARIES = /Applications/Arduino.app/Contents/Resources/Java/libraries
AVRDUDE_DIR = /usr/local/CrossPack-AVR/bin
SIZE = $(AVRDUDE_DIR)/avr-size
SOURCES = $(wildcard src/*.cpp)
#loading libraries
STEPPER = $(LIBRARIES)/Stepper
SERVO = $(LIBRARIES)/Servo
EEPROM = $(LIBRARIES)/EEPROM
SD_UTIL = $(LIBRARIES)/SD/utility
INCLUDE_LIBRARIES = -I$(STEPPER) -I$(SERVO) -I$(EEPROM)
CPP_LIBRARIES = $(wildcard $(STEPPER)/*.cpp) $(wildcard $(SERVO)/*.cpp) \
$(wildcard $(EEPROM)/*.cpp)
PORT = /dev/tty.usbserial*
TARGET = main
SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \
$(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \
$(ARDUINO)/wiring_pulse.c \
$(ARDUINO)/wiring_shift.c $(ARDUINO)/WInterrupts.c
CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WMath.cpp $(ARDUINO)/Print.cpp \
$(CPP_LIBRARIES) $(SOURCES)
MCU = atmega644p
F_CPU = 16000000
FORMAT = ihex
UPLOAD_RATE = 38400
# Name of this Makefile (used for "make depend").
MAKEFILE = Makefile
# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
DEBUG = stabs
OPT = s
# Place -D or -U options here
CDEFS = -DF_CPU=$(F_CPU)
CXXDEFS = -DF_CPU=$(F_CPU)
# Place -I options here : include libraries
CINCS = -I$(ARDUINO) $(INCLUDE_LIBRARIES)
CXXINCS = -I$(ARDUINO) $(INCLUDE_LIBRARIES)
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -Wl,-gc-sections
CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) $(CTUNING)
CXXFLAGS = $(CDEFS) $(CXXINCS) -O$(OPT) $(CTUNING)
LDFLAGS = -lm -Wl,-gc-sections -mmcu=$(MCU)
# Programming support using avrdude. Settings and variables.
AVRDUDE_PROGRAMMER = stk500v1
AVRDUDE_PORT = $(PORT)
AVRDUDE_WRITE_FLASH = -U flash:w:bin/$(TARGET).hex
AVRDUDE_FLAGS = -F -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
-b $(UPLOAD_RATE) -D
# Program settings
CC = $(AVRDUDE_DIR)/avr-gcc
CXX = $(AVRDUDE_DIR)/avr-g++
OBJCOPY = $(AVRDUDE_DIR)/avr-objcopy
OBJDUMP = $(AVRDUDE_DIR)/avr-objdump
AR = $(AVRDUDE_DIR)/avr-ar
SIZE = $(AVRDUDE_DIR)/avr-size
NM = $(AVRDUDE_DIR)/avr-nm
AVRDUDE = $(AVRDUDE_DIR)/avrdude
REMOVE = rm -f
MV = mv -f
# Define all object files.
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(CXXSRC:.cpp=.lst) $(SRC:.c=.lst)
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
ALL_CXXFLAGS = -mmcu=$(MCU) -I. $(CXXFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
all: sizebefore clean build sizeafter
build: info folder elf hex
elf: bin/$(TARGET).elf
hex: bin/$(TARGET).hex
eep: bin/$(TARGET).eep
lss: bin/$(TARGET).lss
sym: bin/$(TARGET).sym
# print info
info:
@echo "compiling sources: " $(SOURCES);
@echo "compiling libraries sources: " $(CPP_LIBRARIES);
@echo "----------";
# create the bin folder if it doesn't exist
folder:
mkdir -p bin
# Program the device.
upload: bin/$(TARGET).hex
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) bin/$(TARGET).hex
ELFSIZE = $(SIZE) bin/$(TARGET).elf
sizebefore:
@echo "size before: ";
@if [ -f bin/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
sizeafter:
@echo "size after:";
@if [ -f bin/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: bin/$(TARGET).elf
$(COFFCONVERT) -O coff-avr bin/$(TARGET).elf $(TARGET).cof
extcoff: $(TARGET).elf
$(COFFCONVERT) -O coff-ext-avr bin/$(TARGET).elf $(TARGET).cof
.SUFFIXES: .elf .hex .eep .lss .sym
.elf.hex:
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
.elf.eep:
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
.elf.lss:
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
.elf.sym:
$(NM) -n $< > $@
bin/core.a: $(OBJ)
@for i in $(OBJ); do echo $(AR) rcs bin/core.a $$i; $(AR) rcs bin/core.a $$i; done
# Link: create ELF output file from library.
bin/$(TARGET).elf: bin/core.a
$(CC) $(ALL_CFLAGS) -o $@ src/$(TARGET).cpp -L. bin/core.a $(LDFLAGS)
# Compile: create object files from C++ source files.
.cpp.o:
$(CXX) -c $(ALL_CXXFLAGS) $< -o $@
# Compile: create object files from C source files.
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
.c.s:
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
.S.o:
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean:
$(REMOVE) bin/$(TARGET).hex bin/$(TARGET).eep bin/$(TARGET).cof bin/$(TARGET).elf \
bin/$(TARGET).map bin/$(TARGET).sym bin/$(TARGET).lss bin/core.a \
$(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d) $(CXXSRC:.cpp=.s) $(CXXSRC:.cpp=.d)
depend:
if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \
then \
sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \
$(MAKEFILE).$$$$ && \
$(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \
fi
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
>> $(MAKEFILE); \
$(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend
I'm using this with XCode 3.2, I have attached a zip file of a working sample project.
hope this helps someone, I for one got a little bit balder trying to get this to work :-)
best,
tim.
I have create a project on Github where I've put the XCode project templates:
https://github.com/timknapen/Arduino-With-XCode
With a little help from people who know about makefiles and compilers, I'm sure we can get decent XCode support for Arduino.
best,
tim.
Hi all,
I don't know if this is the right place for this, but I've updated my XCode projects on Github. It has now been updated to work with the UNO. I did a quick test and it seems to work fine.
Still only XCode 3.2 because I'm not running Lion yet..
go get it here: https://github.com/timknapen/Arduino-With-XCode
best,
tim.
Hey anyone doing the same sort of thing,
Shouldn't we create a specific thread for Arduino + XCode (both XCode3.2 and XCode4) so that everybody who know how to write proper C++ can benefit from our efforts? It seems that all the information is now spread over multiple blogs, github repositories etc..
And even on the playgrond: http://arduino.cc/playground/Main/DevelopmentTools there is no mention.
anyone?
best,
tim.
I fully agree with you.
I find here (http://github.com/turicas/arduinoMakefile/blob/master/resources.markdown) an extensive list of Arduino-related makefiles.
What we need:
• Actions: Build and Upload
• Boards choice: Arduino UNO, ... , chipKIT UNO32
• #include libraries compiled and linked
• Xcode template
I could easily close my repository and point to yours.
Is there an Xcode specialist around? Please!
Best regards,
I fully agree with you.
I'll find here (http://github.com/turicas/arduinoMakefile/blob/master/resources.markdown) an extensive list of Arduino-related makefiles.
What we need:
• Actions: Build and Upload
• Boards choice: Arduino UNO, ... , chipKIT UNO32
• #include libraries compiled and linked
• Xcode template
I could easily close my repository and point to yours.
Is there an Xcode specialist around? Please!
Best regards,
That list of makefiles is very interesting for learning, thanks!
I don't want to come in and take over the show, so I don't think you should close your repository, but a central place for working on this would be great. Like maybe a XCode + Arduino thread on this forum where we discuss the progress and one github repository where multiple people can work on this project.
I'm very new to git and github, so I don't really know how to do this. Do you?
I'm just starting to learn about makefiles so we could use someone that really is fluent with these thing. It would be great that people who download the templates don't have to go into the makefile and change a bunch of parameters just to add a library.
Right now I'm trying to have the choice of Board in the build settings of the project instead of in the makefile. I'm fairly close, but I can't find how to make a drowdown list in the build settings like the ones you have in a Cocoa project when selecting the "Base SDK"...
Avenue33, did you try my project template with XCode 4? I think you can just open it as a normal project with XCode4.
I don't have a computer that runs Lion yet, so I can't test this.
best,
tim
What we "need" is a command-line mode of the Arduino app that does the Arduino-style preprocessing on a set of .pde (or .ino) files.
Having to figure out exactly what it does (slightly differently) with each Arduino release is a pain, and makes implementing Arduino program builds in other IDEs an exercise in chasing not-fully-documented behaviors. :-(
I agree with this approach: all the parameters are on the files
/Applications/Mpide.app/Contents/Resources/Java/hardware/arduino/platforms.txt
/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/platforms.txt
The Arduino IDE or the chipKIT MPIDE are great tools. However, they are closed.
Both Arduino and chipKIT should disclose more so any standard IDE could be used: Visual Studio, Eclipse, Xcode, to name a few.
The Arduino IDE or the chipKIT MPIDE are great tools. However, they are closed.
They're not "closed." They are just rather tightly controlled. You can download the sources and make the patches to do what I described, but the chance that the patches will be accepted for inclusion in future releases is quite small.
What we "need" is a command-line mode of the Arduino app that does the Arduino-style preprocessing on a set of .pde (or .ino) files.
Having to figure out exactly what it does (slightly differently) with each Arduino release is a pain, and makes implementing Arduino program builds in other IDEs an exercise in chasing not-fully-documented behaviors. :-(
What do you mean with "preprocessing" exactly? In the XCode version, we are just using the Arduino C and Cpp libraries and avr-gcc to compile for the arduino, but no special preprocessing.
Or do you mean the converting from .pde files into .h and .cpp files that probably happens behind the screens in the Arduino IDE?
best,
tim.
do you mean the converting from .pde files into .h and .cpp files
Yep; that. Concatenate the .pde files, generate function prototypes, add the default .h files, and detect the used libraries. More or less. Subject to change.
do you mean the converting from .pde files into .h and .cpp files
Yep; that. Concatenate the .pde files, generate function prototypes, add the default .h files, and detect the used libraries. More or less. Subject to change.
hmmm I'm not sure about that... I have absolutely no problem with writing good code when I get all the advantages in XCode.
Also, the code completion probably wouldn't work if you start working with .pde files without proper header files, right?
I think it would make more sense to have two types of working: the easy to learn and quick-sketch Arduino IDE way and a way for more experienced programmers to work with their preferred IDE and a good makefile.
best,
tim.
sure, as long as you don't end up creating sketches that can ONLY be compiled from the XCode environment. Assuming that you want to share your code, it'll need to compile from the Arduino IDE as well. I don't think that this has been a problem so far, but I can see it becoming one as programs get larger.
hey Westfw,
I think this won't be such a big problem. The things people share are more like snippets of code to do something specific and explain a concept or libraries, and they of course would work in any environment as they seem to be always made up of proper .h, .cpp and .c files.
When working in XCode, there is no reason to stick to the Arduino convention of naming the main .pde file the same as the project folder, so when going from XCode to Arduino IDE you'll need to re-name that main file.
That is the only compatibility problem in the XCode -> Arduino IDE direction that I can think of.. The other direction could be a bit more involved because of the preprocessing, but still not a big deal.
I can't really imagine anything that would be workable in XCode (it's still the same compiler..) and would not work in the Arduino IDE.
best,
tim.
always made up of proper .h, .cpp and .c files.
:
I can't really imagine anything that would be workable in XCode and would not work in the Arduino IDE.
Well, you could send out a supposedly complete project with no .pde file, for example.
@Westfw
Feel free to join the project.
As the thread title stands, we plan to deal with Xcode.
Presently, the linker problem is solved and Xcode can compile sketches with #include libraries.
Now, next step is a template.
Tim,
Avenue33, did you try my project template with XCode 4? I think you can just open it as a normal project with XCode4.
I don't have a computer that runs Lion yet, so I can't test this.
The templates on Xcode 4 are totally different from and incompatible with those on Xcode 3.
Building fails with the following error message:
make
pic32-g++ -Wl,--gc-sections -mprocessor=32MX795F512L -Xlinker -T/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/chipKIT-MAX32-application-32MX795F512L.ld -Xlinker -o/Users/avenue33/Desktop/Xcode_chipKIT/main.elf -Xlinker -M -Xlinker -Map=/Users/avenue33/Desktop/Xcode_chipKIT/main.map
/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-toavenue33/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/cpp-startup.o: In function `_main_entry':
(.text+0x10): undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [/Users/avenue33/Desktop/Xcode_chipKIT/main.elf] Error 1
make: *** [build] Error 2
Command make failed with exit code 2
On top of that, Xcode doesn't recognise the symbols and doesn't jump to the definition.
Enclosed the culprit.
My template for chipKIT is broken and I don't know why :(
I hope you'll be luckier than me ;)
Well, you could send out a supposedly complete project with no .pde file, for example.
right, similar to this:
When working in XCode, there is no reason to stick to the Arduino convention of naming the main .pde file the same as the project folder, so when going from XCode to Arduino IDE you'll need to re-name that main file.
the "no .pde" problem is as easily solved by renaming your main file. The Arduino IDE has no problem with having other .h and .cpp files in your project as far as I know.
And the syntax doesn't change so even if you share a project that has no .pde file in it, people can just as easily understand what you are doing.
I think you're right, whatever you do, there will be a tiny little compatibility problem but it it's still all C++ code...
On the other hand what is the benefit of working with pde files in XCode?
best,
tim.
Tim,
The templates on Xcode 4 are totally different from and incompatible with those on Xcode 3.
Yes, I know the templates are completely different now, I will try to look into that over the weekend when I might be able to steal my sister's macbook running Lion... :-)
But I thought the XCode projects were still compatible... no?
Building fails with the following error message:
make
pic32-g++ -Wl,--gc-sections -mprocessor=32MX795F512L -Xlinker -T/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/chipKIT-MAX32-application-32MX795F512L.ld -Xlinker -o/Users/avenue33/Desktop/Xcode_chipKIT/main.elf -Xlinker -M -Xlinker -Map=/Users/avenue33/Desktop/Xcode_chipKIT/main.map
/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-toavenue33/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/cpp-startup.o: In function `_main_entry':
(.text+0x10): undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [/Users/avenue33/Desktop/Xcode_chipKIT/main.elf] Error 1
make: *** [build] Error 2
Command make failed with exit code 2
Wait, that is a completely different log, that can't be from the makefile in my XCode example
On top of that, Xcode doesn't recognise the symbols and doesn't jump to the definition.
I've had the same problem in XCode 3.2 The solution was to go to Project>Edit Project Settings>General and set "Project Format" to XCode3.2 compatible. Maybe try to set yours to XCode4 if this option still exists?
Otherwise, try rebuilding your codesense index... ?
Enclosed the culprit.
My template for chipKIT is broken and I don't know why :(
I hope you'll be luckier than me ;)
I think I will download your complete project from github and try it this weekend, maybe new eyes see something new :-)
best,
tim.
Bonjour Tim,
Sorry, I missed the most important:
#include libraries are compiled on Arduino UNO!
Thank you so much for your help :) .
I pushed a commit to your repository suggesting taking avr/bin from within Arduino.app.
But for chipKIT, the Makefile no longer works.
I try to deal with both platforms.
Is there an Xcode 4 expert around?
Bonjour Tim,
Sorry, I missed the most important:
#include libraries are compiled on Arduino UNO!
Thank you so much for your help :) .
I pushed a commit to your repository suggesting taking avr/bin from within Arduino.app.
But for chipKIT, the Makefile no longer works.
I try to deal with both platforms.
Is there an Xcode 4 expert around?
Hey great! so it is working now? With codesense etc?
I noticed your commit to github with the comment about using the avr-gcc from Arduino.app. I'm very new to GIT and github, so I had no clue how to import your adjustments... so I simply edited it in the makefile I was working on.
It was anyway already a completely different version than the one you branched from.
I just had one weird error with the inclusion of avrdude.conf but that was fixed easily and now it is working the way you suggested.
I'm going to try to become an XCode4 expert over the weekend.
ahoy!
tim.
References about Makefile
Short http://makepp.sourceforge.net/1.19/makepp_tutorial.html (http://makepp.sourceforge.net/1.19/makepp_tutorial.html)
Long http://www.gnu.org/software/make/manual/html_node/index.html (http://www.gnu.org/software/make/manual/html_node/index.html)
the "no .pde" problem is as easily solved by renaming your main file.
Easily solved by the typical XCode user. I don't think you're properly visualizing the level of cluelessness of the would-be consumer of a pre-made Arduino sketch. "rename main.cpp to foo.pde in a directory name foo, and put all the other file there too" just has SO many things that could go wrong.
On the other hand what is the benefit of working with pde files in XCode?
given a sketch containing .pde, .ino, .cpp, .c, and .S files, the .cpp, .c, and .S files are all compiled using standard c/c++/assembler conventions, while the .pde and .ino files are concatenated and (potentially) get special preprocessing and automatic #includes. Which is just a separate makefile rule, really, although the "preprocess" function doesn't exist. While there's no big reason not to make .pde files have their own #includes and prototypes so that the preprocessing isn't needed in an XCode environment, excluding the processing of .pde/.ino files from your Xcode processing makes SW developed there "gratuitously incompatible" with the Arduino environment.
It is (I claim) desirable that the XCode Arduino developer be able to pack his Arduino project into a .zip file and ship it to an Arduino IDE user, where it should compile without any changes. (I suppose that the zip file in question could be a separate XCode "target", but that seems to be unnecesarilly complicated.)
hmm there's some interesting stuff there...
Easily solved by the typical XCode user. I don't think you're properly visualizing the level of cluelessness of the would-be consumer of a pre-made Arduino sketch. "rename main.cpp to foo.pde in a directory name foo, and put all the other file there too" just has SO many things that could go wrong.
To me, it seems this point of view is a little bit overly cautious towards the "beginner Arduino User".
We were all beginners at a certain time and I think this little challenge of renaming a main.cpp file into a project_folder_name.pde file is only a small step to make you learn something new. Compared to learning about pointers, inheritance or even functions, renaming a file seems like a piece of cake. (mmm.. cake :-))
Before I started this effort to try to make an Arduino project with XCode, I had no knowledge at all about makefiles. Just by doing this I already learned so much about this completely new topic. It's fun! And it's a great way to learn too: trying to take this next step and looking through other people's code trying to make sense of it...
It's great that the Arduino IDE is working so good "out of the box" so beginners can get their hands dirty immediately. But at a certain point, if you want to create more complex programs you'll want to learn about classes, pointers, etc and then it is actually a good thing to have a more advanced software community that can happily program in their "professional" IDEs and assist those people.
But what if the Arduino IDE would allow correctly formatted C/C++ code? Then there would be no compatibility problem anymore, right?
I feel we're getting a little bit off topic here.. this thread was going to be about getting XCode to compile Arduino projects I believe.
So let's first get the templates ready for XCode 3.2.x and XCode 4.x and all the different boards, get them properly working for everybody and then worry about the potentially more complex problem of compatibility with the Arduino IDE.
If you have any suggestions on how to solve this problem, let's hear 'em! Maybe there is a very simple solution that I'm not seeing right now... like a simple text file included in the XCode template that explains what to modify for use in an Arduino IDE and vice versa?
best,
tim
Hi I've been playing around with this and can compile and upload sketches. Could you explain exactly how I can include a user-defined library with this template?
Suppose I have a library named foo located in the standard places:
~/Documents/Arduino/libraries/Foo/foo.h
~/Documents/Arduino/libraries/Foo/foo.cpp
~/Documents/Arduino/libraries/Foo/keywords.txt
how can I include it in the Xcode project?
Also, is it necessary to have the "ArduinoProgram" class with setup() and loop() methods, or can I write setup() and loop() functions in main.cpp?
Thanks much
Hi Professor,
That's a very good question. I suddenly realize that I've made this not so user friendly.
Basically, what you need to do is find the variables CPP_LIBRARIES, INCLUDE_LIBRARIES and CXXSRC and add some things.
I will update the github repository as soon as possible with a new makefile and build settings that allow you to add libraries of your own without needing to touch the makefile. I will report back here when that's uploaded to github.
Meanwhile, here is an example of how you could modify the makefile:
Make sure not to use ~/ for your home path, but the full name : /Users/yourUserName/ ... (because of a mistake I made)
#.. beginning of makefile...
# loading libraries
LIBRARIES = EEPROM Ethernet/utility SPI \
Firmata LiquidCrystal Matrix Sprite \
SD SD/utility Servo SoftwareSerial \
Stepper Wire Wire/utility
# Here you add the paths to the folders that contains the cpp files of your libraries:
OTHER_LIBRARIES = /Users/yourName/Documents/arduino_sketchbook/library1 \ # << backslash means "continue on next line"
/Users/yourName/Documents/arduino_sketchbook/library2
# make the correct paths for the libraries
INCLUDE_LIBRARIES = $(addprefix -I$(LIB_ROOT)/,$(LIBRARIES))
INCLUDE_LIBRARIES += $(addprefix -I,$(OTHER_LIBRARIES)) #<<<<<<<<<<<<<<<<<<<<<<<<<<<< add this line
# find .cpp files in libraries
CPP_LIBRARIES = $(foreach lib,$(LIBRARIES),$(wildcard $(LIB_ROOT)/$(lib)/*.cpp))
CPP_LIBRARIES += $(foreach lib,$(OTHER_LIBRARIES),$(wildcard $(lib)/*.cpp)) #<<<<<<<<<<<<<<<<<<<<<<<<<<<< add this line
# main file
TARGET = main
# find .c files in arduino directory
SRC = $(wildcard $(ARDUINO)/*.c)
# .cpp files from libraries and arduino directory
CXXSRC = $(wildcard $(ARDUINO)/*.cpp) $(CPP_LIBRARIES) $(SOURCES)
CXXSRC += $(wildcard $(OTHER_LIBRARIES)/*.cpp) #<<<<<<<<<<<<<<<<<<<<<<<<<<<< add this line
#.... rest of makefile...
You are right about ArduinoProgram, you don't really need it. It's only my preferred way of working.
Here's an example of main.cpp without the ArduinoProgram class:
#include "WProgram.h"
// Arduino doesn't know about new and delete, so let's teach 'm :
#include <stdlib.h> // for malloc and free
void* operator new(size_t size) { return malloc(size); }
void operator delete(void* ptr) { free(ptr); }
// from: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230935955
// you'll need to add function prototypes now...
void setup();
void loop();
// functions
void setup(){
Serial.begin(9600);
Serial.println("this a test without ArduinoProgram");
delay(100);
}
void loop(){
Serial.println("we are looping...");
delay(100);
}
int main(void)
{
init();
setup();
for (;;)
loop();
return 0;
}
I also have a question for you: What OS are you on and what board did you use to test?
Thanks for the feedback professor! Let me know if there is something else we can make better / easier to use...
best,
tim.
Thanks Tim - I'll try this out this evening.
I an running Snow Leopard (10.6.8) and loading to a Duemilanove.
Hi!
Things seem a more complicated with Xcode 4.2 running on Lion 10.7.2.
I had a look at Ino (http://inotool.org): maybe some ideas to grab?
I'm using 2 boards: Arduino UNO and chipKIT UNO32, with only one IDE Mpide 0022.
Hi Chaos & Avenue,
I have uploaded a new version of the XCode3.2 template to github. The adding of external libraries has been simplified a lot and it has (hopefully) clear instructions now in the README file. Get it here: https://github.com/timknapen/Arduino-With-XCode and let me know what you think :-)
I have also made a working XCode 4 project in Lion, but it seems that making templates is still a little too obscure. I haven't done too much research yet (just installed Lion today) so it might not be as hard as it looks.
At the moment, I think it might be better to not go for a project template, but do it the way openFrameworks does it: creating a blank project that has everything setup and just copy the whole project folder to start a new Arduino project in XCode 4
Thanks for the info Chaos, I will check the box on Duemilanove :-)
What are .ino files?
best,
tim.
I've added a first version of an example XCode 4 project to the github repository.
Not a template, a blank project that you can copy and start from. When documentation on XCode 4 templates starts appearing I might have a go at it...
I'm not working in OSX Lion myself, so I'm going to wait for complaints/suggestions before I continue working on the XCode 4 project.
best,
tim.
Very cool Tim - I followed the instructions in the new Readme and was able to compile a sketch with the Streaming and Flash libraries under Xcode 3.2.6!
Thanks!
Congratulations Tim for your hard work!
Here's a minimal template for Xcode 4 you could use as inspiration.
http://blog.boreal-kiss.net/2011/03/11/a-minimal-project-template-for-xcode-4/ (http://blog.boreal-kiss.net/2011/03/11/a-minimal-project-template-for-xcode-4/)
https://github.com/borealkiss/Minimal-Template (https://github.com/borealkiss/Minimal-Template)
Best regards,
Thanks Avenue,
I had checked that blog post, but it doesn't really give a lot more information than what you can find in the templates that Apple provides with XCode.
For now, I'm going to wait until there is decent documentation on XCode4 templates. There are just too many things that we'd have to find by trial&error...
But if anyone is up for the task, don't let my laziness stop you! :-)
best,
tim.
Very cool Tim - I followed the instructions in the new Readme and was able to compile a sketch with the Streaming and Flash libraries under Xcode 3.2.6!
Thanks!
ah that's great news, I'm glad it's starting to become useable!
best,
tim.
What we "need" is a command-line mode of the Arduino app that does the Arduino-style preprocessing on a set of .pde (or .ino) files.
Having to figure out exactly what it does (slightly differently) with each Arduino release is a pain, and makes implementing Arduino program builds in other IDEs an exercise in chasing not-fully-documented behaviors. :-(
I fully agree. Learning Makefile is just horrendous.
Another big benefit is to ensure consistency of the code between the Arduino IDE and alternative IDEs.
So a command-line mode of the Arduino app should be great!
Some interesting info about command-line usage (http://arduino.cc/forum/index.php/topic,79454.0.html) of Arduino.
Hello,
I've just tried Tim's Xcode project on Xcode 4.2.1 running on Lion *.
Trying to compile it i get
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.
Command make failed with exit code 2
Any ideas how to solve this issue?
Thanks
* EDIT: I'm using UNO.
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
I don't understand git… :(
Neither do I, even with the nice Git front client installed on my MacBook ;) .
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.
#include "pins_arduino.h"
Try
#include <pins_arduino.h>
instead of
#include "pins_arduino.h"
The same problem arises with Eclipse.
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.
@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 =(
yes, the newest version (1.0) has changed quite a bit I think.
An example from the release notes of Arduino 1.0:
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.
Thanks Tim, I'll take a look at that trying to solve this issue. I hope so.
Thanks, I'll let you know :)
Tim,
On Xcode 4.2.1 running on Mac OS X 10.7.2 with Arduino 0022, I have the following error message
/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?
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
AVRDUDE_DIR = /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/
and I changed it to
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
Never mind about the oops!
/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.
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...
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?
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 :)
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.
Bonjour Tim,
No problem.
I've played with the Visual Micro (http://www.visualmicro.com), 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 (http://www.baeyens.it/eclipse/) and NetBeans (http://www.kerrywong.com/2010/05/16/arduino-development-using-netbeans/). Both have a dedicated Arduino plug-in available.
Since the makefile is too cumbersome, have you considered Ino (https://github.com/amperka/ino)? It's a command-line version of the Arduino pre-compiler / compiler. It works fine on my MacBook.
Best regards,
Hi all, just wanted to say I'm ALL IN on your Xcode 4.2.x + Arduino efforts!
I'm currently studying computer science at University of Oslo, and one of my topics of
study right now includes a project based on Arduino. To check out what previous
students of this topic have done with Arduino, see: http://sonen.ifi.uio.no/soneprosjekter
(it's in Norwegian, but there's plenty of pictures and video).
I worked as an OS X Server consultant for some years, before I decided I wanted to
move on and go full time as a developer and so went back to
school to learn computer science proper. In particular: iOS, OS X and Arduino projects.
SO :-), I'm very motivated to help out as best I can to get a decent environment for
doing Arduino projects on Xcode 4.2.x up and running. For now I'm reading everything
I can find to educate myself; starting with cloning Tim's excellent git repository to
get everything running. (Thanks, Tim!)
I'm determined to study and do whatever it takes to master Xcode and Arduino, in
particular using the iPhone and iPad to communicate with the Arduino over TCP/IP.
I've got the feeling there must be thousands of people like us around, wanting to
use Xcode for serious Arduino development. So how about we organize ourselves in
some way and launch arduinoandxcode.com, xcodeuino.com or similar? I can put up a simple Joomla-site
in two nights with the primary resources we need: a forum, a news blog, a downloads
section. We could start by setting up a Yahoo Group, having good experiences with it
from past projects, primarily the 'email group' functionality. Emails to xcodeuino@yahoogroups.com from
registered users go to all other registered users with a [xcodeuino] tag in the email header,
just like good ole UseNet used to do. Very simple and very clean.
Let me know what you guys are thinking :)
All the best, //Storm
God kveld Storm,
That's great news.
I started the project (http://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode) a long time ago --July 2010-- before joining Tim's project late 2011.
Compiling does work under Xcode 4.2, see the project available at https://github.com/rei-vilo/Arduino-With-XCode (https://github.com/rei-vilo/Arduino-With-XCode). The makefile is stable. There's only the user library point to check.
Actually, most of the problems come from Xcode:
• No console
• No tooltips for user created items
• No syntax colouring for user created items
and
• No template
I managed to run Jantje's plug-in for Eclipse (https://github.com/jantje/arduino-eclipse-plugin) but I didn't succeed in installing the plug-in for NetBeans.
Another option I tried is Ino (https://github.com/amperka/ino), a command-line compiler for Arduino sketches.There are presently issues with the user's libraries hosted in the Sketchbook/Libraries folder.
I also use the chipKIT UNO32 (http://sites.google.com/site/vilorei/arduino/19--chipkit-uno32-board) board, which requires the PIC32 tool-chain. So I'd like to be able to compile for the two platforms.
So making Arduino usable under Xcode is going to be mainly a Xcode 4.2 issue! But it will open the door to all iOS devices.
Back to the project, gathering and organising the resources are key. I fully agree with you on having a shared website to give maximum visibility to the project.
So let's go!
@avenue33,
thanks for all the work you've put in over the years. Big up!
A common web site for Xcode, Arduino and iOS development will be nice. I'll get to
work as soon as the workload at Uni permits. Would be nice to get more
peoples opinions as well before speccing the requirements for the site, maybe
even get more people aboard our project.
Have you been looking into what needs to be done getting everything up
and running with Arduino 1.0?
I had to downgrade to the 022 release to get the Xcode project to compile.
Even so, I'm having problems getting actual code running on the Arduino. Everything
appears to upload fine, but my sample code doesn't run. I added
pinMode(13, OUTPUT);
to setup(), and changed loop() to
digitalWrite(13, HIGH); // set the LED on
delay(100); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(100); // wait for a second
but the on-board LED doesn't flash. Uploading the same sample code from Arduino.app
produces the expected results.
The .xcconfig line
PORT = /dev/tty.usbmodem*
makes the TX/RX flash as it should, but this line reads
PORT = /dev/cu.usbmodem3d11
in Arduino.app -- is it vital that these match? I've tried changing to match but get the same results.
Also, I know very little C++, only C and Objective-C, so I need to read up on C++ in order
to get up to speed. I didn't even know it was possible to use C++ with the Arduino.
Have you been looking into what needs to be done getting everything up
and running with Arduino 1.0?
Yes, I did.
Please refer to this page (http://sites.google.com/site/vilorei/arduino/13--serial-touch-320x240-lcd-screen/roadmap) with 2 must-read articles!
It implies rewriting all my libraries. So I'm waiting for MPIDE to be on release 1.0 to upgrade.
I can't maintain two different versions for each of my libraries.
I had to downgrade to the 022 release to get the Xcode project to compile.
Even so, I'm having problems getting actual code running on the Arduino.
Are you playing with this example https://github.com/rei-vilo/Arduino-With-XCode (https://github.com/rei-vilo/Arduino-With-XCode)?
It works fine on my MacBook / Xcode 4.2 / OS X 10.7.2
Also, I know very little C++, only C and Objective-C, so I need to read up on C++ in order
to get up to speed. I didn't even know it was possible to use C++ with the Arduino.
Actually, the language used in the Arduino IDE is a C / C++ dialect. If you're fluent in C, C++ shouldn't be a problem.
Keep in mind the main benefit / drawback of the Arduino IDE is to hide all the pre-processing work before building and linking.
So one of the topic to discuss is to define how much the Xcode implementation hides.
Let's keep a little for tomorrow...
Hi All,
I've been away from the Lion machine for a while, but I have updated the Xcode 4.2 project now with all the fancy new features I had added to the Xcode3.2 version.
Check it out at:
https://github.com/timknapen/Arduino-With-XCode
I hope this resolves all the problems with Xcode I've been hearing about the last weeks.
best,
tim.
Tom,
Have you included my pull request?
It works but:
• No build report
• No console
• No tooltips for user created items
• No syntax colouring for user created items
and
• No template
Hi,
The build report should be there, XCode 4 actually generates a build log for every time you compile. It's one of the buttons next to the "Project Navigator" button. (above the source tree)
With
No tooltips for user created items
No syntax colouring for user created items
you mean code completion / code sense for the classes you add, right?
This has been bothering me too... there's really no use working in XCode when you don't get those features...
I'm still on Snow Leopard because I think Lion sucks, so I work with XCode 3.2 and everything works nicely there (see attached image) :(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=11735)
I don't really understand why the code completion would fail on XCode 4, what could be different from the one that I use?
oh now I get it! by "no console" you mean "no serial communication", right? I thought you meant built output... sorry!
I never experienced this as a problem. The Arduino Serial monitor does everything it needs, especially now you can decide the line endings...
Before they added this feature to the Arduino IDE I actually had written my own serial monitor app that did the same thing, but now I never use it anymore, just because of this one little feature.
I also don't see why Xcode would need to do this.
I'm going to take a look at that code completion stuff now...
best,
tim.
Hi Tim,
No problem. Yes, I mean no serial communication.
Problem is, if I open Terminal or whatever communication app, I need to close it before uploading to the Arduino, otherwise there's a conflict and a message pops-up "Serial port already used."
One idea could adding to the Makefile
• "screen $(PORT) 9600" after uploading
• and for safety reasons, "kill screen" before compiling.
Yes again, I mean code completion and code sense.
I tested with Xcode 3 and code sense works as you show it.
With Xcode 4, code sense and code completion don't work for the classes, variables, functions I add.
Strange enough, opening the same sketch as a plain C++ Xcode project does provide code sense and code completion.
So there's a parameter somewhere to fix.
Or, it Xcode bugged?
Could Storm help us on the Xcode issues?
No problem. Yes, I mean no serial communication.
Problem is, if I open Terminal or whatever communication app, I need to close it before uploading to the Arduino, otherwise there's a conflict and a message pops-up "Serial port already used."
One idea could adding to the Makefile
• "screen $(PORT) 9600" after uploading
• and for safety reasons, "kill screen" before compiling.
right, didn't think of that. That might be a good idea...
Maybe we should have build settings flag then, I can imagine it being pretty annoying to have this pop up every time when you're working on a project without serial...
With Xcode 4, code sense and code completion don't work for the classes, variables, functions I add.
Strange enough, opening the same sketch as a plain C++ Xcode project does provide code sense and code completion.
Did the same test just now, it seems that Xcode has no problem with C++, but I can imagine it needing the compiler for code completion...
and then the makefile is maybe a step too far for Xcode?
Could Storm help us on the Xcode issues?
fingers crossed! :-)
best,
tim.
Xcode 4 + makefile + code completion = trouble.
I have found this nice post on stack overflow and will try this next:
http://stackoverflow.com/questions/8726869/xcode-4-external-build-system-code-completion
... and so I did:
https://github.com/timknapen/Arduino-With-XCode/tree/master/Arduino/ArduinoOnXCode4_3
:-)
It's a very stupid workaround, but it seems to be working!
I hope you guys have the same experience...
good night,
tim.
Please find the new release 4.3c (https://github.com/rei-vilo/Arduino-With-XCode)
Declare your library repository
1. Select Project > Build settings
2. Click on Add build setting > Add user-defined setting
3. Add new key = SKETCHBOOK_PATH with value = ~/Documents/SketchBook/
~ is accepted
Add a library
1. Click-and-drop the folder where the .h and .cpp files are into the User folder on the left pane
2. Uncheck Copy items into destination group's folder
3. Select Create groups for any added folders
4. Press Finish
5. Add the #include statement to the sketch
Other items
New groups
Simplified project without unnecesary Sketch.h
Renamed Index (false target) for code sense
To Do
Open serial console after uploading
Close serial console before building and before uploading
Hints
screen $(PORT) 19200
... and obviously a template!
@Tim: I've done a pull request!
Enjoy ;)
Hey Avenue,
What is a "pull request"? I don't get all that git at all..
I will check your version out when I get back to the Lion machine... maybe I can steal some of your ideas :-)
oy!
tim.
A pull request is just I'm asking you to include in your repository my updated code.
Go to your repository, click on Pull Requests: my update is there.
Review the code and accept/refuse to update with the appropriate button.
It makes release management easier.
Three things are missing:
• code sense for Arduino basic libraries, like Serial.print which remains in black
• automatic closing before uploading / launching after uploading of the serial console connected to the right port
• true Xcode 4 template
Help is welcome!
I'm not sure to understand the difference between the version for Xcode 4.2 and 4.3.
And this is weird to have 2 directories if differences are needed. It would have been better to have branches inside git. This way, we could modify the makefile for example in both version (using merge between 4.2 and 4.3).
I'm not sure to understand the difference between the version for Xcode 4.2 and 4.3.
Changes:
- include user libraries from SketchBook/Libraries
- simplified sketch structure with setup() and loop() for better compatibility
- see to do for bugs and missing features
I'm not sure to understand the differenceAnd this is weird to have 2 directories if differences are needed. It would have been better to have branches inside git. This way, we could modify the makefile for example in both version (using merge between 4.2 and 4.3).
Back to ArduinoOnXCode4_2 folder name
So I guess you are rei-vilo from github? Is timknapen here too? I'm jeromelebel. So we are back only 2 version of Xcode project (for each repository). This is a total mess.
So now the most advance project on rei-vilo is 4_2?
by the way, why 4_3??? Xcode 4.3 is not released?
Hi all, and WOW, nice to see such nice activity on this project!
I cloned jeromelebel's git repo and got it to compile and upload the
test program (blinking on-board diode) successfully. I'm running Xcode 4.2.1.
I understand I really need to read up on Xcode to get up to speed in order
to help out. I downloaded the book "Xcode 4 developer reference" by Richard
Wentk as a start. You guys know anything about this book? Got good reviews.
I'm currently in two topics in Uni in order to learn electronics + arduino
proper, in addition to my main programming track. Bear with me as I tag
along and learn as fast as I can.
Regarding the xcodeuino.com site, I can have something up and running just as
soon as we spec our requirements. I am thinking along the lines of a simple Joomla!
installation with a 1.6-based Template from somewhere, with modules for
- forum
- files
- news blog
- wiki? (maybe use wikispaces.com instead?)
Any input on this? Do we need and want for this purpose at all? Maybe not / overkill?
I am thinking the purpose of this site over time is to facilitate
a quick start and a growing resource for Arduino development on OSX as well
as integration with iOS (think Prowl, push notifications and remote control) as I know
you guys have successfully done. I'm thinking there has to be large number of people
interested in the intersection Mac / Arduino / iOS.
Hi
I'm glad you tested my repository... Because, I didn't... Unfortunately I don't have any aduino with me this weekend.
I never heard anything between iOS and arduino. Is there anything to do between those 2?
I never heard anything between iOS and arduino. Is there anything to do between those 2?
Arduino with a WiFi shield :)
Then your Arduino can e.g. use Avviso (http://avvisoapp.com/) and Prowl (http://www.prowlapp.com/) for
an easy way to create even more interrupts in your already fragmented concentration :)
I'm looking to use iOS as a two-way remote control for Arduino. I'm thinking the easiest way to do
this is to set up a third party web service somewhere in the middle for the two to connect to to
facilitate a link. I'm not sure how, yet, but I have a thorough networking topic in this semester at Uni to
grind me in the right way.
I'm curious, what kind of projects are you guys working on regarding Arduino these days?
So I guess you are rei-vilo from github? Is timknapen here too? I'm jeromelebel. So we are back only 2 version of Xcode project (for each repository). This is a total mess.
Yes, it is.
Actually, I started the project. Tim Knapen tool a branch. Then I closed my repository and now I'm working on a fork.
I issued pull requests to Tim Knapen repository.
I fully agree we need to pool resources and maintain one single repository.
Because I own a chipKIT UNO32 (http://sites.google.com/site/vilorei/arduino/19--chipkit-uno32-board) board, I use MPIDE which can address both platforms.
My
goal is to build the makefile(s) I could use for Arduino and chipKIT boards from Xcode.
(https://lh5.googleusercontent.com/-OpA5C7TrxKE/Tju7eURIknI/AAAAAAAAIa0/msPUKZMjHSc/s400/v_IMG_2641.JPG)
by the way, why 4_3??? Xcode 4.3 is not released?
I've made a confusion about which program was concerned by the .2: .2 stands for Xcode 4.2 and not for the second release of the makefile.
It's fixed now.
To avoid confusion, I posted the MPIDE on Xcode 4.2 project on this mpideOnXCode42 (https://github.com/rei-vilo/mpideOnXCode42) repository.
Creating another repository not related to any previous repositories, was definitely not what I had in mind... The number of repository is not a problem if all are forks from each others, and if in all branches contains only one version of the code.
I hoped to convince "timknapen" to remove either 4_2 or 4_3 from his repository (and eventually he could create a branch to work on the second version), then you and I would have to merge, and eventually apply our diffs again on the remaining Xcode project.
Regarding the xcodeuino.com site, I can have something up and running just as
soon as we spec our requirements. I am thinking along the lines of a simple Joomla!
installation with a 1.6-based Template from somewhere, with modules for
- forum
- files
- news blog
- wiki? (maybe use wikispaces.com instead?)
I think we badly need this website give maximum visibility on the project and to clarify the different versions.
So, let's go!
Creating another repository not related to any previous repositories, was definitely not what I had in mind... The number of repository is not a problem if all are forks from each others, and if in all branches contains only one version of the code.
I opened a new repository because I don't want to impose the MPIDE on Xcode project on Arduino on Xcode. Reviewing and accepting a pull request ask for time.
Converting a repository into a branch isn't that difficult.
Both projects share the same issues.
I think Haakon Storm has the solution with the xcodeuino.com website.
I still believe it would be better to either create a branch in your repository, or even fork your own fork. That way, ArduinoOnXcode and your project could be benefit from each others.
Hi all,
Sorry for the mess. I just wanted to quickly share my findings about the code sense issue on XCode4 with Avenue and all the others.
Because I didn't really know if my solution was stable and I don't understand one bit of git, I just created a new folder and appended _3.
I had already run in trouble with git before, so there was also a _2 folder... had nothing to do with XCode 4.2 ... uhm yes... sorry about that.
I've cleaned it up now. There is again only one XCode4 project and I will try to learn about git as soon as possible so I can join the branching and pulling and pushing fun.
Also I don't use Lion or XCode4 myself, so all I'm doing is just suggesting some solutions, but I will be slower than the people who actually use XCode 4. I'm still on Snow Leopard and XCode 3.2.
best,
tim.
Tim,
Thanks for your hard work.
I don't know how to place the MPIDE on Xcode project along the Arduino on Xcode project.
I think Storm's idea is great.
Have a nice day.
Thanks a lot !
I will update my fork as soon as I can.
Hey Avenue33 (olivier?)
I was looking through your version of the XCode project on github and noticed that you have a way to allow paths to use '~/' for the user path. How did you manage to do that?
When I was testing this, my makefile didn't understand ~/ as the current user's home path??
Everyone else:
I will continue making a bit of a mess of the repository for a while as I start learning git and try to set my repo up as a collaborative project.
This repo only makes sense if all of you can update to it and add your improvements.
I think I should split the repo up into 4 projects because of the changes introduced in Arduino 1.0 :
1) Arduino0022OnXCode3 : Template for Arduino 0022 with XCode 3.2 on OSX Snow Leopard
2) Arduino1OnXCode3 : Template for Arduino 1.0 with XCode 3.2 on OSX Snow Leopard
3) Arduino0022OnXCode4: Empty project for Arduino 0022 with XCode4 on OSX Lion
4) Arduino1OnXCode4: Empty project for Arduino 1 with XCode4 on OSX Lion
What do you guys think? Does this make sense? I would split it up like this because making an XCode project that works with both Arduino 002x and Arduino 1.0 will become quite complicated. There are too many renamed files...
Or should we just abandon 0022 and go ahead with the latest and greatest version of Arduino.. ?
best,
tim.
@Tim
Yes, my first name is Oliver, and Rei Vilo in reverse ;).
Here's the trick for the ~:
1. Select Project > Build settings
2. Click on Add build setting > Add user-defined setting
3. Add new key = SKETCHBOOK_PATH with value = ~/Documents/SketchBook/ ( ~ accepted)
(https://lh4.googleusercontent.com/-typRMV2rYyI/Tx1w5Gq2nFI/AAAAAAAAI5E/Gej-IgRNMyo/s800/home.jpg)
Or should we just abandon 0022 and go ahead with the latest and greatest version of Arduino.. ?
MPIDE is still on release 0022, so I'd like to continue with this release.
Most of the issues we're presently facing aren't Arduino- or chipKIT-releated.
They're Xcode 4-related, as code sense, serial console and template.
Hey Olivier,
"verlan" right? this much french I know :-)
I still don't get it, from your picture I can see how you add it in XCode, that's not the problem. My problem was that the makefile didn't understand ~/ and couldn't translate it into /Users/YourUserName/
That's what I'm curious about!
oh and I think I'll be able to fix code sense for the Arduino libraries too. I will test & upload it as soon as I can get to the Lion machine.
best,
tim.
The makefile:
# print info
info:
@echo "------------------------ some info for debugging ------------------";
@echo "\nUsing AVRDUDE: " $(AVRDUDE);
@echo "\nUsing board: " $(BOARD);
@echo "\nUsing BF_CPU: " $(BF_CPU);
@echo "\nUsing SKETCHBOOK_PATH: " $(SKETCHBOOK_PATH);
...
The result:
------------------------ some info for debugging ------------------
Using AVRDUDE: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude
Using board: Arduino_UNO
Using BF_CPU: 16000000L
Using SKETCHBOOK_PATH: /Users/OlS/Documents/Arduino/_Projets
...
oh right, I just checked my makefile and it appears that the problem was this:
INCLUDE_LIBRARIES = $(addprefix -I, $(LIBRARY_PATHS))
somehow by doing the $(addprefix ..) doesn't expand the ~/ in LIBRARY_PATHS.
Just passing a build setting as a single variable does expand the ~/
I'm cleaning that up in my makefile, because ~/ is awesome! :-)
best,
tim.
Hi all,
I think we've finally managed to have code completion working decently on Xcode 4.
(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=12002)
The updated project is here:
(http://Screen Shot 2012-01-24 at 01.05.46.png)
https://github.com/timknapen/Arduino-With-XCode/tree/experimental/Arduino/ArduinoOnXCode4
This is the 'experimental' branch. I will merge it into the main branch once I get some feedback from other people that can get it to work too.
There is a little trick to it:
You need to add all the sources ( .c, .cpp and .h files) to the 'Compile sources' build phase of the Fake Target. This fake target is only used for triggering the code completion in Xcode 4.
In the project navigator click on your project > Targets > fake target > build phases > expand "Compile sources"
press the "+" button at the bottom and in the list that pops up, just select all your .c, .cpp and .h files.
To add your own libraries, just drag them into the source tree with these options:
(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=12004)
You will still have to add the path to those files in the build settings
hope this helps,
tim.
Tim,
Great work! Thanks.
In the screen-shot you supply, Serial.print is still in black :(
I posted two suggestions on the GitHub issues list:
#3-- Codesense not working all the time in Xcode 3.2
Serial.print() is still in black :~
#4-- Auto-Launch of the Console
Serial console parameters
Close serial console before upload OK
Open serial console after upload Error: screen /dev/tty.usbmodem641 -b19200 Must be connected to a terminal.
How to make the connection with the terminal?#12-- User libraries easy declarationJust type the name of the folder of your library
Example:
- code: #include "Serial_GP"
- makefile: USR_LIBRARIES_LIST = Serial_GPS
In the screen-shot you supply, Serial.print is still in black :(
Look here: :-)
(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=12028)
Latest changes for XCode 4 to be found here:
https://github.com/timknapen/Arduino-With-XCode/tree/experimental/Arduino/ArduinoOnXCode4 (https://github.com/timknapen/Arduino-With-XCode/tree/experimental/Arduino/ArduinoOnXCode4)
Any more code completion that is not working?
Hi all,
I've secured the xcodeuino.com domain (I considered xcodeui.no for .Norway but relented;) and web
hosting with mySQL databases for a year. I planned to implement it as a Joomla!-site but talking
with a collegue I've decided to use Drupal instead. This means I no longer know
what modules are good or not, so if you have any preferences, let me know.
I'm thinking something like this:
Forums: Drupal Advanced Forum module(s) (screenshots: http://drupal.org/node/867944)
Wiki: demo of the wiki-installation module http://acme.yourbizwiki.com/ (login with test/test!!)
File upload functionality
Unregistered/Registered/Admin/SuperAdmin granularity for permissions
Lets start with just one discussion board, put it on the front page, and go from there
as we build the wiki, coordinate our efforts and get to master how git works with
branching and pulling and requesting :)
If everything goes according to plan, it should be live monday and open for registrations.
Again guys, thank you so much for all the work you've put in to creating makefiles and what not
to get xcode+arduino running together. I'm way behind atm but will get up to speed asap.
/Storm
Any more code completion that is not working?
That world fine on my MacBook.
Could you please detail how you reach the result? I've already noticed the HEADER_SEARCH_PATHS parameter, but are there other?
Please keep in mind I'm working on a Makefile with MPIDE for Arduimo and chipKIT platforms.
I also posted a new idea worth considering: a cleaner make with a specific directory for OBJ files, with a reference to another Makefile repository.
Olivier et al:
If it isn't too much hassle, I know that myself and many with me would appreciate a lot if
you could do a write-up of what you have learned so far about how this Xcode+Arduino.app setup
works. I'm thinking about a sequential description of how you understand everything runs from
the point to click Build&Upload, what happens with the makefile, documentation about the makefile
and other important knowledge like customizing code completion, syntax coloring et al.
I'm thinking this can be the starting point for a page in the upcoming wiki. We can divide it
into the different phases of compiling and uploading.
We can also start a wiki page documenting how to use git for this project in particular; how to
clone, branch, pull requests and merge. I'm still not sure how merge works with conflicting
parts of the same files (say, the .xcodeproject file) and not overwriting other important changes.
I know diving into many smaller files are key, as always, but with Xcode projects some files are
unavvoidably monolothic.
Also, how does the serial monitor work with our setup? I see you use 'screen ...' - is this the
usual screen command I use when I start shell scripts and irssi on remote servers so I
can reconnect to them later?
Maybe it's an idea to hack a quick Cocoa app or script that handles/starts the serial monitor automatically
for the user?
I've also ordered the WiFly wifi shield from Sparkfun.com so my arduino can speak tcp/ip
with the world. Do you guys have any experience with this, or have any other wifi shield
to reccommend?
Regarding versions: as Olivier use a different and more powerful Arduino board that
isn't fully compatible/running to Arduino 1.0 libraries yet, we'll have two parallell
projects running (or more). For myself I'm primarily interested in Arduino 1.0 + Xcode 4.2
as I'm just recently come aboard and might as well start with the most recent iteration of both.
Tim: How does A*.app 1.0 seem to have changed from 022?
Could you please detail how you reach the result? I've already noticed the HEADER_SEARCH_PATHS parameter, but are there other?
Hey Olivier, my guess is that this should work fine on mpide too, as long as you have Arduino.app installed. Unless Mpide has a lot of functions that are not in Arduino? Anyway it is only for syntax coloring and code completion, it will not affect your build.
IF mpide is not following the arduino conventions, it should be another project anyway, we can't make one XCode project for every flavour of Arduino-style AVR programming, right? Better make a specific project that bases its concepts on the Arduino project.
How does it work? "Serial" is defined in HardwareSerial.h, but only when certain macros have been defined. Those are defined in io.h.
Those macros get defined depending on a macro that defines the arduino board you're using.
So when you pick your board inside the Arduino.app before compiling, it adds a macro that defines your board. For example: __AVR_ATmega168__ . When this is defined, io.h can then load the correct io header for that specific board and the serial communication can get put together correctly.
I have just set __AVR_ATmega8__ in the build settings for the fake target, because for our purposes it doesn't really matter what board the fake target thinks it is building for. (not really sure about this)
While looking through all this, I noticed that a lot of stuff in the Arduino .cpp and .h files depends on inttypes.h, stdlib.h, stdio.h etc..
Just to be sure, I included the ones that avr-g++ uses in the header search paths.
I thought about moving the Arduino group to the header search paths too, but I think you sometimes want to check them for reference...
best,
tim
Tim: How does A*.app 1.0 seem to have changed from 022?
Those are documented in http://arduino.cc/en/Main/ReleaseNotes
- * The WProgram.h file, which provides declarations for the Arduino API,
has been renamed to Arduino.h. To create a library that will work in
both Arduino 0022 and Arduino 1.0, you can use an #ifdef that checks
for the ARDUINO constant, which was 22 and is now 100. For example:
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
- The avrdude included with the Mac and Windows versions of the Arduino
software has been upgraded to avrdude 5.11 (from an Arduino-specific
version of avrdude 5.4). The software now uses the "arduino" programmer
type in place of "stk500v1" for uploading to most Arduino boards.
etc..
good luck with that!
best,
tim.
Haakon (is that your first name?),
Please consider the Reference.txt file at https://github.com/rei-vilo/mpideOnXCode42 (https://github.com/rei-vilo/mpideOnXCode42). I tried and listed all the documents I've read so far.
Some of the technical details are in the issues in the timknapen / Arduino-With-XCode repository: please refer to https://github.com/timknapen/Arduino-With-XCode/issues (https://github.com/timknapen/Arduino-With-XCode/issues)
I strongly recommend having a look at Christopher Peplin's repository arduino.mk at https://github.com/peplin/arduino.mk (https://github.com/peplin/arduino.mk). The makefile embrace both Arduino and chipKIT.
The Arduino part works fine and features a dedicated folder for OBJ files. I'm currently testing the chipKIT part and face two issues I've already reported.
Downloading MPIDE and playing with it are just one click away: https://github.com/chipKIT32/chipKIT32-MAX/downloads (https://github.com/chipKIT32/chipKIT32-MAX/downloads)
Another section to add to the website is the list of features required, with a points-based system of vote, pretty much like the http://getsatisfaction.com implementation. Each registered user has —let' say— 6 points and can allow up to 3 points per feature. Once the feature is delivered, the user recover his/hers points.
It would be nice to link the number of points one user can handle with his/hers active participation on the project.
@All,
I've just changed the thread name from
- UPDATE - Linker Problem -- Arduino Uno and Xcode (cont'd) )
to
- Arduino on Xcode Project -- Official Thread
in order to make everything clearer for everyone :).
- Arduino on Xcode Project -- Official Thread
haha aw yeah!
If it isn't too much hassle, I know that myself and many with me would appreciate a lot if
you could do a write-up of what you have learned so far about how this Xcode+Arduino.app setup
works. I'm thinking about a sequential description of how you understand everything runs from
the point to click Build&Upload, what happens with the makefile, documentation about the makefile
and other important knowledge like customizing code completion, syntax coloring et al.
Absolutely agree with that, when I get some time, I will try to do a nice write-up.
Maybe after we finnish integrating Arduino.app 1.0 ?
Maybe it's an idea to hack a quick Cocoa app or script that handles/starts the serial monitor automatically
for the user?
I have that app lying around here on my computer.. but I'm not sure I am convinced this should be part of the XCode project...
This is just my personal opinion, but I think this should be as general as possible and the least bloated possible. More stuffss == more places where things can break. People can always fork from the project to add extra special personal preferences to it..
I'm not sure I am right on this one... is serial communication essential in this project? Should it be from XCode? I feel not. What do you guys think?
I've also ordered the WiFly wifi shield from Sparkfun.com so my arduino can speak tcp/ip
with the world. Do you guys have any experience with this, or have any other wifi shield
to reccommend?
There must be some people on this forum that have worked with those things, but that might be another thread... ;)
Maybe it's an idea to hack a quick Cocoa app or script that handles/starts the serial monitor automatically
for the user?
I have that app lying around here on my computer.. but I'm not sure I am convinced this should be part of the XCode project...
This is just my personal opinion, but I think this should be as general as possible and the least bloated possible. More stuffss == more places where things can break. People can always fork from the project to add extra special personal preferences to it..
I'm not sure I am right on this one... is serial communication essential in this project? Should it be from XCode? I feel not. What do you guys think?
I use the serial connection very often as a mean to debug my applications.
So I would greatly appreciate an easy way to have a serial console with a smart management of the USB port to avoid any conflict between the serial console and the upload of the code.
For normal and interactive use, I prefer CooTerm (free (http://download.cnet.com/CoolTerm/3000-2383_4-10915190.html)).
The error message I receive so far is
screen /dev/tty.usbmodem641 -b19200
Must be connected to a terminal.
It seems to be a rather basic error but I don't know OS X intricacies feel enough to fix it!
I've also ordered the WiFly wifi shield from Sparkfun.com so my arduino can speak tcp/ip
with the world. Do you guys have any experience with this, or have any other wifi shield to reccommend?
I bought the XBee Explorer Regulated board from Sparkfun (WRL-09132 (http://www.sparkfun.com/products/9132)) but it has a major flaw: the diode D1 prevents data going to DIN. I put a 10 k? resistor instead.
First app was to read time from a NTP server a set the internal clock of my chipKIT UNO32 board.
Everything is here (https://github.com/rei-vilo/pic32_RTC)! Enjoy :)
Hey Olivier,
try this in your makefile for opening a serial terminal from XCode:
serial:
@echo " ---- open serial ---- "
osascript -e 'tell application "Terminal" to do script "screen /dev/tty.usbmodem* 9600"'
killserial:
@echo " ---- close serial ---- "
osascript -e 'tell application "Terminal" to do script "screen -X quit"'
You can then add these rules after and before your upload if you want.
Thanks Tim, it works great!
For better interaction, I'll use CoolTerm.
One caveat, however: the \n management
(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=12112;image)
How to convert a \n into \r\n?
Latest timknapen-Arduino-With-XCode-3dec20f commit includes a nice feature:
• on main.cpp, change #include "ArduinoProgram.h"
for #include "ArduinoProgram.pde"
• delete ArduinoProgram.h
• rename ArduinoProgram.cpp to ArduinoProgram.pde
On Xcode 4.2 right-most pane Utility, under Identity and Type, select File Type to C++ source instead of Default Plain Text.
Everything runs fine, including code sense :)
The \n bug remains: I guess it is just a parameter to set for the console.
Work has started on Xcodeuino.com - will keep you posted. Took longer than excepted.
I've also ordered the WiFly wifi shield from Sparkfun.com so my arduino can speak tcp/ip
with the world. Do you guys have any experience with this, or have any other wifi shield
to reccommend?
I've been using the RN-171 from Roving Networks and just set it up to post to a PHP server every minute without interaction from the host controller. This way, you can power down everything except the WiFi module, it will read sensor data and post to a web server as the frequency you wish. I posted on the Roving FAQ at http://rovingnetworks.com/FAQs/Standalone_WiFi_modules_sending_data_to_web
Sorry Phooto, I'm afraid this is not the right thread for RN-171 related issues.
Please join or create the appropriate thread.
Thank you.
Okay, the skeleton of http://xcodeuino.com is live.
All interested parties are called to register!
I'm not a web developer by trade, and this is my first Drupal site. Bear with me :-)
Congratulations for the launch.
Is there a specific thread on the forum for suggestions?
Discover what Xcode can do (http://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode/xcode-glimpse) for Arduino / chipKIT!
(https://lh5.googleusercontent.com/-96zl5fWYLT0/Ty8I3x9KHpI/AAAAAAAAI9M/Xw5_t_coJ6o/s1600/1.png)
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.
This brach of the project (with mpide) seems it has some traction,will be modding with this one some more testing.
Wish I had everything up and running already, to do some actual client/server programming ;)
Have a nice night, I'm going to bed zzz
/Storm
The Index target throws a couple of errors but the most important is the index is built.
(https://lh4.googleusercontent.com/-vb-CE4mnNRg/Ty9-gT0HHcI/AAAAAAAAI_U/ijr3ilNLZYI/s800/ei.png)
As a matter of facts, the errors are known bugs of Xcode.
The Index target is a trick: we declare a specific target for Xcode built-in LLVM 3.0 compiler. That way, we benefit from all the niceties of Xcode. Question: how to get them without this ghost target?
So we badly need some help from an Xcode 4 expert!
not sure if this helps but in visual studio and arduino we copy all libs and code to a temp folder prior to compile. this is important because many user libs #include std libs (ie:../Wire/foo) so they all need to be located in the same directory system. without copy to temp, many arduino the sketches will never fully compile
Thanks for the tip.
Building for Arduino or chipKIT works fine with no library related error. Actually, the error reported earlier is raised when Xcode built-in LLVM compiler is used as a target for all the code-sense.
Best solution would be to have code-sense working but without this ghost target.
Any Xcode specialist around willing to help us?
Hey guys,
Sorry for not responding for a while. I'm very busy at work right now. I will try to catch up in a week or so.
Avenue / olivier:
I'm not entirely sure, but I think XCode 4 won't do Code Sense without the fake target. I think XCode needs to be able to communicate with the compiler to do Code Sense. Because of the makefile, XCode can't really do this with the AVR-G++ compiler.
If there was a way to select AVR-G++ as a compiler in an XCode build process we could get this to work and we wouldn't even need the makefiles...
But if this would be possible, somebody would have discovered a long time ago and nobody would be messing with the makefiles in XCode.
best,
tim.
not sure if this helps but in visual studio and arduino we copy all libs and code to a temp folder prior to compile. this is important because many user libs #include std libs (ie:../Wire/foo) so they all need to be located in the same directory system.
The makefile I use just does that: all .cpp .c .h files are converted into .o files which are stored under the Builds/ folder.
I'm not entirely sure, but I think XCode 4 won't do Code Sense without the fake target. I think XCode needs to be able to communicate with the compiler to do Code Sense. Because of the makefile, XCode can't really do this with the AVR-G++ compiler.
Nice to see you back :)
I've noticed the same behaviour on my MacBook.
If there was a way to select AVR-G++ as a compiler in an XCode build process we could get this to work and we wouldn't even need the makefiles...
We haven't explored yet the templates and frameworks and other advanced strings of Xcode 4. Maybe I'm expecting too much, but the solution may be there.
But if this would be possible, somebody would have discovered a long time ago and nobody would be messing with the makefiles in XCode.
Xcode seems exclusively devoted to OS and iOS app development.
What a pity :(
Intellisense aside (i am sure you will get it working),
If xcode combines the pde/ino into a single cpp file, pulls in both core and user libs, compiles the lot without error that is very good. If it also returns clickable (goto source) errors for invalid source or lib files then I am very impressed! This had to be manually coded in the visual studio plugin, yes it works very well, seemlessly, but it's a chore to maintain.
Intellisense aside (i am sure you will get it working),
I hope so ;) But help from an Xcode expert would be greatly appreciated!
If xcode combines the pde/ino into a single cpp file, pulls in both core and user libs, compiles the lot without error that is very good.
That's the standard feature from the makefile. It's neat and clean!
If it also returns clickable (goto source) errors for invalid source or lib files then I am very impressed! This had to be manually coded in the visual studio plugin, yes it works very well, seemlessly, but it's a chore to maintain.
The code check-as-you-go monitoring and click-to-error features only work when target = Index is activated, fooling Xcode.
(https://lh6.googleusercontent.com/-WC9Zzb7riFg/Ty8I_GMSqpI/AAAAAAAAI-Y/5M4GeHWq59s/s1600/index.png)
More pictures are available here (http://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode/xcode-glimpse).
Xcode is certainly better than I had assumed, that doesn't mean I will use it because I am a windows user and content with the visual studio solution. but for mac users it is a revelation, well done!
The code check-as-you-go monitoring and click-to-error features only work when target = Index is activated, fooling Xcode.
Yes, it is great to have some "intellisense/check as you go" error reporting. I also find it useful in Visual Studio but it seems that both xcode and vs are not using the gcc compilers for the intellisense. So many real exceptions don't appear until we compile. The errors returned by gcc are not very friendly and that's where the fiddly work began in the Visual Studio plugin development. Translating the gcc compiler outputs back to real file locations isn't much fun. If you find an easier solution than coding this manually then please let me know :)
New Feb 08, 2012 release f brings
• Code-sense and click-to-error with standard targets
• Code check-as-you-type only with Index as target (continous compiling)
(https://lh5.googleusercontent.com/-mUAM82Cf5fg/Ty8I8o_n4WI/AAAAAAAAI98/gzwhBzfDkrw/s1600/err-l.png)
(https://lh5.googleusercontent.com/-uieLp4ctN1Q/Ty8I9KVJ7nI/AAAAAAAAI-A/q5NQkCvQPJU/s1600/err-m.png)
Please refer here (http://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode) for documentation and there (https://github.com/rei-vilo/mpideXcode) for code.
very VERY nice work. One little question.
Does this support multiple .pde/.ino files in a single project? If so, do any errors point back to the correct original source code lines?
Does this support multiple .pde/.ino files in a single project? If so, do any errors point back to the correct original source code lines?
.pde / .ino files are considered as .cpp files and are natively supported.
However, some extra code is required and should be added:
// core library
#include "WProgram.h"
// needed here
// separate main.cpp creates conflicts
int main(void)
{
init();
setup();
for ( ; ; ) loop();
return 0;
}
Defining a separate main.cpp with main function or using the main.cpp provided by Arduino / chipKIT resulted in duplicate declarations and loss of code-sense.
Function main is the compulsory entry to the code to active code-sensing and all other niceties.
I haven't added yet a routine to check there's only one .pde / .ino file.
Xcode is poorly documented but has automatic features supposed to
make developer's life easier. Xcode doesn't support plug-ins, so I'm afraid I can't go further... unless a white knight comes to the rescue!
Would you like to consider NetBeans instead? It's cross-platform and has an open architecture for plug-in. Combining your expertise with Visual Studio on Windows and my tests with Xcode on Mac OS X, we could do something really nice.
pde / .ino files are considered as .cpp files and are natively supported.
That is probably a problem for many existing arduino sketch projects because the
.pde files in arduino are joined into a single cpp file . This allows all of the variables and methods of every .pde to be shared (and is heavily used by many arduino sketches).
.cpp files need .h files and public declrations + #includes to be access by other files where as .pde files are global.
Example: if we have void Test() {} in Blink2.pde then it should automatically be accessible from Blink1.pdeThe joining of .pde files into a single .cpp is where the complexity arises when mapping error line numbers back to source. This is why I asked about it so often, it's messy!
Infact the problem is even worse, as you say you need the arduino.h or wprogram.h but Arduino also extracts and automatically adds the prototypes for each .pde method.
So when we translate error source line numbers we need to subtract the header lines then any other combined pde file line lengths.
Would you like to consider NetBeans instead
Normally no, because I am very happy with Visual Studio and would like to get back to building sketches instead of plugins :)
But my nephew wants me to install netbeans to help him make some minecraft mods :)
So maybe netbeans is a solution, escpecially because the arduino ide source is .java files so should be easily portable to netbeans? I would be happy to help you if you do!!
I was talking about Xcode hidden features but you're right in pointing Arduino ones.
Wait a minute: Are they
features or
bugs?
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.
We could go back to a more canonical way of programming and get rid of the false automatons that make programers' life
more difficult.
That's the way I've taken, in order to get as much as possible from Xcode.
But my nephew wants me to install netbeans to help him make some minecraft mods
Splendid, just suggest him this challenge: building an Arduino plug-in for NetBeans!
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!
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:
AVRDUDE_COM_OPTS = -q -V -F -p $(MCU)
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!
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!
Actually, the output from [font=Courier]Serial.println()[/font] 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.
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?
I've just added to release 1 an Installation Guide.
As usual, the repository is rei-vilo/embedXcode (https://github.com/rei-vilo/embedXcode)
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
Oh, yeah, I'm using the Arduino 1.0. Is the project template compatible with this?
Dave
Thank you for the accolade.
Just add a Libraries folder into your sketchbook folder.
I know there are too many targets. [font=Courier]Build[/font] includes [font=Courier]Clean[/font] and so compile everything from scratch, while Make only compile updated files for faster answer. [font=Courier]Build = Clean + Make[/font], 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 (https://github.com/rei-vilo/embedXcode/issues) on the GitHub repository.
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 ;)
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
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 (https://github.com/rei-vilo/embedXcode) and documentation there (https://sites.google.com/site/vilorei/arduino/20--arduino-makefile-for-xcode).
Next step is to add Wiring, if I find a Wiring S board to test the upload.
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!
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.
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!
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 :)
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.
Thanks again for the detailed feed-back.
No problem, thanks for the template!
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:
AVRDUDE_PORT = $(firstword $(wildcard $(BOARD_PORT)))
with BOARD_PORT defined in Arduino UNO.xconfig by
BOARD_PORT = /dev/tty.usbmodem*
or in Step1.mk otherwise by
ifndef BOARD_PORT
BOARD_PORT = /dev/tty.usb*
endif
Arduino UNO.xconfig has priority over Step1.mk.
That's strange, AVRDUDE_PORT is defined in Avrdude.mk by:
AVRDUDE_PORT = $(firstword $(wildcard $(BOARD_PORT)))
with BOARD_PORT defined in Arduino UNO.xconfig by
BOARD_PORT = /dev/tty.usbmodem*
or in Step1.mk otherwise by
ifndef BOARD_PORT
BOARD_PORT = /dev/tty.usb*
endif
Arduino UNO.xconfig has priority over Step1.mk.
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.
Hi again, I've discovered another problem, but unfortunately my makefile writing skills aren't up to scratch to fix this one.
For some reason the Step2 makefile is losing the USER_LIBS_LIST. USER_LIB_PATH works for me when in Arduino.mk I change
USER_LIB_PATH = $(wildcard $(SKETCHBOOK_DIR)/libraries)
to
USER_LIB_PATH = $(SKETCHBOOK_DIR)/libraries
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!
Just open makefile
# Libraries
# ----------------------------------
# Declare application Arduino/chipKIT/Wiring and users libraries used
# Short-listing libraries speeds-up building
# Typing = 0 takes none
# Otherwise, all will be considered (default)
you can define which Arduino/chipKIT/Wiring libraries you want
# List Arduino/chipKIT/Wiring libraries here
#
as well as which users libraries
# List users libraries here
#
Those parameters are intended to avoid compiling all the libraries each time and thus, speed-up the process.
Ah that's great, thanks :)
Perhaps it'd be better to have an environment variable set in Xcode defining whether you want to compile user libraries or not, would be much easier than changing a list in the makefile. You could have the envar as a list of user librares too.
Feel free to skip APP_LIBS_LIST and USER_LIBS_LIST from Makefile and add them to Project > Project > Build Settings > User-Defined.
The real challenge is to obtain documentation about Xcode inner structure and keywords to improve:
- the template sets the sketch as c++ code and not plain text, for code-sense
- the template populates the Sources List for code-sense
- instead of having the serial console in a separate Terminal window, integrate it in Xcode debug pane
- ...
New releases add Wiring and LaunchPad support.
(http://embedXcode.weebly.com/uploads/1/1/6/2/11624344/7675641.png)
embedXcode • Apr 05, 2012 release 7 • Wiring and LaunchPad platforms added
mpideXcode • Apr 05, 2012 release 10 • Wiring and LaunchPad platforms added
Code is here (https://github.com/rei-vilo/embedXcode) and documentation there (http://embedXcode.weebly.com/).
Both build and upload have been successfully tested on Wiring S and LaunchPad msp430g2452 boards.
Energia (https://github.com/energia/Energia) is the Processing-based IDE for the LaunchPad platform.
Critical Decision Ahead
Most of the open points (https://github.com/rei-vilo/embedXcode/issues) on embedXcode (http://embedxcode.weebly.com) are about Xcode, especially keywords on the template.
Despite numerous calls for help, they're still unresolved. The Xcode template remains undocumented and there's no sign of openness from Apple. Apple seems to restrict Xcode to OS X and iOS platforms only.
So I'm considering to change for another IDE, with NetBeans as most probable solution. It's open, and documentation is available.
What do you think?
There are people attempting to unravel the template format (why Apple had to change it in Xcode 4 to this weird new system we'll never know) for coding other projects too. You aren't alone in trying to decipher it, but only asking for help via the Arduino on Xcode project means the audience is pretty small. I'm sure someone will figure it out (or it'll get leaked from Apple) sometime.
You're right that Xcode is really designed for OS X and iOS, Apple has little interest in supporting other languages/platforms. Despite its limitations though, I'd personally rather use Xcode. NetBeans is Java, which is usually pretty clunky and un Mac-like. I don't have experience with anything but the Arduino IDE, and Xcode on the Mac however.
Elijahg,
You're right about selecting the right channel for the right audience.
I'm posting on both Xcode-related forums --of which Stack Overflow for very specific questions about the Xcode 4 template-- and embedded computing related forums.
The idea is Arduino users may be interested in using Xcode and Xcode experts may have some tricks to exchange.
Thanks to this strategy, the Wiring and LaunchPad platforms are now supported by embedXcode. I hope adding more platforms may help raising interest on this project.
There are so many things one could dream about: built-in serial console, integrated help, debugging, closer integration of the tool-chains, ...
Please find the new releases for
embedXcode • Apr 16, 2012 release 9 • Code-sense reference defined by selected board
mpideXcode • Apr 16, 2012 release 12 • Code-sense reference defined by selected board
Installation Guide • Apr 16, 2012 release 6 • General update
All the manual settings are due to unknown template keywords (https://github.com/rei-vilo/embedXcode/issues?labels=Template). Your help is greatly appreciated.
Documentation is here (http://embedXcode.weebly.com) and code is there (http://www.github.com/rei-vilo/embedXcode).
embedXcode now supports Maple!
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9015344.png)
embedXcode • May 23, 2012 release 10 • LeafLabs Maple implementation
mpideXcode • May 23, 2012 release 13 • LeafLabs Maple implementation
Installation Guide • May 23, 2012 release 7 • LeafLabs Maple implementation
The Maple reset script --which sends control signals over the USB-serial connection to restart and enter the bootloader-- is written in Python and requires the PySerial library:
• Read the instructions at http://leaflabs.com/docs/unix-toolchain.html#os-x (http://leaflabs.com/docs/unix-toolchain.html#os-x) and
• Download PySerial library from http://pypi.python.org/pypi/pyserial (http://pypi.python.org/pypi/pyserial).
Full documentation and download are available here (http://embedXcode.weebly.com).
Enjoy :)
Please find the new releases of
embedXcode • Jun 03, 2012 release 11
mpideXcode • Jun 03, 2012 release 14
Installation Guide • Jun 03, 2012 release 8
As embedXcode manages multiple platforms, including the right libraries and dealing with syntax specificities are two cumbersome challenges.
Until now, the platform identification was solely based on the MCU, resulting on lengthy #if #elif #else #endif statements.
Now, embedXcode brings a new approach based on the IDE.
The Arduino, Wiring and Maple IDEs set an environment variable for the tool-chain.
For example, Arduino defines ARDUINO=100 and pass -DARDUINO=100 on to gcc, g++ and alike, Wiring sets -DWIRING=100 and Maple -MAPLE_IDE.
So the code is fully compatible between embedXcode and those IDEs. This new approach brings more compact and easier to read code, and doesn't require maintenance at code level when a new MCU appears.
This new IDE-based approach is optional, as not all IDEs include this approach. Let's mention Energia and chipKIT MPIDE, and hope they consider it!
As always, full documentation including features, tutorials, installation guide and code, is available at embedXcode website (http://embedXcode.weebly.com).
Enjoy ;)
I'm working on the next release of embedXcode. I plan to integrate an automatic documenting feature.
After having reviewed HeaderDoc, doxygen and appledoc, I picked doxygen.
Integration with Xcode is the main challenge. The idea is to select a specific target to build the documentation, obtain a PDF and integrate a codeset Xcode could use.
There's still a lot of work to do.
Stay tuned ;)
Please find the new release of embedXcode with the implementation of the self-documentation.
embedXcode • Jun 14, 2012 release 13
Installation Guide • Jun 14, 2012 release 9
Just add to your code and launch the Document target:
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/238082_orig.jpg)
A help document is generated and closely integrated in Xcode.
Quick Help provides details on documented functions:
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/3244187_orig.jpg)
As always, learn more and download from here (http://embedXcode.weebly.com).
New version 14 of embedXcode brings a significant improvement on the size of the HEX and BIN files over the
embedXcode • Jun 25, 2012 release 14 • HEX and BIN files size optimisation
Sizes are now close to and even better than those obtained with the corresponding IDEs.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/8704458.jpg?896)
All measures are in bytes.
As always, learn more and download from here (http://embedXcode.weebly.com/).
Hey everybody,
I believe the arduino on Xcode project is just awesome, and as i have a pretty big arduino-project coming up for myself,
i wanted to switch to Xcode for the programming part, But:
On Lion, the developer-folder changed, it is now located in Xcode/contents/developer
So now I'm not sure where to put the embedxcode template files???
i do believe here like in the photo? am i right? because there are other Xcode/template/file_temp.... in the platform-direction!!
might be a dumb question but thanks anyway!
Please refrain from modifying the Xcode directory! This is potentially dangerous!
Instead,
1.4. Install the Template
Now, the template can be installed:
Check and create ~/Library/Developer/Xcode.
Copy the folder Templates into ~/Library/Developer/ Xcode
I wrote an Installation Guide and User Manual (http://embedxcode.weebly.com/tutorial.html). I hope it's clear enough.
(http://arduino.cc/forum/index.php?action=dlattach;topic=49956.0;attach=22000;image)
Enjoy ;)
embedXcode on Dangerous Prototypes!
Read at http://dangerousprototypes.com/2012/08/24/embedxcode/ (http://dangerousprototypes.com/2012/08/24/embedxcode/)
Please find the new release of embedXcode
Sep 01, 2012 • Support for Arduino Leonardo
As the Arduino Leonardo requires a specific reset procedure due to its ATmega32U4, I had to develop a reset script in Python.
Also included in this release, support for Xcode 4.4.1 and for newly released Energia 0101E0008 (https://github.com/energia/Energia/downloads) and a fix for GraphWiz 2.28 crashing on Mountain Lion.
As always, find documentation and download at http://embedXcode.weebly.com
New! Installation Package
embedXcode is now installed with a standard installation package. Installation is faster and easier.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9677597_orig.png)
The Installation Guide and User Manual has changed for User Manual.
The package includes the templates, the code snippets, and the User Manual.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/1381655_orig.png)
Find it at the download page (http://embedxcode.weebly.com/download.html)!
As Arduino 1.0 is now stabilised and wide-spread, should embedXcode continue to support Arduino 23?
Answer the poll (http://poll.fm/3w3qa) :)
Please note this is not going to affect other platforms, like chipKIT MPIDE which is still based on Arduino 23 and continues to be supported as it.
Thank you for your input. The poll opens for one week.
Dear avenue33,
I'm a complete newbie on Xcode but since I wanted to have a bit more advance IDE than the Arduino provided one and I'm on a Mac, I went for Xcode and your template embedXcode. I've tried to follow your installation guide but I must say it could be more extensive when it comes to where a certain dropdown menu is instead of just saying "the dropdown menu", like on page 37 when selecting a target. And the pictures could also be of higher resolution so one can actually se what's written in them. But I'm not just wining, I'm giving you hopefully constructive feedback because I really want this to work! :)
Also, when I build the default code in a new project I get the following error message:
Argument list too long: recursive header expansion failed at /Applications/Preview.app/Contents.
And loads of messages of the following type:
Warning: no rule to process file '$(PROJECT_DIR)/TestOfXcode/Arduino/cores/arduino/Arduino.h' of type sourcecode.c.h for architecture i386
Any hints to get in the right direction?
Dear Hasse,
What is the target selected?
According to the message, it seems the Index target is selected.
The Index target is a dummy target and should not be used. It always throws the error you mention.
Please select the Build target to compile only, and the All target to compile and upload.
About the quality of the images, the full quality PDF is 6 GB. I'm obliged to reduce the size because the host for the website limits the size of the files. Uploading larger files would require a non-free plan.
Please don't consider my user manual is an introduction to Xcode. There are excellent books about Xcode: for example, I recommend Xcode 4 Unleashed by Fritz F. Anderson I've purchased thanks to contributions (http://embedxcode.weebly.com/1/post/2012/06/book-purchased-thanks-to-contributions.html).
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
The user manual I wrote only focuses on how to use the template. Xcode, like all other professional IDEs --to name a few: Visual Studio, Eclipse, NetBeans, Qt, ...--, has a steep learning curve. The magic of the Arduino IDE relies in its instant plug-and-play gratification.
As a matter of fact, I'm still using the Arduino IDE when I don't need the power of Xcode.
Thanks for the quick reply! :)
Yeah, once I got the target right it all works like a charm!
Cheers
New release 16 of embedXcode supports the FraunchPad MSP430FR5739.
embedXcode • Sep 25, 2012 release 16 • Support for FraunchPadThe Document target now builds a PDF file along with HTML and docset files.
Documentation is here (http://embedxcode.weebly.com/tutorial.html) and download there (http://embedxcode.weebly.com/download.html).
Obsolescence Notice
The following features are planned to become obsolete in a future release:
- Support for Arduino 0023 is planned to be be discontinued.
- The code for multiple platforms is managed in two ways: the MCU variables like __AVR_ATmega328P__ and the IDE variables like ARDUINO=101. The MCU variables are going to be suspended in favour the IDE variables. This enables a more compact code and an easier maintenance.
Has this latest version:
embedXcode • Sep 25, 2012 release 16 • Support for FraunchPad,
been tested with xCode 4.5?
Thanks
Yes, it is compatible with Xcode 4.5 and even 4.5.1 :)
Updated User Manual and Support for Xcode 4.5.1
I updated the user manual based on the feed-back I've received about the following two sections: installation and target selection.
embedXcode now supports Xcode 4.5.1.
The package includes the templates, the code snippets, and the User Manual.
As always, documentation is here (http://embedxcode.weebly.com) and download there (http://embedxcode.weebly.com/download.html)!
I've downloaded the latest guide and embedXcode after downloading the Arduino 1.0.1 IDE, but I'm a little lost as to where my Sketchbook\Libraries folder is (mentioned on page 23). When I launched Arduino, it created a ~\Documents\Arduino directory, but seemingly nothing else.
I see in the guide and this forum that 1.0 is supposed to be supported, and with 1.0.1 being a minor point release, I figured perhaps it would be fine. Is 1.0.1 not supported?
I loaded 1.0 and then re-ran the embedXcode installer. I still have no "Library" or "Libraries" folder under that Sketchbook path.
Any ideas where I must have gone off the road?
Thank you all for your dedication and time.
Thomas
embedXcode supports Arduino 1.0.1.
The Sketchbook/Library folder is not created by embedXcode but managed by the Arduino IDE.
Please refer to Installing Additional Arduino Libraries (http://arduino.cc/en/Guide/Libraries) on how to install the Sketchbook/Library folder.
Once the Sketchbook/Library folder exists,
- run Arduino
- and define the path of the sketchbook in the menu Arduino > Preferences > Sketchbook location as explained page 6.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/4210966_orig.png)
Now, launch embedXcode, create a new project and follow the instructions page 22:
- Open the Sketchbook group on the project hierarchy. Right-click to obtain the contextual menu.
- Choose Add file to...
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/3069677_orig.png)
- ?Select the Library sub-folder on the sketchbook folder, tick Add to target > Index and validate with Add.
Xcode is a whole new environment and, as other advanced IDEs, requires some learning.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
I recommend the book
Xcode 4 Unleashed by Fritz F. Anderson I've purchased thanks to contributions (http://embedxcode.weebly.com/contact.html).
Enjoy ;)
Right - I knew that the Library directory was for the Arduino IDE, but the instructions in the guide regarding it confused me. It made me think that the Arduino IDE was going to also create and insert its default libraries there. And then by some quirk of the whole X Code template situation, I might need to add (but not copy) those libraries so that the compiler can find everything. In digging into the template though, I see that all default Arduino libs are actually included as part of the project.
Anyhow, my mistake. It seems this step is only relevant if one actually has additional libraries they want to include at the time of creating their project.
So just to make sure I understood everything so far, should the SKETCHBOOK_DIR be pointed at my ~/Documents/Arduino path (where the IDE identifies the Sketchbook and where Library will soon be) or the X Code project's Sketchbook directory?
Thanks again.
The SKETCHBOOK_DIR should be pointed at your ~/Documents/Arduino path to take into account your personal libraries.
Once again, Xcode is a professional IDE and, as so, requires some learning.
I strongly recommend the book Xcode 4 Unleashed by Fritz F. Anderson I've purchased thanks to contributions.
Please keep in mind the embedXcode User Guide is not an introduction to Xcode. It implies some fluency with Xcode.
Enjoy ;)
Thanks.
At this point I can build the Build target, but code sense is still not working on PDE files despite having their type set to C++ Source and re-indexing 3 times now.
None of the other standard C/C++ file types are having this issue. It's as if the if-def header isn't being processed properly in specifically the PDE file despite it otherwise being treated like a C/C++ file.
EDIT - Per your suggestion, I eliminated the larger if-def block in place for just Android.h since that's the only platform I am working with. After re-indexing, everything seems to be fine.
Thank you so much for setting this whole thing up.
Normally, code-sense should work after the first build even for the pde or ino file.
Try closing the project and opening it again.
Xcode has sometimes strange behaviours.
Please find the new release of embedXcode
Oct 21, 2012 • Selection of pde, ino or cpp extension for the sketch
When creating a new project, select the extension on the drop-down list:
• Choose pde for Arduino 0023, chipKIT MPIDE, Wiring and Leaflabs Maple,
• Choose ino for Arduino 1.0 and Energia,
• Choose cpp optionally for a standard C++ file.
Using a pde or ino extension allows to edit the sketch with the standard IDEs of the boards.
Find documentation at http://embedxcode.weebly.com
and download from http://embedxcode.weebly.com/download.html
Enjoy ;)
I'm implementing support for Due on embedXcode.
Building and linking work fine.
Unfortunately, I can't proceed with the uploading tests as I don't own an Arduino Due board.
Learn more (http://bit.ly/P5VmgF) :)
Same here. The amazing invisible board :)
I'm implementing support for Due on Xcode for Mac OS X with the template embedXcode.
Building and linking work fine.
Unfortunately, I can't proceed with the uploading tests as I don't own an Arduino Due board.
Can an Arduino Due owner post the verbose output for upload?
(http://farm9.staticflickr.com/8464/8135817630_4dc8a23fed.jpg)
Thanks!
Dear avenue33 (or anybody else who may help),
I have installed embedXcode but get stuck since a couple of days when trying to execute the build target.
I get errors that suggest that the compiler would not accept overloading functions. (screenshot attached)
Also, the UDPbytewise library seems to request a "Types.h" include that cannot be found.
What kind of confuses me is also that those are "Shell Script Invocation Errors".
Any idea if this is a compiler flag not set or something of that sort? I really would like this to work, as I have a project that I need to separate into different libraries and classes to be maintainable, and the Arduino IDE is just not made for that.
Any help would be greatly appreciated.
Does the project compile with the standard Arduino IDE?
The "already defined here" message occurs when the same libraries are in two places:
- first under the sketchbook / libraries folder
- and second under the project folder.
The screenshot doesn't provide enough clues to help you more. What is the board used?
Thank you for your input.
I try to build for Arduino Mega 2560
On the standard IDE, I get the following error:
main.cpp:45:25: error: BlinkTest.ino: No such file or directory
If I remove main.cpp from the project, it compiles (this does not seem strange, as the main.cpp is probably already "hidden" in the Arduino IDE), but I get some warnings:
Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:82: warning: comparison between signed and unsigned integer expressions
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp:390: warning: comparison between signed and unsigned integer expressions
and
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.cpp:44: warning: '__progmem__' attribute ignored
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp:93: warning: only initialized variables can be placed into program memory area
Attached is the path of the project folder. The Sketchbook folder is empty, except for the .txt file, the others have all the .h and .cpp files in them.
Does that seem right?
Any clues?
Well, it seems your project is having some issues even in the Arduino IDE.
How complex is your project?
The sketchbook folder is the place were you place a link to the libraries you've developed.
Please refer to section 3.3. Add User's Libraries on pages 25 et sq. of the User Manual (http://embedxcode.weebly.com/tutorial.html).
it's really just the test project that appears when you create a new embedxcode project. I haven't changed a line of code and just wanted to try if it compiles, at all... :~
maybe I should try a regular c++ project to see what's wrong with the environment?
Which release of embedXcode are you using?
Which release of the Arduino IDE are you using?
Is the Arduino IDE installed on the folder /Applications?
Current version 17 of embedXcode doesn't invoque any HardwareSerial in the default sketch.
According to the messages, it seems Arduino 23 and 1.0 are mixed. Best solution consists on deleting the Arduino IDEs and proceeding with a clean install.
Arduino IDE 1.0.2. Just deleted the whole thing (including sketch folder) and reinstalled. (I think it was 1.0.1, before, they must have updated it quite recently).
embedxcode downloaded installer package from your website on 21 oct 2012 (where do I see the version?)
Same result...
I will try a little more over the weekend
Strange indeed. This is the first time such error is reported.
Can I ask you or some other Xcode/Makefile craig again if you have some clues?
I discovered the following:
When I add in main.cpp the full path of BlinkTest.ino (i.e. #include"/Users/myname/Documents/Arduino/BlinkTest/BlinkTest/BlinkTest.ino") the test project compiles in the Arduino IDE.
The warnings are still present. They appear in Libraries HardwareSerial.cpp, Print.cpp and Tone.cpp which are included from a previous compile (although I installed the whole Arduino.app new).
E.g. the last lines of the compiler output before the warnings are:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 \
-I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino \
-I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp \
-o /var/folders/gq/_c97z0614fj267w8732pn4r00000gn/T/build4731805130703822254.tmp/HardwareSerial.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
I suspect this may be independent from the build errors in XCode, but on the other hand, I was able to avoid all warnings in previous sketches.
What I also observed: If I insert some rubbish into the main.cpp (either within main{} or outside), it is not picked up during the build target, at all. This can be because it lists too many other errors and parses all includes, first, but may still be a clue.
I still believe this may be some problem with errors due to function overloading which would normally work in C++ (maybe some functions are not interpreted as being part of a class ??)
If I look at the first bit that generates an error:
#ifdef __cplusplus
#include "WCharacter.h"
#include "WString.h"
#include "HardwareSerial.h"
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(__VA_ARGS__)
Which is some part of Arduino.h I get the first error in the lower line of uint16_t makeWord saying Declaration of C function 'uint16_t makeWord(byte, byte)' conflicts with and in the line above the error is Previous declaration 'uint16_t makeWord(uint16_t)' here.
I also included in Arduino1.mk the line $(shell env>theEnvironment)
and the anonymized result is attached...
Thank you anyone for your help.
I'm sorry not to be able to help you on your specific case.
I don't understand why the blink.ino file isn't inside the folder of the Xcode project:
MyProject/
. MyProject.xcode
. MyProject/
. . blink.ino
. . main.cpp
. . and other files
Please find the new release of embedXcode
- Oct 26, 2012 release 18 • Support for Arduino Due
- Oct 28, 2012 release 19 • Support for StellarPad
- Nov 09, 2012 release 20 • Support for Teensy 3.0
The user manual has been updated too
- Nov 09, 2012 release 16 • Updated with new boards
Please note the Arduino 1.5, Energia for StellarPad and Teensy 3.0 softwares are in development.
I've tested build, link and upload successfully for all boards except for the Arduino Due I don't own.
Website: http://embedxcode.weebly.com
Download: http://embedxcode.weebly.com/download
User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
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 :)
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 (http://embedxcode.weebly.com/tutorial.html).(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 (http://embedxcode.weebly.com/tutorial.html).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.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
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 ;)
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.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9158627_orig.png)
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 (http://embedxcode.weebly.com/1/post/2012/11/new-fast-and-make-optimised-targets.html).
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
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
What target have you selected?
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9158627_orig.png)
Thank-you for such a quick response!
The only option I can have is All->My Mac 32bit.
The Project Targets/All Build Settings show
Debug Board Port as tty.usbmodem*, and the Debug Board Tag as uno
Thank-you for such a quick response!
You're welcome!
The only option I can have is All->My Mac 32bit.
Strange, you should have also Build, which builds and links without uploading, and many other options as shown is my previous post.
The Project Targets/All Build Settings show
Debug Board Port as tty.usbmodem*, and the Debug Board Tag as uno
I the case your
genuine Arduino Uno board --and not a compatible board that may use another driver to upload-- is connected, open the Terminal and type
ls /dev/tty.usb*
It might be the serial port is managed by /dev/tty.usbserial* instead of the default /dev/tty.usbmodem*
- Arduino Uno rev 2 board = /dev/tty.usbmodem411
- Compatible Uno board = /dev/tty.usbserial-A40084mc
In such a case, just edit the the Arduino UNO.xcconfig file with the USB port.
Thank-you all for your attention.
I have run Blink under OSX Arduino - on port tty.usbmodem*, (As reported by /dev/tty) and no problem.
It would appear that I need to have the Arduino plugged in when I use XCode (?)
I then returned to Xcode and set the Option to BUILD (as suggested) and got 30 plus failures concerned with wiFi.cpp - e.g. wifi_drv.h no such file or directory. No Serial Port error reported.
I have run Blink under OSX Arduino - on port tty.usbmodem*, (As reported by /dev/tty) and no problem.
It would appear that I need to have the Arduino plugged in when I use XCode (?)
As mentioned page 49 of the User Manual, each target has a specific agenda:
• All cleans the files from a previous compilation, compiles and links, uploads and opens a serial window in Terminal.
So you need the board to be plugged-in to upload.
• Build compiles all the files, changed and unchanged, and links them.
No plugged-in board is required.
I then returned to Xcode and set the Option to BUILD (as suggested) and got 30 plus failures concerned with wiFi.cpp - e.g. wifi_drv.h no such file or directory. No Serial Port error reported.
Please, you're going too fast...
If the blink example works on the Arduino IDE, have you tried it on Xcode before trying a more complex example?
You need to validate each step, with one single change per step.
About the WiFi, I guess some specific libraries need to be installed. Have you installed them? Does the sketch compile on the Arduino IDE? Have you check the sketchbook is correctly defined --page 9 sq., ibid.? Have you restricted some libraries for faster compilation --page 51, ibid.?
oops - I will slow down -
Blink runs in Arduino under OSX
Now I understand the Build Options - I get a clean build but when I try to UPLOAD the Blink app I get:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -D -patmega328p -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -carduino -b115200 -P/dev/tty.usbmodem26421 -Uflash:w:Builds/embeddedcomputing.hex:i
Avrdude: can't open input file Builds/embeddedcomputing.hex: No such file or directory
Looks as though I have not done something!
My thanks and apologies for any confusion.
The target UPLOAD requires the file Builds/embeddedcomputing.hex to be ready.
Have you checked that the file Builds/embeddedcomputing.hex is available?
Use instead the target ALL = CLEAN + BUILD the sketch + ULPOAD to the board + SERIAL console.
It might be easier to use the contact form (http://embedxcode.weebly.com/contact.html) to send me the content of the Log Navigator.
The maintenance of the embedXcode template is really difficult due to Apple secrecy around and lack of documentation on Xcode.
So I'm considering switching from Xcode to another IDE.
Here's an open letter to Apple Xcode team. Feel free to send it to members of the Apple Xcode team you know.
Thank you for your help :)
Dear Xcode Team,
Xcode offers superior features and ergonomics compared with other IDEs running on OS X.
Unfortunately, its restricted documentation prevents from using many of its features.
I'm using Xcode as a development tool for embedded computing platforms.
As at today, the embedXcode (http://embedxcode.weebly.com/) template supports Arduino, Diligent chipKIT with MPIDE, Texas Instruments' Launchpad with Energia, Leaflab Maple, Teensy, Wiring, and has received a warm welcome from the embedded computing community.
The issues (http://embedxcode.weebly.com/issues) I'm currently facing are mostly linked to the lack of available documentation.
The books available on Xcode focus on how to use the tool, not on how to customise it. Similarly, Apple doesn't provide any clues about its inner structure.
For example, keywords used by the templates are not documented. Neither is using other tool-chains, albeit the specific Toolchains folder.
Is Xcode solely limited OS X and iOS development?
By just releasing some documentation on Xcode inner organisation and customisation, Apple can easily make Xcode the best choice for developers.
Otherwise, I'd have no option but to switch to another IDE and to abandon OS X.
Looking forward to hearing from you,
Best regards,
--- Rei Vilo
http://embedxcode.weebly.com (http://embedxcode.weebly.com)
Please find the new release of embedXcode
embedXcode • Nov 24, 2012 release 23 • Fixed WiFi issue on Arduino 1.0.2 and 1.5.x
User Manual • Nov 24, 2012 release 17 • New section Dealing with Issues
embedXcode release 23 includes the additional optional parameter EXCLUDE_LIBS in the main makefile to black-list libraries.
Issues have been reported for the WiFi library on Arduino 1.0.2 and the Firmata library with Teensy 3.0.
Edit the makefile on you project and add the names of the libraries to exclude:
# List the libraries to be excluded
# For example, WiFi may crash on Arduino 1.0.2
# For example, Firmata may crash on Teensy 3.0
#
EXCLUDE_LIBS = Firmata WiFi WiFi/utility
The user manual includes a check-list when facing an issue on embedXcode.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
Please find the new release of embedXcode
embedXcode • Dec 10, 2012 release 23 • Fixed MAPLE_IDE variable and added Energia 9 support for Stellaris
User Manual • Dec 10, 2012 release 18 • New section Dealing with Issues
The user manual includes check-lists when facing an issue on embedXcode.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
Please find the new releases of embedXcode
embedXcode • Dec 14, 2012 release 25 • New target for distribution
User Manual • Dec 14, 2012 release 19 • New target for distribution
The new Distribute target creates a specific folder Distribution which contains:
• all the headers and code files,
• documentation in PDF if available,
• and main sketch --.pde or .ino-- in a folder with the appropriate name.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/7251380_orig.png)
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
I'm having issues getting my sketch to compile in Xcode for the Uno. It works fine in the Arduino IDE.
When I run a compile, I get the error:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Esplora/Esplora.cpp:54: error: 'A11' was not declared in this scope
make: *** [Builds/libs/Esplora/Esplora.o] Error 1
I've attached the full error log.
I get this same error with a fresh embedxcode project too. Any ideas where I've gone wrong?
This is strange as your target is UNO.
I suggest you to edit the makefile on you project and add the names of the libraries to exclude:
# List the libraries to be excluded
# For example, WiFi may crash on Arduino 1.0.2
# For example, Esplora may crash on Arduino 1.0.3
# For example, Firmata may crash on Teensy 3.0
#
EXCLUDE_LIBS = Firmata WiFi WiFi/utility Esplora
It seems the Processing IDE is reaching its limits with the new Arduino products.
Thank you for reporting this issue. Please keep me informed of the result as I'm focused on the 1.5.x release
Excluding the Esplora lib worked. Thanks.
Thank you for the feed-back.
Please find the new release
embedXcode • Jan 08, 2013 • Fix for Esplora issue on Arduino 1.0.3
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
Running into another problem: I'm trying to build a project on the Due, and I get the following error:
---- Compile ----
1.1-CORE: .o < .c arduino_due_x Builds/ WInterrupts.c
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -mmcu= -DF_CPU= -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/Arduino -I/Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/EEPROM -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Ethernet -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Ethernet/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/SPI -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Servo -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/SoftwareSerial -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Stepper -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/utility -g -Os -w -Wall -ffunction-sections -fdata-sections -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/ -DARDUINO=150 /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/Arduino/WInterrupts.c -o Builds/WInterrupts.o
cc1: error: missing argument to "-mmcu="
make: *** [Builds/WInterrupts.o] Error 1
This is with Arduino 1.5.1 and the latest embedxcode. I can compile and upload form Arduino, but even a brand new project in embedxcode fails to compile. Full log is attached
Problem is, I don't own an Arduino Due, so I can't proceed with the required tests.
I'll see what I can do.
Attached file displays
Error 503 Service Unavailable
Service Unavailable
Guru Meditation:
XID: 1076264504
Varnish cache server
Please find an updated version of embedXcode with successful compilation for Arduino Due.
- Download: http://embedxcode.weebly.com/download
Please let me know how the upload works so I could improve it.
Thank you!
Please find a new release of embedXcode
embedXcode • Jan 15, 2013 release 26 • Support for Arduino Due -- Build, link and upload tested
Arduino Due is now fully supported thanks to the help of a user who proceeded with the build, link and upload tests.
Many thanks to Mike!
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy ;)
Hi Avenue33,
thanks for this development, I still have problems creating index and by trying to understand found that in the step1.mk file you also exclude OneWire :
# List of sub-paths to be excluded
#
EXCLUDE_NAMES = Example example Examples examples Archive archive Archives archives Documentation documentation Reference reference
EXCLUDE_NAMES += ArduinoTestSuite OneWire
EXCLUDE_NAMES += $(EXCLUDE_LIBS)
EXCLUDE_LIST = $(addprefix %,$(EXCLUDE_NAMES))
Any special reason for this ?
Thanks !
Yes, the OneWire library used to be incompatible with the chipKIT MPIDE IDE.
Just remove OneWire from step1.mk file.
New place for excluding libraries is the makefile file:
# List the libraries to be excluded
# For example, WiFi may crash on Arduino 1.0.2
# For example, Esplora may crash on Arduino 1.0.3
# For example, Firmata may crash on Teensy 3.0
# For example, OneWire may crash on MPIDE 0023
#
EXCLUDE_LIBS = Firmata WiFi Esplora OneWire
The template has been updated accordingly.
Please find a new release of embedXcode
embedXcode • Feb 02, 2013 release 27 • Support for Teensyduino release 1.12
Teensyduino for Teensy 3.0 is no longer in beta; the plug-in for Arduino has reached release 1.12 (http://forum.pjrc.com/threads/17592-Teensyduino-1-12-Released) and is based on gcc 4.7.2.
As always,
• Website: http://embedxcode.weebly.com (http://embedxcode.weebly.com)
• Download: http://embedxcode.weebly.com/download (http://embedxcode.weebly.com/download)
• User guide: http://embedxcode.weebly.com/tutorial (http://embedxcode.weebly.com/tutorial)
Enjoy ;)
Hello people, I'm new in this forum and also English isn't my first language so forgive me if I have some mistakes.
I'm having problems with Xcode and user libraries, I follow every process of the manual( obviously I forgot something) but I couldn't make it build all.
It's a small code that only uses the IRremote library just that.
I was able to build all without the library, and then I added the files in the a sketchbook tree node on Xcode also in the index for code sensing(witch is working) but when I build all, Xcode complains aboud not finding the ir methods.
I notice also something strange, in the arduino IDE we have the path library, but in embedxcode you have used Libraries, since Mac OS is caps oriented this has some issue, or I'm wrong?
Thanks in advance
Eduardo
¡Bienvenido!
Where the IR library is on the hard disk? The tree on the left pane is part link, part real files.
- Have you run the Arduino IDE once and declared the SketchBook folder? --see §1.2. Install the IDEs of the Boards
- Is the IR library inside the library folder inside the sketchbook folder? --see §3.3. Add User's Libraries
- Is the IR library a user library --you've wrote it-- or a standard library --supplied with Arduino? --see §5.2 Manage the Libraries for Compilation
If you new to the Arduino world, I'd recommend to go step-by-step and start with the standard Arduino IDE before switching to Xcode, which is a very rich IDE.
Hi thanks for quick response.
1 yes I have worked with the arduino IDE and was able to compile everything and upload all the sketches to the board.
2 yes, the only think I have noticed is that, I'm using IDE 1.0.3, and inside my sketchbook folder (/Users/eduardo/Arduino) has the libraries folder, but low caps.
on the documentation was Libraries
3 the library does not matter, I pickup just for try the NewPing library (a standard library)
4 No I'm not, even with Xcode I'm not a newbie, I just dont know it very well...
The errors are these one:
In file included from main.cpp:51:
NewPing.ino:65: error: 'NewPing' does not name a type
NewPing.ino: In function 'void loop()':
NewPing.ino:73: error: 'sonar' was not declared in this scope
NewPing.ino:75: error: 'US_ROUNDTRIP_CM' was not declared in this scope
make: *** [Builds/main.o] Error 1
Hi to all again,
I did a search in all project, with Libraries and change everything to libraries.
Well this is sort a desperate measure, but it worked, I don't know, how do you are able to compile your libs like this, but it worked.
Everything is build and ok...
If anyone has an idea, I like to hear....
Hi,
I think this is a problem, or by my IDE in installation or the embedeXcode. I had mapped all the files that are required to everything build ok. Plus, I made a Duemilanove configuration.
If you guys want the codes, please ask.
Hi to all again,
I did a search in all project, with Libraries and change everything to libraries.
Well this is sort a desperate measure, but it worked, I don't know, how do you are able to compile your libs like this, but it worked.
Everything is build and ok...
If anyone has an idea, I like to hear....
Mac OS X offers two kinds of file format: case-sensitive and not case-sensitive. What's your configuration?
On my MacBook, the folder for the user libraries is called ~/Documents/Projets/Arduino/Libraries , hence the Libraries with capital L.
Mine is case-sensitive,
Interesting in your configuration you have a library directory with a capital L, in mine (the default from arduino IDE) is l.
Is this a configuration on the IDE? Maybe integrate this is a good idea.
Thanks
What are the advantages of having a case-sensitive file system?
I really don't have an answer for that, but is an option and I think there are some users using this out there...
Thanks
Please find a new release of embedXcode:
embedXcode • Feb 28, 2013 release 29 • Support for Digispark (build and link tested)
The Digispark by Digistump is an incredibly small --0,69x0,75" or 17,5x19,0mm only-- but fully featured board --with I²C, SPI, ADC or PWM!
(http://www.weebly.com/uploads/1/1/6/2/11624344/593967221.jpg)
More tests are required for the upload as the process is not standard.
(http://www.weebly.com/uploads/1/1/6/2/11624344/140781_orig.png)
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release of embedXcode:
embedXcode • Mar, 05 2013 release 30 • Full support for Digispark
embedXcode • Mar, 05 2013 release 31 • Automatic project configuration
Thanks to the Digispark boards received from Digistump, I ran the tests for the upload. build, link and upload work fine now.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/477479_orig.jpg) Enjoy the power of a square inch!
The automatic project configuration procedure saves a lot of time. Before, a newly created project used to require many manual procedures, like declaring the .ino or .pde sketch file as C++ code file for colour syntaxing, or defining the directories for click-to-error, ... Now, you need just a click!
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/8069618_orig.jpg)
This new automatic project configuration (http://embedxcode.weebly.com/automatic-project-configuration.html) works for all the supported platforms: Arduino, chipKIT, Digispark, LaunchPad MSP430 + FRAM + Stellaris, Maple and Wiring.
As always:
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
I'm presently working on extending the automatic project configuration (http://embedxcode.weebly.com/1/post/2013/03/embedxcode-working-on-a-fully-automatic-project-configuration.html) to include all the manual procedures, except for adding the user's libraries.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/5517385_orig.png)
The major challenge is to understand how Xcode stores and structures the configuration of a project.
Stay tuned :)
Hi,
I've exactly the same problem as eduardorcosta.
I've Arduino IDE 1.5 on Mountain Lion (case-insensitive system). It automatically create a folder "libraries" (with a lower L).
I installed embedxcode exactly like in the documentation. I can build and upload to my Arduino board.
But when I need a local library, it didn't work. When I build I become the following errors:
error: ble.h: No such file or directory
error: 'ble_begin' was not declared in this scope
To add libraries, I follow the guide at § 3.2.3.
If I try to change the Sketchbook libraries folder to "Libraries" (with upper L), the Arduino IDE doesn't compile anymore, and under xcode I become the following errors when compiling:
(all error for the app.cpp file,a file from the BLE library)
/Documents/Arduino/Libraries/BLE/app.cpp:17:22: Services.h: No such file or directory
/Documents/Arduino/Libraries/BLE/app.cpp:18:21: error: lib_aci.h: No such file or directory
/Documents/Arduino/Libraries/BLE/app.cpp:46: error: 'lib_aci_device_wakeup' was not declared in this scope
/Documents/Arduino/Libraries/BLE/app.cpp:56: 'lib_aci_send_setup_msg' was not declared in this scope
and 11 more errors…
It would be really great if somebody knows a solution for this problem.
Thanks a lot!
Kass
You could try with this set of makefiles where all /Libraries
have been replaced by /libraries
obviously with libraries in the sketchbook folder.
One question for my understanding: what is the rationale for case-sensitive file system?
I hope this helps :)
Hey Avenue33,
thanx for your very quick answer !
Unfortunately the change of the makefile didn't help me. When I build I get the same error as when I tried to change the sketchbook libraries folder to Libraries (in the finder). :(
In my first post, I wrote that about the case insentive stuff because you asked eduardorcosta if he uses a case sensitive file format.
Please find a new release of embedXcode:
embedXcode • Mar 15, 2013 release 32 • Full automatic project configuration
This new release enhances the automatic project configuration (http://embedxcode.weebly.com/automatic-project-configuration.html) and includes:
• Declare .pde or .ino file as C++ code for code-sense, and
• Define the directory for the targets,
• Add all the cores, variants and libraries from the installed platforms under the group Resources,
• Declare all the files of the project for code-sense.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6574469_orig.png) (http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9554119_orig.png)
Major impact: project are much lighter, typically 2 MB instead of 16 MB!
The only remaining manual procedure is adding user's libraries.
The User Manual (http://embedxcode.weebly.com/tutorial) has been updated accordingly.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release
embedXcode • Mar 15, 2013 release 33 • Patch for libraries Libraries in sketchbook
This release fixes an annoying bug on the the folder name for the user's libraries.
The folder with the user's libraries in the sketchbook can now be spelled with or without a capital L.
Both libraries and Libraries names are valid.
Thanks Kass for reporting the issue!
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
I've update the most recent embedXcode ,but when the project is created,the files in Configurations become blank. I've installed manually, but it does't work either.
Can you tell me how to deal with it?
I got it, change the "Config" to "Configurations" in the templates ....
The new release
embedXcode • Mar 18, 2013 release 33.2 • Sub-folders in Libraries
fixes a number of issues, including the one you mention.
Learn more (http://embedxcode.weebly.com/1/post/2013/03/embedxcode-improved-sub-folders-in-libraries.html).
Please find a new release of embedXcode:
embedXcode • Mar 21, 2013 release 34 • Support for Digispark release 1.04
embedXcode • Mar 26, 2013 release 35 • Support for OS X 10.7 Lion and 10.8 Mountain Lion
embedXcode now supports the new release of the IDE for Digispark, which is bundled with the Arduino 1.0.4 IDE.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/287952.png)
The automatic project configuration tool runs now on both OS X Mountain Lion aka. 10.8 and OS X Lion aka. 10.7.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release of embedXcode
embedXcode • Mar 27, 2013 release 36 • Configurations folder name fixed
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy
Please find a new version of mbedXcode
embedXcode • Apr 05, 2013 release 36 • Stability enhancement with revised main()
The revised main() function includes now copies of the main files from each platform and architecture. An issue with arm-none-eabi-ar release 4.7.1 has also been fixed. Teensy 3 and LaunchPad Stellaris were concerned.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
I'd like to try using XCode to program my Arduinos instead of the Arduino IDE. Here's what I have installed
Mac OSX 10.7.5
Arduini IDE 1.04
Xcode 4.6.1
EmbedXcocd Mar 27 Release 36
Doxygen 1.8.3.1
Graphviz 2.30
Note: My Arduino sketches are not in the default location, they are in /volumes/srgshare/Arduino Sketches/
My libraries are in /volumes/srgshare/Arduino Sketches/libraries/
I followed your installation instructions and then tried to create a new project. When I get to step 3.1.1 and run the Build procedure it fails with these errors
Shell Script Invocation Error
/volumes/srgshare/Arduino: No such file or directory
Shell Script Invocation Error
Sketches/test1/test1/Makefiles/step1.mk: No such file or directory
In your user manual, I can't get any of the hyperlinks to work.
Also, when you come out with new versions, how do I install them? Do I just double click on the package?
Thank you for your message and questions.
Note: My Arduino sketches are not in the default location, they are in /volumes/srgshare/Arduino Sketches/
My libraries are in /volumes/srgshare/Arduino Sketches/libraries/
I followed your installation instructions and then tried to create a new project.
Just to be sure, have you run the Arduino IDE just once and declared the sketchbook folder in Arduino > Preferences?
When I get to step 3.1.1 and run the Build procedure it fails with these errors
Shell Script Invocation Error
/volumes/srgshare/Arduino: No such file or directory
Shell Script Invocation Error
Sketches/test1/test1/Makefiles/step1.mk: No such file or directory
What files are in the folder? The Arduino.app should be in the default applications folder, i.e. /Applications/Arduino.app
In your user manual, I can't get any of the hyperlinks to work.
Thank you for noticing me. My website host doesn't allow files larger than 5 MB. The PDF is 10 MB so I have to compress it. Unfortunately, the compression removes the links.
Also, when you come out with new versions, how do I install them? Do I just double click on the package?
Yes, each release has a number so OS X can manage the updates.
Please let me know.
Note: My Arduino sketches are not in the default location, they are in /volumes/srgshare/Arduino Sketches/
My libraries are in /volumes/srgshare/Arduino Sketches/libraries/
I followed your installation instructions and then tried to create a new project.
Just to be sure, have you run the Arduino IDE just once and declared the sketchbook folder in Arduino > Preferences?
Yes. Before I installed embedXcode, I installed the latest version of Arduino IDE ran it and changed the default sketch directory in preferences.
When I get to step 3.1.1 and run the Build procedure it fails with these errors
Shell Script Invocation Error
/volumes/srgshare/Arduino: No such file or directory
Shell Script Invocation Error
Sketches/test1/test1/Makefiles/step1.mk: No such file or directory
What files are in the folder? The Arduino.app should be in the default applications folder, i.e. /Applications/Arduino.app
I'm not sure which directory your are referring too. This directory doesn't exist: "/volumes/srgshare/Arduino". I do have a directory called "/volumes/srgshare/Arduino Sketches". Could the space between "Arduino" and "Sketches" be causing a problem?
My Arduino.app file is located in my Applications directory, as is xcode.app
In your user manual, I can't get any of the hyperlinks to work.
Thank you for noticing me. My website host doesn't allow files larger than 5 MB. The PDF is 10 MB so I have to compress it. Unfortunately, the compression removes the links.
Can you make the uncompressed version available somewhere else, like slideshare.net?
Could the space between "Arduino" and "Sketches" be causing a problem?
Yes, I think so, as the tools used in the makefiles doesn't like spaces in folders and files names.
Can you make the uncompressed version available somewhere else, like slideshare.net?
Thank you for pointing me at slideshare.net. See http://us.slideshare.net/rei_vilo/embed-xcode-usermanual
I'm also considering another solution, publishing an ebook.
Yes, I think so, as the tools used in the makefiles doesn't like spaces in folders and files names.
I'll rename the directory to Arduino_Sketches to get rid of the space. After I do this, do I need to change any settings or reinstall embedXcode?
I don't think so, as the Xcode project is self-contained in its folder.
I'm trying to create my first project (no coding yet). I followed the example in the instructions. After I do step 3.1.1 where it builds the project (I guess that's what it's doing). I get a bunch of error in the included Arduino (1.0.4) libraries. I'm getting errors in WString.h, Arduino.h and stdlib.h. See attached screenshot. I just installed the latest version of embedXcode. What should I do?
Hi!
Really, I don't understand what's happening. This is the very first time so many issues are reported.
Let's try something: as per §5.2. Manage the Libraries for Compilation, please edit the main makefile and change the line
APP_LIBS_LIST =
for
APP_LIBS_LIST = 0
Hi!
Really, I don't understand what's happening. This is the very first time so many issues are reported.
Let's try something: as per §5.2. Manage the Libraries for Compilation, please edit the main makefile and change the line
APP_LIBS_LIST =
for
APP_LIBS_LIST = 0
I tried that, then I started getting errors in other libraries. First I got errors in a clock.h library I have. So I moved it out of the \libraries folder. Then I rebuilt and started getting error in DS1307RTC library, so I moved that out of the library folder. Then I got errors in ERxPachube library. I moved that out of the library folder. Then I got errors on WString.h, Arduino.h and stdlib.h. All these libraries work in the Arduino IDE. See screenshots.
Some errors are byte does not name a type
Just to see if the problem was with the latest Arduino IDE (1.0.4), I deleted Arduino.app and installed 1.0.2. I rebuilt in xcode and got the same errors.
So I have a little more info, maybe it will help. I removed all the libraries from my \library\ folder and tried to rebuild my project xcode and it worked, no errors. Then I started adding libraries back, and re-built. Sometimes it build successfully, and sometimes I got errors. For example, when I added a twitter.h library in, I got errors (see screenshot). Another library that gave me errors was EthernetDHCP (https://github.com/colagrosso/ciao/tree/master/Arduino/libraries/EthernetDHCP).
Thank you for your investigation.
Does the header of the libraries always include the statement
#include "Arduino.h
I looked at 3 libraries that had errors and none of them have arduino.h
As recommended at Writing a Library for Arduino (http://arduino.cc/en/Hacking/LibraryTutorial),
You need a couple of other things in the header file. One is an #include statement that gives you access to the standard types and constants of the Arduino language (this is automatically added to normal sketches, but not to libraries). It looks like this (and goes above the class definition given previously):
#include "Arduino.h"
Have you followed the procedure detailed in section 7.2. Solution to Most Common Issues
Q: Does the sketch compiles normally on the standard IDE?
A: If the sketch doesn't compile on the standard IDE, then the error isn't generated by Xcode or embedXcode alone.
I'll try including Arduino.h to the libraries and see if that helps. If that's the problem I would think lots of other people would have come across this before me.
I do check to see if the sketch compiles in the Arduino IDE. Right now my sketch is empty, I'm just trying to create an empty project.
For your user manual in slideshere.net, the hyperlinks to outside sites work, but the links to other sections in the pdf do not. Can you enable the save option so users like me can just download the PDF from slideshare.
Thanks for your help with getting this to work for me. I hope I get it figured out, I look forward to using XCode with my Arduino.
I still haven't figured out all my compile error problems on a new install; maybe #include "Arduino.h" will fix it. But I can compile okay if I remove all the libraries from my library folder, which I've done for the time being. But I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.
Thank you for answering this two questions survey (http://rei-vilo.polldaddy.com/s/using-embedxcode-with).
The answers will help me to focus on the most popular platforms.
Survey: http://rei-vilo.polldaddy.com/s/using-embedxcode-with
I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.
Any suggestions for me? I'd really like to get this working. It seems like the Automatic Procedure isn't running.
I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.
Any suggestions for me? I'd really like to get this working. It seems like the Automatic Procedure isn't running.
Could you please send me a copy of the log navigator when you launch the Build? Feel free to use the contact form at http://embedxcode.weebly.com/contact.html.
What's the log navigator?
What's the log navigator?
Please find the screen capture attached.
Sorry, but I can't provide support for Xcode.
I strongly recommend you to refer to the book
Xcode 4 Unleashed by Fritz F. Anderson I purchased thanks to contributions (http://embedxcode.weebly.com/contact.html).
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
If I can get this working, I'll definitely get the book and learn xcode. Arduinos are the only thing I program, so I don't want to invest time in learning xcode if I can't get this working.
Attached is a screenshot of the log and also I cut and pasted it into a text file.
The build log you sent me is successful.
As detailed in §
3.1. Automatic Procedure,
However, as the automatic procedure can only be launched once, they are detailed in the next section.
Please create a new project and send me the build log of the very first build.
Please create a new project and send me the build log of the very first build.
See attached
The light is green so compilation is successful.
The light is green so compilation is successful.
I know, but EmbedXCode didn't do any of the stuff described in step 3.1.2. The automatic procedure is supposed to prepare the project by adding setting the file type for .ino files to C++, setting click to error , adding core libraries etc. It didn't do any of those things.
Ok. Create a new project and then go inside
folder_for_Xcode_projects/embed1/embed1/Utilities
and check if embedXcode_prepare is inside.
Once you have launched the first compilation, embedXcode_prepare is used and then deleted.
Ok. Create a new project and then go inside
folder_for_Xcode_projects/embed1/embed1/Utilities
and check if embedXcode_prepare is inside.
Once you have launched the first compilation, embedXcode_prepare is used and then deleted.
I created Test8 and I do see embedXcode_prepare. It's also in my previous project (test7), but it's colored red, maybe that means it's deleted. Attached are screen shots for both.
For test8, could you please launch Build and send me the history log.
For test8, could you please launch Build and send me the history log.
see attached
At last, after 5 days of research and endless posts, the key element is
/bin/sh: line 1: 38998 Segmentation fault: 11 Utilities/embedXcode_prepare /Users/Scott/Documents/Arduino_OLD/Test8/Test8.xcodeproj
I guess this was caused by embedXcode_prepare running on OS X 10.7.
Now, I've compiled embedXcode_prepare specifically for OS X 10.7 and released a new version of embedXcode
embedXcode • Apr 08, 2013 release 38 • embedXcode_prepare for OS X 10.7
I tested it successfully on my OS X 10.8 Mac.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
At last, after 5 days of research and endless posts, the key element is
/bin/sh: line 1: 38998 Segmentation fault: 11 Utilities/embedXcode_prepare /Users/Scott/Documents/Arduino_OLD/Test8/Test8.xcodeproj
I guess this was caused by embedXcode_prepare running on OS X 10.7.
Now, I've compiled embedXcode_prepare specifically for OS X 10.7 and released a new version of embedXcode
embedXcode • Apr 08, 2013 release 38 • embedXcode_prepare for OS X 10.7
I tested it successfully on my OS X 10.8 Mac.
It's working now, thanks for the update!! Now I can get back to my original problem where the build is failing when I have user libraries installed. I'm hoping #include "Arduino.h" fixes that issue.
Now that Xcode compiles without errors I've started adding my user libraries back to my \library folder. Most of the libraries compile fine, but not all. The first one I'm trying to tackle is DallasTemperature.h. Arduino.h is already included, so that shouldn't be the problem. The library works fine in Arduino IDE 1.0.4, I compiled a couple of the example sketches without errors in the Arduino IDE.
Attached are some of the errors and the library file.
Now that Xcode compiles without errors I've started adding my user libraries back to my \library folder. Most of the libraries compile fine, but not all. The first one I'm trying to tackle is DallasTemperature.h. Arduino.h is already included, so that shouldn't be the problem. The library works fine in Arduino IDE 1.0.4, I compiled a couple of the example sketches without errors in the Arduino IDE.
Until I can figure out why the DallasTemperature library won't compile on xcode I'm trying to exclude it, I added it the the makefile:
EXCLUDE_LIBS = Firmata WiFi Esplora OneWire DallasTemperature
But that didn't help, xcode still gives me the same errors when I run Build.
I'm trying to follow step 3.2.2 (Declare Sources for Code Sense) in the manual, but the screenshots are really blurry and I can't figure out what to do. I attached a screen shot of what I think is the target index and build phases pane. But I don't see an add items button There is an add Target, but that doesn't seem to be the same. I Googled around for help, but didn't find anything.
I strongly recommend you to refer to the book Xcode 4 Unleashed by Fritz F. Anderson
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
I just got the Kindle version.
Now that Xcode compiles without errors I've started adding my user libraries back to my \library folder. Most of the libraries compile fine, but not all. The first one I'm trying to tackle is DallasTemperature.h. Arduino.h is already included, so that shouldn't be the problem. The library works fine in Arduino IDE 1.0.4, I compiled a couple of the example sketches without errors in the Arduino IDE.
I figured out how to solve this compile problem. In Makefile I changed
EXCLUDE_LIBS = Firmata WiFi Esplora OneWire
to
EXCLUDE_LIBS = Firmata WiFi Esplora
I'm trying to follow step 3.2.2 (Declare Sources for Code Sense) in the manual, but the screenshots are really blurry and I can't figure out what to do. I attached a screen shot of what I think is the target index and build phases pane. But I don't see an add items button There is an add Target, but that doesn't seem to be the same. I Googled around for help, but didn't find anything.
I figured it out. I don't know why I didn't see the + at the bottom of the list the first time.
Code-Sense isn't working for basic Arduino keywords like pinMode() and delay() . I re-indexed as described in step 4.6, but still no luck.
I'm using version the latest version of embedXcode.
Each release of Xcode changes the way code-sense works.
I suggest to get rid of the whole core library for code-sense block and keep only
#include "Arduino.h"
Also, launch one compilation.
Each release of Xcode changes the way code-sense works.
I suggest to get rid of the whole core library for code-sense block and keep only
#include "Arduino.h"
Also, launch one compilation.
No luck, here's what I did.
- Changed INO file so only had #include "Arduino.h" in the Code-Sense block
- Saved and closed the project
- Went to organizer folder and deleted Derived Data
- Opened my project
- The project re-indexed itself
- Ran Build
Attached is a screenshot of what the code looks like after doing this.
Edit: The auto-complete does seem to work, it's just the colors don't match what I see in your manual.
The procedure you've followed is basically this described on section 4.6 Re-Index the Keywords for Code-Sense.
Strange enough, code-sense, auto-completion and arguments list are displayed usually without problem in my laptop. Now, it isn't a 100% hit and Xcode dedicated forums recommend the procedure you've followed and I've mentioned in the user manual.
Unfortunately, as code-sense implementation changes with every Xcode release and as Apple is more than secretive about the customisation of Xcode, I'm sorry I can't be of much help.
The procedure you've followed is basically this described on section 4.6 Re-Index the Keywords for Code-Sense.
Strange enough, code-sense, auto-completion and arguments list are displayed usually without problem in my laptop. Now, it isn't a 100% hit and Xcode dedicated forums recommend the procedure you've followed and I've
mentioned in the user manual.
Unfortunately, as code-sense implementation changes with every Xcode release and as Apple is more than secretive about the customisation of Xcode, I'm sorry I can't be of much help.
I think code-sense is working but the colors are different from your manual. Or maybe it's partially working.
Can you give me links to the xcode forums you like to go to?
I have another smaller issue, not a show stopper. When I create a new project, xcode does no do a reindex on it's own. But when I go do my first build and where embedxcode does it's thing, the Build is cancelled because the index starts. I did notice the the embedxcode changes all seem to be there, so that's good. Once the indexing is done, if I start another Build, it finishes okay. Is there a way for me to make xcode do the index so it doesn't just start it on it's own and cancel my first Build. I guess I could follow the code-sense same re-indexing procedure, but I'm wondering if there is something more direct. I tried Run > Index, but that didn't work, I guess that's for something else.
I think code-sense is working but the colors are different from your manual. Or maybe it's partially working.
Yes, the colours may vary, due to different available configurations --see attached screen-shot-- and due to different interpretation of the functions as Project Class Names or Other Class Names, Project Function and Method Names or Other Function and Method Names.
Can you give me links to the xcode forums you like to go to?
Sure, http://stackoverflow.com/questions/tagged/xcode and http://apple.stackexchange.com
I have another smaller issue, not a show stopper. When I create a new project, xcode does no do a reindex on it's own. But when I go do my first build and where embedxcode does it's thing, the Build is cancelled because the index starts. I did notice the the embedxcode changes all seem to be there, so that's good. Once the indexing is done, if I start another Build, it finishes okay. Is there a way for me to make xcode do the index so it doesn't just start it on it's own and cancel my first Build. I guess I could follow the code-sense same re-indexing procedure, but I'm wondering if there is something more direct.
On embedXcode releases up to 40, the preparation of the project is done the first time compilation is asked for, but actually before the compilation really starts. As Xcode tries to do two thinks at the same time, it realises the project has been changed by the preparation and thus stops the compilation.
On embedXcode releases 41 and on, the preparation of the project is still done the first time compilation is asked for, but this time after compilation is completed, avoiding conflicts of multi-tasking.
The preparation provides Xcode with all the references required for building the index, so code-sense, auto-completion and argument list can work.
I tried Run > Index, but that didn't work, I guess that's for something else.
As explained in section
5. Build and Upload the Project -- 5.1. Select a Target,
Index is a proxy target solely used for code-sense. Do not launch it.
On embedXcode releases up to 40, the preparation of the project is done the first time compilation is asked for, but actually before the compilation really starts. As Xcode tries to do two thinks at the same time, it realises the project has been changed by the preparation and thus stops the compilation.
On embedXcode releases 41 and on, the preparation of the project is still done the first time compilation is asked for, but this time after compilation is completed, avoiding conflicts of multi-tasking.
Isn't release 38 (April 8) the latest release?
Ref: http://arduino.cc/forum/index.php/topic,49956.msg1192390.html#msg1192390
Please find a new release of embedXcode
embedXcode • Apr 12, 2013 release 39 • Arduino architecture new variables
embedXcode • Apr 13, 2013 release 40 • Arduino Duemilanove configuration file
embedXcode • Apr 16, 2013 release 41 • Estimated RAM usage
Arduino 1.5 new compilation variables are now included.
Estimated RAM usage and total RAM are displayed after compilation.
---- Size ----
Binary sketch size: 654 bytes (of a 16384 byte maximum)
Estimated SRAM used: 8 bytes (of a 512 byte maximum)
==== Make done ====
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/2461115_orig.png)
Based on the results of the survey (http://embedxcode.weebly.com/1/post/2013/04/embedxcode-surveyusing-embedxcode-with1.html), support for chipKIT, Maple and Wiring is put on hold until new boards or new versions of the IDEs are released.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
I just installed release 41. I created a new project, but the embedxcode script isn't doing anything: core libraries are not added, file type is not changed etc. The build says it's successful, but I get these errors:
==== Build done ====
/bin/sh: Utilities/embedXcode_prepare: Permission denied
Showing first 200 notices only
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make emitted errors but did not return a nonzero exit code to indicate failure
I have Xcode 4.6.1 on Mac 10.7.5
I attached the log.
Strange, I haven't modified the embedXcode_prepare utility, built as 10.7 compatible.
Please try with release 42 just uploaded.
Strange, I haven't modified the embedXcode_prepare utility, built as 10.7 compatible.
Please try with release 42 just uploaded.
I installed r42 and still have the problem, but only when the new project is on a network drive (connected as WebDAV. When I create a project on the local drive it's fine. My computer has full rights to the network drive. Any suggestions?
Hi!
Have you tried Repair permissions with the disk utility?
Have you tried Repair permissions with the disk utility?
Disk Utility only lists my local disks, not network drives.
Can you give me some information as to what embedxcode is doing regarding this error?
==== Build done ====
/bin/sh: Utilities/embedXcode_prepare: Permission denied
Showing first 200 notices only
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make emitted errors but did not return a nonzero exit code to indicate failure
Maybe that can help me figure out why it won't run when creating a new project on my network drive.
embedXcode only displays the error message provided by the system.
It seems the network connection prevents the utility from running successfully.
You can try to run embedxcode_prepare from the terminal window.
You can try to run embedxcode_prepare from the terminal window.
How do I do that?
You can try to run embedxcode_prepare from the terminal window.
How do I do that?
- Create a new embedXcode project with Xcode, e.g. embed1
- Close Xcode
- Launch Terminal
- Look for the full path of embedXcode_prepare at
/Users/home/Documents/Xcode/embed1/embed1/Utilities/embedXcode_prepare
- Look for the full path of embed1.xcproject at
/Users/home/Documents/Xcode/embed1/embed1.xcodeproj
- Type in Terminal the command
/Users/home/Documents/Xcode/embed1/embed1/Utilities/embedXcode_prepare /Users/home/Documents/Xcode/embed1/embed1.xcodeproj
home is the folder with your name.
You can try to run embedxcode_prepare from the terminal window.
How do I do that?
- Create a new embedXcode project with Xcode, e.g. embed1
- Close Xcode
- Launch Terminal
- Look for the full path of embedXcode_prepare at
/Users/home/Documents/Xcode/embed1/embed1/Utilities/embedXcode_prepare
- Look for the full path of embed1.xcproject at
/Users/home/Documents/Xcode/embed1/embed1.xcodeproj
- Type in Terminal the command
/Users/home/Documents/Xcode/embed1/embed1/Utilities/embedXcode_prepare /Users/home/Documents/Xcode/embed1/embed1.xcodeproj
home is the folder with your name.
I get permission denied:
mac_eth1:Utilities Scott$ /Volumes/srgshare/Arduino_Sketches/Test_webdav/Test_webdav/Utilities/embedXcode_prepare /Volumes/srgshare/Arduino_Sketches/Test_webdav/Test_webdav.xcodeproj
-bash: /Volumes/srgshare/Arduino_Sketches/Test_webdav/Test_webdav/Utilities/embedXcode_prepare: Permission denied
mac_eth1:Utilities Scott$
Unfortunately, I'm afraid I won't be of much help on this OS X-related issue. File permissions are always tricky,me specially in shared volumes.
You could try sudo chmod -R 777 /Volumes/srgshare/Arduino_Sketches/Test_webdav
Unfortunately, I'm afraid I won't be of much help on this OS X-related issue. File permissions are always tricky,me specially in shared volumes.
You could try sudo chmod -R 777 /Volumes/srgshare/Arduino_Sketches/Test_webdav
That didn't work. I'm using jungledisk software to create the network drive. I'll see if their tech support can help.
Can you try on your Mac hard disk instead?
Can you try on your Mac hard disk instead?
Running embedxcode from terminal works if the project is on my local hard drive.
I'm getting a couple errors after my first Build on a new project. The build is successful, so I don't know if these errors are important are not. They are:
/bin/sh: /usr/local/bin/wget: No such file or directory
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make emitted errors but did not return a nonzero exit code to indicate failure
See attached screenshots and log
I'm getting a couple errors after my first Build on a new project. The build is successful, so I don't know if these errors are important are not. They are:
/bin/sh: /usr/local/bin/wget: No such file or directory
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make emitted errors but did not return a nonzero exit code to indicate failure
No, it isn't a problem. embedXcode is just checking the release number.
I'm getting a couple errors after my first Build on a new project. The build is successful, so I don't know if these errors are important are not. They are:
/bin/sh: /usr/local/bin/wget: No such file or directory
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make emitted errors but did not return a nonzero exit code to indicate failure
No, it isn't a problem. embedXcode is just checking the release number.
What's strange is I just ran Build on a project I created a couple days ago, I think it was with embedXcode Release 39, and I don't get those errors. Any idea why?
The new release of the template only applies for the new projects.
You need to copy-paste the makefiles, About and Utilities folder from the template into your existing project.
Please find a new release of embedXcode
embedXcode • Apr 19, 2013 release 42 • Release number check
During the first compilation of the project, a dialog box may prompt if a new release of embedXcode is available.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/5386828_orig.png)
The dialog box closes automatically after 5 seconds. Click on Go to Download to download the new release or OK to ignore it.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Isn't this release 43, not 42.
I just downloaded the latest release, which I'm pretty sure is r45. I created a new project on my local hard drive. When I run Build, it says it's successful, but I get an error that says" Workspace Integrity. Couldn't load project" and the project is not loaded. See screenshots.
Also, can I get previous embedxcode.pkg files on github (https://github.com/rei-vilo/embedXcode)? If so, where?
This error arises when another process is running when you launch the first compilation with the preparation of the code.
3.1.1. Launch the Procedure
To proceed with the automatic configuration procedure,
• Select any target, as Build or Make.
• Check no other process is running on Xcode, like indexing.
• Click on Run to launch it.
GitHub has the history of all the versions. However, the download section only has the latest release.
This error arises when another process is running when you launch the first compilation with the preparation of the code.
3.1.1. Launch the Procedure
To proceed with the automatic configuration procedure,
• Select any target, as Build or Make.
• Check no other process is running on Xcode, like indexing.
• Click on Run to launch it.
I just tried it again and I have the same problem. No other processes were running.
Is it the same error you were experiencing before due to a volume on a network?
Is it the same error you were experiencing before due to a volume on a network?
No. Plus I'm doing this on my local disk
This error arises when another process is running, as indexing in Xcode, when you launch the first compilation with the preparation of the code.
The project preparation is now done after the end of the first compilation, to avoid such a conflict.
This error arises when another process is running, as indexing in Xcode, when you launch the first compilation with the preparation of the code.
The project preparation is now done after the end of the first compilation, to avoid such a conflict.
But there isn't another process running when I start my build (according to the little window at the top-center of my xcode screen). Here's what I'm doing, tell me if I'm doing something wrong.
- Create a new project on my local hard drive (not my network drive)
- I make a small change to makefile - for excluded libraries, I replace OneWire with panstamp (because panstamp.h give me build errors)
- I make sure the window at the top center of xcode doesn't show anything processing.
- I select Build as my target and then click Run button
And I have the problem I mentioned where the project isn't loaded and won't load when I try to re-open.
I've even tried waiting a few minutes before doing my build just to make sure, even though xcode isn't showing anything processing.
When I do the exact same thing with release 42, it works fine. I've even reinstalled release 42, made sure it worked then installed release 45 again and I get this problem.
The procedure you're following is the right one.
I don't understand what's happening as I'm unable to replicate the problem on my MacBook.
Other users with chipKIT boards run the first Build successfully.
The issue you describe is related to the corruption of the project.pbxproj file. The project.pbxproj file becomes corrupt when two processes are dealing with it.
As it is not another process from Xcode so it should be an external process. Do you have an anti-virus installed (I do) and some SSD caching (I don't)?
Do you have an anti-virus installed (I do) and some SSD caching (I don't)?
No antivirus. I don't have an SSD drive.
Can you tell me exactly where on github you have release 43 & 44 .pkg files. I looked and couldn't find them. Maybe it would help if we knew which release was the first on to give me this problem.
The differences between releases 42 and 45 are:
- wget (42) vs. curl (45)
- check release every time (42) vs. check release only once
- specific MPIDE handling (45)
Should I be able to replicate the same issue, I would understand what's going on and work on a fix.
Can you tell me exactly where on github you have release 43 & 44 .pkg files. I looked and couldn't find them. Maybe it would help if we knew which release was the first on to give me this problem.
The log with all changes is available at http://github.com/rei-vilo/embedXcode/commits/master
Can you tell me exactly where on github you have release 43 & 44 .pkg files. I looked and couldn't find them. Maybe it would help if we knew which release was the first on to give me this problem.
The log with all changes is available at http://github.com/rei-vilo/embedXcode/commits/master
Thanks. I'll go by the dates because I see there are two files for r39 and nothing for r42 and r44.
Can you tell me exactly where on github you have release 43 & 44 .pkg files. I looked and couldn't find them. Maybe it would help if we knew which release was the first on to give me this problem.
The log with all changes is available at http://github.com/rei-vilo/embedXcode/commits/master
How do I find the .pkg file on github? I want to download r43, but all I see is your source files, not a .pkg file.
GitHub only hosts the source code, not the installer package.
I just downloaded the latest release, which I'm pretty sure is r45. I created a new project on my local hard drive. When I run Build, it says it's successful, but I get an error that says" Workspace Integrity. Couldn't load project" and the project is not loaded. See screenshots.
I don't know why, but this problem is gone. New projects are building normally now.
I don't know why, but this problem is gone. New projects are building normally now.
I'm glad it works now. Enjoy embedXcode :)
Hi,
I found I can't build "Marlin" in embedXcode, while in Arduino IDE, it works well. The error code is here
7.2-LINK: .elf < . mega2560 Builds/ .
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -mmcu=atmega2560 -lm -Wl,--gc-sections -Os -o Builds/embeddedcomputing.elf Builds/LocalLibrary.o Builds/main.o Builds/embeddedcomputing.a -lc
Builds/embeddedcomputing.a(MarlinSerial.o): In function `__vector_25':
/Users/my/Documents/Arduino/libraries/Marlin/MarlinSerial.cpp:54: multiple definition of `__vector_25'
Builds/embeddedcomputing.a(HardwareSerial.o):/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/Arduino/HardwareSerial.cpp:118: first defined here
Builds/embeddedcomputing.a(MarlinSerial.o):(.bss.rx_buffer+0x0): multiple definition of `rx_buffer'
Builds/embeddedcomputing.a(HardwareSerial.o):/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/Arduino/HardwareSerial.cpp:113: first defined here
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld: Warning: size of symbol `rx_buffer' changed from 68 in Builds/embeddedcomputing.a(HardwareSerial.o) to 132 in Builds/embeddedcomputing.a(MarlinSerial.o)
make: *** [Builds/embeddedcomputing.elf] Error 1
Marlin rewrites the serial library, which is conflict to HardwareSerial. It's really odd why Arduino can compile it...
How can I deal with it?
If Marlin rewrites HardwareSerial, edit the main makefile
EXCLUDE_LIBS = HardwareSerial
as described in section 5.2.2 Exclude Librairies.
Now, if two libraries define the same constants or variables, conflict is unavoidable.
I have tested it, but it didn't work either. the HardwareSerial.cpp is the core of arduino instead of the library.
It seems MarlinSerial also raises problems here (http://arduino.cc/forum/index.php/topic,124736.0.html), there (http://www.visualmicro.com/forums/YaBB.pl?num=1356976682) and even at GitHub (https://github.com/ErikZalm/Marlin/issues/243).
As far as I understand, your project with the MarlinSerial library does compile with the Arduino IDE. Which release of the Arduino IDE are you using? Which Arduino board are you using?
As a matter of facts, Arduino does a lot of things under the hood. In normal C++, if a library declares a public variable, another library can't declare the same public variable.
Now, as I don't have the code for the MarlinSerial library, I can't be of much help.
Try new release
embedXcode • Apr 26, 2013 release 46 • Excluded libraries from core, application and user
where excluded libraries include all libraries, core, application and user.
I created a project in Xcode and everything works fine. I wanted to open it in the Arduino IDE and compile it, but the problem is since main.cpp is in the same directory as my .ino file, Arduino IDE opens up main.cpp as as tab. When I try to compile I get an error because main.cpp isn't needed by the Arduino IDE. Any suggestion as to getting around this?
I have a library called panstamp.h that won't compile in xcode. The problem is PRR isn't defined. It compiles fine in the Arduino IDE. PRR is defined in Arduino's library iom328p.h
I created a project in Xcode and everything works fine. I wanted to open it in the Arduino IDE and compile it, but the problem is since main.cpp is in the same directory as my .ino file, Arduino IDE opens up main.cpp as as tab. When I try to compile I get an error because main.cpp isn't needed by the Arduino IDE. Any suggestion as to getting around this?
Remember, with Xcode, you're working with true C++. The main.cpp is a standard for C++ but Arduino IDE hides it.
The only solution is to create another folder with the name of the sketch (eg. embed1) and copy the main sketch .ino and all the .h .cpp except main.cpp.
I have a library called panstamp.h that won't compile in xcode. The problem is PRR isn't defined. It compiles fine in the Arduino IDE. PRR is defined in Arduino's library iom328p.h
The iom328p.h file is not an Arduino library. Instead, the iom328p.h file is part of the AVR toolchain. It is located deep under the toolchain folder.
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr/iom328p.h
embedXcode is provided with the path to the tool-chain and no specific operation is carried out concerning one specific file. It is really strange as other files are used.
I need the code of the project to investigate and see what's happening.
embedXcode is provided with the path to the tool-chain and no specific operation is carried out concerning one specific file. It is really strange as other files are used.
I need the code of the project to investigate and see what's happening.
It happens when creating a new project. Just put the panstamp library in your libraries folder and create a new project and you should get the same error. Panstamp library is located here:
http://code.google.com/p/panstamp/downloads/detail?name=panstamp_arduino_1.0.zip&can=2&q=
The only solution is to create another folder with the name of the sketch (eg. embed1) and copy the main sketch .ino and all the .h .cpp except main.cpp.
I noticed if in make.cpp, if I comment out:
//Sketch
#include "MyNewProject.ino"
it will compile in Arduino IDE.
This isn't a big deal to do when I need too, but I'm wondering if I can conditionally include this line with #ifdef or #ifndef. Do you know of a defined constant that would be defined when xcode tries to compile this line, but would not be defined if the Arduino IDE compiled it? Then I could do something like this
#ifdef XCODE_IS_COMPILING
#include "MyNewProject.ino"
#endif
embedXcode is provided with the path to the tool-chain and no specific operation is carried out concerning one specific file. It is really strange as other files are used.
I need the code of the project to investigate and see what's happening.
It happens when creating a new project. Just put the panstamp library in your libraries folder and create a new project and you should get the same error. Panstamp library is located here:
http://code.google.com/p/panstamp/downloads/detail?name=panstamp_arduino_1.0.zip&can=2&q=
panStamp is a whole new platform and is not currently supported by Arduino.
I'd need a couple of these boards so I can investigate and add support to them.
Please find a new release of embedXcode.
embedXcode • Apr 28, 2013 release 47 • Pre-processing variable EMBEDXCODE
A project using embedXcode declares a pre-processing variable, EMBEDXCODE, with the release number as value.
EMBEDXCODE = 47
The variable and the value are passed on to the compiler as a -D variable:
-DEMBEDXCODE=47
This allows you to manage conditional #define and #include based on the IDE you use, either Xcode or one of the large Processing-based family.
The EMBEDXCODE variable is already used in the main.cpp code file so it is only considered when compiled by Xcode, and ignored by the Processing-based IDEs.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
panStamp is a whole new platform and is not currently supported by Arduino.
I'd need a couple of these boards so I can investigate and add support to them.
From the IDE perspective, it's the same as Arduino Pro or Pro Mini (3.3V, 8Mhz) w/ATmega 328. This is the board I select in Arduino IDE when uploading to panstamp
Please find a new release of embedXcode.
embedXcode • Apr 28, 2013 release 47 • Pre-processing variable EMBEDXCODE
A project using embedXcode declares a pre-processing variable, EMBEDXCODE, with the release number as value.
For projects I created with an earlier release of embedxcode, will this pre-processing variable still be set? If not, how do I implement this feature on projects I've already created?
In LocalLibrary.h I have a #include <> for a library in my sketchbook libraries folder, but I get an error that xcode can't find it. If I remove the include from LocalLibrary.h and put it in the .ino file, it works fine. I've spent two hours trying to figure out what I'm doing wrong - reading XCode 4 Unleashed, Google searches, but I can't figure it out. I'll but it's something really simple. Please help.
In LocalLibrary.h I have a #include <> for a library in my sketchbook libraries folder, but I get an error that xcode can't find it. If I remove the include from LocalLibrary.h and put it in the .ino file, it works fine. I've spent two hours trying to figure out what I'm doing wrong - reading XCode 4 Unleashed, Google searches, but I can't figure it out. I'll but it's something really simple. Please help.
It is very hard to help you on a specific project and it is not the purpose of the thread.
Just mention #include <> in both the main sketch and in the library.
Please find a new release of embedXcode.
embedXcode • Apr 28, 2013 release 47 • Pre-processing variable EMBEDXCODE
A project using embedXcode declares a pre-processing variable, EMBEDXCODE, with the release number as value.
For projects I created with an earlier release of embedxcode, will this pre-processing variable still be set? If not, how do I implement this feature on projects I've already created?
embedXcode is a template, not a framework.
So, yes, you need to update all the makefile and the main.cpp files with the new release.
panStamp is a whole new platform and is not currently supported by Arduino.
I'd need a couple of these boards so I can investigate and add support to them.
From the IDE perspective, it's the same as Arduino Pro or Pro Mini (3.3V, 8Mhz) w/ATmega 328. This is the board I select in Arduino IDE when uploading to panstamp
As I've said before, even if the panStamp is considered as a Arduino Pro or Pro Mini (3.3V, 8Mhz) w/ATmega 328 by the Arduino IDE, because it uses some obscure AVR library, it is a new platform for embedXcode.
Sorry, but I can't provide general support for Arduino.
I strongly recommend the book Arduino Cookbook -- Recipes to Begin, Expand, and Enhance Your Projects by Michael Margolis I purchased thanks to contributions (http://embedxcode.weebly.com/contact.html).
It reviews all the basics of Arduino, both hardware and software, and provide very interesting technical tips.
(http://akamaicovers.oreilly.com/images/9780596802486/cat.gif)
It is very hard to help you on a specific project and it is not the purpose of the thread.
Just mention #include <> in both the main sketch and in the library.
I understand. I didn't know if the LocalLibrary files embedxcode created had some special setting or something that would cause my problem. I posted on stack overflow, so hopefully I can get it figured out. I tried your suggestion about about putting #include in the main sketch and library, but that didn't work.
Hi everyone, I've been recently using embedXcode for some Arduino related projects. as you all know that code sense is not an option u can get in the arduino IDE. thats why i was trying to use embedXcode as it gives you the freedom to get the code sense of Xcode along with the other functionalities in Arduino IDE.
Now the problem I'm having is even though the standard C++ codes are recognised by Xcode, it can't yet recognise the Arduino specific codes for example in void loop(){} void is highlighted but not loop. in the same way while typing pinMo.. it's not showing any suggestions. As it was mentioned in the embedXcode tutorial, after running the automatic project configuration the code sense should work. But I couldn't figure out any solution. Am I doing something wrong or is there any little tweak i'm missing.
Please help me solve the issue
zulkarnine
Have you tried closing and opening the project again and the procedure described on section 4.6 Re-Index the Keywords for Code-Sense?
Strange enough, code-sense, auto-completion and arguments list are displayed usually without problem in my laptop. Now, it isn't a 100% hit because code-sense implementation changes with every Xcode release and as Apple is more than secretive about the customisation of Xcode.
You're having something like:
void loop()- void is in red because it is a standard C++ predicat
- loop() is in black as it is defined here
Let's define then call
testvoid test() {}
void loop() {
test();
}- The first test() remains in black as it is defined here.
- But the second test is coloured in orange as it is a call to a known function
So everything's normal :)
Thank you for your response, I tried re-indexing the way it was mentioned in 4.6 even ater that they don't show any color or auto-complete. pinMode or OUTPUT or Serial.print() doesn't show any sigh of auto completion. :(
in the 2nd post the example what you mentioned is the part of standard C++ code sense, isn't it.
like
int functionName(int an_example,int b_example){
return a_example+b_example;
}
void main(){
int a=10;
int b=20;
cout<<functionName(a,b);
}
in the above mentioned example we are declaring a function functionName and calling it again in the main function. so it works fine since it is standard C++ implementation. But when I try to write:
pinMode(pinNum,HIGH);
Serial.begin(960);
analogWrite(13,HIGH);
they don't show colors and I dont even get code completion suggestions. But they should be actually like this:
pinMode(pinNum,HIGH);
Serial.begin(960);
analogWrite(13,HIGH);
aren't they? Since they are declared in Arduino.h
what i mean is the functions declared in Arduino.h are not being recognised by Xcode while i'm editing in the .ino file. It might have something to do with the Xcode version. I'm using Xcode 4.6.2. Is there anything I'm missing maybe :~
Try commenting the whole Core library for code-sense section except #include "Arduino.h".
// Core library for code-sense
//#if defined(WIRING) // Wiring specific
//#include "Wiring.h"
//#elif defined(MAPLE_IDE) // Maple specific
//#include "WProgram.h"
//#elif defined(MPIDE) // chipKIT specific
//#include "WProgram.h"
//#elif defined(DIGISPARK) // Digispark specific
#include "Arduino.h"
//#elif defined(ENERGIA) // LaunchPad, FraunchPad and StellarPad specific
//#include "Energia.h"
//#elif defined(CORE_TEENSY) // Teensy specific
//#include "WProgram.h"
//#elif defined(ARDUINO) && (ARDUINO >= 100) // Arduino 1.0 and 1.5 specific
//#include "Arduino.h"
//#elif defined(ARDUINO) && (ARDUINO < 100) // Arduino 23 specific
//#include "WProgram.h"
//#else // error
//#error Platform not defined
//#endif
Thanks a lot.
After commenting out the whole section except #include "Arduino.h" as you mentioned it solved my problem. everything is perfect now. The code sense has started working.
Keep up the good work. :) :) :)
You're welcome!
I'm glad it works now. It seems Xcode goes lost with many files to sort.
I have almost the same problem as Zulkarnine, and the previous solutions didn't work for me =S
The difference is that i have color and auto-complete code with:
pinMode(myLED, OUTPUT);
but i don't have with this:
Serial.begin(960);
=S anyway, Is there any theme to get the color equal to the arduino ide?
in the above mentioned example we are declaring a function functionName and calling it again in the main function. so it works fine since it is standard C++ implementation. But when I try to write:
pinMode(pinNum,HIGH);
Serial.begin(960);
analogWrite(13,HIGH);
they don't show colors and I dont even get code completion suggestions. But they should be actually like this:
pinMode(pinNum,HIGH);
Serial.begin(960);
analogWrite(13,HIGH);
aren't they? Since they are declared in Arduino.h
what i mean is the functions declared in Arduino.h are not being recognised by Xcode while i'm editing in the .ino file. It might have something to do with the Xcode version. I'm using Xcode 4.6.2. Is there anything I'm missing maybe :~
I have almost the same problem as Zulkarnine, and the previous solutions didn't work for me =S
The difference is that i have color and auto-complete code with:
pinMode(myLED, OUTPUT);
but i don't have with this:
Serial.begin(960);
As I wrote before,
Code-sense, auto-completion and arguments list are displayed usually without problem in my laptop.
Now, it isn't a 100% hit because code-sense implementation changes with every Xcode release and as Apple is more than secretive about the customisation of Xcode.
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes (http://www.cplusplus.com/doc/tutorial/polymorphism/). Serial.print() is a virtual function.
=S anyway, Is there any theme to get the color equal to the arduino ide?
Sorry, but I can't provide support for Xcode. Please refer to Xcode documentation for interface customisation.
I strongly recommend you to refer to the book
Xcode 4 Unleashed by Fritz F. Anderson I purchased thanks to contributions (http://embedxcode.weebly.com/contact.html).
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9702031_orig.jpg)
Good luck!
Please find a new release of embedXcode:
embedXcode • May 04, 2013 release 48 • Compilation of main.cpp for embedxcode only
embedXcode • May 10, 2013 release 49 • Improved code-sense for core libraries
main.cpp has a conditional statement for compilation based on EMBEDXCODE.
The name of the IDE is included in the pre-processing variable use for code-sense.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/3407177.png?275)
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Hi, I'm trying to get the project configuration working but I have an error on line 16 of easyTransfer.cpp:
_serial->print(0x06, BYTE);
It says: "BYTE was not declared in this scope"
What do you think it could be?
Tx
Gabriele
I don't know. I guess BYTE isn't declared. Try using the Arduino IDE.
Please find a new release of embedXcode
embedXcode • May 21, 2013 release 50 • Arduino and Digispark 1.0.4 compatibility
For the Teensy boards, embedXcode takes into account the Teensyduino installed either as a plug-in for Arduino 1.0.3, or as a stand-alone application /Applications/Teensyduino.app.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6472463_orig.png)
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release of embedXcode.
embedXcode • May 23, 2013 release 51 • Project configuration with user's libraries
The automatic preparation procedure now includes the user's libraries for code-sense.
For example, if you select Arduino Uno as board when you create a new project, all the libraries under the sketchbook/libraries folder define in the Arduino preferences are going to be included to the project.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/7676676_orig.png) (http://www.weebly.com/uploads/1/1/6/2/11624344/870719_orig.png)
When I started the embedXcode project back in January 2012, I didn't expect to reach the 51st release!
Thank you for your support, feed-back and help you've provided me during all the development!
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Thanks for all your hard work. Does release 51 mean we don't need to do step 3.2.1 (add user's libraries) in the manual
Thanks for all your hard work.
You're welcome! Now the next big challenge is to update my old Mac :~. Xcode is too demanding :(.
Does release 51 mean we don't need to do step 3.2.1 (add user's libraries) in the manual
That's correct. No more manual procedure is required.
However, I keep providing the manual procedures on the User Manual as they might be useful if you make important changes to a project, for example changing the platform.
Got this thing working. Great work!
My only problem is how to set the baud rate of the terminal serial monitor?
Got this thing working. Great work!
My only problem is how to set the baud rate of the terminal serial monitor?
By default, 9600.
For another speed, see the screen documentation by typing on the Terminal
man screen
Please find a new release of embedXcode:
embedXcode • May 28, 2013 release 52 • Project configuration stability enhancement
It appeared the tool in charge of configuring the project generated zombies (http://embedxcode.weebly.com/1/post/2013/05/embedxcode-ghost-buster-and-zombie-chaser.html), resulting in a cryptic Segmentation fault: 11 error message. The cause has been fixed and zombies are over now.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/5983901_orig.png)
More important, I'm going to resume playing with boards, sensors and displays. As my current Mac no longer provides enough power (http://embedxcode.weebly.com/1/post/2013/05/embedxcode-back-to-boards-sensors-and-displays.html) to run Xcode smoothly,
I plan to update my old Mac for a new one, as this year's target for contributions (http://embedxcode.weebly.com/contact.html). Obviously, I continue to maintain and support embedXcode.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Zulkarnine has posted a nice video about Setting-up embedXcode for Arduino, development in Mac using Xcode IDE on YouTube.
Watch it at http://www.youtube.com/watch?v=b4lnz6ixvgU
Thank you Zulkarnine :)
You are welcome :) :) :)
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes (http://www.cplusplus.com/doc/tutorial/polymorphism/). Serial.print() is a virtual function.
Yes. One should not forget that Apples does not care too much about C++ in Xcode. Xcode is mainly made for C and ObjC. Although they try to make a decent C++ compiler, proper C++ code sense is clearly not their top priority.
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes (http://www.cplusplus.com/doc/tutorial/polymorphism/). Serial.print() is a virtual function.
Yes. One should not forget that Apples does not care too much about C++ in Xcode. Xcode is mainly made for C and ObjC. Although they try to make a decent C++ compiler, proper C++ code sense is clearly not their top priority.
I more than agree with you! Xcode is aimed at OS X and iOS.
Now, I'm not tied to Xcode and can consider another IDE. The tests of the makefiles were successful with NetBeans.
I only need some help from someone knowing NetBeans well.
thanks for this project!! :) :)
the site is currently in maintenance, when he comes back online?
thanks for this project!! :) :)
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.
thanks for this project!! :) :)
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!
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 [font=Courrier]#include "library_name.h"[/font] 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.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/7271155.jpg?222)
Discover the preview (http://embedxcode.weebly.com/1/post/2013/06/embedxcode-new-user-manual-ibook-preview.html)!
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.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/2718278_orig.png)
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.
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.
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.
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 :)
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...
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 (http://code.google.com/p/beta-lib/downloads/list)
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.
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.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/8641362_orig.jpg)
(http://www.weebly.com/uploads/1/1/6/2/11624344/3074443_orig.png) (link) (http://itunes.apple.com/book/embedxcode/id667501748)
Enjoy :)
SdSpi.h line 65 = uint8_t const SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN;
But on Sd2Card?
You are right. There is an old Sd2Card.h from 2009 included in the Arduino "Genuine" Libs, and this is the one file which collide with the one from the SdFat Lib from now which I am trying to use...
Is there a way to give the user libs precedence over the arduino ones in EmbedXCode ??
Is there a way to give the user libs precedence over the arduino ones in EmbedXCode ??
Sure, RTFM = Read the Fabulous User Manual, on chapter 4 section 2, now as an e-book.
Is there a way to give the user libs precedence over the arduino ones in EmbedXCode ??
Sure, RTFM = Read the Fabulous User Manual, on chapter 4 section 2, now as an e-book.
Hi there, ok ok. It was not so easy :-) First the manual was not available until today and second you need an iPad...
I did find one and read TFM now. Sorry for that.
Put SD and SD/utility in EXCLUDE_LIBS and now, it works.
Crazy isnt'it ?
Many thanks for your help and generally for this Xcode Template !
Once I finish my project, I will contribute you can count on me.
Problem solved with the latest version~~
Thank you!
Put SD and SD/utility in EXCLUDE_LIBS and now, it works.
Crazy isnt'it ?
Yes :)
Many thanks for your help and generally for this Xcode Template !
Once I finish my project, I will contribute you can count on me.
You're welcome!
The User Manual for embedXcode as a free e-book is now available.
I downloaded the iBook in iTunes, but it says I need an ipad to read it. I don't own an ipad. Is there another way to read it?
The User Manual for embedXcode as a free e-book is now available.
I downloaded the iBook in iTunes, but it says I need an ipad to read it. I don't own an ipad. Is there another way to read it?
The next iteration of the Mac OS X due this fall is planned to feature an reader for the electronic books using Apple iBook format.
In the meantime, I'm PM you a link to the printed manual as a PDF file.
I just installed the latest version (rev 59 I think) of EmbedXcode and I'm having a couple issues. I created a new project. I did not add any code yet. I noticed my .ino file was still listed as txt, not C. I ran build and I got an error on my Dallas library. So I set USER_LIBS_LIST = 0 and tried again. It said the build succeeded, but then it said it could not load my project because of workspace integrity. I closed xcode and tried again to open the project, but it didn't work. I deleted the bad project and tried it again creating a new project and I had the same result.
My OS is 10.7.5, My Arduino IDE ver is 1.0.5. When I created the project I told it to use source control and my board was the Mega 2560.
I just installed the latest version (rev 59 I think) of EmbedXcode and I'm having a couple issues. I created a new project. I did not add any code yet. I noticed my .ino file was still listed as txt, not C.
That's normal. See Chapter 2 Section 2 on the User Manual.
I ran build and I got an error on my Dallas library. So I set USER_LIBS_LIST = 0 and tried again. It said the build succeeded, but then it said it could not load my project because of workspace integrity. I closed xcode and tried again to open the project, but it didn't work. I deleted the bad project and tried it again creating a new project and I had the same result.
My OS is 10.7.5, My Arduino IDE ver is 1.0.5. When I created the project I told it to use source control and my board was the Mega 2560.
I wasn't able to replicate the [font=Courrier]workspace integrity[/font] error on my MacBook. Are there other time-consuming processes running? as Mac OS X is a multitasking OS, processes may conflict.
What is your Mac? Try with only Xcode launched.
You could also try the procedure we've already discussed at http://forum.arduino.cc/index.php?topic=49956.msg1206628#msg1206628
I wasn't able to replicate the [font=Courrier]workspace integrity[/font] error on my MacBook. Are there other time-consuming processes running? as Mac OS X is a multitasking OS, processes may conflict.
What is your Mac? Try with only Xcode launched.
You could also try the procedure we've already discussed at http://forum.arduino.cc/index.php?topic=49956.msg1206628#msg1206628
I logged out of my mac and back in again to make sure nothing else was running. I created a new project and got the same workspace integrity error.
I looked at the post you referenced, but I don't have an Xcode folder in my Documents folder. So I couldn't do the terminal commands.
I tried installing xcode rev 50 (still had it in my download folder) and created a new project and this worked fine, no errors.
My computer is a Mac Pro with Quad-core Intel Xeon, 8GB RAM.
I've PM-ed you to send me the log so I can investigate.
Thank you.
I've PM-ed you to send me the log so I can investigate.
Thank you.
Okay. One thing I noticed is rev 59 installer says it will use 1.9MB on my disk. I think Rev 50 installer said it was over 6MB on disk. Seems like a big difference.
I've PM-ed you to send me the log so I can investigate.
Thank you.
Okay. One thing I noticed is rev 59 installer says it will use 1.9MB on my disk. I think Rev 50 installer said it was over 6MB on disk. Seems like a big difference.
The difference comes form the User Manual no longer included in the distribution but available separately. The Release Notes is a much more compact PDF, hence the difference of size.
After two days of intensive search, the cause of the error reported by ScottG has been identified: non standard file names.
Volume, folder or file names with space --e.g. [font=Courier]My first project.ino[/font]-- , number as first character --e.g. [font=Courier]3D_library.h[/font]--, special letters as . + ~ --e.g. [font=Courier]Wtv020sd16p.cpp~[/font]--, among other cases, raise an error with GCC and make.
This is not specific to embedXcode.
I've updated embedXcode to deal with those cases and plan to release it soon, but I strongly recommend to avoid the cases mentioned above.
Needless to say I can't provide support for issues which are not related with embedXcode, as two major challenges are ahead: OS X Mavericks with Xcode 5 and Arduino 1.5 framework.
Hi,
Does the "Fast" Scheme disappear?
My macbook is not powerful enough. Thus where can I find it?
Thank you~~
Hi,
Does the "Fast" Scheme disappear?
My macbook is not powerful enough. Thus where can I find it?
Thank you~~
The template has grown in complexity, making it difficult to maintain. So I've started a simplification process, removing some extras to focus on the main features.
You can easily speed compilation by as described in chapter 4
Build and Upload the Project section 2
Manage the Libraries for Compilation on the User Manual.
Hi,
Which is the latest embedXcode release 59 or 101?
Latest version is 101. A new one numbered 102 is to be released later today.
Thanks avenue33 for the quick reply.
It would be great if you could add links for the old releases.
I wanted to install release 059 again, but I wasn't able to find it.
Thank you for your effort, I like embedXcode.
Please find a new release of embedXcode.
embedXcode • Jul 27, 2013 release 101 • Stability enhancements
embedXcode • Jul 29, 2013 release 102 • Improved utilities
Interim release 101 initiates the simplification process, as the template has grown in complexity, making it difficult to maintain. The idea is to focus on the main features.
Release 102 improves the utilities for checking the availability of new releases and preparing the project with all the references.
The User Manual is also being reviewed and is under approval.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release of embedXcode.
....
Enjoy :)
I've installed Release 102 and did a quick test (Build and Upload to Arduino Mega2560 r3). So far Okay. Thanks for the new Release.
Can I have two or more Arduinos plugged into my Mac and then try to upload to one of them with Xcode? If so, how to I pick the port? I just tried a little test: I plugged my Mega into my Mac and nothing else. I uploaded my sketch successfully to it. Then I plugged in a Leonardo and tried to upload my sketch again. The first time I tried the upload build failed. The second the upload build just hung and did nothing until I cancelled it after a few minutes.
embedXcode uses the first serial port found.
You need to unplug and plug the boards it you want to upload to a specific board.
embedXcode uses the first serial port found.
You need to unplug and plug the boards it you want to upload to a specific board.
Thanks. Do you have any plans to add some user control to picking USB ports?
Thank you for your feed-back. I'll consider adding this feature.
I am getting errors with the OneWire Library in the OneWire.h and OneWire.cpp it says oneWire was not defined. If you have any progress please let me know yagoax at gmail dot com.
By default, OneWire is excluded as it raises issues with different boards.
To include it again, edit the makefile and the line
EXCLUDE_LIBS = Firmata WiFi Esplora OneWire Robot_Control Robot_Control/utility Robot_Motor
For more information, please refer to Chapter 4 Build and Upload the Project, Section 2 Manage the Libraries for Compilation, Sub-section Exclude Libraries of the User Manual.
Hi:
I followed the instructions on the You-Tube video and created a new project (Quite Nice Actually). Then per the instructions I ran the build and the build failed with the following error:
Error, No Application Found Stop
What did I do wrong?
Thanks,
freddie
Is Arduino installed in the /Applications folder?
See chapter 1 Install the Template section 2 Install the IDEs of the boards of the User Manual.
Hi:
I Cannot read the Users Manual because I do not possess an iPad or any other iXxx device, and iTunes will not download to my Mac. And Yes Arduino is installed (In the usual place: Applications folder)and I have been using the Arduino IDE for about 6 months with no problems.
Unfortunately the Arduino IDE is not very useful for larger projects.
Thanks,
Freddie
Please open a Terminal window and launch
ls /Applications/Arduino.app
The main sections of the User Manual are available at http://embedxcode.weebly.com/tutorial
My Arduino.app was not installed in the Applications Folder, it was inside another folder that is why Xcode could not find it.
So I just moved it to the Application Folder and its working alright for now, its time to try to make it do something now.
I did not find the tutorial on your Website to be very useful at all, it is confusing because it does not just come out and tell you the steps you need to take to get it working.
Perhaps putting in FAQ (Frequently Asked Questions) section would be helpful.
Thanks,
Freddie
Hi Again:
Now I have started to build a Project I get 42 errors related to the following file inclusions:
#include <OneWire.h> //These are the libs for the One-Wire interface
#include <UTFT.h> // We are going to use the Display instead of the monitor
#include <SD.h> // We also need the SD card libraries for storing the data on the disk.
#include <Wire.h>
#include <SPI.h> // not used here, but needed to prevent a RTClib compile error
#include <RTClib.h>
Xcode does not seem to have a problem finding these files, however whenever I try to use any of the features of these files I get an error. These work fine in the Arduino IDE with no errors.
What is wrong now?
Thanks,
Freddie
Hi Again:
Now I have started to build a Project I get 42 errors related to the following file inclusions:
#include <OneWire.h> //These are the libs for the One-Wire interface
#include <UTFT.h> // We are going to use the Display instead of the monitor
#include <SD.h> // We also need the SD card libraries for storing the data on the disk.
#include <Wire.h>
#include <SPI.h> // not used here, but needed to prevent a RTClib compile error
#include <RTClib.h>
Xcode does not seem to have a problem finding these files, however whenever I try to use any of the features of these files I get an error. These work fine in the Arduino IDE with no errors.
What is wrong now?
Thanks,
Freddie
Go up a few posts (http://forum.arduino.cc/index.php?topic=49956.msg1340982#msg1340982) and it tells you how to take care of the onewire issue. Not sure about the rest. One issue I discovered for the user libraries (not app libraries) was that the directory name had to be the same as the library name; Arduino IDE didn't care but xcode does.
Please find a new release of embedXcode
embedXcode • Aug 10, 2013 release 103 • First release of embedXcode+
I'm introducing a second and more elaborate version of embedXcode, embedXcode+, available soon.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9345388_orig.png)
A new release of the User Manual as e-book is also available.
I take this opportunity to announce that embedXcode is joining forces with Visual Micro (http://embedxcode.weebly.com/1/post/2013/08/introducing-embedxcode.html), to share experience and release exciting new features.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Please find a new release of embedXcode.
embedXcode • Sep 01, 2013 release 104 • Improved utilities
embedXcode+ • Sep 01, 2013 release 104 • Improved utilities and select among two connected boards
Release 104 inaugurates the new embedXcode+ edition with extended features.
In case two similar boards are connected, for example two Arduino boards, a windows lists the connections and ask to select one:
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6051142_orig.png)
• To select the first port, press Enter, click on the button 1 or wait 10 seconds.
• To select the second port, click on the button 2.
This feature works with the Arduino boards and similar boards using a serial through USB connection.
As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
Enjoy :)
Hi. Is just me that is having this problem? I just install the last Xcode and embedXcode. Than start one simple project, don't make ANY change, config to Build and press run. Than I have this error:
In poliserial.cpp
void pollserial::write(uint8_t c) {
pollserial.cpp:131: Prototype for 'void pollserial::write(uint8_t)' does not match any in class 'pollserial'
In Print.h
virtual size_t write(uint8_t) = 0;
Print.h:48: Candidates are: virtual size_t Print::write(uint8_t)
size_t write(const char *str) {
Print.h:49: size_t Print::write(const char*)
virtual size_t write(const uint8_t *buffer, size_t size);
Print.h:53: virtual size_t Print::write(const uint8_t*, size_t)
Is this a bug? All the problem is with this write function. This is just a compilation problem but I am very weak in C++ to solve it :(
Can someone help this?
In order to help, I need more information.
- What release of the Arduino IDE are you using?
- Does the sketch compile successfully with the standard Arduino IDE?
Hi. Thanks for the fast answer.
I am using the last of everything:
- Arduino: 1.0.5
- XCode: 4.6.3
- embedXcode: Sep 01, 2013 release 104
I don't make ANY change from original script from your embedXcode. I just start a project and try to compile it. So I really think this is a small bug and it is not in sketch, but in "core" program.
Where can I download an old version to see if this is the problem? This look like a problem with virtual function... I tried a lot of things and none work until now...
I did a quick search on the Arduino forum to find solutions related to this
PollSerial library.
It seems it raises problems.
See for example Arduino to Stand-alone ATMEGA328 Communication Problem (http://forum.arduino.cc/index.php?topic=146344), among the many threads about this very library.
I guess you have installed this library in your sketchbook.
You need to exclude it. Please proceed as follow:
EXCLUDE_LIBS = pollserial OneWire Firmata WiFi Esplora OneWire Robot_Control Robot_Control/utility Robot_Motor
For more information, please refer to Chapter 4 Build and Upload the Project, Section 2 Manage the Libraries for Compilation, Sub-section Exclude Libraries of the User Manual.
Have you downloaded the User Manual?
Hum... This is not library from your project? My bad... Because I am starting with Arduino and in my first try with your program I get this error, I thought this problem come from your program...
I will try it now and see if it work :)
And yes, I tried to read your (good) user manual. I only have to understand that this is a library from arduino :)
Sh*t... This poliserial is a sub-library from a library that I installed other day.. Because this I have no idea from were this come from (now I discovery the build log from Xcode :smiley-red: and see the it compile every library I have, even if I not call then)..
Only one day to discovery this small problem... =(
If I not did this mistake, It will be "plug and play"!!
One advice, in Solutions to Most Common Issues
Symptom: Compilation fails.
Solution: Create an empty library folder and try again. Than put the libraries you want and test what cause problem.
Symptom: Compilation fails.
Solution: Read the f*cking compilation log! It will show that the problem come from one of your library!
Already in the
Solutions to Most Common IssuesSymptom Compilation fails.
Solution What are the messages in the Log navigator?
Reference See Error Messages
Old and new icons for embedXcode!
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/363011385.png)(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/9370800_orig.png)
Hi again! the embedXcode is working very well. But, I am having problem with git and XCode. I can use a external program and it work well.
But with Xcode, I can't do anything. It commit with out problem, but it don't make any difference and I can't see the history in the Xcode. No matter how many times I do the commit, the "A" status never change.
This only happens with embedXCode project, if I create a "normal" project I don't see any of this problems.
Did you know the problem or what I can do to solve it?
This is the image:
(http://i42.tinypic.com/fxurmw.jpg)
Hi again! the embedXcode is working very well. But, I am having problem with git and XCode. I can use a external program and it work well.
Did you know the problem or what I can do to solve it?
I haven't been able to replicate the issue.
Now, Xcode is performing many things under the hood, especially indexing all the libraries.
This may have an impact on the commit process.
I haven't been able to replicate the issue.
Now, Xcode is performing many things under the hood, especially indexing all the libraries.
This may have an impact on the commit process.
Do you know how can your program affect the git? The git itself is working perfectly outside, but something between Xcode and Git are not working. I was the first to report this?
The template doesn't affect the Git, except Xcode has a lot of work to perform just after the project is prepared, as references to all the libraries are added to the project.
Yes, you're the first to report this. Congratulations!
Something very strange is happing with my Xcode... I will try to reinstall it.
Anyway, one last thing that I can't do is send a message to serial for debug. How can I print a single "Hello World"?
This classic way don't work:
Serial.begin(9600);
Serial.println("Hello world!");
Neither the
printf("Hello World");
Is this the way to do it? Or I can't send this message with your program? I try to read all your docs, but didn't find this answer. Is this one (more) problem of my Xcode, or am I missing a library?
The serial console appears on a separate Terminal window.
The serial console appears on a separate Terminal window.
Yes, I know this. So by your answer it have to work like normal... Why I have all this problem?? =(
The console is just equal the Arduino IDE console? So I have one more problem in my Xcode...
Connect your Arduino board and open Terminal.
Then type in
ls /dev/tty.usb*
and press return.
Result lists the available USB ports.
Copy and post the answer.
OK, when I connect my arduino uno and type this command I get:
/dev/tty.usbmodem1d11
When I run a program, the console show
Last login: Tue Sep 17 12:02:04 on ttys001
[~] screen /dev/tty.usbmodem1d11 9600
There are a lot of new line, I don't know if it is important.
And the last line that "Build All" console in XCode show is:
osascript -e 'tell application "Terminal" to do script "screen /dev/tty.usbmodem1d11 9600"'
tab 1 of window id 210
screen /dev/tty.usbmodem1d11 9600
This is the standard command to open a serial console with the device attached to port /dev/tty.usbmodem1d11 at speed 9600 bps.
For me, everything is normal as this is the standard procedure.
I'm sorry I can't be of much help as I don't know the specifics of your configuration.
I want to update my older Xcode projects that were created with earlier versions of embedxcode so they use the latest version of embedXcode. Do I just need to update makefile and main.cpp files with the latest embedxcode versions?
I want to update my older Xcode projects that were created with earlier versions of embedxcode so they use the latest version of embedXcode. Do I just need to update makefile and main.cpp files with the latest embedxcode versions?
That's not an easy procedure as you need to copy the whole [font=Courrier]Configurations[/font] and [font=Courrier]Makefiles[/font] folders into your existing project.
Some of the utilities and the way the project is prepared may have also changed.
For that reason I haven't implemented the update of the existing projects.
Sounds like it would be easier to make a new project and just copy my code into it then delete the old project. Some sort of upgrade utility would be a nice feature to add to embedxcode; especially since you make frequent updates - which is a good thing.
For anyone who is using the new Xcode 5 released today, embedXcode does a check to verify the version of Xcode that's running and fails since it's not 4.x. Since there are few internal changes in Xcode's build process, you can skip the check by adding a # infront of lines 548 and 549 in Makefiles/Step2.mk.
# @if [ -f $(CURDIR)/About/About.txt ]; then $(CAT) $(CURDIR)/About/About.txt; fi;
# @if [ -f $(UTILITIES_PATH)/embedXcode_check ]; then $(UTILITIES_PATH)/embedXcode_check; fi
Also it's probably best to keep these compiled binaries disabled since the source code is unknown, and embedXcode_check gets your serial number then chats to a PHP script. Why do you need people's serial numbers Avenue33, without their permission? That is rather unscrupulous, and there's no reason I can see that you need a binary since everything can be done within the makefile, including version checking.
imac:~ Elijah$ strings /Users/Elijah/Dropbox/test/Heating3.1/Utilities/embedXcode_check
@NSt3__113basic_fstreamIcNS_11char_traitsIcEEEE
NSt3__113basic_filebufIcNS_11char_traitsIcEEEE
/Makefiles/Step1.mk
grep -e '.*USER_FLAG.*:=' "
true
grep -e '.*TEMPLATE.*:=' "
/Makefiles/Step2.mk
grep -e '.*RELEASE_NOW.*:=' "
PROJECT_FILE_PATH
PROJECT_NAME
ioreg -l | awk '/IOPlatformSerialNumber/ { print $4;}'
open "
/Utilities/serial.txt
ports available
====
====
: select one.
/Utilities/TemplateIcon.icns
port selected ====
embedXcode_check
ERROR
Xcode project not found
PRODUCT_NAME
XCODE_VERSION_ACTUAL
Xcode
required,
installed
BOARD_TAG
http://embedxcode.free.fr
/Utilities/embedXcode_prepare
message
/release.php?tag=
&goal=
&ver=
embedXcode+
release
Installed release is
.php
DOCTYPE html PUBLIC
==== New release
available ====
A new release of embedXcode is available.
Ignore
Go to Download
http://www.embedXcode.weebly.com/download
Have you contributed? Thanks!
==== Release
installed ====
==== Message ====
==== End of message ====
embedXcode is donationware.
Contribute
http://www.embedXcode.weebly.com/contact
zPLR
Forum server has been down for a while, hence my late answer.
About Xcode 5
This new version 5 of Xcode has just been released and sure, you want to play with it!
On the first tests I conducted, all crashed, so please give me some time to update the template.
I'm afraid you don't realise how much work the development of embedXcode requires.
About embedXcode_check utility
This utility checks the availability of a new release of embedXcode and that the configuration suits the embedXcode requirements, especially for the preparation of the project --adding all the references and libraries.
To do so, it needs to read some variables from the system.
About read and used variables
I took a standard function that reads many variables. Actually, only a few of them are used.
Unfortunately, I haven't erased those unused variables from the program and I understand your concern about some specific variables. They're going to be removed from the next release.
I'm sorry if this has raised false alarm.
I've just downloaded the last release supposing to get Release 105 as announced in your blog but I got Release 104.
Is there a reason why you don't specify the release on your download page?
This specific page hadn't been updated.
It had the old icon and the link pointed to release 104.
The page has just been updated to release 105 with the new icon.
Okay, thanks.
Xcode 5 was officially released to the public and I rushed to test it.
Existing projects created with embedXcode on Xcode 4 open with no problem, although the utilities aren't compatible with Xcode 5.
However, creating a new project based on the embedXcode templates fails: Xcode quits unexpectedly.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/697375_orig.png)
Is it a bug due to the embedXcode templates, a bug due to this new Xcode release, or a new --and undocumented-- standard for the templates?
I know and understand how impatient you are to play with this new release of Xcode.
I have also to cope with the extra power this new release of Xcode requires and makes my old MacBook really slow.
In the meantime, stick with Xcode 4 and please, give me time to investigate and work on the next release that works.
Thank you!
screen /dev/tty.usbmodem1d11 9600
This is the standard command to open a serial console with the device attached to port /dev/tty.usbmodem1d11 at speed 9600 bps.
For me, everything is normal as this is the standard procedure.
I'm sorry I can't be of much help as I don't know the specifics of your configuration.
HI! Just to answer, now the serial is working! Why? I deleted every library that I don't need in makefile (in other words, I delete all library from the minimum project). Maybe some library cause the problem, maybe not. I also deleted all files that I don't need, maybe it helps.
And now I discovery the git problem is not exclusively from your project, every project has this problem. Thanks for all the support.
Please find a new release of embedXcode.
• embedXcode • Sep 20, 2013 release 107 • Support for Xcode 5 on OS X 10.8
• embedXcode+ • Sep 20, 2013 release 107 • Support for Xcode 5 on OS X 10.8
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/1379697824.jpg) (http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6593998_orig.png)
embedXcode now supports the new Xcode 5 on OS X 10.8. Support for OS X 10.7 is deprecated
For more details, please refer to the Release Notes.
Thank you to the users who helped me with the implementation of Xcode 5!
Next challenge: update my old Mac!
Download (http://embedxcode.weebly.com/download)
HI! Just to answer, now the serial is working! Why? I deleted every library that I don't need in makefile (in other words, I delete all library from the minimum project). Maybe some library cause the problem, maybe not. I also deleted all files that I don't need, maybe it helps.
And now I discovery the git problem is not exclusively from your project, every project has this problem. Thanks for all the support.
Thank you for the update. I'm glad it works now.
My guess is there was a library among those you deleted that redefined the Serial port.
I confirm the erratic behaviour of Git on Xcode, whatever the project.
Hi,
I just installed embedXcode onto a fresh Mavericks machine with Xcode 5 but I find that the syntax checking and autocomplete is not working for .ino files. What do I need to do to have these treated as C++ files?
Thanks,
Al
Mavericks isn't released yet so I can't test it, sorry.
Have you checked the related section on the User Manual?
Hello,
Thanks for the fast reply. I'm a Mac newbie so following the guide helped. I was missing to set "Identity and Type" to C++ Source. Working now.
Thanks,
Al
Hey,
I am just starting out with embedXcode so I do not have any previous installations or working projects. I installed XCode 5.0 and embedXcode 107. When I create a new project and build, it is successful but then comes up with the "Workspace Integrity" error. I tried the recommendation from before in this thread (and elsewhere online) to close all other projects but that did not help. I have quit XCode completely, rebooted the computer, opened a fresh instance of XCode and a new project but I still get the error.
@kieferm
This case has been already discussed. Please refer to these posts:
http://forum.arduino.cc/index.php?topic=49956.msg1318987#msg1318987
I wasn't able to replicate the workspace integrity error on my MacBook. Are there other time-consuming processes running? as Mac OS X is a multitasking OS, processes may conflict.
What is your Mac? Try with only Xcode launched.
You could also try the procedure we've already discussed at http://forum.arduino.cc/index.php?topic=49956.msg1206628#msg1206628
http://forum.arduino.cc/index.php?topic=49956.msg1321296#msg1321296
After two days of intensive search, the cause of the error reported by ScottG has been identified: non standard file names.
Volume, folder or file names with space --e.g. My first project.ino-- , number as first character --e.g. 3D_library.h--, special letters as . + ~ --e.g. Wtv020sd16p.cpp~--, among other cases, raise an error with GCC and make.
This is not specific to embedXcode.
I've updated embedXcode to deal with those cases and plan to release it soon, but I strongly recommend to avoid the cases mentioned above.
Needless to say I can't provide support for issues which are not related with embedXcode, as two major challenges are ahead: OS X Mavericks with Xcode 5 and Arduino 1.5 framework.
Hi~~
Have you upgrade to Mavericks? I use Mavericks GM and Xcode 5, but code hinting seems not working.
If I change the #include"Arduino.h" to
#include"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
The code hinting works for the function. However Registers like "UBRRH" seem not defined so variables like "Serial" doesn't have code hinting either.
Do you have this problem? Thank you ~~
OS X Mavericks isn't released yet and I don't have a developer account so I can't test it.
Support for Mavericks is in the roadmap and I'm waiting for the official release.
Since you seem to have Mavericks installed on your Mac and if you aren't limited by a NDA, does the standard Arduino IDE work fine?
Arduino IDE works fine in Mavericks, as it is based on Java~~
Arduino IDE works fine in Mavericks, as it is based on Java~~
I don't understand the point very well: Java is for the Arduino IDE only, not for compilation.
Compilation, including building and linking, is done by the GNU GCC tool-chain, which is also used by embedXcode.
Since you have Mavericks GM, I guess you're a registered Apple developer, so you have access to the full technical support. Could you please investigate on what has changed between OS X 10.8 and 10.9 that raises the issue you've reported?
Thank you for your help!
Hi~~
I've tried my best to find the solution. However there aren't any issues about it.
I also ask my colleague with 3 years IOS development about this problem, but he is not familiar with external environment configuration.
I'm Sorry...
Thank you for investigating.
When OS X Mavericks is officially released, I'll give a look at that issue.
Please find a new release of embedXcode.
• embedXcode • Oct 12, 2013 release 108 • Support for Arduino Uno USBtinyISP
• embedXcode+ • Oct 12, 2013 release 108 • Support for Arduino Uno USBtinyISP and improved update management
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/875633_orig.png)
The embedXcode+ edition brings an improved update management for future release. The improved update management allows to update the projects when a new release of the template is available. This applies for project initially created with release 108, for example with next release 109 of the template.
Download (http://embedxcode.weebly.com/download.html)
Happy coding :)
Just so I'm clear on updating projects to the latest embedxcode version - if my project is rev 108 or higher, then when new versions of embedxcode come out, I can update that project to the latest embedxcode version. But projects 107 or lower are not updatable, is that correct?
Just so I'm clear on updating projects to the latest embedxcode version - if my project is rev 108 or higher, then when new versions of embedxcode come out, I can update that project to the latest embedxcode version. But projects 107 or lower are not updatable, is that correct?
That's correct.
Starting release 108, the template includes a utility to manage and update the projects created with it.
Any chance you'll come out with a way to upgrade projects that are on rev 106? My Mac is too old to install Mountain Lion, so I can't use any version of embedxcode after 106. But someday I'll get a new computer and it would be nice if there was an update option available to me. Or could you come out with a version of 108 that will work on OSX 10.7 with Xcode 4?
I understand your concern.
The real problem is managing different editions x versions x platforms:
- embedXcode Legacy and embedXcode+ Legacy for Xcode 4 on Mac OS X 10.7 Lion and 10.8 Mountain Lion
- embedXcode and embedXcode+ for Xcode 5 on 10.8 Mountain Lion and 10.9 Mavericks
My idea was to focus on Xcode 5 on 10.8
Mountain Lion and 10.9
Mavericks. I'll see what I can do for an updated version of embedXcode+ Legacy for Xcode 4 on Mac OS X 10.7
Lion and 10.8
Mountain Lion.
That would be great. I wouldn't expect you to keep coming out with 2 flavors every time, one for xcode 4 and another for xcode 5. I would just like there to be an update path for those of us stuck on older hardware and software.
How do I download embedXcode+Legacy? It's not available under the no donation option. BTW - I donated to this project last April.
I just installed EmbedXcode+Legacy. My project successfully compiled when I ran "Build", but I am getting this error:
embedXcode+ • Oct 20, 2013 release 106 • Legacy for Xcode 4 on Mac OS X 10.7 or 10.8
grep: /Users/Scott/Library/Developer/Xcode/Templates/Project Template/embedXcode+/embedXcode+
Sketch.xctemplate/Makefiles/Step2.mk: No such file or directory
I checked and this directory (/Users/Scott/Library/Developer/Xcode/Templates/Project Template/embedXcode+/embedXcode+)
does not exist. This seems like a directory embedxode should create. What should I do?
I've sent you an updated version of embedXcode Legacy.
When Mac OS X 10.9 Mavericks is available, the roadmap will focus on porting embedXcode and embedXcode+ to OS X 10.9. embedXcode+Legacy will be no longer maintained.
Please understand I can't develop a specific version of embedXcode to meet one single user's needs.
Please find a new release of embedXcode.
- embedXcode • Oct 24, 2013 release 110 • Mac OS X 10.9 Mavericks compatibility
- embedXcode+ • Oct 24, 2013 release 110 • Mac OS X 10.9 Mavericks compatibility and extended options for programmer
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/1162429_orig.png)
Mac OS X 10.9 Mavericks allows to read User Manual as an e-book a Mac.
Please note previous versions for Xcode 4 on Mac OS X 10.7 Lion and Mac OS X 10.8 Mountain Lion are deprecated and no longer maintained.
embedXcode+ includes new options for the Adafruit USBtinyISP programmer (http://www.adafruit.com/products/46), including a free parameter and fuses settings.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Hi,
Does the code sense work well on your Mavericks ? Upgrading to Ver.110 did no help for me...
Strange, as code sense works fine on my Mavericks.
Some forums are reporting issues with code sense on Xcode 5.
I guess we'll need to wait for Xcode 5.0.1 on Mavericks 10.9.1!
I've updated to 5.0.1. However it doesn't work either. I even create a new account, but no help...
Tonight I'll install a new mavericks to test whether the problem exists again~~
I'll give you the feedback tomorrow~~
Thank you~~
Hi~~
A good news that after re-installing the mavericks everything goes well. However I don't know the reason why?
Glad to know. Thank you for your feed-back.
I guess a clean install wipes out old files that may be conflicting.
As usual, Apple provides no explanation and no documentation :(
I'm trying to upload my sketch to an Arduino Pro-Mini via the FTDI cable. Embedxcode says it can't find the serial port. What should I do to get it to recognize the serial port? I'm using v106 on Mac 10.7.5
I'm trying to upload my sketch to an Arduino Pro-Mini via the FTDI cable. Embedxcode says it can't find the serial port. What should I do to get it to recognize the serial port? I'm using v106 on Mac 10.7.5
Support for external programmers has been introduced in release 108.
Thanks. I wish I had a new Mac now so I could use your latest version.
I was wondering if anyone has embedXCode 111 working with Arduino IDE 1.5 on OSX Mavericks for Arduino Due, Xcode version 5.01.
After following the install tutorial and creating a new embedxcode project (embedXcode sketch option) and selecting 'BUILD MyMac 64-bit' option. When I click the run button to build the newly created project I get an error being flagged in Audio.h regarding missing DAC.h file and build fails
Any suggestions, anyone get this to work?
~Colin
Arduino 1.5.x is still in beta, hence some issues with the libraries.
By default, embedXcode compiles
all the libraries. It seems the latest release of Arduino includes libraries with issues.
Proceed as follow:
- Create a new embedXcode project.
- Edit the makefile with
APP_LIBS_LIST = 0
USER_LIBS_LIST = 0
Please refer to chapter 4
Build and Upload the Project section 2
Manage the Libraries for Compilation for more details.
As I don't own an Arduino Due, I can't conduct the tests myself but the issue has been reported on other boards.
Thanks that helped.
I still had to manually setup the project after creating a new project, making changes to makefile and first build as the automatic updates didn't happen.
Otherwise it's compiling and executing on target.
I am still battling with differences between options of 'ALL' and 'BUILD' as both seem to compile, download to target and execute code - will play around a bit more.
~Colin
Arduino 1.5.x is still in beta, hence some issues with the libraries.
By default, embedXcode compiles all the libraries. It seems the latest release of Arduino includes libraries with issues.
Proceed as follow:
- Create a new embedXcode project.
- Edit the makefile with
APP_LIBS_LIST = 0
USER_LIBS_LIST = 0
Please refer to chapter 4 Build and Upload the Project section 2 Manage the Libraries for Compilation for more details.
As I don't own an Arduino Due, I can't conduct the tests myself but the issue has been reported on other boards.
Strange you have to battle with manual changes on the makefiles...
It should work fine right away out-of-the-box.
Yes, it is a bit strange. I even tried creating a new project seeing as the automated procedure is a once only affair.
I created a new project, manually edited lib lines in make file and then click the run icon to build.
Build was successful, but .ino file was still associated as a plain text file, plus I had to set up other items as outlined in manual procedure.
Colin
I was wondering if my embedXcode/xcode setup is correct. I am running Arduino 1.5x, Xcode 5.01 and embedXcode 1.11 on OSX Mavericks as it is building/downloading very slowly (can take a minute to compile for small code base).
When viewing navigator I notice that under "Utilities" and "Product" I have embedXcode_prepare and "Index" showing in red - is this correct/okay?
As reported in my earlier post that I had to manually setup Xcode as the automated procedure doesn't work so am concerned I have not configured my setup correctly.
Please see attached showing the navigator.
~Colin
When viewing navigator I notice that under "Utilities" and "Product" I have embedXcode_prepare and "Index" showing in red - is this correct/okay?
The
embedXcode_prepare program prepares the project and runs only once, during the first compilation. It is deleted after.
The
Index target is a proxy target used solely for code-sense.
Please find excerpts (http://flic.kr/s/aHsjM8L3cg) from the User Manual.
Please find a new release of embedXcode.
- embedXcode • Nov 08, 2013 release 112 • Stability enhancement for Digispark
- embedXcode+ • Nov 08, 2013 release 112 • Support for Protostack 28-pin AVR board, USBtinyISP and USBASP programmers
Mac OS X 10.9
Mavericks allows to read the
User Manual as an e-book on a Mac.
embedXcode+ supports new boards and programmers: Adafruit Atmega32u4 Breakout (http://www.adafruit.com/products/296) and Protostack 28-pin AVR boards, Adafruit USBtinyISP (http://www.adafruit.com/products/46) and Protostack USBASP programmers.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Hi,
I've just updated to embedXcode+113 in Mavericks. However when I try to create a new project ,set the USER_LIBS_LIST = 0, and build it. After successfully compile the project, all the files in the left project navigator disappear except the project file. If I click this project file ,an error diagram pops up "The file couldn't be opened".
If I remove all the user library away, this problem will no longer exist. However if there is any library in the library folder, this problem remains.
I turn back to the ver.110. There is no such problem in it.
Hi,
I've just updated to embedXcode+113 in Mavericks. However when I try to create a new project ,set the USER_LIBS_LIST = 0, and build it. After successfully compile the project, all the files in the left project navigator disappear except the project file. If I click this project file ,an error diagram pops up "The file couldn't be opened".
If I remove all the user library away, this problem will no longer exist. However if there is any library in the library folder, this problem remains.
I turn back to the ver.110. There is no such problem in it.
The utility in charge of preparing the project hasn't changed between release 110 and 113. The issue you're reporting is due to non-standard names for the folders and files of the user library --like spaces, +, ...
I've dealt with this problem by moving the incompatible user library before. However at this time, whatever user library I put into the library folder, the project will be lost.
Since there is no such problem in ver.110 ,I can maintain use this version. But can you figure out the reason why?
I've dealt with this problem by moving the incompatible user library before. However at this time, whatever user library I put into the library folder, the project will be lost.
Since there is no such problem in ver.110 ,I can maintain use this version. But can you figure out the reason why?
With so few elements, it is just impossible.
I resolved it by uninstalling it using the app under the document.
PS:
Perhaps you lost an 's' in the "document" folder. A new folder named "Document" is in my home folder after installation.
Thanks for noticing me about the typo. Fixed :)
Hi,
I haven't read all the thread, and the search function turns up nothing. I hope this question hasn't been asked already.
I have to small issues using embedXcode:
- I develop an RS-485 communication for my board (duemilanove). So naturally, I have an RS-485/USB converter plugged into my MAC. Unfortunately, wen the converter is plugged, I can't upload code to my board. embedXcode thinks the converter is my board. So I have to unplug, compile, upload, re-plug the RS-485 converter. That, in turn breaks the connection with my MAC application that I use to communicate with the board… and so on.
Question: how do I tell embedXcode which port to use to communicate with the board?
- I would like to test several boards (uno with ATMEGA, due with ARM processor and chip kit with PIC32). How do I add targets such as "ALL for uno", "ALL for due", and "ALL for chipkit"?
Thank you for reading me.
I have to small issues using embedXcode:
- I develop an RS-485 communication for my board (duemilanove). So naturally, I have an RS-485/USB converter plugged into my MAC. Unfortunately, wen the converter is plugged, I can't upload code to my board. embedXcode thinks the converter is my board. So I have to unplug, compile, upload, re-plug the RS-485 converter. That, in turn breaks the connection with my MAC application that I use to communicate with the board… and so on.
Question: how do I tell embedXcode which port to use to communicate with the board?
On the main makefile, uncomment the line with [font=Courier]BOARD_PORT[/font] and set the exact USB port, as [font=Courier]/dev/tty.usbmodem1421[/font] in the example
# BOARD_PORT is optional
# If not defined, BOARD_PORT = /dev/tty.usb* (default)
#
BOARD_PORT = /dev/tty.usbmodem1421
- I would like to test several boards (uno with ATMEGA, due with ARM processor and chip kit with PIC32). How do I add targets such as "ALL for uno", "ALL for due", and "ALL for chipkit"?
Thank you for reading me.
Just select the board according to chapter 3
Use the Project section 3
Manage the Code for Multiple Plaforms sub-section 1
Change the Board of the User Manual (http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/_7922139_orig.png).
Thank you for your help. And thank you for the link towards the manual :)
Hi,
I have created a new workspace, with a new project for Chipkit Uno 32. After the project was created, I launched the build phase to set everything up, just as indicated in the documentation, and I get tons of errors.
Many are in the form:
relocation truncated to fit: R_MIPS_GPREL16 against `myLED'
I am using Mpide.app version 0023.
This is an Arduino forum.
Please post at MPIDE on Xcode 4.2 (http://www.chipkit.org/forum/viewtopic.php?f=6&t=796)
Thank you for your reply.
Sorry for the post. I was seeking help on Xcode embed project. Their official website redirects here.
I will post my question where you told me to.
hi avenue33
i just started using embedxcode for Arduino and everything seems to work fine! but i have few questions,
1.When including header files from Arduino, should i use Arduino.h or arduino.h ? and should it be <> or "" ?
2.How do i use the serial monitor in Xcode? instead of using terminal, can i use the console inside Xcode?
3.Finally, is it possible to preset the .ino file whenever it startup? cuz i don't need to include all the other header and would be nice to start with a clean layout =)
cheers!!
1.When including header files from Arduino, should i use Arduino.h or arduino.h ? and should it be <> or "" ?
See tutorial at http://arduino.cc/en/Hacking/LibraryTutorial
2.How do i use the serial monitor in Xcode? instead of using terminal, can i use the console inside Xcode?
Please refer to « Display the Serial Console on a Terminal Window » in the User Manual (https://itun.es/fr/0suYN.l).
3.Finally, is it possible to preset the .ino file whenever it startup? cuz i don't need to include all the other header and would be nice to start with a clean layout =)
Please refer to « Manage the Libraries for Compilation » in the User Manual (https://itun.es/fr/0suYN.l).
alright! thanks for that =) i got my answers!
hi again, why doesn't embedxcode show an error directly? for example if i forgot to put a ' ; ' , the compiler won't notify me unless i build. is this feature available for embedxcode?
My builds are failing with two errors in Main.CPP
In the #elif (ARDUINO < 150) section:
line 304 fails: "A function-declaration is not allowed here before '{' token."
line 319 fails: "Expected `}' at end of input."
Any ideas?
hi again, why doesn't embedxcode show an error directly? for example if i forgot to put a ' ; ' , the compiler won't notify me unless i build. is this feature available for embedxcode?
No, but once the project is compiled, clicking on an error shows the corresponding line of code.
My builds are failing with two errors in Main.CPP
In the #elif (ARDUINO < 150) section:
line 304 fails: "A function-declaration is not allowed here before '{' token."
line 319 fails: "Expected `}' at end of input."
Any ideas?
Sorry, I haven't been able to replicate the issue.
Looks like it has to do with the default code. I started a new project, selected the following and commented it out, then added my current sketch. This causes the Main.CPP to fail as previously indicated.
As blinking the LED on pin 13 is not what I'm trying to accomplish, how much of the default code should I be leaving alone and where?
// Include application, user and local libraries
// Define variables and constants
//
// Brief Name of the LED
// Details Each board has a LED but connected to a different pin
//
uint8_t myLED;
//
// Brief Setup
// Details Define the pin the LED is connected to
//
// Add setup code
void setup() {
// myLED pin number
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega32U4__) || defined(__SAM3X8E__) // Arduino specific
myLED = 13;
#elif defined(__PIC32MX__) // chipKIT specific
myLED = 13;
#elif defined(__AVR_ATtinyX5__) // Digispark specific
myLED = 1; // assuming model A
#elif defined(__AVR_ATmega644P__) // Wiring specific
myLED = 15;
#elif defined(__MSP430G2452__) || defined(__MSP430G2553__) || defined(__MSP430G2231__) || defined(__MSP430F5529__) || defined(__MSP430FR5739__) // LaunchPad MSP430 and Experimeter Board FR5739 specific
myLED = RED_LED;
#elif defined(__LM4F120H5QR__) || defined(__TM4C1230C3PM__) // LaunchPad Stellaris and Tiva specific
myLED = RED_LED;
#elif defined(MCU_STM32F103RB) || defined(MCU_STM32F103ZE) || defined(MCU_STM32F103CB) || defined(MCU_STM32F103RE) // Maple specific
myLED = BOARD_LED_PIN;
#elif defined(__MK20DX128__) // Teensy 3.0 specific
myLED = 13;
#endif
pinMode(myLED, OUTPUT);
}
// Brief Loop
// Details Blink the LED
//
// Add loop code
void loop() {
digitalWrite(myLED, HIGH);
delay(500);
digitalWrite(myLED, LOW);
delay(500);
}
My builds are failing with two errors in Main.CPP
In the #elif (ARDUINO < 150) section:
line 304 fails: "A function-declaration is not allowed here before '{' token."
line 319 fails: "Expected `}' at end of input."
Any ideas?
Sorry, I haven't been able to replicate the issue.
What happens when you compile the templates directly without modifying them, embedXcode Local Library Project and embedXcode Sketch?
What happens when you compile the templates directly without modifying them, embedXcode Local Library Project and embedXcode Sketch?
Xcode reports good builds.
Ok, great news: so your configuration is fine.
The issue you've reported earlier comes from your sketch.
Please find a new release of the User Manual, with reference for debugging and improved presentation.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/_7922139_orig.png) (link) (https://itunes.apple.com/book/embedxcode/id667501748)
Ok, great news: so your configuration is fine.
The issue you've reported earlier comes from your sketch.
You evaded my question on what parts of the demo code aren't demo.
Please consider stripping all demo code out of your next release, perhaps as a separate project type. Trying to strip out demo code for EVERY new project is adding a level of complexity and potential building errors that might not be easy to find.
You evaded my question on what parts of the demo code aren't demo.
Please consider stripping all demo code out of your next release, perhaps as a separate project type. Trying to strip out demo code for EVERY new project is adding a level of complexity and potential building errors that might not be easy to find.
I haven't evaded your question as it doesn't concern embedXcode but rather Arduino.
#include "Arduino.h"
void setup() {
}
void loop() {
}
Please keep in mind that Xcode is a professional IDE, and thus requires a steep learning curve. I'd recommend starting first with the standard Arduino IDE and, when the framework is mastered, turn to Xcode with embedXcode. Should more advanced options be required, please consider embedXcode+.
I apologise if this basic question is already andswered but I could not find it via search or through google...
I just started using EmbedXCode (and Xcode for that matter). I have been able to create projects and download them to my Arduino Mega, all works very nicely. The IDE is so much nicer than the standard one.
However, I have not figured out how to create a new project from existing code that was created in another tool. The only way I have been able to accomplish this is to create a new project with the same name as my original sketch (.ino) and then copy/paste the code from the original script into the one created by Xcode when the project was created.
Is it possible to point Xcode at an existing code when creating a new project?
One reason I want to do this is I am also playing with the QM modelling tool (which is also it's own IDE), whcih generates code and I would like to be able to work with that code in Xcode.
Thanks in advance.
Is it possible to point Xcode at an existing code when creating a new project?
This question hasn't been raised before, you're the first!
The answer is no, as embedXcode doesn't feature an import utility.
However, could you configure QM to output the code to a given folder?
I'm not sure, but I don't see how that would solve my dilemma. QM wants to create the ino files from scratch and so does Xcode. Plus I have a bunch of existing sketches already written in the standard IDE I would like to be able to use in Xcode. It's frustrating needing to juggle 3 different IDEs. If I could I would prefer to use Xcode as much as possible.
Thanks for the quick response.
edit:
Also, has anyone else had issues with not being able to upload to a Mega in the standard IDE after doing an upload via Xcode? This is happening it me. I can upload in Xcode now but in the normal IDE I can't even upload the blink example. I've tired quitting everything and even rebooted a few times. Nothing seems to work. The IDE says the device is in use
Once embedXcode has uploaded the sketch, it opens a Terminal window for the serial console.
For the next upload, embedXcode automatically close the serial console. The Arduino IDE doesn't, hence the issue you're facing.
thanks again I really appreciate the help!. but I quit the terminal program and it does not solve anything. Is there any work around? Is there a process I can kill or some other action? As long as I need to juggle the IDEs this is going to come up
edit: hit or miss but it seems if I quit everything and then disconnect the usb cord, restart the Arduino IDE and then reconnect the USB I can get them to talk again Doesn't always work though.
Please refer to the User Manual Build at the section Upload the Project • Build and Upload • Display the Serial Console on a Terminal Window page 105.
I am using the QP framework libraries in my code. The are in the arduino/libraries folder. I can build the code in both the arduino IDE and in Xcode. However even after the successful build in Xcode, the include statement to one of the .h files in the library has a red exclamation point next to it that says "file not found" Because of this Xcode can not find the definition of anything defined in that file, or the ones it includes. This seems weird because the code builds.
Any ideas?
Sorry, but I'm not sure to understand your question correctly.
Code-sense is managed by a proxy target, Index. This target may display red dots while all the other targets for production run fine.
What's important is your sketch compiles and uploads.
I understand, my confusion is probably more with Xcocde than embedXcode. I am having lots of problems with the way Xcode deals with files in the Arduino libraries folders. Most 3rd party libraries contain examples as well as the regular library files. Most of my build issues are related to the build target trying to compile everything in the example directories inside the library directories. I had one library that contained code that would not build and caused build failures in my project. Now I am having trouble because I want to put a file in my project that has the same name as a file in one of the example directories. MY build fails because lots of things have multiple definitions.
Any idea what I am doing wrong or how to tell Xcode/embedXcode not to build those examples?
Thanks
embedXcode only compiles the main sketch in the project, here [font=Courrier]embed1.ino[/font].
embedXcoed doesn't compile other [font=Courrier]ino[/font] files from other folders.
I'm testing embedXcode on a regular basis with many different boards and libraries and haven't faced so far the issue you're describing.
thanks, no idea what I am doing incorrectly.
If I look in the builds directory under my project I can see that it created .d and .o for every file in the libraries directory, including all the example code.
please ignore these last few posts.... I think I figured out what was going on and it was a code issue. if it comes back I'll try to ask again with more info
Thanks for trying to help me.
Hello,
I have a big Problem with X-Code and Arduino Uno:
if i try to send Datas to the serialport "/dev/tty*" it does NOT work, if i use the Serialport "/dev/cu*" it works...
More Details i wrote here :
http://forum.arduino.cc/index.php?topic=207287
Please can anyone here help me? im freaking out :-(
Thank you!
Kaspar
To be sure: are you using embedXcode?
No i am using Apple Xcode 5.0.1
No i am using Apple Xcode 5.0.1
So I can't help you, sorry.
Hello,
I'm trying to use embedXcode for developing a project, but I can't seem to get anything to work. I've tried using Arduino 1.5.5, 1.0.5 and I have two computers, one runing xcode 4 and another with xcode 5. I've installed the correct versions of embedXcode, but I always end up with script errors such as these:
~/Documents/Arduino/libraries/VirtualWire/VirtualWire.cpp:14:22: WProgram.h: No such file or directory
~/Documents/Arduino/libraries/VirtualWire/VirtualWire.h:59: Variable or field 'vw_set_tx_pin' declared void
I'd really like to use embedXcode, but I just can't get it to work. Is there something simple that I'm missing?
My systems are:
Macbook Pro 15-inch, Mid 2009, 2.8 GHz Intel Core 2 Duo running 10.9.1
Mac Pro, 2006, 2.6GHz Xeon, Running 10.7.5
Thanks for the help!
#include "WProgram.h"
is no longer valid: it was the old Arduino 0023 IDE.
If you're using the Arduino 1.0 or 1.5 IDE, you need to specify #include "Arduino.h"
Please delete that old library and take a more recent one.
avenue33,
Thanks for the quick reply. I'm running the default sketch you get when you create e new project. I believe it has those includes within the #ifdef statements. Just to be sure I added #include "Arduino.h", but there was no change.
I've also attempted to compile for the Mega and the Uno (by making new projects) but no change
Also, when the dialog box saying that embedxcode is donationware, it get a bunch of what looks like html code within the box. This happens on both computers.
Cheers,
Please refer to this post: http://forum.arduino.cc/index.php?topic=49956.msg1456956#msg1456956
avenue33, that worked perfectly! Thank you!
Hello Again,
I'm having a strange problem. I'm attempting to test the SD card writing compatibility of embedXcode. So far if i compile the sketch and upload it It will only log 5 numbers. If I compile the same sketch in the Arduino IDE it will work fine. I'm not certain if it's a problem with my code, my installation, or embedXcode.
/*
SD card datalogger
This example shows how to log data from three analog sensors
to an SD card using the SD library.
The circuit:
* analog sensors on analog ins 0, 1, and 2
* SD card attached to SPI bus as follows:
** MOSI - pin 11
** MISO - pin 12
** CLK - pin 13
** CS - pin 4
created 24 Nov 2010
modified 9 Apr 2012
by Tom Igoe
This example code is in the public domain.
*/
#include <Arduino.h>
#include <SD.h>
// On the Ethernet Shield, CS is pin 4. Note that even if it's not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.
const int chipSelect = 4;
void setup()
{
// make sure that the default chip select pin is set to
// output, even if you don't use it:
pinMode(10, OUTPUT);
pinMode(53, OUTPUT);
// see if the card is present and can be initialized:
SD.begin(chipSelect);
}
void loop()
{
digitalWrite(13, LOW);
// make a string for assembling the data to log:
String dataString = "";
// read three sensors and append to the string:
for (int analogPin = 0; analogPin < 3; analogPin++) {
int sensor = analogRead(analogPin);
dataString += String(sensor);
if (analogPin < 2) {
dataString += ",";
}
}
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dataFile = SD.open("datalog_xcode.txt", FILE_WRITE);
// if the file is available, write to it:
if (dataFile) {
dataFile.println(dataString);
dataFile.close();
// print to the serial port too:
}
digitalWrite(13, HIGH);
}
Note: I removed the serial terminal output to see if that was causing the problems (and because I don't need it). It didn't change anything.
Thanks!
I don't know what could happen.
Does the [font=Courier]SD.h[/font] include a [font=Courier]#include "Arduino.h"[/font] statement?
Hello avenue33,
I thought it a long shot, this is a rather tough problem to try and troubleshoot without seeing the actual installation and devices. Seeing as how the code compiles I'm wondering if it's a build issue with the compiler. I'll try it on a couple different boards I've got lying around and see if I can come up with anything more specific. I'll post if I figure out anything.
EDIT:
Turns out it doesn't necessarily have anything to do with embedXcode. If you make the string variable used in the data logging example a global variable (as opposed to local) the sketch runs, although not exactly the same. Not sure of the cause here, might have to do with compiler settings?
Please See: http://forum.arduino.cc/index.php?topic=105631.0 (http://forum.arduino.cc/index.php?topic=105631.0)
End EDIT
Thanks again,
Fratink
Thank you for the update! Glad to know it works now.
Please find a new release of embedXcode.
- embedXcode • Jan 04, 2014 release 122 • Support for Energia 11 IDE, BLuno and Microduino boards
- embedXcode+ • Jan 04, 2014 release 122 • Support for Energia 11 IDE, BLuno and Microduino boards
This cumulated release includes support for two new boards, DFRobot BLuno (http://embeddedcomputing.weebly.com/2/post/2014/01/dfrobot-bluno-ble-arduino-uno.html) and Microduino (http://embeddedcomputing.weebly.com/2/post/2014/01/microduino-10-x-11-arduino.html); updated support for the new release 11 of Energia, and improvements for the Stellaris now Tiva C Series LaunchPad.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Want to provide feed-back and vote for the next features on embedXcode?
Try the new feed-back page at embedxcode.idea.informer.com (http://embedxcode.idea.informer.com/).
My plan is to proceed with an initial test for a couple of months before full implementation.
I just got a new iMac and installed EmbedXcode+ v126 and Xcode 5. All my projects have EmbedXcode legacy. How do I upgrade my projects to work with the new EmbedXcode+
I just got a new iMac and installed EmbedXcode+ v126 and Xcode 5. All my projects have EmbedXcode legacy. How do I upgrade my projects to work with the new EmbedXcode+
Congratulations for your new Mac and welcome to embedXcode+.
How many projects do you have?
The automatic update of the existing projects works created starting release 108 of embedXcode+.
I suggest the following procedure:
- create a new embedXcode project, in my example embed1
- run a build for the project
- open the folder of the project, something like .../embed1/embed1
- copy the About, Configuration, Makefiles and Utilities subfolders -see screenshot
- paste those files on each folder of your project
After, open each project and check the libraries used are mentioned on the main makefile:
APP_LIBS_LIST =
USER_LIBS_LIST =
I'm using this procedure myself and it's fast and reliable.
When I create a new project, I see both EmbedXcode and EmbedXcode+ templates. Is there a way to get rid of EmbedXcode. I don't think I need it now that I have plus.
Sure!
Please refer to the manual procedure at chapter Install the Template section Install embedXcode sub-section Uninstall the Template of the User Manual.
I'm evaluating the Arduino Yún and its different upload and console options.
First tests with standard USB and over-the-air upload, including Ethernet and WiFi, are successful :)
Another major improvement is the way libraries are managed. Based on the feed-back I've received, I plan to implement a simpler way of dealing with them.
By default, no library is included in the compilation process. Adding a library is done by
- using the standard statement [font=Courier]#include "library.h"[/font] in the sketch, and
- adding [font=Courier]library[/font] to [font=Courier]APP_LIBRARY = library[/font] to the main makefile.
Stay tuned!
Learn more (http://embedxcode.weebly.com/1/post/2014/01/embedxcode-arduino-yn-with-over-the-air-upload-and-console.html) • Download (http://embedxcode.weebly.com/download.html)
Please find a new release of embedXcode+.
- embedXcode • Jan 28, 2014 release 128 • Support for Arduino Yún with USB
- embedXcode+ • Jan 28, 2014 release 128 • Support for Arduino Yún with USB Ethernet WiFi
Release 128 of embedXcode supports the Arduino Yún connected to a USB port.
In addition, release 128 of embedXcode+ features upload and console over-the-air, through WiFi or Ethernet. The password is asked for during the process.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/3514145_orig.png)
Download (http://embedxcode.weebly.com/download)
Happy coding :)
Hi to all of you,
I downloaded embedXcode 129, installed it following your guide step by step, uploading is working seamlessly but I cannot get code-sense to work... The only weak workaround I found was to put Arduino.h in the Xcode "Sketchbook" group, then build the whole project.
This solution is certainly not the best, that's why I am asking your help... I am using Xcode 5.02 or 5.1.4 (I have both, same problem) with Arduino UNO (Arduino 1.5.5 IDE) on Mavericks 10.9.1 .
I tried :
- Off-course I build the projects once to launch the "automatic procedure" you describe in your very detailed Guide
- Reindex the whole project (Via project organizer as stated in your guide)
- Only include "Arduino.h" at the top of the .ino file
- Verify that all the projects files are present in "Project Properties" -> Targets -> Index -> "Build Phases" ->"Compile Sources"
- Create a Library project
- Create a Sketch project
- Uninstalling/Reinstalling embedXcode
- Create projects in different places on my iMac
- Move my Arduino Sketchbook folder (It was initially in my google drive folder, I tried to put it back at its original path (~/Documents/Arduino), still didn't work)
- Try on my second Mac (MacBook Pro on Mavericks 10.9.1, Xcode 5.0.2, Arduino 1.5.5)
Have a look at my attachment if it can be useful.
Thanks in advance, and thanks a lot for making this amazing tool.
I hope you will forgive me for my english, I am french.
Bonjour!
The same question was raised at the support portal (https://app.onedesk.com/html/feedback/?cid=embedxcode#) and the solution was to include #include "Arduino.h"
in the main sketch.
Maybe Xcode doesn't like conditional includes for code-sense.
Please refer to chapter 7 Find Solutions to Issues • section 1 Compatibility on the User Manual.
Merci pour la réponse rapide!
I already tried that, as you can see on my first attached picture, there is only "Arduino.h" included, and it still doesn't work...
Very strange, as it works fine on my MacBook...
(https://app.onedesk.com/cware/view/21918489)
Very strange indeed... What Arduino version do you use ?
Arduino 1.0.5
Is there an anti-virus installed? Are there other power-hungry processes running?
Indexing for code-sense on Xcode requires a lot of resources and thus can give mixed results.
There is no antivirus nor any power-hungry process...
But what I find weird is that if I put "Arduino.h" in the Sketchbook group in Xcode it works (at least with the Arduino.h prototypes)
I will try with 1.0.5 and get back to you !
If which folder Arduino.app is installed?
It is installed in /Applications/
I just tried with 1.0.5, same problem :(
On both of my computers.
I'm lost!
So am I :(
What libraries have you put in "Sketchbook/Libraries"? Only user libraries and no core libraries?
Update :
I got it working on the Guest account of the MacBook!
Something must be broken with my Xcode, on both of my Macs. I will try a clean install of Xcode.
Glad to know it worked for you and the cause was external to embedXcode :)
Yep but it still does not work on my main account !! Still investigating (Clean Xcode install did not change anything), I am now trying a full and clean Mavericks reinstall... (Yes I am - very - determined to make embedXcode work perfectly on my computers, it looks so great!!)
I recommend installing the Arduino 1.0.5 release as the 1.5.5 is still in beta.
Don't forget to launch the Arduino IDE once and define the sketchbook folder.
Good news!
After a clean install of OSX Mavericks 10.9.2, without installing any other application than Xcode 5.0.2, Arduino 1.0.5 and embedXcode 129, all is working like a charm.
I still do not know what caused the problem to happen on both of my Macs, could it be related to a sketchbook folder placed in a DropBox or Google Drive folder ? Or could it be related to the coexistence of both Xcode 5.0.2 and 5.1?4 ?
I am now reinstalling Dropbox and drive client applications, I keep my finger crossed...
Maybe Xcode 5.1. As it isn't yet available, I haven't tested embedXcode on it.
I don't know how shared folders like DropBox and Google Drive manage files authorisations.
Ok, I found a really interesting bug...
I will try to be as clear as possible.
I have on my iMac all the Adobe CS6 Master Collection installed, that makes a lot of applications beginning by the letter "A" in my Applications folder.
I launch Xcode and create a new embedXcode sketch project, build it once (Build Succeeded), delete all includes but "Arduino.h". (Code-sense doesn't work at this point).
I then select "Index" in the scheme menu and "Run" (I know that Index is not meant to be used, but it permitted me to find from where the error was coming from) of course it does not compile but when I look at the errors I can see that the first in the list explains that "Arduino.h" could not be found.
When I follow the exact same procedure on my MacBook (where I got code-sense working), it does find "Arduino.h".
Now I look at the second error in the list and on my iMac it is :
Argument list too long: recursive header expansion failed at /Applications/Adobe Dreamweaver CS6/Configuration/Snippets/~Deprecated/Form_Elements/DropDownMenus.
On my MacBook (where code sense is working) it is
Argument list too long: recursive header expansion failed at /Applications/iMovie.app/Contents/PlugIns/MediaProviders/MotionEffect.fxp/Contents/Resources.
Comparing those two errors leaded me to the hypothesis that "Arduino.h" on my iMac could not be found because the "Recursive header expansion" failed before analyzing "Arduino.app" since it failed in "Adobe Dreamweaver CS6", and so it could not find any core library as Arduino.h.
So, to test if I was right, I moved all of CS6 applications to a folded named "Z".
I followed the exact same procedure as before, and when I looked again at the errors the one saying that "Arduino.h could not be found" did disappeared.
The second error had also changed, and the "Recursive header expansion" failed during analyzing an app which is alphabetically after Arduino.h.
I then tried using the conventional "Build" scheme, and code-sense was working like a charm in the .ino file!
So to recap, I think that when embedXcode searches for Arduino.h and other core libraries in large Applications folders, it can fail if the Arduino.app is too far from the beginning of the list.
I hope I was clear enough for you to maybe resolve the bug in a later release, or I can explain in French if you prefer...
Thanks for all of your answers, and for having built a such amazing tool, It is so useful and powerful. I am looking into getting the embedXcode+ version really soon ! ;)
Thus is not a bug: Index in the target menu is a proxy target.
The additional target Index is a proxy target solely used for code-sense. Do not launch it.
Please refer to the user manual, chapter 4
Build and Upload the Project section 1
Select a Target.
Have you read the User Manual?
Avez-vous lu le Mode d'Emploi ?
Of course I read it, and I know Index isn't meant to be used as a scheme or anything, it is only useful for code-sense to work.
I just tried to analyze the errors when using "Index" as a scheme and it appeared that it permitted me to fix the bug.
Please read my full answer, I tried to be as clear as possible in describing the procedure I followed to find the bug. I can explain it in French if my English is not understandable enough, (I am sorry about that).
Glad to know it works now and thank you for investigating.
Actually, Index can't compile because the MCUs used by Arduino are unknown to the Mac platform.
I'm glad I could find where the problem was coming from, and hope you can find a fix for future versions.
I did saw several peoples having the exact same issue on the internet...
Thanks again for the great work you provided with embedXcode.
Just one more question, are you planning to include a "sort of debugger" as the one included in "Visual Micro" for boards like Arduino or Chipkit? I know that a true debugger is impossible to implement with those boards because they have not any hardware debugger but maybe one like the "Visual Micro" one ?
Thanks.
I'm glad I could find where the problem was coming from, and hope you can find a fix for future versions.
I did saw several peoples having the exact same issue on the internet...
The right place to go is the new OneDesk page (http://embedxcode.weebly.com/onedesk.html). This code-sense case was raised and solved.
Just one more question, are you planning to include a "sort of debugger" as the one included in "Visual Micro" for boards like Arduino or Chipkit? I know that a true debugger is impossible to implement with those boards because they have not any hardware debugger but maybe one like the "Visual Micro" one ?
Visual Micro is using a technique called
code injection for providing some sort of debugging. This monopolises the serial interface and is basically the same as [font=Courier]Serial.print()[/font].
Arduino doesn't provide any debugging facility except the [font=Courier]Serial.print()[/font]. chipKIT programmer costs USD27 and doesn't support GDB.
To perform real debugging, a hardware debugger is required.
As at today, the only boards featuring such built-in debugger are the LaunchPad boards from Texas Instrument:
- MSP430G2 LaunchPad (http://embeddedcomputing.weebly.com/launchpad-msp430.html) with 16-bit 16 KB flash, 512 bytes RAM, 16 MHz MCU, at USD10
- MSP430F5529 LaunchPad (http://embeddedcomputing.weebly.com/launchpad-msp430f5529.html) with 16-bit 128KB flash, 8 KB RAM, 25 MHz MCU, at USD13
- and Stellaris LaunchPad (http://embeddedcomputing.weebly.com/launchpad-stellaris-lm4f.html) now Tiva C LaunchPad (http://embeddedcomputing.weebly.com/launchpad-tiva-c-series.html) with ARM 32-bit 256 KB flash, 32 KB RAM, 80 MHz MCU including FPU, at USD13, best value ever
They are supported by Energia, a fork of Arduino, and of course by embedXcode (http://embedxcode.weebly.com) with external debugging (http://embedxcode.weebly.com/debugging.html). They share the same language and the same framework.
Give the LaunchPad a try: they are cheaper and more powerful!
The right place to go is the new OneDesk page. This code-sense case was raised and solved.
I did saw this case but the solution didn't completely resolved the problem, I can post my problem and the workaround on OneDesk page if you want me to!
As at today, the only boards featuring such built-in debugger are the LaunchPad boards from Texas Instrument:
...
- and Stellaris LaunchPad now Tiva C LaunchPad with ARM 32-bit 256 KB flash, 32 KB RAM, 80 MHz MCU including FPU, at USD13, best value ever
Thanks a lot for your explanations, you convinced me to look into the ARM based Tiva C Launchpad, and I bought it ! Can't wait to try it with Xcode !
I will now look into embedXcode+, since it is required to use the debugging functions.
Thanks again, and keep up the good work on embedXcode !
Please find a new release of embedXcode.
- embedXcode • Feb 08, 2014 release 131 • Improved indexing for code-sense
- embedXcode+ • Feb 08, 2014 release 131 • Improved indexing for code-sense
Release 130 improves support for Arduino Mega2560 with Arduino 1.5.5 IDE. Release 1.5.5 of the Arduino IDE is still in beta.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/4673392_orig.png)
Release 131 improves reference indexing for code-sense.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Please find an update of embedXcode.
- embedXcode • Feb 10, 2014 release 132 • Warning and patches for Arduino 1.5.5
- embedXcode+ • Feb 10, 2014 release 132 • Warning and patches for Arduino 1.5.5
Release 1.5.5 of the Arduino IDE is still in
beta and unstable. As a matter of facts, each new release of the Arduino 1.5.x IDE includes many changes, some of them undocumented.
My advice:
- Use Arduino 1.5.5 only for boards requiring it, like Arduino Due --tested by users, not by me-- and Arduino Yún --fully tested with upload and console through USB and over-the-air by Ethernet and WiFi.
- Otherwise, please avoid that beta release and stick with Arduino 1.0.5 instead.
Download (http://embedxcode.weebly.com/download.html)
Hi,
I'm using the embedXcode+ • Feb 10, 2014 release 132 with the "embedXcode+ Example" template
Xcode 5.0.2
Mac OSX 10.9.1
If the user library is updated in Xcode, the "Fast" Scheme seems not compile the changed library?
The Make and Fast targets don't compile the user libraries, only the main sketch and the local libraries.
Please refer to the chapter
Build and Upload the Project section
Select a Target sub-section
Faster Targets of the
User Manual:
The second time the Make and Fast targets are launched, they only compile the main sketch and the local libraries, and link them reusing the foundation archive built previously. The Fast target also uploads and opens a serial window in Terminal.
I've found it in the user manual. It's greatly improved.
I'll review it before posting next time~~
Thank you all the same~~
You're welcome!
If you want to work on a library, the best way is to have it on the same folder where the main sketch is located.
This way, libraries under the user sketchbook are protected against unwanted editing.
Please find a new release of embedXcode.
- embedXcode • Mar 04, 2014 release 136 • Stability improvement
- embedXcode+ • Mar 04, 2014 release 136 • Folders for local libraries and warning messages
Release 136 of embedXcode and embedXcode+ includes stability improvement.
Cumulated release 136 of embedXcode+ introduces folders for local libraries (release 133) and a dedicated variable (release 134) to select among them local for compilation.
Cumulated release 136 of embedXcode+ also improves feed-back from compilation with optional warning messages (release 135). Turned off by default, they provide useful information about possible causes of errors, for example unused variables.
(http://www.weebly.com/uploads/1/1/6/2/11624344/4543564_orig.jpg)
Please refer to the release notes for more details.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
I'm having problems getting the warnings feature to work. I just installed ver 136 (I have plus). I opened an existing project and told embedxcode to upgrade when asked. I went into the Makefile and noticed the upgrade process did not add WARNING_OPTIONS. So I added:
WARNING_OPTIONS = unused-variable unused-function unused-label unused-value
I put it right after the #SERIAL_BAUDRATE = 19200 line.
I created some variables that are not used and ran Build, but I didn't get any warnings.
I'm having problems getting the warnings feature to work. I just installed ver 136 (I have plus). I opened an existing project and told embedxcode to upgrade when asked. I went into the Makefile and noticed the upgrade process did not add WARNING_OPTIONS. So I added:
WARNING_OPTIONS = unused-variable unused-function unused-label unused-value
You're right: the main makefile isn't updated because it contains specific settings to be kept, as the list of the libraries.
I took the option not to update the makefile to save the settings.
I put it right after the #SERIAL_BAUDRATE = 19200 line.
I created some variables that are not used and ran Build, but I didn't get any warnings.
Were the variables you created global or local?
Keep in mind compilation has optimisation options to remove unused portions of the code. Those optimisation options may interfere with the warning messages. Please refer to the Using the GNU Compiler Collection Manual.
Were the variables you created global or local?
They were local
Fixed with embedXcode+ release 137. Thank you for noticing me.
Fixed with embedXcode+ release 137. Thank you for noticing me.
Works now, thanks!
Fixed with embedXcode+ release 137. Thank you for noticing me.
Works now, thanks!
Great :)
I've just downloaded the latest version of embedXCode, i have the latest version of Xcode and have tried version 1 and 1.5 of the Arduino library and yet everytime i try to build i end up with:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference to `main'
The bit that confuses me as and i'm not adding or removing anything. Im starting a new project. Hitting build as the tutorial says so it can setup and it always comes up with this? Im trying to build this for an Arduino Duo. Can anyone even point me in the right direction ? I'm assuming no one else gets this.
Full log: http://cl.ly/text/2K0t3e3q1R32
I've just downloaded the latest version of embedXCode, i have the latest version of Xcode and have tried version 1 and 1.5 of the Arduino library and yet everytime i try to build i end up with:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference to `main'
Every time I create a new project using EmbedXcode, I change main.cpp to main2.cpp
Every time I create a new project using EmbedXcode, I change main.cpp to main2.cpp
Hey that worked! Thank you. Why is the main.cpp file even put there if its not meant to be there ? Bug ? Issue with updated Xcode ?
Using the new feature to turn on warning messages I'm mgetting an error for this code:
Serial.println(F("Hello World"));
The error is: Only initialized variables can be placed into program memory area
It seems the warning might be a GCC bug (http://forum.arduino.cc/index.php?topic=107141.0) and shouldn't display at all. Regardless, is there a way to suppress this warning message? My makefile settings are:
WARNING_OPTIONS = unused-variable unused-function unused-label unused-value
I looked around on GCC Warnings Page (http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Warning-Options.html#Warning-Options), but I wasn't able to figure it out.
Remember, warnings are warnings, not errors.
Remember, warnings are warnings, not errors.
True, but there are a lot of these warnings in some of my sketches and it really clutters things up, making it harder to spot the other warnings.
From the
Releases NotesThe [font=Courier]all[/font] option usually generates a very long list of warning messages, making the analysis difficult if not impossible. Moreover, only the 200 first messages are displayed.
The solution consists on selecting a scope and targeting specific warnings.
The solution consists on selecting a scope and targeting specific warnings.
I'd like to do this, but I'm not sure where to start in order to learn more about selecting a scope and targeting specific warnings. I did some searching online but didn't find much. Can you point me to a good resource for this?
I provide two sets of examples on the Release Notes.
I'm trying to upload to a Leonardo, but xcode doesn't see it. I get this error:
---- Size ----
Binary sketch size: 21028 bytes (of a 28672 byte maximum)
Estimated SRAM used: 1385 bytes (of a 2560 byte maximum)
Elapsed time: 0.8 s
---- Reset ----
screen -X kill
No screen session found.
make: [reset] Error 1 (ignored)
sleep 1
9.2-RESET: < leonardo ./ ./
stty -f /dev/tty.usbmodem14644111 1200
sleep 2
---- Upload ----
9.3-UPLOAD: < leonardo ./
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -D -patmega32u4 -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -cavr109 -b57600 -P/dev/tty.usbmodem14644111 -Uflash:w:Builds/embeddedcomputing.hex:i
Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
make: *** [raw_upload] Error 1
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exi
I don't have any other Arduinos plugged into the serial ports. I'm using EmbedXcode+ 137. I have not problem uploading to the Leonardo with the Arduino IDE (v1.05)
I don't have any other Arduinos plugged into the serial ports. I'm using EmbedXcode+ 137. I have not problem uploading to the Leonardo with the Arduino IDE (v1.05)
I was unable to replicate the issue with the exact same configuration --Arduino Leonardo, embedXcode 137, Arduino 1.0.5.
Have you tried and pressed the RESET button?
Please send me by mail the full Log Navigator output.
Please find a new release of embedXcode.
- embedXcode • Mar 10, 2014 release 138 • Support for Arduino Mini with ATmega328-3.3V
- embedXcode+ • Mar 10, 2014 release 138 • Support for Arduino Mini with ATmega328-3.3V
Download (http://embedxcode.weebly.com/download.html)
I'm trying to upload to a Leonardo, but xcode doesn't see it.
I got xcode working with the Leonardo. I press and release the reset button on the Leonardo. As soon as I release the button I upload the sketch from Xcode. My next problem is I can't get the serial monitor working in Terminal with the Leonardo. I'll choose the Fast scheme and it opens the terminal windows, but not output from the Leonardo appears.
Serial ports in the Leonardo are tricky.
See Guide to the Arduino Leonardo and Micro (http://arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo#toc3) for more details.
Serial ports in the Leonardo are tricky.
See Guide to the Arduino Leonardo and Micro (http://arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo#toc3) for more details.
Even with the Arduino IDE, I've seen the Leonardo over serial port behave a bit finicky. The only real advice in the link above was to hold down the reset button then upload - which works pretty well. This is close to what I'm doing with Xcode, but it seems that Xcode will fail right away if it doesn't see a serial port while the Arduino IDE keeps looking for a bit. So with the Arduino IDE you can start the upload, then release the reset button. With Xcode you have to release the reset button then upload. Unfortunately, this doesn't seem to help with the Serial Monitor in the Terminal window issue when using Xcode. Do you have any tips for getting this to work? Is there anything you can change in EmbedXcode that would help?
The problem with the Leonardo board is the way Serial ports are managed through USB. The latency you describe is caused by the operating system that needs to re-enumerate the USB devices. What version of Mac OS X do you have?
I'm investigating. In the meantime, just select the target Serial to open the serial console, or even better, use the great CoolTerm terminal (http://freeware.the-meiers.org).
(http://freeware.the-meiers.org/CoolTerm_Screenshot_Mac.png)
The problem with the Leonardo board is the way Serial ports are managed through USB. The latency you describe is caused by the operating system that needs to re-enumerate the USB devices. What version of Mac OS X do you have?
I've got Mavericks running on a new iMac I got a month ago.
Mavericks should explain the slow USB enumeration.
Please find a maintenance release of embedXcode.
- embedXcode • Mar 12, 2014 release 139 • Stability improvement for Arduino Leonardo
- embedXcode+ • Mar 12, 2014 release 139 • Stability improvement for Arduino Leonardo
Thanks ScootG!
Also, embedXcode runs fine on Xcode 5.1.
Download (http://embedxcode.weebly.com/download.html)
I was using EmbedXCode (v1.39) with my Arduino Pro-Mini 3.3v and it was having trouble finding the serial port. Uploading would fail right away. So I ran "ls /dev/tty.usb*' in terminal and in the mini 3volt xcconfig file I changed
BOARD_PORT = /dev/tty.usbmodem*
to
BOARD_PORT = /dev/tty.usbserial-AH01PAW8
This solved the problem. Is there a way to make EmbedXcode work better with usbmodem*? I gather the whole serial port thing is a bit tricky.
Also, I noticed that a few times I uploaded the sketch and Xcode said it was successful but the changes I made didn't take, so the program really didn't upload - strange. I did see the Tx and Rx LEDs blink rapidly. This happened when the Target was "Upload", but sometimes it worked properly on Upload. I changed the target to "Fast" and the program was actually uploaded, but it may have been a coincidence that it worked with the Fast target.
I'm running on iMac with Mavericks and using Adafruit FTDI Friend (http://www.adafruit.com/products/284). This morning I installed EmbedXcode v1.41 and had the same issue with the serial port.
Actually, you're using an external programmer which is not supported by embedXcode+. embedXcode+ already supports the following programmers:
- Adafruit USBtinyISP programmer,
- Protostack USBASP programmer and
- Sparkfun 5V FTDI Basic programmer.
Each programmer --either included in the board like in the Arduino Uno or external as the Adafruit USBtinyISP or the one you use-- has its specific address --e.g. [font=Courier]/dev/tty.usbmodem1411[/font] or [font=Courier]/dev/tty.usbserial-AH01PAW8[/font], respectively. The address is defined in the board configuration file.
The way to handle this is to change the default [font=Courier]BOARD_PORT[/font] on the board configuration file as you did or to uncomment and specify a port after [font=Courier]BOARD_PORT[/font] on the main makefile.
# BOARD_PORT is optional
# If not defined, BOARD_PORT = /dev/tty.usb* (default)
#
BOARD_PORT = /dev/tty.usbserial-AH01PAW8
For more information, please refer to
- chapter: User the Project
- section: Add Files
- sub-section: Add a Configuration File for a New Board
- sub-section: Define a Specific Programmer for a New Board
The
Fast target uses the very same procedure for uploading as the
All and
Upload targets you may have used.
There are too many devices --Mac, programmer, board-- and too many parameters involved --Xcode, embedXcode template, Arduino tool-chain, uploader, boot loader-- as possible causes to identify one for sure.
Please find a release of embedXcode.
- embedXcode • Mar 14, 2014 release 141 • Stability improvement
- embedXcode+ • Mar 14, 2014 release 141 • Stability improvement
This release fixes small glitches reported by the users. Thanks!
Download (http://embedxcode.weebly.com/download.html)
The way to handle this is to change the default [font=Courier]BOARD_PORT[/font] on the board configuration file as you did or to uncomment and specify a port after [font=Courier]BOARD_PORT[/font] on the main makefile.
Thanks.
Are the board config files over-written when you upgrade an existing project to the latest version of EmbedXcode?
Thanks.
Are the board config files over-written when you upgrade an existing project to the latest version of EmbedXcode?
You're welcome!
Yes, the board configuration files are going to be over-written by the upgrade.
Hence the solution of modifying the main makefile, which is preserved from being updated.
Hence the solution of modifying the main makefile, which is preserved from being updated.
Modifying the makefile seems like the best approach. It would be really nice if EmbedXcode supported multiple BOARD_PORT definitions. Embedxcode would try the first, if that failed, it would try the next, and so on.
embedXcode already manages multiple ports when 2 boards are connected.
A dialog box pop-ups and asks to select which one of the 2 boards to upload the sketch to.
(http://forum.arduino.cc/index.php?action=dlattach;topic=49956.0;attach=72974;image)
Adding selection among multiple ports for one board would conflict with this feature.
Hardcoding or restricting the path of the port on the main makefile is an acceptable solution.
Please find a new release of embedXcode.
- embedXcode • Mar 26, 2014 release 143 • Improved code sense for libraries
- embedXcode+ • Mar 26, 2014 release 143 • Improved code sense for libraries
Release 143 of embedXcode and embedXcode+ includes improved code-sense for libraries.
Please refer to the release notes for more details.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
I'd like to see the Iteaduino Lite board supported by EmbedXcode
See: http://imall.iteadstudio.com/iteaduino-lite.html
I got a bunch of these recently and they seem pretty nice. You can operate at 3.3v or 5v and they have lots of pads so you can solder leads right to the board. They only cost $8.
I'm not sure adding this specific board makes sense.
- With 8 KB of flash, this board seems pretty limited and expensive.
- Adding more boards makes embedXcode more difficult to use and to maintain.
- How many users for this board?
You can try the procedure Add a Configuration File for a New Board described in the User Manual.
I recommend using the support page at http://embedxcode.weebly.com/onedesk.html
I've been interviewed by Michael James of the Open Source Hardware Group.
- OSHGroup 040: Use embedXcode to program multiple development boards with Arduino code
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/4562357_orig.png)
Go and listen the podcast (http://opensourcehardwaregroup.com/oshgroup-040-use-embedxcode-to-program-multiple-development-boards-with-arduino-code/)!
Andy, a user of embedXcode, posted in his blog a review of the template for Xcode.
- embedXcode: A Better Way to Develop for Arduino on the Mac using Xcode (http://stuffandymakes.com/2014/04/05/embedxcode-a-better-way-to-develop-for-arduino-on-the-mac-using-xcode/)
Go and read it at Stuff Andy Makes - DIY, make, tinker, play (http://stuffandymakes.com/2014/04/05/embedxcode-a-better-way-to-develop-for-arduino-on-the-mac-using-xcode/)
@avenue33
With the latest Cosa update I understand that you have got the Xcode code-sense work. Does this mean that the Cosa documentation is now available as pop-up boxes? As all member functions are fully documented with the doxygen-style this would give a major advantage when learning to use the Cosa classes. Most of the Arduino/Wiring code base is not documented in this style.
Are there any code-sense specific tags that can be used to improve documentation?
Also does the code-sense also handle auto-completion?
Cheers!
@kowalski
Yes, code-sense, auto-completion and tool-tip-texts are now nicely managed by embedXcode.
Here are two examples, taken from my review of Cosa (http://embeddedcomputing.weebly.com/cosa-an-alternative-framework-for-avr-boards.html):
(http://embeddedcomputing.weebly.com/uploads/1/1/6/2/11624344/2026690.png?452)
(http://embeddedcomputing.weebly.com/uploads/1/1/6/2/11624344/3514560_orig.png)
I need to play more with Cosa before answering the other question.
@avenue33
This looks great and very much what I was hoping for with the Xcode platform.
The hours of pushing an industry strength programming style, object-orientation and rich documentation is now starting to pay off. This is a quantum leap compared to the Arduino/Wiring core code base.
Getting documentation direct and the list of member functions when typing helps a lot when learning a large object-oriented platform as Cosa.
Nice work!
Nice work!
You're welcome!
Have you considered other platforms?
Have you considered other platforms?
Please see my answers here (http://forum.arduino.cc/index.php?topic=150299.msg1671398#msg1671398) :)
Cheers!
Hello, I just started using embedxcode+ and encountered a strange situation.
I used "Blink" sketch for trial. Build succeeded and the log didn't report any errors but the board doesn't change the behaviour (i.e. interval of the blink).
I wondered if embedxcode didn't upload the sketch properly.
The board is Uno and OS X 10.9.2. & Xcode 5.1.1. Arduino1.0.5 IDE can upload to the same board without a problem.
I uploaded the "blink" from Arduino IDE first then tried to overwrite with embedxcode to see if upload is OK or not.
But the board didn't change the interval of the blink at all.
What could be the cause of the problem?
I tried full path for "BOARD_PORT" in MakeFile but no change.
The log says "avrdude: writing flash (2312 bytes):" but the size of the "embeddedcomputing.hex" file is 7kb in Finder instead.
Does this mean it was not writing all the codes to the board?
Any help will be appreciated. The part of the log is at the bottom.
Jabbish.
ExternalBuildToolExecution All
embedXcode
embedXcode+
----------------------------------
Embedded Computing on Xcode
© Rei VILO, 2010-2014
All rights reserved
http://embedXcode.weebly.com/
embedXcode • Apr 16, 2014 release 148 • Fix for project name and path
embedXcode+ • Apr 17, 2014 release 149 • Stability enhancements
---- Port ----
Uploader avrdude
AVRdude /dev/tty.usbmodemfa131
Programmer arduino
Serial /dev/tty.usbmodemfa131
---- Libraries ----
. Core libraries from /Applications/Arduino
Arduino Client HardwareSerial IPAddress Platform Print Printable Server Stream USBAPI USBCore USBDesc Udp WCharacter WString binary new wiring_private
. Application libraries from /Applications/Arduino
0
. User libraries from /Users/................/Documents/Develop/Embeded/Arduino/Sketches
0
. Local libraries from .
==== Info done ====
==== All ====
---- Clean ----
---- Compile ----
---- Size ----
Binary sketch size: 2312 bytes (of a 32256 byte maximum)
Estimated SRAM used: 207 bytes (of a 2048 byte maximum)
Elapsed time: 1.7 s
---- Reset ----
screen -X kill
sleep 1
---- Upload ----
9.3-UPLOAD: < uno ./
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -D -patmega328p -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -carduino -b115200 -P/dev/tty.usbmodemfa131 -Uflash:w:Builds/embeddedcomputing.hex:i
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: reading input file "Builds/embeddedcomputing.hex"
avrdude: writing flash (2312 bytes):
Writing | ################################################## | 100% 0.38s
avrdude: 2312 bytes of flash written
avrdude: verifying flash memory against Builds/embeddedcomputing.hex:
avrdude: load data flash data from input file Builds/embeddedcomputing.hex:
avrdude: input file Builds/embeddedcomputing.hex contains 2312 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.30s
avrdude: verifying ...
avrdude: 2312 bytes of flash verified
avrdude done. Thank you.
---- Serial ----
osascript -e 'tell application "Terminal" to do script "screen /dev/tty.usbmodemfa131 9600"'
tab 1 of window id 223
==== All
I just installed EmbedXcode+ ver 149, but when I opened a project, I was not prompted to upgrade. I ran the Build scheme and looked at the log and it said embedxcode ver 141.
The board is Uno and OS X 10.9.2. & Xcode 5.1.1. Arduino1.0.5 IDE can upload to the same board without a problem.
I uploaded the "blink" from Arduino IDE first then tried to overwrite with embedxcode to see if upload is OK or not.
But the board didn't change the interval of the blink at all.
That's really strange. Everything works fine on my MacBook with the very same configuration.
Result is:
---- Size ----
Binary sketch size: 1184 bytes (of a 32256 byte maximum)
Estimated SRAM used: 10 bytes (of a 2048 byte maximum)
For technical issues, please use the OneDesk portal (http://embedxcode.weebly.com/onedesk.html).
I just installed EmbedXcode+ ver 149, but when I opened a project, I was not prompted to upgrade. I ran the Build scheme and looked at the log and it said embedxcode ver 141.
It seems there's been a typo on the name of the folder for the project templates, erroneous [font=Courier]Project Template[/font] in singular instead of the correct [font=Courier]Project Templates[/font] in plural.
To fix this,
- create a new project [font=Courier]embed1[/font],
- copy the file [font=Courier]embed1/embed1/Utilities/embedXcode_check[/font] and
- paste into the folder [font=Courier]oldProject/oldProject/Utilities[/font] of your old project.
For technical issues, please use the OneDesk portal (http://embedxcode.weebly.com/onedesk.html).
avenue33
After updated to release 150 and created a new project with the release 150, the problem has gone away.
Thanks and regards,
Jabbish
I just installed release 151. I opened a project on release 148 or 149 and embedxcode+ upgraded my project. But in the log it said it updated it to ver 150.
Sorry, I can't replicate the issue.
Was the project created with embedXcode instead of embedXcode+? embedXcode release is still at 150.
For technical issues, please use the new help portal (http://embedxcode.weebly.com/onedesk.html).
Please find a new release of embedXcode+.
- embedXcode+ • Apr 23, 2014 release 151 • Added My Boards configuration file
How to proceed:
- Edit and customise the specific board called My Board on embedXcode+.
- Call the utility Update My Board to add the new board to the embedXcode+ templates Example, Local Library and Sketch.
- Create a new project: the board My Board is available for selection.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6127903_orig.png)
Please refer to the release notes for more details.
Based on the feed-back I've received for the last couple of months, I've reconsidered the provider for the help desk (http://embedxcode.weebly.com/help-desk.html) and selected FreshDesk, with a fast, light and modern interface.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/2444360.png)
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Each board displays a name on the USB ports for uploading the sketch and visualising the serial console.
However, some boards take the name of the hardware USB port while other provides a specific name whatever the port there're connected too.
Thank you very much for helping me finding the names of the USB ports.
Take the survey for Arduino boards (http://rei-vilo.polldaddy.com/s/usb-ports-names).
Please find a new release of embedXcode.
- embedXcode • Apr 28, 2014 release 152 • Improved boards USB ports names
- embedXcode+ • Apr 28, 2014 release 152 • Improved boards USB ports names
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Please find a new release of embedXcode+.
- embedXcode+ • Apr 29, 2014 release 153 • Arduino Yún password and address
During the first compilation, embedXcode looks for the Arduino Yún board and checks the password.
If the Arduino board isn't found on the network, a window asks for the IP address.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/975051_orig.png)
A message box asks for the password.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/8621550_orig.png)
Download (http://embedxcode.weebly.com/download.html)
Please find a new release of embedXcode.
- embedXcode • May 12, 2014 release 158 • Maximum size for RAM
- embedXcode+ • May 12, 2014 release 158 • Maximum size for RAM
The cumulated embedXcode+ release also includes improved boards USB ports names, USB type and keyboard layout selection for Teensy, customised path for IDE applications, and optional serial console for Fast target.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Please find a new release of embedXcode.
- embedXcode • May 14, 2014 release 159 • Fix for Arduino 1.5.6 intricate libraries
- embedXcode+ • May 14, 2014 release 159 • Fix for Arduino 1.5.6 intricate libraries
As the Arduino IDE 1.5.6r2 is still in beta, support for this IDE remains experimental.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Please find a new release of embedXcode.
- embedXcode • Jun 18, 2014 release 163 • Support for additional Arduino boards
- embedXcode+ • Jun 20, 2014 release 164 • Support for LightBlue Bean
The LightBlue Bean board is an Arduino with Bluetooth, more specifically an ATmega328P with a CC2540-based Bluetooth Low Energy or BLE radio.
Additional Arduino boards include Arduino Pro, Mini, Nano.
(http://forum.arduino.cc/index.php?action=dlattach;topic=49956.0;attach=85894;image)
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Hi,
I have managed to compile, build and upload an sketch to an Arduino Due successfully :) Yay!
However, when if I remove it from the serial port, I am not able to compile the code anymore.
Is this a limitation/restriction ? Do I have to have an Arduino connected to the USB in order to just compile/build the hex ?
Thanks!
Nevermind :)
RTFM on page 114/115: change "Build All" to just "Build".
Thanks!
Hi,
I have managed to compile, build and upload an sketch to an Arduino Due successfully :) Yay!
However, when if I remove it from the serial port, I am not able to compile the code anymore.
Is this a limitation/restriction ? Do I have to have an Arduino connected to the USB in order to just compile/build the hex ?
Thanks!
:)
Hi, it is me again:
I have followed the manual to add libraries to my sketchfolder.
However, I still get a "no such file or directory" when including any of the libs.
I believe the steps are:
+ add the libraries directories according to page 69;
+ define the SKETCHBOOK_DIR variable;
+ add the library name to the Makefile variable USER_LIBS_LIST;
Is there something else I am missing ?
Thanks for any pointers!
Does the main sketch mention #include "library_name"?
Yes, I am including the library in the main sketch file (ino).
However, calling Build (Cmd-B on a Mac) for individual targets (Build, Upload, Serial) works.
Calling Build for the target "All" gives a "Shell Script Invocation Error". Libname.h: no such file or directory.
Thanks again,
That's really strange, as the target All calls Clean, Build, Upload and then Serial.
Thanks, I have just deleted everything and started from scratch and it works :)
Another question:
+ I want to keep the code and classes organised inside subfolders on the main project directory; can I just drag and drop these folders containing classes inside the project (and tick the "index" target) ? These classes reference each other so would it be possible to configure USER_HEADER_SEARCH_PATH to include these folders for compilation ?
Thanks again!
By default, Xcode indexes all the .h and .cpp in the folder of the main project directory. Just be sure to check the Index target when creating new ones.
Thanks avenue33,
I believe I did not express myself properly. To better exemplify I did two tests:
1. Drop a class (cpp and h files) inside the root directory of the xcode project (where main.ccp, Makefile and everything is). Compilation works fine.
2. Drop a directory which contains my class files inside the root directory. Compilation does not work.
I believe it is a problem with the search paths for the included files. Or maybe this is not supported and I need to place all cpp and h files in the root directory.
Thanks again,
By default, Xcode indexes all the .h and .cpp in the folder of the main project directory. Just be sure to check the Index target when creating new ones.
Directories with libraries is supported in embedXcode+ but not in embedXcode.
May I suggest you to use the help desk (http://embedxcode.weebly.com)? Attaching files and screen-shots are much easier.
Thanks avenue33, I did not notice it was limited to the + version.
These are not Libraries but some Classes I wrote. Well, the definition of Classes and Libraries can be interchanged in this context :) So I guess it apply to Classes inside directories as well ?
Do you plan to support Xcode 6 when it comes out ?
Thanks again,
The template for classes is very close to the template for library except that it comes pre-populated with a class.
Sure, I plan to investigate and add support to Mac OS X 10.10 Yosemite or Xcode 6 (http://embedxcode.weebly.com/blog/embedxcode-o-mac-os-x-1010-yosemite-and-xcode-6) when they're available.
Please find a new release of embedXcode.
- embedXcode • Jul 09, 2014 release 166 • Support for Arduino IDE 1.5.7 beta
Release 166 supports the Arduino IDE 1.5.7 beta for both Java 6 and Java 7, the previous Arduino IDE 1.5.6 beta and the mainstream Arduino IDE 1.0.5.
Download (http://embedxcode.weebly.com)
Hello, I want to know if can I debug from XCODE using embedxcode. Please say yes because I bought personal license.
best regards
As per chapter • section
Debug the Project • Check the Configuration of the User Manual, the Debug page (http://embedxcode.weebly.com/debugging.html) on the website and the Debugger Compatible Boards (http://embedxcode.freshdesk.com/support/solutions/articles/1000046740) solution on the support desk,
Debugging requires boards with a built-in hardware debugger. Debugging has been tested successfully on the following boards:
• LaunchPad MSP430G2,
• LaunchPad MSP430F5529,
• LaunchPad MSP430FR5969,
• Experimenter Board MSP430FR5739,
• LaunchPad Stellaris LM4F120 now Tiva C Series TM4C123,
• Connected LaunchPad with Tiva C Series TM4C129,
• chipKIT Uno32 with the external chipKIT PGM programmer- debugger.
For more information on how to install the tools, please refer to chapter
Debug the Project of the User Manual.
I was reading how there are several alternatives in terms of referencing the user-contributed libraries in makefile for embedXcode for arduino. namely these options are 0 blank or name_of_library
example makefile
APP_LIBS_LIST = 0
USER_LIBS_LIST = 0
no libraries are compiled therefore this option is the fastest
APP_LIBS_LIST =
USER_LIBS_LIST =
all libraries are compiled therefore this option is the slowest
APP_LIBS_LIST = [insert library name]
USER_LIBS_LIST = [insert library name]
only the referenced libraries are compiled therefore should the sketch should function on a per project basis therfore slower than 0 but faster than all
my question is how do I refernce multiple libraries in the line
USER_LIBS_LIST
for example is it a comma or tab seperated list, is it one library per line, is it a semi-colon or colon seperated list, do the entries have to be seperated by quotes (single ' or double "), or do they have to be seperated by parenthesis (), square bracketts [], or curly bracketts {}?
my question is how do I refernce multiple libraries in the line
USER_LIBS_LIST
for example is it a comma or tab seperated list, is it one library per line, is it a semi-colon or colon seperated list, do the entries have to be seperated by quotes (single ' or double "), or do they have to be seperated by parenthesis (), square bracketts [], or curly bracketts {}?
Just mention the names of the libraries separated with spaces.
LOCAL_LIBS_LIST = LocalLibrary AnotherLocalLibrary
Please note this requires the libraries to be inside folders.
Please find a new release of embedXcode.
- embedXcode • Jul 12, 2014 release 168 • Support for Arduino Micro board
- embedXcode+ • Jul 17, 2014 release 169 • Improved Document and Distribute targets
This new release adds support for the Arduino Micro board.
The new embedXcode+ release improves the Document and Distribute targets, based on the Doxygen standard.
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Please find a new release of embedXcode.
- embedXcode • Jul 31, 2014 release 171 • Support for Intel Galileo and Gen2
- embedXcode+ • Jul 31, 2014 release 171 • Support for Intel Galileo and Gen2
Remember to always power the board before connecting the USB cable!
Download (http://www.weebly.com/download.html)
Hi,
I have a question. I want to use a display with I2C backpack. In the Arduino IDE this code with the libraries work great:
http://www.instructables.com/id/I2C-LCD-Controller-the-easy-way/step5/The-code-Part-II/ (http://www.instructables.com/id/I2C-LCD-Controller-the-easy-way/step5/The-code-Part-II/).
I also tried this in embedXcode because I like Xcode for the Autocompletion and Syntax-highlighting.(embedXcode is great project and you do a good job!)
But for the first time I don't understand what I do wrong.
I've imported the libraries but Xcode show a lot of errors.
Here the code with the errors:
https://www.dropbox.com/s/qvwu0mk603xo2la/Screenshot%202014-08-07%2019.52.02.png (https://www.dropbox.com/s/qvwu0mk603xo2la/Screenshot%202014-08-07%2019.52.02.png)
Here the makefile:
https://www.dropbox.com/s/0dyh2sxzmv6r0xq/Screenshot%202014-08-07%2019.52.54.png (https://www.dropbox.com/s/0dyh2sxzmv6r0xq/Screenshot%202014-08-07%2019.52.54.png)
and here only the errors:
https://www.dropbox.com/s/5o804c4cnktvci6/Screenshot%202014-08-08%2000.51.35.png (https://www.dropbox.com/s/5o804c4cnktvci6/Screenshot%202014-08-08%2000.51.35.png)
The IRRemote Library works fine I don't know what I did wrong.
Can you please help me?
Best regards
Noah
I've tested the code provided at http://www.instructables.com/id/I2C-LCD-Controller-the-easy-way/step5/The-code-Part-II/ and everything compiled fine.
Thank you for the pictures. Unfortunately, they are too small to be easily readable.
To send/received files, please use the Help Desk (http://embedxcode.weebly.com/help-desk.html) page.
Hi,
thanks for your answer.
Yes I wrote to you on helpdesk as well.
I updatet the ticket on helpdesk with a zip of the projectfolder.
My ticketnumber is #77.
Noah
Actually, the name of the folder where the LiquidCrystal_I²C is located is LiquidCrystal, not LiquidCrystal_I²C.
Just specify in the main makefile
USER_LIBS_LIST = LiquidCrystal
Delete the headers in the main directory as they are already available in the LiquidCrystal folder.
I've just discovered embedXcode (bought it a few days ago XD) and now I'm trying to get some programs to work using the Cosa framework. Let's start with: "Great work!". I love what you have done and Xcode is such an improvement over the Arduino IDE. Using it for a few days I already got some improvement requests:
1. When starting a new project in Xcode the Drop-Down list for "Board" is missing all ATtiny variants Cosa is available for. (See question below…)
2. Running a "Clean" fails with "serial port not available" if programmer is not connected. I don't assume it also cleans the attached ICs so this should not be a requirement :-).
3. When running a "Clean" with programmer attached I get a "*** BOARD_TAG not defined". It actually is defined in the .xcconfig and normal builds work just fine. Only "Clean" fails.
4. Looks like adding "SERIAL_BAUDRATE = 57600" to the Makefile is the easiest way to change the baud rate. It may help to add this to the comments in the default Makefile.
Sorry for all these "issues". Just look at the points as possible improvements. It's also quite possible that I'm doing something wrong here…
One question: How can I build (and upload) for ATtiny devices (ATtiny85) using Cosa and an ISP programmer? What do I have to select while creating the project and what changes are needed to the Makefile to make it work? I can't figure it out myself :(
Thanks!
Thank you for the accolade and the useful comments.
I'll investigate them and add some features to the next revision.
Supporting all the boards isn't easy as I don't have them all and thus can't proceed with the required tests.
Have you investigated using the My Board board configuration file as described in chapter • section Use the Project • Add a Board Configuration File in the User Manual?
For a better follow-up of your points, could you please fill a ticket at the help desk portal (http://embedxcode.weebly.com/help-desk.html)? Thank you :)
For a better follow-up of your points, could you please fill a ticket at the help desk portal (http://embedxcode.weebly.com/help-desk.html)? Thank you :)
I've already tried to add a board configuration as described in the book. But this actually makes things worse :(. I think it's now looking in the wrong boards.txt (arduino core instead of Cosa) but have no idea how to fix this. I've opened a ticket a few minutes ago. Thanks for looking into it.
Here are some answers:
1. Please try Cosa Digispark Tiny Core.xcconfig
2.-3. I've been unable to replicate the issue.
4. The [font=Courier]SERIAL_BAUDRATE[/font] value is taken from the board configuration file and then overridden from the main makefile. The [font=Courier]SERIAL_BAUDRATE[/font] is commented by default in the main makefile. Just uncomment it to set the desired speed.
# Parameters
# ----------------------------------
# ...
# SERIAL_BAUDRATE for the serial console, 9600 by default
# Uncomment and specify another speed
#
SERIAL_BAUDRATE = 19200
Dear Masters,
I'm pretty new on this Embedded Xcode, but I already developed a beginner code for my Arduino Uno, it was built, uploaded, everything was working fine.
Last night Xcode upgraded to 6.0.0 and now, there is no Embedded code compiled at all!
Nothing compiled!
The error message is : "ERROR Xcode 4.6.3 required, 6.0.0 installed"
Which is interesting, on my computer there was never ever Xcode 4.6.3, but Xcode 5.something...
What to do now? Is there any workaround?
Thanks in advance!
Regards,
Janos
From the help desk portal at Xcode 6 and Mac OS X 10.10 Yosemite (http://embedxcode.freshdesk.com/support/solutions/articles/1000124546)
Update September 18, 2014
I've just downloaded Xcode 6 and ran the first tests successfully. Now, Xcode 6 is just one part of the picture; the other big part is Mac OS X 10.10 Yosemite.
The makefiles shouldn't raise any concern as GCC hasn't changed. However, the utilities may require some adaptation.
I'm waiting for the release of Mac OS X 10.10 and plan to proceed with extensive tests before releasing an official version compatible with Mac OS X 10.10 and Xcode 6.
Stay tuned!
Please find a new release of embedXcode.
- embedXcode • Sep 20, 2014 release 201 • Support for Xcode 6.0.1 on Mac OS X 10.9.5
- embedXcode+ • Sep 20, 2014 release 201 • Support for Xcode 6.0.1 on Mac OS X 10.9.5
This new release combines release 177 of embedXcode+ with support for the Robotis OpenCM9.04 board and release 176 with a cleaner build process.
As embedXcode celebrates its first birthday, release 201 is the first release of the 2nd year!
Happy coding :)
Download (http://embedxcode.weebly.com/download)
Last night Xcode upgraded to 6.0.0 and now, there is no Embedded code compiled at all!
Nothing compiled!
The error message is : "ERROR Xcode 4.6.3 required, 6.0.0 installed"
Which is interesting, on my computer there was never ever Xcode 4.6.3, but Xcode 5.something...
I'm getting the same error. I have Mavericks 10.9.5 with xcode 6.0.1 and embedxcode+ v201.
Please refer to the solution Update Project (http://embedxcode.freshdesk.com/support/solutions/articles/1000129114) on the help portal.
Please refer to the solution Update Project (http://embedxcode.freshdesk.com/support/solutions/articles/1000129114) on the help portal.
That worked. Thanks. I'm not looking forward to doing the manual update to all my projects :(
Just use Xcode 5 to update your projects.
Note for updating to Xcode 6 -- If the project to be updated has been created with embedXcode+ release 175 or previous, open the project to update in Xcode 5 as the utility in charge of the automatic update of the project doesn't work with Xcode 6.
Hi Coders,
I have updated Xcode and embedXcode+ to latest versions and now I cant upload any code to my board. So now I'm back on the example code with same problem. Blink from Arduino IDE works fine but the embedXcode+ Example wont upload with standard error that programmer is not responding.
Im using several different Arduino Nano from China, but dont think the error is there if it works from Arduino IDE.
Have tried several different parameters:
BOARD_TAG = nano and pro,
BOARD_PORT = /dev/tty.usbserial*
SERIAL_BAUDRATE = 9600 - 57600
Im no expert on Arduino and Xcode, but not novice either.
Grateful for any feedback.
Zorro
Have you tried to upload with the standard Arduino IDE? In that case, what is the board you select?
There are 6 boards available for Arduino nano, mini and Pro on embedXcode
- Arduino Mini with ATmega168
- Arduino Mini with ATmega328
- Arduino Nano with ATmega168
- Arduino Nano with ATmega328
- Arduino Pro with ATmega328-3.3V
- Arduino Pro with ATmega328-5V
When you connect the board, what is the serial port? Open a Terminal window and type ls /dev/tty.usb*
For more information, please refer to the User Manual (https://itunes.apple.com/book/embedxcode/id667501748) or the Customise Upload Serial Port (http://embedxcode.freshdesk.com/support/solutions/articles/1000082057).
If uploading from the Arduino IDE doesn't work, it can't work from embedXcode either.
Yes, I tried Blink example from Arduino IDE and uploaded it fine with IDE 1.0.5. The board is a Nano v3 and it has worked before with all the settings I posted. In the log it seems fine, I think:
embedXcode • Sep 20, 2014 release 201 • Support for Xcode 6.0.1 on Mac OS X 10.9.5
embedXcode+ • Sep 30, 2014 release 204 • Support for RFduino
==== Check Test ====
==== Test checked ====
==== Info ====
---- Project ----
Target all
Name Test
Tag pro5v328
Extension ino
User /Users/zorro/
---- Platform ----
IDE Arduino
Version 1.0.5
Variant standard
---- Board ----
Name Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
Frequency 16000000L
MCU atmega328p
Flash memory 30720 bytes
SRAM memory 2048 bytes
---- Port ----
Uploader avrdude
AVRdude /dev/tty.usbserial-AH01A95U
Programmer arduino
Serial /dev/tty.usbserial-AH01A95U
Here are the settings that work in Arduino IDE:
avrdude: Version 5.11, compiled on Sep 2 2011 at 18:52:52
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/zorro/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbserial-AH01A95U
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Which board are you selecting on the Tool > Board menu of the Arduino IDE?
Have you tried with Arduino 1.5.8 installed instead of 1.0.5?
Please use the dedicated Help Desk (http://embedxcode.weebly.com/help-desk.html) as it provides an easy way to attach files.
The boards definitions are different between 1.0.5 --now 1.0.6-- and 1.5.8 :(
Yes, I can use Helpdesk if thats easier for you, but thought that more people had same problem with Xcode 6 and embedXcode since it don't work with example code.
An yes, I can instal newer Arduino IDE, but I don't have problem with that IDE, so was hoping to not need that anymore when having embedXcode.
Regarding selected board in Arduino IDE, it works with many different boards, like nano, pro and mini. It seems that the only thing that matters is the MCU, and as you can se above its atmega328p.
Hi guys. Sorry if this question has been asked thousands of times, but I can't seem to find a search thread function. I've added the libraries folder to Xcode, added the words MPU6050 (the library is MPU6050.h) to the USER_LIBS_LIST part of the Makefile and added #include MPU6050.h to the main sketch, however I still get 'No such file or directory'. I'm developing for an Arduino Uno. Any ideas?
Regarding selected board in Arduino IDE, it works with many different boards, like nano, pro and mini. It seems that the only thing that matters is the MCU, and as you can se above its atmega328p.
I'm unable to replicate the issue with
- Arduino 1.0.6
- Arduino mini with ATmega328
- embedXcode 2.1.2
Upload works on both Arduino and embedXcode. The command lines are the same.
The official Arduino 1.0.6 IDE gives
/Applications/Arduino-106.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino-106.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/tty.usbmodem1411 -b115200 -D -Uflash:w:Build/Blink.cpp.hex:i
while embedXcode uses
/Applications/Arduino-106.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -D -patmega328p -C/Applications/Arduino-106.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -carduino -b115200 -P/dev/tty.usbmodem1411 -Uflash:w:Builds/embeddedcomputing.hex:i
Could you please copy the log navigator and send it to me?
Hi guys. Sorry if this question has been asked thousands of times, but I can't seem to find a search thread function. I've added the libraries folder to Xcode, added the words MPU6050 (the library is MPU6050.h) to the USER_LIBS_LIST part of the Makefile and added #include MPU6050.h to the main sketch, however I still get 'No such file or directory'. I'm developing for an Arduino Uno. Any ideas?
- Have you launch the Arduino IDE once and defined the sketchbook folder? -- please refer to Install the Template • Install the IDEs of the Boards • Install the Arduino Platform on the User Manual
- Does the sketchbook folder contains a sub-folder named Libraries or libraries? -- please refer to Create a New Project • Perform Manual Procedures • Declare User's Sketchbook on the User Manual
- Where is located the MPU6050 folder? -- please refer to Use the Project • Add Libraries to the Project • Where to Find the Libraries in embedXcode and in the Finder on the User Manual
- Is the dedicated folder MPU6050 inside the folder named Libraries or libraries? -- please refer to Use the Project • Add Libraries to the Project • Include Libraries to the Main Sketch and Header Files on the User Manual
In that case, set
USER_LIBS_LIST=MPU6050 as you've already done --
please refer to Build and Upload the Project • Manage the Libraries for Compilation • Select the Libraries for Compilation on the User Manual.
1. I have defined the arduino sketchbook folder in the Arduino IDE.
2. I have added the MPU6050 (as well as Kalman and I2CDev) folder(s) to 'libraries' under the sketchbook folder.
The makefile line looks like:
USER_LIBS_LIST = MPU6050 Kalman I2CDev
However now, It's trying to compile the MPU6050.h file, but can't find the I2CDev libraries. Do I drag my 'libraries' folder into the Sketchbook folder of Xcode? (which is empty).
Sorry, I don't know how to make the image any smaller.
EDIT:
I've added all the files to the same directory, and the only errors I'm experiencing are compilation errors in I2CDev.cpp:
(http://i.imgur.com/Os3E3ZV.png) (http://imgur.com/Os3E3ZV)
Thank you for the hard-copy of the screen: it provides the solution to the tricky misspelling.
My guess is you have activated the case-sensitive file system on your Mac.
So you need to list I2Cdev instead of I2CDev to obtain this:
USER_LIBS_LIST = MPU6050 Kalman I2Cdev
consistent with that:
Okay, I'm editing this post because I've made some progress (kind of). There are only a few files I want to include in the project, so I've added them to the project folder (not using libraries) by dragging them into Xcode and selecting Copy files to folder, create groups and add to Index. Upon compiling, I'm getting the following error (attachment 1). Attachment 2 shows my sketch folder.
I get the same error in the Arduino IDE when I don't include <Wire.h>, even though Wire.h is included in the Xcode version.
I get the same error in the Arduino IDE when I don't include <Wire.h>, even though Wire.h is included in the Xcode version.
If the issue arises with the standard Arduino IDE, it is not related to embedXcode.
Does [font= Courrier]i2Cdev.h[/font]header include an [font=Courier]
#include "Wire.h"[/font] statement?
I started a new project, and things seem to have fixed themselves, however I'm having trouble adding libraries to the project. When I build the project to prepare it, I've noticed that my libraries folder is not being included in the sketchbook folder in Xcode. Where would be the first place to look to try and sort out this issue?
My sketchbook location is defined in the Arduino.app IDE (located in the applications folder).
Dear All,
I have installed Xcode 6, Arduino.app and mbedXcode on a MAC OS 10.9. This is not my first install of mbedXcode. Previously I was using it with Xcode 5. I did ran Arduino.app to chef the project path.
Now, when I want to load "old" project, there is an unknown "make" issue occurring when building them. I can live with it and reconstruct new projects.
Unfortunately, when I create a new project, and add the following two lines in the main file (.ino)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
I get the following error
"'Software' serial does not name a type"
Same happens with the wire library.
I have noticed that both of them aren't included in
/Resources/Arduino/arduino/libraries/
of the project, despite being present on the disk.
I tried adding them, but it does not change anything.
I also have the issue with the liquid crystals library, which is included in the "/Resources/Arduino/arduino/libraries/" folder by default.
However, I do not have the error with stream.
Any ideas on how to solve this. Can anyone use any of those two libraries with Xcode 6 and the latest version of mbedXcode ?
I partially solved the issue by a hack :
move the SoftwareSerial.h and .cpp from
/Application/Arduino.App/Resources/Java/libraries/SoftwareSerial
to
/Application/Arduino.App/Resources/Java/hardware/arduino/cores/arduino
It seems that anything inside the libraries folder is visible for Xcode but isn't included when compiling.
How can I fix this without a hack ?
Which version of the Arduino IDE are you using?
The last batch of tests I ran was with:
- Arduino release 1.0.5,
- Arduino release 1.5.8 for Java 6
- and Arduino release 1.5.8 for Java 7.
As usual with each new release, the Arduino team loves to include incremental changes that are incompatible with previous iterations.
The name of the template is embedXcode, not mbedXcode. mbed is a SDK for ARM MCUs.
embedXcode+ supports the mbed SDK but keeps its name unchanged ;)
Thank you for your reply. I am sorry about the mistake on the name embedXcode.
I am using 1.0.6, downloaded today. With the latest version of embedXcode, downloaded today, and the latest version of Xcode, downloaded today.
Should I decrease the version of Arduino.app ? Note: I had the issue with an old version of Arduino.app from 2013. I switched versions today.
I have also noticed that executing Build on a brand new project just kills the project (files disappear from Xcode) and xcode complains about the format of the project file). But if I execute "all" first, then it works.
The issue only happens if the project is located in the path defined in Arduino.app.
I am using 1.0.6, downloaded today. With the latest version of embedXcode, downloaded today, and the latest version of Xcode, downloaded today.
I went through the test with Arduino 1.0.6 and everything went fine.
Have you declared the the libraries you want to use in the main makefile
APP_LIBS_LIST = SoftwareSerial Wire
Please refer to Build and Upload the Project • Manage the Libraries for Compilation in the User Manual.
I have also noticed that executing Build on a brand new project just kills the project (files disappear from Xcode) and xcode complains about the format of the project file). But if I execute "all" first, then it works.
The issue only happens if the project is located in the path defined in Arduino.app.
I wasn't able to replicate the issue, even with a project located in the path defined by Arduino.
Have you checked Xcode runs no other process, like indexing? In that case, two processes are working on the same index, and thus collide.
Please refer to Create a New Project • Prepare the Project! in the User Manual.
Thanks for your help. No I haven't declared the libraries used in the main makefile. Last time I used embedXcode, it was 2013. I didn't remember it necessary. I will read the manual again, try everything and post back.
Temporarily, I made it work by copying all source files for the libraries (software serial, eeprom, wire) in the core path.
All the libraries in the core path are included.
Application libraries in the libraries path --like SoftwareSerial and Wire-- are optional, and they require to be specified.
Same for the user's libraries from the sketchbook/libraries folder.
embedXcode now runs on Mac OS X.10 Yosemite.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/5673825_orig.png)
Download (http://embedxcode.weebly.com/download)
I'd like to upgrade my Arduino IDE from 1.0.5 to 1.0.6. Anything special I need to do with embedxcode so it works properly?
I'd like to upgrade my Arduino IDE from 1.0.5 to 1.0.6. Anything special I need to do with embedxcode so it works properly?
No, nothing special. embedXcode will consider the new [font=Courier]Arduino.app[/font].
Avenue33, thank you so much for your help. Everything works perfectly now.
I will test on an arduino board on monday.
Hi I tried do update embedXcode to use it with Yosemite and Xcode 6 but compiling just doesn't work.
I've downloaded the installer from your website and installed it.
Now I opened a project which I created with embedXcode under Xcode 5.1 and I tried du Build it. The Build fails with exit code 2.
Here is a picture:click (https://www.dropbox.com/s/udcnll6wlyh4js4/Bildschirmfoto%202014-10-26%20um%2023.25.17.png?dl=0)
Please help :). It didn't update since 171 how can I fully uninstall embedXcode and reinstall it ?
apple877
@apple877
Sorry for the late answer. Release 171 is a very old version and there has been Xcode 5 in between.
Here's the procedure:
- Create a new project with the same name, ProjectA.
- Copy-paste the corresponding files from the old project to the new project: the main sketch ProjectA.ino and the local libraries.
- Edit the main makefile of the new project to add the libraries you plan to use, for example the application and user's libraries.
- Optionally, edit the main makefile of the new project to customise the options, for example the warning options.
Should you need more details, please open a ticket at the Help Desk (http://embedxcode.weebly.com/help-desk.html)?
thanks :) now it works :)
New release 2.3 of embedXcode support the Little Robot Friends (http://embeddedcomputing.weebly.com/little-robot-friends.html) board and includes many stability improvements for Arduino boards.
(http://embeddedcomputing.weebly.com/uploads/1/1/6/2/11624344/360790_orig.jpg)
This is the first time I write in this forum so hello everybody, and thank you for your help!
You can see my problem in the attachment.
I'm using an Arduino Uno board, with Xcode 6.1, OS X 10.10.1, and the IDE for Arduino with version 1.06.
I don't really know what to do with the error, so any help will be welcome.
Anyway thank you for your time!
Hi!
Sorry for the late answer.
I can't manage to replicate the issue with current version 2.3.2 of embedXcode.
- Which release of embedXcode are you using?
- Which board are you trying to compile for?
Feel free to use the Help Portal (http://embedxcode.weebly.com/help-desk.html).
Hello,
great job, i am new in mac world (come from windows) and very happy with your solution.
Some problems and questions anyway :
I am trying to make a library directly with some different sketch in subfolder example.
It seems not possible to do that with your solution ?
If i try to put my sketch (ino file) in a subfolder this one is no more detected (i updated the include of the main.cpp). The sketch need to be at the base folder of the project ? This is quite unusual in a library.
After, i think that all source code are always compilated, buikld target selection seems not used, isn't it ?
So even if i success to have multiple ino file in some different subfolder (different example for my library), it seems impossible to select which on is used to be compilated ?
If i understand well, with this solution, i need to make one project for the library , then one project for each example ? Is this the solution ?
ANyway, great job ! thanks for that.
Fabien
great job, i am new in mac world (come from windows) and very happy with your solution.
You're welcome!
I'm not sure to understand all your questions. I'll try my best.
I am trying to make a library directly with some different sketch in subfolder example.
It seems not possible to do that with your solution ?
A project has one unique
.ino sketch and as many
.h + .cpp libraries.
Depending on the edition you're using, libraries can be placed in sub-folders and selected or ignored.
If i try to put my sketch (ino file) in a subfolder this one is no more detected (i updated the include of the main.cpp). The sketch need to be at the base folder of the project ? This is quite unusual in a library.
For the
embed1 project, the unique
embed1.ino sketch should be under
embed1/embed1/embed1.ino.
After, i think that all source code are always compilated, buikld target selection seems not used, isn't it ?
So even if i success to have multiple ino file in some different subfolder (different example for my library), it seems impossible to select which on is used to be compilated ?
Which target selection are you referring to?
Again, a project has one unique
.ino sketch and as many
.h + .cpp libraries.
If i understand well, with this solution, i need to make one project for the library , then one project for each example ? Is this the solution ?
Yes.
A project is not a workspace.
Feel free to use the Help Portal (http://embedxcode.weebly.com/help-desk.html).
I have installed the new (260) embedXcode on two different computers and followed the video (two years and a couple of Xcode versions out of date) and every installation instruction I can find, but it just isn't working. The installation instructions are not very clear. Other than "install it and hit Command-B to build", there is little to go on. The Schemes in the video are vanished in Xcode 6.1.
I see things like Boards in the configuration, but the only choice is "My Mac" and it just doesn't build. Is there a more up-to-date tutorial somewhere? Is there a thread on a forum for Xcode 6.1 somewhere? I can't find it. Is anybody using embedXcode?
Thanks!
Glenn Reid
Silicon Valley
Hi!
The installation video was shot by an enthusiast user.
Have you read the User Manual (http://embedxcode.weebly.com/download.html)?
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/5400527.png)
The User Manual provides step-by-step instructions as is available as both an iBook and a PDF document. I update for each new release of embedXcode.
Please download it from this page (http://embedxcode.weebly.com/download.html) at the embedXcode website. You just need to scroll down a little. The User Manual is also mentioned at the Tutorial (http://embedxcode.weebly.com/tutorial.html) section with a link to download it.
Please note embedXcode has a dedicated page at the Arduino Playground (http://playground.arduino.cc/Main/EmbedXcode) with all the relevant links.
Read The Fabulous Manual :)
Please find a new release of embedXcode.
- embedXcode • Feb 20, 2015 release 2.6.2 • Support for Arduino 1.6.0
- embedXcode+ • Feb 20, 2015 release 2.6.2 • Support for Arduino 1.6.0
- embedXcode Tools • Jan 08, 2015 release 250 • Updated pre-compiled frameworks
Arduino version 1.6.0 is a welcomed release as it replaces both Arduino 1.0.6 and Arduino 1.5.8. embedXcode will focus on Arduino 1.6.0.
Download (http://embedxcode.weebly.com/download.html)
I've got a few versions of Arduino on my Mac, including 1.6.0. Do I have to set anything in Xcode so it uses a particular one?
No, embedXcode goes for the Arduino.app and adapts itself automatically to the version, 1.0.6, 1.5.8 or 1.6.0.
On my Mac IDE ver 1.6.0 is named Arduino_160.app. I still have an older version (1.0.5) that's named Arduino.app.
Please find a new release of embedXcode.
- embedXcode • Mar 02, 2015 release 2.6.3 • Stability improvement for Arduino 1.6.0
- embedXcode+ • Mar 02, 2015 release 2.6.3 • Stability improvement for Arduino 1.6.0
- embedXcode Tools • Jan 08, 2015 release 250 • Updated pre-compiled frameworks
Release 2.6.3 improves stability for Arduino 1.6.0.
Not all the plug-ins are compatible with Arduino 1.6.0, so please refrain from updating them. Section
Install the Template • Install the IDEs of the Boards • Check the IDE and Plug-In Options lists the recommended versions of the Arduino IDE for each plug-in.
(http://embedxcode.weebly.com/uploads/1/1/6/2/11624344/6716440_orig.png)
Download (http://embedxcode.weebly.com/download.html)
Avenue 33,
I think I'm a bit confused as to where I define functions within the program. Im getting the error " 'Fancontrol' was not declared in this scope" when the function being called on is after the loop function at the bottom of the sketch.
Ive attached a screen shot of the code and error.
Should the 'fancontrol' function code be relocated to one of the local library files? if so where exactly?
Thanks for your help!
If youe using Emberded X then you have to declare using C/C++ including .h files otherwise Xcode will throw this sort of error.
The Artdunio IDE fiddles many aspects of the correct way to program in C++ so to use Xcode you need to understand the correct way of doing things..
@kervyn
Please refer to
Find Solutions to Issues • Check Compatibility • Declare Prototypes on Main Sketch on the User Manual.Projects developed by embedXcode are highly compatible with the standard IDEs, like Arduino and alike.
However, unlike the standard IDEs, code with embedXcode is true C++.
The main consequence of true C++ is the need for declaring prototypes of the functions in the main sketch.
In the example provided below, the prototype for fancontrol() is required, as fancontrol() is called by loop() but defined after.
Without prototyping fancontrol(), compilation would raise an error. The standard IDEs add the prototypes on the main sketch.
Prototypes aren't required for libraries as they are already included in the header file.
Prototypes are fully compatible with the standard IDEs.
As usual, reading the user manual is highly recommended.
Please find a new release of embedXcode.
embedXcode 2.7 adds two new platforms.
- Added support for panStamp AVR and NRG boards.
- Added support for Intel Edison on Wiring / Arduino framework release 1.6.1
- Added support for Intel Edison on Yocto framework for embedXcode+.
embedXcode 2.7 also updates the IDEs.
- Updated support for Arduino IDE 1.6.1.
- Updated support for MPIDE 2014-08-21 and 1.5 beta.
- Updated support for RedBearLab as at March 11, 2015.
- Updated support for Teensyduino 1.21.
- Updated support for Wiring 1.0.1.
Please check the release of the official IDEs as previous versions are no longer supported. With the release of Arduino IDE 1.6.1, previous versions 1.0.6 and 1.5.8 are no longer supported except for plug-ins.
Download (http://embedxcode.weebly.com/download.html)
The last release of the Arduino IDE 1.6.2 inaugurates a radical new internal structure and is not compatible with previous versions.
The standard ASCII files for boards, platforms and programmes are gone! They are no longer under the folder /Applications /Arduino.app /Contents /Java /hardware /arduino /avr /boards.txt but they have moved to the hidden folder /Users /ReiVilo /Library /Arduino15 /packages /arduino /hardware /avr /1.6.2 /boards.txt.
Moreover, the support for the Arduino Due doesn't come as standard. An additional download is required. Call the menu Tools > Boards > Boards Manager and then click on Download for the Arduino SAM Boards.
Worse, none of the plug-ins developed by other providers of boards works with this next release 1.6.2.
For all those reasons, embedXcode doesn't support release 1.6.2.
Please install and use Arduino release 1.6.1, which is supported by embedXcode.
The last release of the Arduino IDE 1.6.2 inaugurates a radical new internal structure and is not compatible with previous versions.
The standard ASCII files for boards, platforms and programmes are gone! They are no longer under the folder /Applications /Arduino.app /Contents /Java /hardware /arduino /avr /boards.txt but they have moved to the hidden folder /Users /ReiVilo /Library /Arduino15 /packages /arduino /hardware /avr /1.6.2 /boards.txt.
Moreover, the support for the Arduino Due doesn't come as standard. An additional download is required. Call the menu Tools > Boards > Boards Manager and then click on Download for the Arduino SAM Boards.
Worse, none of the plug-ins developed by other providers of boards works with this next release 1.6.2.
For all those reasons, embedXcode doesn't support release 1.6.2.
Please install and use Arduino release 1.6.1, which is supported by embedXcode.
how about the newest version of Arduino IDE 1.6.3 ?
how about the newest version of Arduino IDE 1.6.3 ?
Same answer, as Arduino 1.6.3 shares the same structure as 1.6.2, incompatible with previous releases 1.0.6 and 1.5.8.
My advice is to stick with 1.6.1.
Hi, i've being trying to install embededXcode but after installation is done, there is no XCode templates neither any folder with embededXCode in my library ?
I've proceeded as explained in the tutorials : 1) install Arduino environment ; 2) install embededXCode ; 3) create new project...
I'm using MacOSX 10.10.3, and XCode 6.3.1.
It seems like no files are even installed into the computer (?!)
Any ideas ?
Check
- Solving Issues with Mac OS X 10.10 Yosemite (http://embedxcode.freshdesk.com/support/solutions/articles/1000143239)
- Perform a manual installation if the package fails (http://embedxcode.freshdesk.com/support/solutions/articles/1000171531)
- What Information to Provide When Asking for Help (http://embedxcode.freshdesk.com/support/solutions/articles/1000046741-what-information-to-provide-when-asking-for-help)
on the Help Portal (http://embedxcode.freshdesk.com/support/home).
Thank you for the links, it is better now, I've also discovered I was using the wrong version of arduino environment.
Thank you very much !
@Zorro_X
You're welcome. Enjoy embedXcode!
Please find a new release of embedXcode.
- embedXcode • May 18, 2015 release 289 • Added support for Teensy LC and updated support for 1.6.1 or 1.7 Arduino IDE plug-ins
- embedXcode+ • May 18, 2015 release 289 • Added support for Teensy LC and updated support for 1.6.1 or 1.7 Arduino IDE plug-ins
Release 2.8.9 adds support for the Teensy LC board. The Teensy 3.0 and 3.1 are very popular among the embedXcode users and the Teensy LC is a welcomed addition.
Release 2.8.9 also updates support for the plug-ins running on
Arduino 1.6.1 or 1.7.x, including Adafruit, Cosa, LightBlue, panStamp, RedBearLab, RFduino, Teensy.
Finally, release 2.8.9 brings support for Particule, the new name of Spark. I'm still waiting for the Photon so I can add support for it.
Download (http://embedxcode.weebly.com/download.html)
Should the 'fancontrol' function code be relocated to one of the local library files? if so where exactly?
Hey kervyn, I don't know if this is too late or not, but for clarity...
In C/C++ you must declare things before you use them. The Arduino environment doesn't change the rules of C/C++, it just hides away some of the normal things you'd see in a C or C++ main file, like the program's starting point, the main() function. It's there, it's just behind the scenes.
Therefore, because the definition of the fancontrol() function is AFTER loop() where it is first called, it doesn't exist at the point the compiler gets to loop(). Move the entire function above loop() or setup() in your sketch file OR write a prototype for it above loop() or setup() to give the compiler a hint that it does exist later on in the file.
A prototype is just the function declaration without the block after it (the function block is the curly braces and the stuff in between them following the "void function()" bit). Like this:
void fancontrol(); // prototype or declaration
void setup() {
...
}
void loop() {
...
}
// actual function definition
void fancontrol() {
...
}
Has anyone seen Xcode suddenly start throwing an error after building a project like this?
.../Makefiles/Step1.mk:572: *** mega2560 board is unknown. Stop.
I'm on Yosemite 10.10.3, Xcode 6.1, embedXcode+ 289, Arduino 1.6.0. This project is running on an Arduino Mega 2560 (if you couldn't tell from the error).
It had been building perfectly fine (no errors at all) until this morning. Nothing had been changed since a week ago. This error isn't stopping avrdude from flashing the chip, but it's just weird.
The BOARD_TAG User-Defined variable is defined in the project Build Bettings, which is why it's weird.
@kervyn
Please report to section
Find Solutions to Issues • Manage Compatibility with Standard IDEs on the User Manual.
Declare Prototypes on Main Sketch
The main consequence of true C++ is the need for declaring prototypes of the functions in the main sketch.
In the example provided below, the prototype for functionB() is required, as functionB() is called by functionA() but defined after.
// Prototypes
void functionA();
void functionB();
// Functions
void functionA() {
Serial.println("functionA"); functionB();
}
void functionB() {
Serial.println("functionB");
}
Without prototyping functionB(), compilation would raise an error. The standard IDEs add the prototypes on the main sketch.
Prototypes aren't required for libraries as they are already included in the header file.
Prototypes are fully compatible with the standard IDEs.
I've dedicated a lot of time in writing and maintaining this User Manual. Why isn't read?
@StuffAndyMakes
Does the sketch include the sequence !!! ?
There are two releases of the Arduino IDE 1.6.0: one for Java 6 and another for Java 7. Both are not compatible as they have a different internal structure.
Have you tried to install the Arduino IDE release 1.6.1? Arduino IDE release 1.6.1 is officially supported by embedXcode.
Feel free to use the help desk (http://embedxcode.freshdesk.com)!
Thank you!
Please find a new release of embedXcode.
- embedXcode+ • Jul 09, 2015 release 298 • Updated support for Energia 16, mbed 102 and fix for Ethernet library
- embedXcode • Jul 09, 2015 release 298 • Updated support for Energia 16, mbed 102 and fix for Ethernet library
- embedXcode Tools • Jul 09, 2015 release 298 • Updated support for mbed 102
This cumulated release includes:
- Fixed issue with Ethernet library for Arduino Due and LaunchPad TM4C129
- Updated support for mbed SDK 102
- Updated support for Energia 16, including Energia Multi-Tasking for the LaunchPad CC3200
- Updated support for Particle Core previously Spark Core
- Added support for NodeMCU 1.0
- Added debugging for LaunchPad MSP432
- Improved utilities
Download (http://embedxcode.weebly.com/download.html)
Hi!
Well done on this project!
Do you plan to add Arduino Zero (Native USB programming if possible) to embedXcode?
embedXcode already supports the Arduino Zero Pro (http://labs.arduino.org/tiki-view_forum_thread.php?comments_parentId=320&topics_offset=3) from Arduino.ORG, now rebranded as Arduino M0 Pro.
Both boards are said to be compatible. Have you tried with the Arduino Zero M0 board?
I'd love to add support for the Arduino Zero Pro from Arduino.CC, but I don't have any available for testing. Any sponsor?
New release 3.0 of embedXcode supports and runs on Xcode 7 with Mac OS X 10.10.
Release 3.0.1 improves the stability of the installation process. Release 3.0.2 fixes two bugs for Arduino Due and LaunchPad CC3200. Release 3.0.3 fixes a bug for mbed.
Please note embedXcode requires Arduino.CC 1.6.1 for Java 7 or Arduino.ORG 1.7.7.
Download (http://embedxcode.weebly.com/download.html)
Hey!
I've just updated Xcode to 7.1 version and found out that embedXcode isn't compatible with it :(
Do I have to downgrade or there is some other way?
Please check release 3.0.5.
Hello
I am a student in engineering school . I am trying to implement a project : I want to create a sole that can accurately calculate the number of steps you are doing :
The problem is that I want to spend my Arduino code that works, on Xcode and then to have it, on my iPhone.
I installed embledXcode as advised but when I 'Run' after being ' built ' I have this error message " uno board is unknown . Stop . "
How do I do to not get this message and continue to provide coding?
In advance thank you friends
Ulysse
Unfortunately, I can hardly help you with the information you provide
Please open a ticket on the Help Desk (http://embedxcode.weebly.com/help-desk.html) and provide the information listed at What Information to Provide When Asking for Help (http://embedxcode.freshdesk.com/support/solutions/articles/1000046741-what-information-to-provide-when-asking-for-help).
New release 4.0 of embedXcode brings support for the Arduino.CC 1.6.5 and for Energia 0101E017.
The Arduino.CC 1.6.5 IDE features the Boards Manager, which provides an easy way to download and install boards.
The following boards have been tested successfully: Adafruit 1.3.3, Cosa 1.1.0, Digistump 1.6.5, ESP8266 1.6.5-947-g39819f0, Intel 1.6.2+1.0, MediaTek 1.1.17, Little Robot Friends 1.6.0, panStamp AVR 1.5.1 and MSP430 1.0.4, RedBearLab 1.0.0, RFduino.
Download (http://embedxcode.weebly.com/download.html)
I have this error 'ArduinoAVR_165.mk : No such file or directory' some where in my step1.mk file under makefile.
I am not too savvy with this, and the manual and/or video was not too explicit on solving this or i just do not understand the process...
I have xcode 7 installed on my macboook pro running on El Capitan, i have embedXcode installed, i have the arduino 1.6.5 installed and have been using it but now want to work with my board from xcode.
Does anyone have time to help me with this , well walk me through kind of.
Thanks in advance.
@sixqub
Please open a ticket on the Help Desk (http://embedxcode.weebly.com/help-desk.html) and provide the information listed at What Information to Provide When Asking for Help (http://embedxcode.freshdesk.com/support/solutions/articles/1000046741-what-information-to-provide-when-asking-for-help), especially which template you've used for your project.
@sixqub
Please open a ticket on the Help Desk (http://embedxcode.weebly.com/help-desk.html) and provide the information listed at What Information to Provide When Asking for Help (http://embedxcode.freshdesk.com/support/solutions/articles/1000046741-what-information-to-provide-when-asking-for-help), especially which template you've used for your project.
[/quote]
Thanks, I had the embedxcode 4.0.0 build and i updated to build 4.0.1 and it solved the issue in question.
Glad to know. Enjoy embedXcode!
Hey!
I've created project for Arduino Uno and now I want to move it to Arduino Mega. Do I have to change any files/settings before building and uploading to the new board?
Please refer to the User Manual.
Hello,
I have created a ESP8266 project on xCode but the Libraries of ESP8266 are not found (like EEPROM.h).
This libraries are still present in /Users/michael/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/libraries.
On Arduino IDE, this libraries are present.
I tried :
#include "EEPROM.h"
#include "EEPROM/EEPROM.h"
#include <EEPROM.h>
#include <EEPROM/EEPROM.h>
but i have the same error... EEPROM.h not found...
Thanks for your help.
Arduino 1.6.5 / embedXcode+ 4.0.3
Please refer to the User Manual for how to use the libraries, especially
- Compilation Fails When Adding a Library (http://embedxcode.freshdesk.com/solution/articles/1000047503-compilation-fails-when-adding-a-library) and
- Libraries APP_LIBS_LIST and USER_LIBS_LIST Variables (http://embedxcode.freshdesk.com/solution/articles/1000059098-libraries-app-libs-list-and-user-libs-list-variables).
The esp8266.com forum may be more appropriate for ESP8266-related topics.
OK thank you, it's OK :-)
Please find a new release of embedXcode.
embedXcode release 4.1 updates support for IDEs and boards.
- Arduino 1.6.6 with AVR 1.6.9 boards,
- panStamp AVR 1.5.3 and MSP 1.0.6,
- Energia 0101E0017.
Download (http://embedxcode.weebly.com/download.html)
Hi avenue33! Thank you for all the hard work, simplifying my work.
I have one persistent problem though. In trying use avr-objdump to view disassembly, I can't get it to "Intermix source code with disassembly". I do get the disassembly but no source code.
I've tried everything here: http://forum.arduino.cc/index.php?topic=152005.0 and googled a lot. I also tried adding and changing some avr-objdump arguments (-Sz, -I/path/to/sketch.ino) and some ASFLAGS in EmbedXcode's step2.mk makefile to no avail (--dwarf-2, -ggdb etc)
Any suggestions?
Using an Arduino Nano project
Xcode 7.1.1
EmbedXcode 4.0.3
Arduino IDE 1.6.6
Merry Christmas
/ Andreas
Thank you for the kind words. I'm glad you like embedXcode.
You need to tweak the -O parameter to prevent the compiler and linker from removing the symbols for disassembly.
Does the standard Arduino.CC IDE provide those symbols?
Thank you for the fast reply!
However, there must be something more amiss, neither -O, -Os or -O3 shows source code intermixed with disassembly. They do produce different file sizes, so I'm sure I'm changing in the right place
I am using avr-objdump -h -S
and ASFLAGS = -$(MCU_FLAG_NAME)=$(MCU) -x assembler-with-cpp
I just tried with the Arduino IDE 1.6.6 and I do get intermixed source code.
Command: avr-objdump -h -S /private/var/folders/lots/of/random/stuff/Blink.ino.elf
I compiled and linked the same basic blinky sketch with ArduinoCC 1.6.7 and embedXcode.
I launched avr-objdump with no parameters, then with the -d option and finally with the -S option.
I'm getting the disassembly output for the 6 cases, and they are very close.
Again, have you tried with the standard Arduino.CC IDE and obtained those symbols?
Please open a ticket on the help desk (http://embedxcode.weebly.com/help-desk.html) to add files.
I made a fresh EmbedXcode project and pasted the blink code in it. Compiled and opened the .elf with avr-objdump -h -S, and then -d. Still no intermixed C code. Strange.
Again, do you obtain the result you're looking for with the standard Arduino.CC IDE?
I do get the source code information with the Arduino IDE and the same avr-objdump command
(Sorry, I added that information to the previous message but since I'm not allowed to post again within 5 minutes it took a while to show up.)
Some hints:
- Arduino copies the .ino sketch into a standard .cpp code file
- Arduino places the standard .cpp code file the same directory as the compiled .elf file.
I put a cpp file named "embeddedcomputing.cpp", and another "main.cpp" and another "MyProjectName.cpp" with the contents of MyProjectName.ino in both the Build folder and the project folder.
Tried avr-objdump -I and gave it 1) project directory, 2) build directory, 3) cpp file name, and 4) ino file name
Still no C code :(
I don't know.
I guess the solution consists on comparing the trace of the building and linking process with Arduino.CC 1.6.5 and embedXcode line per line.
For quite a while, in order to get line numbers from errors "correct", the arduino pre-processing was adding lines that looked like:
#line 1 blink.ino
to the .cpp file that it created in the build directory during pre-processing. This of course is what gets propagated to the .elf files, and is used by objdump. Since the build directory didn't actually have a copy of the .ino file, this broke the source inter-mingling of disassembly. It was fixed relatively recently.
https://github.com/arduino/Arduino/issues/1337 (https://github.com/arduino/Arduino/issues/1337)
Because embedXcode relies on standard C++ and makefile implementation, it doesn't need the #line 1 blink.ino trick.
The compiler starts with the void main() function, located on the main.cpp. The main.cpp includes the statement #include "blink.ino".
Should an error be reported, clicking on it goes right to the line of code.
This was fixed already in Arduino 1.6.6, which is the version I am using. There's something else going on on my end...
After a lot of testing, I realized that the problem was a missing gcc directive in the included makefile.
If you are having the same problems (no intermixed C++ source code when using avr-objdump -S) please make sure that the makefiles ArduinoAVR_165.mk and ArduinoAVR_177.mk contain the -g flag
I added it in both files like this:
CPPFLAGS = -g $(OPTIMISATION) $(WARNING_FLAGS)
CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU)
CPPFLAGS += -ffunction-sections -fdata-sections
CPPFLAGS += $(addprefix -D, printf=iprintf $(PLATFORM_TAG))
CPPFLAGS += $(addprefix -I, $(INCLUDE_PATH))
Was previously (EmbedXcode version 4.0.3):
CPPFLAGS = $(OPTIMISATION) $(WARNING_FLAGS)
CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU)
CPPFLAGS += -ffunction-sections -fdata-sections
CPPFLAGS += $(addprefix -D, printf=iprintf $(PLATFORM_TAG))
CPPFLAGS += $(addprefix -I, $(INCLUDE_PATH))
I also noted another anomaly: in the Configurations/Arduino Nano ATmega328.xcconfig
MAX_RAM_SIZE = 1024
should be
MAX_RAM_SIZE = 2048
Merry Christmas!!!
/ Andreas
@Andreas_Gaunitz
Thank you for investigating and congratulations for finding the solution!
The -g is activated for the Debug target on the platforms that support debugging, e.g. Zero, M0 Pro, LaunchPads, mbed-enabled boards on embedXcode+.
I'll include it in a next few release.
Hi Guys,
I've been using embedXcode for some time now and i love it.
I migrated my arduino project recently to a breadboard, where i use an arduino as an ISP to program the Atmega328p. This works perfectly from the Arduino IDE (shift + upload)...
The question is: how do I change the makefiles of embedXcode such that the "Upload" scheme would use the arduino as ISP ??
I appreciate your ideas.
DeafSoul
Please find a new release of embedXcode.
Release 4.1.9 adds support for Arduino.CC Zero. Please use the Programming Port to upload the sketch.
Release 4.1.8 updates the Intel Galileo and Edison upload procedure.
Download (http://embedxcode.weebly.com/download.html)
Hi Guys,
I've been using embedXcode for some time now and i love it.
I migrated my arduino project recently to a breadboard, where i use an arduino as an ISP to program the Atmega328p. This works perfectly from the Arduino IDE (shift + upload)...
The question is: how do I change the makefiles of embedXcode such that the "Upload" scheme would use the arduino as ISP ??
I appreciate your ideas.
DeafSoul
Please have a look at chapter 3 section 5 of the User Manual.
embedXcode release 4.3.9 improves support for Arduino Due and updates boards for Arduino CC IDE.
Download (http://embedxcode.weebly.com/download.html)
Is there any chance you will support RedBear DUO anytime soon? definitely getting couple of commercial licenses for my team if you do :) ... Thanks, Ondrej
Actually, the RedBear Duo is supported since embedXcode+ 4.2.3 released Feb 06, 2016. I've also posted a review of the board. (http://embeddedcomputing.weebly.com/redbear-duo.html)
In addressing such problems can advise you here this website https://jitbit.com. There's a cool team. They operate 24/7 and will help you at any time. I also have software is ordered and use it for work. I advise everyone to this site.
I can see in the Makefiles that embedXcode @echos a number of things during building?
How can I view this output?
For instance I am interested in the memory specifically. Currently I am having to switch to using the Arduino IDE to check this.
@echo '---- Size ----'
@echo 'Estimated Flash: ' $(shell $(FLASH_SIZE)) $(MAX_FLASH_BYTES); echo;
@echo 'Estimated SRAM: ' $(shell $(RAM_SIZE)) $(MAX_RAM_BYTES); echo;
@echo 'Elapsed time: ' $(STOPCHRONO)
Just select the Report Navigator.
For more information, please refer to the official Xcode documentation or to section Build and Upload the Project • Manage General Messages on the User Manual.
Hi avenue33.
I'm new to embedXcode but already hooked up :-)
I have one issue with the arduino due in Xcode:
When I use the 'SD card test' example from arduino.org (File/Examples/SD/CardInfo) the sketch works without change in Arduino.org 1.7.7 (and in Arduino.cc 1.6.10).
In Xcode I added the SD & SPI Library to the Makefile and it works with the Arduino uno and Mega 2560 but not with the due. I changed boards in the TestFile itself an also made separate new projects for the uno and the due.
With the due I always get 5 issues with "undefined reference":
- /Applications/ArduinoORG.app/Contents/Java/libraries/SD/src/utility/SdFat.h:140: warning: undefined reference to `vtable for SdFile'
- /Applications/ArduinoORG.app/Contents/Java/libraries/SD/src/utility/SdFat.h:454: warning: undefined reference to `SdVolume::init(Sd2Card*, unsigned char)'
- /Applications/ArduinoORG.app/Contents/Java/libraries/SD/src/utility/SdFat.h:349: warning: undefined reference to `SdFile::openRoot(SdVolume*)'
- /Users/user/Test.ino:75: warning: undefined reference to `Sd2Card::init(unsigned char, unsigned char)'
- /Users/user/Test.ino:131: warning: undefined reference to `SdFile::ls(unsigned char, unsigned char)'
Any idea what I'm doing wrong?
Thanks for your work and help!
@TMD0
I confirm the issue. Could you please open a ticket at the Help Desk (http://embedxcode.weebly.com/support.html)?
Thank you.
Hello,
is it possible to use my programmer with embedXcode ?
Hello,
is it possible to use my programmer with embedXcode ?
Which programmer and which board please?
Programmer : Diamex ISP programmer
Controller: Atmel 328
Programmer : Diamex ISP programmer
Controller: Atmel 328
Have you managed to use this programmer with the Arduino IDE?
For AVR MCUs, embedXcode+ already supports the Adafruit USBtinyISP (https://www.adafruit.com/product/46) and the USBASP AVR Programmer (http://www.protostack.com/accessories/usbasp-avr-programmer) programmers. A coming version will add support for the Segger J-Link (https://www.segger.com/jlink_base.html) for ARM Cortex-M.
Could you please open a ticket at the Help Desk (http://embedxcode.weebly.com/support.html)?
No it doesn work with Arduino but it works great with Avrdudess 2.4 (Atmel STK500)
i found this ->
http://forum.diamex.de/showthread.php?866-Diamex-AVR-USB-ISP-Programmer-mit-Arduino-IDE-nutzen
i doesn t find the file "programmer.txt" in xcode. i want to chang "avrispmkii.communication=usb" to"avrispmkii.communication=serial" , i hope that is it.
Please open a ticket at the Help Desk (http://embedxcode.weebly.com/support.html).
I have a project written for the UNO which I wish to transfer a mega2560, id there any way (apart from creating a new mega2560 project and transferring the source code files in to it) to edit the project so that is converted from a Uno to a mega?
Thank-you
Please refer to chapter Use the Project section Change the Board on the User Manual.
Just an update on embedXcode+.
- Release 5.1.7 adds debugging for Arduino Due with Segger J- Link.
- Release 5.1.5 adds debugging for Arduino Zero.
Download (http://embedxcode.weebly.com/download.html)
I need help I've been trying to handle the Arduino Uno from xcode 8.0 and i yet download embed and the manual and i too download arduino.cc and i opened the new project then choose embed and then went to proyecto.ino and put compile build but does not compile because it says there is an error, HELP
Please open a ticket at the Help Desk (http://embedxcode.weebly.com/support.html) and provide What Information to Provide When Asking for Help (https://embedxcode.freshdesk.com/support/solutions/articles/1000046741-what-information-to-provide-when-asking-for-help).
New release embedXcode 6.0.2 updates support for unified Arduino 1.8.0 IDE.
Download (http://embedxcode.weebly.com/download.html)
New release embedXcode 6.0.6 updates support for unified Arduino 1.8.1 IDE.
Download (http://embedxcode.weebly.com/download.html)
Is anyone else seeing an issue where the sketchbook libraries are not populated?
using Sierra 10.12.3
And embedXcode 6.1.2
I have the sketchbook directory specified in arduino.
I can see the entry in the properties file but the sketchbook in Xcode only contains the readme.txt
The other libraries are found fine.
Code compiles if I use the "standard" libraries but I cannot use any libraries that should be in the sketchbook.
Cheers in advance.
I have RTFM
Please open a ticket at the Help Desk (http://embedxcode.weebly.com/help-desk.html) and provide the details listed at What Information to Provide When Asking for Help (https://embedxcode.freshdesk.com/solution/articles/1000046741-what-information-to-provide-when-asking-for-help).
Hi,
On a new install of MAC OS X Sierra 10.12.4, using the latest version of xcode (8.3) and embedxcode,
when I create a new project (arduino, default options) and hit build, I get
Segmentation fault: 11
make: *** [info] Error 1
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2
I have Arduino IDE 1.8.2.
Please update to release 6.2.0 as per "Segmentation Fault" Error (https://embedxcode.freshdesk.com/support/solutions/articles/11000024204--segmentation-fault-error).
Hello Guys,
I have xcode Version 8.3.1 (8E1000a) and ESP8266 Version 2.3.0-rc2 on a Mac installed.
Arduino is installad in the Version 1.8.2
Same Problems as described before from other users ...
/Makefiles/Step1.mk:437: *** generic board is unknown. Stop.
$(error $(BOARD_TAG) board is unknown)
Any Ideas?
Cheers, Stefan
@stevie72
As for other users, please open a ticket at the Help Desk (http://embedxcode.weebly.com/help-desk.html) and provide the details listed at What Information to Provide When Asking for Help (https://embedxcode.freshdesk.com/solution/articles/1000046741-what-information-to-provide-when-asking-for-help).
embedXcode currently supports
ESP8266_RELEASE = 2.3.0
Now, you can update the board package or edit the About.mk file following the procedure Update the Releases for the Board Packages (https://embedxcode.freshdesk.com/support/solutions/articles/11000019602-update-the-releases-for-the-board-packages-).
I got it working !
Version 2.3.0 is stable
Cheers Stefan
make: /Users/respect/Library/Arduino15/packages/arduino/tools/bossac/1.7.0/bossac: No such file or directory
make: *** [raw_upload] Error 1
xcode Version 8.3.2 (8E2002)
arduino 1.8.2
arduino due
Install Arduino SAMD Boards (32-bits ARM Cortex-M0+).
Thanks, helped.
embedXcode+ - What additional functions does it include?
I am getting the noob error..... :-(
"Error: sketchbook path not found"
My setting in Arduino IDE is: "/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino"
I also tried location "/Users/klm47954/Documents/Arduino"
But I get the same error....
P.s. My projects in the Arduino IDE work just fine with these locations set...
MacBookPro13,3 (15" TouchBar)
macOS 10.12.4 (16E195)
XCode Version 8.3.2 (8E2002)
Arduino IDE 1.8.2
embedXcode (not the + version because trying out)
Arduino Uno rev. 3
Error details:
/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/xcodeprojects/DSG-GearMonitor/DSG-GearMonitor/Makefiles/ArduinoAVR_180.mk:65: *** Error: sketchbook path not found. Stop.
~/Library/Arduino15/preferences.txt:
board=uno
boardsmanager.additional.urls=
build.verbose=false
build.warn_data_percentage=75
compiler.cache_core=true
compiler.warning_level=none
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=true
editor.caret.blink=true
editor.code_folding=false
editor.divider.size=0
editor.external=false
editor.font=Monaco,plain,12
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=false
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.save_on_verify=true
editor.tabs.expand=true
editor.tabs.size=2
editor.update_extension=true
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.stop=true
export.delete_target_folder=true
gui.scale=auto
last.ide.1.8.2.daterun=1493300363
last.ide.1.8.2.hardwarepath=/Applications/Arduino.app/Contents/Java/hardware
last.screen.height=900
last.screen.width=1440
last.sketch.count=1
last.sketch.default.location=35,22,1405,878,712,6
last.sketch.default.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino
last.sketch0.location=35,22,1405,878,712,6
last.sketch0.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino
platform.auto_file_type_associations=true
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
proxy.manual.hostname=
proxy.manual.password=
proxy.manual.port=
proxy.manual.type=HTTP
proxy.manual.username=
proxy.pac.url=
proxy.type=auto
recent.sketches=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino,/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/bicolor8x8/bicolor8x8.ino,/Applications/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino,/Applications/Arduino.app/Contents/Java/examples/01.Basics/BareMinimum/BareMinimum.ino
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=true
run.present.stop.color=#cccccc
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/cu.usbmodem1441
serial.port.file=cu.usbmodem1441
serial.port.iserial=75630313536351A0C0B2
serial.stopbits=1
sketchbook.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino
software=ARDUINO
target_package=arduino
target_platform=avr
update.check=true
update.id=9093398885407155017
upload.using=bootloader
upload.verbose=false
upload.verify=true
I am trying to bring my project from VisualMicro for Windows to embedXcode/Arduino. I managed to fix most of issues (there were not that many), but one still persists: I am not able to get SdFat library working. I use the Data logger sketch that comes with the library as a sort of test bed. It compiles fine under visual micro as well as the normal Arduino IDE.
When I try to compile it in embedXcode, I get some „undefined reference to" errors from linker
/Users/xxx/Library/Developer/Xcode/DerivedData/w1k-hceiuzqjyfurxefrcitlorgxfrjb/Build/Products/Debug/SDCard.cpp.o: In function `PrintFile::write(unsigned char const*, unsigned int)':
The library is listed in makefile, gets compiled (at least partially) - I can see three .o files in the build folder (SdFat.cpp.o, SdFatUtil.cpp.o and MinumSerial.cpp.o). SDCard.cpp is an implementation of my class that uses the library, but I get the same error for built-in examples).
I have opened a support ticket, got some good advice, but apparently not enough to fix the problem. Any more hints as where to look next?
@tychop @Sudetak
Best solution is to open a ticket at the Help Desk and provide a minimal example so I can replicate and investigate the issue.
I am trying to bring my project from VisualMicro for Windows to embedXcode/Arduino. I managed to fix most of issues (there were not that many), but one still persists: I am not able to get SdFat library working.
[...]
I have opened a support ticket, got some good advice, but apparently not enough to fix the problem. Any more hints as where to look next?
I took the
Datalogger.ino example and compiled it successfully on embedXcode.
Please ensure the main
makefile lists
APP_LIBS_LIST = SPI SD
I am getting the noob error..... :-(
"Error: sketchbook path not found"
My setting in Arduino IDE is: "/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino"
I also tried location "/Users/klm47954/Documents/Arduino"
But I get the same error....
P.s. My projects in the Arduino IDE work just fine with these locations set...
MacBookPro13,3 (15" TouchBar)
macOS 10.12.4 (16E195)
XCode Version 8.3.2 (8E2002)
Arduino IDE 1.8.2
embedXcode (not the + version because trying out)
Arduino Uno rev. 3
Error details:
/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/xcodeprojects/DSG-GearMonitor/DSG-GearMonitor/Makefiles/ArduinoAVR_180.mk:65: *** Error: sketchbook path not found. Stop.
~/Library/Arduino15/preferences.txt:
board=uno
boardsmanager.additional.urls=
build.verbose=false
build.warn_data_percentage=75
compiler.cache_core=true
compiler.warning_level=none
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=true
editor.caret.blink=true
editor.code_folding=false
editor.divider.size=0
editor.external=false
editor.font=Monaco,plain,12
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=false
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.save_on_verify=true
editor.tabs.expand=true
editor.tabs.size=2
editor.update_extension=true
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.stop=true
export.delete_target_folder=true
gui.scale=auto
last.ide.1.8.2.daterun=1493300363
last.ide.1.8.2.hardwarepath=/Applications/Arduino.app/Contents/Java/hardware
last.screen.height=900
last.screen.width=1440
last.sketch.count=1
last.sketch.default.location=35,22,1405,878,712,6
last.sketch.default.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino
last.sketch0.location=35,22,1405,878,712,6
last.sketch0.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino
platform.auto_file_type_associations=true
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
proxy.manual.hostname=
proxy.manual.password=
proxy.manual.port=
proxy.manual.type=HTTP
proxy.manual.username=
proxy.pac.url=
proxy.type=auto
recent.sketches=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/DSG-GearMonitor/DSG-GearMonitor.ino,/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino/projects/bicolor8x8/bicolor8x8.ino,/Applications/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino,/Applications/Arduino.app/Contents/Java/examples/01.Basics/BareMinimum/BareMinimum.ino
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=true
run.present.stop.color=#cccccc
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/cu.usbmodem1441
serial.port.file=cu.usbmodem1441
serial.port.iserial=75630313536351A0C0B2
serial.stopbits=1
sketchbook.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino
software=ARDUINO
target_package=arduino
target_platform=avr
update.check=true
update.id=9093398885407155017
upload.using=bootloader
upload.verbose=false
upload.verify=true
I think, I had similar issues but with Teensy board and therefore different makefile. Basically, the system couldn't find preferences.txt file in order to extract sketchbook path. This file is located in
~/Library/Arduino15/preferences.txtIn my case, the following line would through
Error: sketchbook path not found because of the following part:
ifeq ($(wildcard $(SKETCHBOOK_DIR)),)
SKETCHBOOK_DIR = $(shell grep sketchbook.path $(ARDUINO_180_LIBRARY_PATH)/preferences.txt | cut -d = -f 2)
endif
Namely with variable
ARDUINO_180_LIBRARY_PATH. So I defined it just before this if statement:
ARDUINO_180_LIBRARY_PATH=~/Library/Arduino15
This worked for me.)
sketchbook.path=/Users/klm47954/Library/Mobile Documents/com~apple~CloudDocs/Arduino
The problem is, the path to the sketchbook contains special characters, which are not very friendly with GCC. ~ is considered as /Users/klm47954.
Please refer to Avoid spaces and special characters in the name and path of the projects (https://embedxcode.freshdesk.com/solution/articles/1000120953-avoid-spaces-and-special-characters-in-the-name-and-path-of-the-projects).
I am getting the error "/Users/Danny/Documents/Xcode/Arduino/Arduino/Makefiles/Step1.mk:279: *** uno board is unknown. Stop.
"
and it shows this :
(https://image.noelshack.com/fichiers/2017/35/4/1504150146-capture-d-ecran-2017-08-31-a-04-27-37.png)
What should i do ? :( :( :(
I am getting the error "/Users/Danny/Documents/Xcode/Arduino/Arduino/Makefiles/Step1.mk:279: *** uno board is unknown. Stop.
"
and it shows this :
[...]
What should i do ? :( :( :(
Help yourself!
- See Check platforms and MCUs page 326 sq. of the User Manual (https://itunes.apple.com/book/embedxcode/id667501748)
- Read Check platforms and MCUs on the Help Desk portal (https://embedxcode.freshdesk.com/support/solutions/articles/11000032859--check-platforms-and-mcus)
- If neither solutions work, open a ticket on the Help Desk (http://embedxcode.weebly.com/help-desk.html).
The
embedXcode User Manual is now available as a dedicated website.
- User Manual Website (http://bit.ly/2yqAXQ9)
Help yourself!
- See Check platforms and MCUs page 326 sq. of the User Manual (https://itunes.apple.com/book/embedxcode/id667501748)
- Read Check platforms and MCUs on the Help Desk portal (https://embedxcode.freshdesk.com/support/solutions/articles/11000032859--check-platforms-and-mcus)
- If neither solutions work, open a ticket on the Help Desk (http://embedxcode.weebly.com/help-desk.html).
@avenue33. Just to let you know the User Manual is not available in the UK. I have the same error as above and am trying to solve it:
*** uno board is unknown. Stop.
@rcwhiteley
The User Manual as an iBook has been discontinued since September 29, 2017 (https://embedxcode.weebly.com/blog/embedxcode-user-manual-as-a-website).
The User Manual is now available as a website (https://embedxcode.com).
(https://embedxcode.weebly.com/uploads/1/1/6/2/11624344/capture-2017-10-04-17-37-53_orig.png)
Hi everyone!
I have a question. Where I can get embedXcode for El Capitan 10.11.6, Xcode 7 working with Teensy 3.2?
Thank you!!!
Please check the download page of the embedXcode website (https://embedxcode.weebly.com).
For legacy systems with Xcode 8 on Mac OS X 10.11 El Capitan or macOS 10.12 Sierra, please select the embedXcode Legacy 8 installation package. It corresponds to embedXcode release 7.6.8.
Hi avenue33,
Yeah I checked website and all available eX not working for me. Version recommended for OS X 10.11 I tried to install but during installation I get problems, eX asking for OS X 10.12.
I have pretty old MacBook Pro late 2009 with El Capitan 10.11.6 , Xcode 7.
I can't upgrade my Mac to Sierra because too old, the higher OS what I can use is 10.11.6 at the moment.
I need eX older version than is available on your website. But I didn't see around any option to download.
Thank you.
Unfortunately, prior releases of embedXcode are no longer available.
Even if there were available, they would require very old releases of the IDEs, tools and libraries that are no longer available.
Sorry.
I am a new EmbedXcode user (and a novice Arduino user, to boot). I am trying to develop on the ESP-32 TTGO LORA-OLED board. I got some test code working under the Arduino IDE, but when I try to get it to compile under Xcode, it can't find some header files that are referenced from other header files.
I am using BLE, and I have included the BLE library here in the make file:
#
APP_LIBS_LIST = Wire BLE
But, some of the headers in BLE refer to files in a different location. For example, bleaddress.h references esp_gap_ble_api.h, which is located here:
~/Documents/Arduino/hardware/espressif/esp32/tools/sdk/include/bluedroid/api/esp_gap_ble_api.h
bluedroid is not a "library", so adding it to the makefile doesn't help. Also, explicitly adding the full path to the file doesn't work, either.
How do I tell Xcode (via EmbedXcode) to search this path:
~/Documents/Arduino/hardware/espressif/esp32/tools/sdk/include/bluedroid/api
??
- To install the EP32 boards, follow the procedure Install the ESP32 Platform (https://embedxcode.com/site/Chapter1/Section4/#install-the-esp32-platform).
- To create a custom board, follow the procedure Add a Board Configuration File (https://embedxcode.com/site/Chapter3/Section5/#add-a-board-configuration-file).
- To report an issue, open a ticket at the Help Desk (https://embedxcode.weebly.com/help-desk.html).
I created a ticket, and support responded with an updated make file that fixes the issue.
Now I am having a different problem. When I try to compile the code, I get the following error:
throw new BLEUuidNotFoundException; error: exception handling disabled, use -fexceptions to enable
I searched for this error and found a thread that says to change -fno-exceptions to -fexceptions in platform.txt, but doing this had no effect (do I need to start from scratch on a new project?).
- To report an issue, open a ticket at the Help Desk (https://embedxcode.weebly.com/help-desk.html).
Please find a new major release of embedXcode.
- embedXcode • 25 Sep 2018 release 10.0.6 • Added IDE path to board configuration files
- embedXcode+ • 25 Sep 2018 release 10.0.6 • Added IDE path to board configuration files
embedXcode now supports Xcode 10 on macOS 10.14 Mojave.
Download (https://embedxcode.weebly.com/download.html)
Release 10.2.3 updates support for Xcode 10.1 and macOS 10.14.1.
Download (https://embedxcode.weebly.com/download.html)
How do I get the serial terminal to output a CR LF on return when entering from the keyboard.
You have different options:
- set parameters for the `screen`utility,
- use another serial console utility
Please refer to Manage the serial console after upload (https://embedxcode.com/site/Chapter4/Section1/#manage-the-serial-console-after-upload) for more information.
I just downloaded embedxcode, and I am having trouble getting it to work. I have the Arduino 1.8.9 release with all the board files updated to the latest available version. I start a new embedxcode project in Xcode, don't even add any code, and I can compile it, but if I try to upload it I get "avrdude: ser_open(): can't open device "/dev/tty.usbmodem14201": No such file or directory". This is the port that is configured for my Leonardo in the Arduino IDE, and compiling and uploading sketches from there works fine. Any ideas on how to fix this issue?
I'm using Mac 10.14.5, Xcode 10.2.1.
Please open a ticket at the Help Desk (https://embedxcode.weebly.com/help-desk.html) with What information to provide when asking for help (https://embedxcode.com/site/Chapter7/Section3/#what-information-to-provide-when-asking-for-help). Thank you!
If the issue is about the Arduino Leonardo board, version 10.9.8 released 08 Jul 2019 improved stability for the Arduino Leonardo board.
Hello,
Are there any plans to incorporate the Arduino CLI into embedXcode so the IDE is not required?
Thank you,
Release 11.2.1 of embedXcode adds support for Xcode 11.1 on macOS 10.15 Catalina.
It also brings support for latest Arduino Nano boards.
Download (http://"https://embedxcode.weebly.com/download.html")
Hello,
Are there any plans to incorporate the Arduino CLI into embedXcode so the IDE is not required?
Thank you,
Actually, embedXcode doesn't require any component of the Arduino IDE except for managing and updating the boards packages. embedXcode relies on its own build manager for speed and customisation.
I've been using Visual Studio Code for a while now with Arduino and have become somewhat familiar with that workflow and quite prefer it to using the Arduino IDE.
I am not sure if you are familiar with vs code but I thought to ask you if you can comment on how the embedXCode environment compares to vs code? I am a macOS guy so I think I might like the embedXCode environment better because my general experience is UI issues are thought out much better in macOS. However, I do not have any actual experience using Xcode so wondering if there are limitations using Xcode compared to vs code for Arduino.
FWIW, I use the following extensions with vs code:
Arduino
Bookmarks
C/C++
Debugger for Chrome
Docker
Doxygen documentation
Git Graph
GitLens
npm
Python
SPICE
Thank you for your interest in embedXcode. I tested Visual Studio Code with the dedicated Arduino extension (https://embeddedcomputing.weebly.com/arduino-extension-for-visual-studio-code.html) but wasn't happy with the splash screens.
The first main difference relies on the underlying IDE: Xcode versus Visual Studio Code. So it is more about which IDE are you more familiar with. Xcode is a very polished IDE with code-sense, check-as-you-type, and the features listed at A Glimpse of Xcode (https://embedxcode.weebly.com/a-glimpse-of-xcode.html).
The second main difference is that embedXcode uses GNU make as build manager and not the Arduino Builder (with the splash screens).
The best way is to see by yourself and give a try with the embedXcode standard edition (https://embedxcode.weebly.com/download.html).
Yeah, the Arduino plugin for vscode is pretty weird. Moreover, it doesn't work well with IntelliSense so the code checking can be problematic. I've pretty much figured out what you need to do to get IntelliSense to work properly. Unfortunately, someone responsible for the plugin broke it a few months ago by adding a "feature" that "auto" includes some recursive include paths. Unfortunately, you cannot turn this "feature" off so it is a headache because if often uses the wrong header. Thus, my interest in using Xcode instead.
Does Xcode support linting using the a third party gnu compiler? I could not find a setting anywhere that let me specify the compiler. This is one of the things you need to do with vscode to set it up properly. I've got my linting set up to point to the same gcc compiler that Arduino uses.
Recently, I started using the arduino-cli and vscode "tasks" to do the build instead of using the plugin.
I recall I downloaded the standard edition a while ago. I'll give it a go and see what happens. Thanks for the feedback.
Hi,
I just installed embedXCode and have it successfully uploading my Star Wars Astromech control program to an Arduino Mega 2560. I have several libraries to run servos and LEDs in real time. The code sense works fine for all of these libraries. However, I cannot get the basic Arduino commands to use code sense (such as Serial.println("Gripper Arm DeActivated");).
Additionally, it doesn't seem to recognize procedures if they are defined after the procedure that calls them. I was able to reorder the code to get the sketch to compile. However, this isn't normal behavior. I should be able to declare a function at the end of the file that gets called from the main loop without getting a build error.
For example, using the Arduino IDE this code works and compiles just fine. But in embedXCode I get a "swapPS3NavControllers was not declared in this scope" error.
void onInitPS3(){
Serial.print(F("\r\nGot to onInitPS3"));
String btAddress = getLastConnectedBtMAC();
PS3Nav->setLedOn(LED1);
isPS3NavigatonInitialized = true;
badPS3Data = 0;
//sfx.playTrack("T12 OGG");
trigger.trigger(23);
#ifdef SHADOW_DEBUG
output += "\r\nBT Address of Last connected Device when Primary PS3 Connected: ";
output += btAddress;
if (btAddress == PS3MoveNavigatonPrimaryMAC){
output += "\r\nWe have our primary controller connected.\r\n";
}else{
output += "\r\nWe have a controller connected, but it is not designated as \"primary\".\r\n";
}
#endif
}
void onInitPS3Nav2(){
String btAddress = getLastConnectedBtMAC();
PS3Nav2->setLedOn(LED1);
isSecondaryPS3NavigatonInitialized = true;
badPS3Data = 0;
//sfx.playTrack("T12 OGG");
//TODO:Fix the error when uncommenting line below
if (btAddress == PS3MoveNavigatonPrimaryMAC) swapPS3NavControllers();///<-------Error on this line !!
#ifdef SHADOW_DEBUG
output += "\r\nBT Address of Last connected Device when Secondary PS3 Connected: ";
output += btAddress;
if (btAddress == PS3MoveNavigatonPrimaryMAC){
output += "\r\nWe have our primary controller connecting out of order. Swapping locations\r\n";
}else{
output += "\r\nWe have a secondary controller connected.\r\n";
}
#endif
}
void swapPS3NavControllers(){
PS3BT* temp = PS3Nav;
PS3Nav = PS3Nav2;
PS3Nav2 = temp;
//Correct the status for Initialization
boolean tempStatus = isPS3NavigatonInitialized;
isPS3NavigatonInitialized = isSecondaryPS3NavigatonInitialized;
isSecondaryPS3NavigatonInitialized = tempStatus;
//Must relink the correct onInit calls
PS3Nav->attachOnInit(onInitPS3);
PS3Nav2->attachOnInit(onInitPS3Nav2);
}
I have gone through all of the help files from the embedXCode website about reindexing and manual setup and updating the makefile. I don't know if it matters, but all of the example screen shots show the Arduino icon on the project .ino file while my .ino file has a C++ icon.
Any help would be greatly appreciated. I have spent five days mucking around with this and can't seem to make it work as expected.
You need to forward declare the function to clear up the error.
For instance, at the top of the file include the following forward declaration (prototype):
void swapPS3NavControllers(void);
That fixed the build error. Thanks. Is this normal behavior in embedXCode?
Thanks,
Tim
Yes, as I understand embedXCode, it performs a "make" style build which follows all the standard C and C++ conventions. The declaration before use is required for C and C++. The forward declaration satisfies this by providing the information the compiler requires to understand the function call properly.
The Arduino IDE gets around this by scanning the sketch and deriving a set of prototypes and then it inserts them into the code before it is compiled.
For a comparaison between the standard Arduino IDE and embedXcode, please refer to Manage compatibility with standard IDEs (https://embedxcode.com/site/Chapter7/Section1/) of the embedXcode User Manual (https://embedxcode.com/site/).
When I started developing embedXcode in 2010 and decided to share it in 2012, I've never imagined that it would be still active so many years later.
(https://forum.arduino.cc/index.php?action=dlattach;topic=49956.0;attach=389003)
Because of the multiple challenges (https://embedxcode.com/site/Appendixes/Section99/#the-reasons-behind) embedXcode faces today, the adventure is coming to an end.
embedXcode does not plan to support macOS 11
Big Sur and Xcode 12 but will focus instead on long-term support for macOS 10.15
Catalina and Xcode 11.
To replace embedXcode, I recommend
- Visual Micro for Visual Studio (https://www.visualmicro.com/) on Windows, and
- PlatformIO for Visual Studio Code (https://platformio.org/) available on macOS, Windows and Linux.
I want to thank all the users who enjoyed embedXcode and supported the project by making donations and reporting issues, allowing to reach a high level of stability.
Thank you!
Chasing Apple as a development platform is clearly fraught with some peril. (Although I note that "Atmel Studio" is still based on "Visual Studio 2015", so Microsoft doesn't seem much better.)
To bad Avenue33,
I'm still looking for an Arduino GUI and finally I found "embedXcode". Even before I've had a chance to use it, it's gone.
I'm using PlatformIO with Visual Studio but, there's AFAIK no support for a graphical user interface on the Mac.
I understand your motives, but are we now in the hands of Bill? Though Linux could be our escape.
The alternative is of course to build and support a GUI for the Arduino IDE by the Arduino community, maybe we can even use your effort?
Visual Studio Code, Eclipse, Netbeans, and presumably others all run on MacOS.
At least up to the most recent upheaval.