Go Down

Topic: Arduino on Xcode Project — Official Thread (Read 159510 times) previous topic - next topic

avenue33

Please find a new release of the User Manual, with reference for debugging and improved presentation.

(link)

JGuthridge


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.

avenue33

#527
Dec 13, 2013, 08:38 am Last Edit: Dec 13, 2013, 12:07 pm by avenue33 Reason: 1

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.

Code: [Select]
#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+.

ForgotToGrowUp

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.

avenue33


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?

ForgotToGrowUp

#530
Dec 17, 2013, 01:56 am Last Edit: Dec 17, 2013, 02:44 am by ForgotToGrowUp Reason: 1
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



avenue33

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.

ForgotToGrowUp

#532
Dec 17, 2013, 03:07 am Last Edit: Dec 17, 2013, 03:15 am by ForgotToGrowUp Reason: 1
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.

avenue33

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.

ForgotToGrowUp

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?

avenue33

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.

ForgotToGrowUp

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

avenue33

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.

ForgotToGrowUp

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.

ForgotToGrowUp

#539
Dec 23, 2013, 08:41 pm Last Edit: Dec 23, 2013, 08:50 pm by ForgotToGrowUp Reason: 1
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.

Go Up