Pages: 1 ... 21 22 [23] 24 25 ... 46   Go Down
Author Topic: Arduino on Xcode Project — Official Thread  (Read 145813 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Offline Offline
God Member
*****
Karma: 2
Posts: 535
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

GitHub only hosts the source code, not the installer package.
Logged


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

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

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

I don't know why, but this problem is gone.  New projects are building normally now.

I'm glad it works now. Enjoy embedXcode smiley
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I found I can't build "Marlin" in embedXcode, while in Arduino IDE, it works well. The error code is here

Code:
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?
« Last Edit: April 26, 2013, 02:24:38 am by jimaobian » Logged

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

 If Marlin rewrites HardwareSerial, edit the main makefile
Code:
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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tested it, but it didn't work either. the HardwareSerial.cpp is the core of arduino instead of the library.
Logged

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

It seems MarlinSerial also raises problems here, there and even at GitHub.

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.
« Last Edit: April 26, 2013, 07:20:58 am by avenue33 » Logged


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

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

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

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
Logged

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

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


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

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.

Code:
/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.
Logged


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


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=

Logged

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

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:
Code:
//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

Code:
#ifdef XCODE_IS_COMPILING
#include "MyNewProject.ino"
#endif
Logged

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


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


Pages: 1 ... 21 22 [23] 24 25 ... 46   Go Up
Jump to: