Santa Monica, CA
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« on: June 28, 2012, 12:17:03 am » |
I'm new to the IDE and was having lots of problems getting a semi-complex sketch to compile. I finally got smart and tried to compile the "blink" sketch. That failed with the error message that there was no such file or director as "Arduino.h" My somewhat feeble understanding is that the IDE inserts this multipurpose header during the build process. I know that these libraries are in the Mac package & I found them inside java/hardware. So I copied the Arduino.h file up into the sketches directory to see what would happen. At that point the error message changed to indicate that a whole bunch of libraries listed in Arduino.h were non-existent. So to continue my experiment, I copied all the core libraries from the Arduino package up into the sketches folder. The IDE ground away for a while and then gave the error message "avr-gcc: core.a: No such file or directory". I'm smart enough to know that this is part of the compiler. Clearly my installation of Arduino 1.01 is hosed. I tried deleting and reinstalling but no improvement. I even tried the Mac equivalent of casting entrails which is repairing permissions. No dice. I'm totally stymied and would appreciate some pointers to repair my IDE. This is a mac pro with 2x quad core xeon processors and 24gb memory running mac 10.7.4. As far as I know all my system software is up to date and functioning correctly. Best regards, Stefank1 **************************************************************************************************************************************************************************************************************** Thanks for the question about which board was selected in the IDE. I decided that in spite of my reinstallation of the IDE something was still not right. So I reinstalled the IDE yet again. After reinstallation "blink" would compile perfectly with any of the usual arduino boards selected--so the weird problem with system libraries was solved. However, if "lightuino" was selected as the board, the compilation still threw a small number of errors (at least no "arduino.h" errors). That made me suspicious of the entries in the 'boards.txt' file that defines IDE behavior with the various boards. It seems that the IDE has a simple way to add new information to boards.txt that works pretty much like the way custom libraries are imported. Supposedly if one creates a folder named 'hardware' in the primary sketch folder ('/users/stefank1/documents/arduino') on my system and then places the variant board definitions in a folder named to match the board in that folder(~/arduino/hardware/lightuino/boards.txt), the new board shows up on the IDE menu. That is what I did on my initial installation. The alternative method is to actually edit the primary 'boards.txt' file which hides deep in the Arduino app package on a mac. Well, I compared the Lightuino definition that I had added to my 'hardware' folder to the other board definitions in the primary 'boards.txt' file and everything looked exactly correct. I could see absolutely no reason that the board definition was messing up the compiler. So in desperation I actually copied the Lightuino definitions into the primary 'boards.txt' file inside of the Arduino app container. And (of course) I deleted the definition in my added hardware folder. At that point selection of Lightuino as the target board resulted in a perfect compilation without error. I have absolutely no idea why it works if the definition is in the primary 'boards.txt' file and not in the added hardware folder since you get the Lightuino choice on the menu in either case. And since I no longer got any arduino.h error it would seem that the definitions placed in the hardware folder were correctly transferring the 'lightuino5_16.build.core=arduino' definition. But something does not transfer correctly. At this point I don't know why placing definitions in the ~/hardware/lightuino/boards.txt' does not work correctly. But I don't care because editing the primary 'boards.txt' file (while sort of a pain) does work. I either made some sort of stupid error (likely) of else the '~/hardware/lightuino/boards/txt' method has a bug in it (possible). Best regards, stefank1
|
|
|
|
« Last Edit: June 30, 2012, 01:44:13 pm by stefank1 »
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #1 on: June 28, 2012, 12:49:08 am » |
Where did you put it? My 1.0.1 on the Mac works perfectly. You should not need to copy any files anywhere.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #2 on: June 28, 2012, 12:49:34 am » |
And what board have you selected in the IDE?
|
|
|
|
|
Logged
|
|
|
|
|
Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 7
Posts: 3532
|
 |
« Reply #3 on: June 28, 2012, 07:18:48 am » |
And can you enable verbose output during compilation (in the Preferences dialog) and post the full output here?
|
|
|
|
|
Logged
|
|
|
|
|
Santa Monica, CA
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #4 on: June 28, 2012, 12:40:05 pm » |
Where did you put it? My 1.0.1 on the Mac works perfectly. You should not need to copy any files anywhere.
Hi Nick,
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 65
CJH Innovations
|
 |
« Reply #5 on: July 23, 2012, 05:37:12 pm » |
Nick,
I only use my Mac occasionally for Arduino dev, when I am working on multi CPU networking, etc.
Can You describe where the installation puts the Arduino files? On the PC, I expect to see folders such as drivers, examples, hardware, java, lib, libraries, reference, and tools. Where are these on a Mac?
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5172
CMiYC
|
 |
« Reply #6 on: July 23, 2012, 05:43:45 pm » |
Inside the Application Bundle.
Right-Click on the Arduino Icon and select "Show Package Contents".
You can also cd directly into the bundle from the terminal by using "cd Arduino.app".
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #7 on: July 23, 2012, 06:01:20 pm » |
Here, in my case: /Applications/Arduino_1.0.1.app As James C4S says, you can look inside that, it's really a folder. Open a Terminal window, and do "ls -R" the location of the app (you can drag it from the Finder window to copy the name in), eg. ls -R /Applications/Arduino_1.0.1.app
Contents
/Applications/Arduino_1.0.1.app/Contents: Info.plist MacOS PkgInfo Resources
/Applications/Arduino_1.0.1.app/Contents/MacOS: JavaApplicationStub
/Applications/Arduino_1.0.1.app/Contents/Resources: Java pde.icns processing.icns
/Applications/Arduino_1.0.1.app/Contents/Resources/Java: RXTXcomm.jar core.jar ecj.jar examples hardware jna.jar lib libquaqua.jnilib libquaqua64.jnilib libraries librxtxSerial.jnilib pde.jar quaqua.jar reference revisions.txt tools
/Applications/Arduino_1.0.1.app/Contents/Resources/Java/examples: 01.Basics 02.Digital 03.Analog 04.Communication 05.Control 06.Sensors 07.Display 08.Strings 09.USB(Leonardo) 2.Digital ArduinoISP
... and so on ...
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 65
CJH Innovations
|
 |
« Reply #8 on: July 23, 2012, 06:05:55 pm » |
Perfect. I needed to add the PString library and now I can.
Seems like the Mac, for being so intuituve, is not so intuitive.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #9 on: July 23, 2012, 06:21:22 pm » |
You should not modify your core installation however (the Arduino.app). You install libraries by copying them to the libraries folder in your personal sketch folder. In my case: /Users/nick/Documents/Arduino/libraries
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 65
CJH Innovations
|
 |
« Reply #10 on: July 28, 2012, 04:24:18 pm » |
You should not modify your core installation however (the Arduino.app). You install libraries by copying them to the libraries folder in your personal sketch folder. That could make it difficult to maintain two versions of the Ardiono environment.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #11 on: July 28, 2012, 04:32:06 pm » |
You can have multiple personal sketch folders (Preferences -> Sketchbook Location).
Then you can have different libraries in each one.
|
|
|
|
|
Logged
|
|
|
|
|
|