Pages: 1 ... 18 19 [20] 21 22 ... 45   Go Down
Author Topic: Arduino on Xcode Project — Official Thread  (Read 140781 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I strongly recommend you to refer to the book Xcode 4 Unleashed by Fritz F. Anderson



I just got the Kindle version.
Logged

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Code:
EXCLUDE_LIBS = Firmata WiFi Esplora OneWire
to
Code:
EXCLUDE_LIBS = Firmata WiFi Esplora
Logged

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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

Code:
#include "Arduino.h"

Also, launch one compilation.
Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
#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. 


* Screen Shot 2013-04-17 at 8.34.59 AM.png (37.65 KB, 472x373 - viewed 8 times.)
« Last Edit: April 17, 2013, 07:40:48 am by ScottG » Logged

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

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.

« Last Edit: May 10, 2013, 11:25:14 am by avenue33 » Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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,

Quote
Index is a proxy target solely used for code-sense. Do not launch it.


* colors.png (118.56 KB, 750x548 - viewed 8 times.)
Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Logged

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

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.

Code:
---- Size ----
Binary sketch size:  654 bytes (of a 16384 byte maximum)
Estimated SRAM used: 8 bytes (of a 512 byte maximum)
==== Make done ====


Based on the results of the survey, 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
 
« Last Edit: April 17, 2013, 11:17:32 am by avenue33 » Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
==== 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.

* Xcode log.txt (619.54 KB - downloaded 15 times.)
Logged

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

Strange, I haven't modified the embedXcode_prepare utility, built as 10.7 compatible.

Please try with release 42 just uploaded.
Logged


New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 525
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: 1 ... 18 19 [20] 21 22 ... 45   Go Up
Jump to: