Open timknapen opened 13 years ago
Neither on Xcode 4.2 for release prettier output, better extracting variables from boards dated Jan 23, 2012
Xcode specialists, any idea?
Just switched on the Lion machine, taking a look at it NOW. :-)
Good luck ;-)
Ok codesense is working consistently everywhere now in Xcode 4 check my "experimental" branch of the project.
The way to make sure that everything works in Code sense is this: 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.
They are now happily code completing :-) yaay!
Serial.print() is still in black :-(
yeah I've noticed after uploading... will investigate soon, I feel we're getting closer and closer.
investigated and fixed :-) fix depends on Arduino.app being in /Applications/ though... so it's not perfect...
Release timknapen-Arduino-With-XCode-3dec20f does provide code sense for all libraries.
Great!
However, is there an easier way?
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.
Instead of adding manually each and every files, couldn't we pass a list of those file.
To obtain a list of all the .c .cpp .h file, try this:
# Comments:
# := immediate assignment
# ~ is accepted in makefile but requires translation with wildcard
# List of all h c cpp files within ARDUINO_DIR
ARDUINO_DIR := /Applications/Mpide.app/Contents/Resources/Java
EXCLUDE := %xample %xamples %eference %rchive %ocumentation
DIRS := $(filter-out $(EXCLUDE),$(shell find $(ARDUINO_DIR) -type d -print))
FILES1 := $(foreach file,$(DIRS),$(wildcard $(file)/*.h))
FILES2 := $(foreach file,$(DIRS),$(wildcard $(file)/*.c))
FILES3 := $(foreach file,$(DIRS),$(wildcard $(file)/*.cpp))
LIST := $(FILES1) $(FILES2) $(FILES3)
all:
@echo " \n"
@echo "----DIRS"
@echo $(DIRS)
@echo " "
@echo "----FILES1"
@echo $(FILES1)
@echo " "
@echo "----FILES2"
@echo $(FILES2)
@echo " "
@echo "----FILES3"
@echo $(FILES3)
@echo " "
@echo "----LIST"
@echo $(LIST)
@echo " "
I can't replicate the trick on a MPIDE based configuration.
So the tip seems to be trickier than expected!
The Auto Suggestion feature of XCode3.2 doesn't work "sometimes"... If you add a class to ProjectFolder/src/ the auto completion works, but the exact same code for one of the standard library classes in Arduino.app doesn't trigger the auto completion correctly.
example:
ArduinoProgram.h
ArduinoProgram.cpp
TestThing.h
TestThing.cpp: