Skip to content

arduino:arduino in boards.txt is not supported (for upload) #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xaljox opened this issue Jun 26, 2014 · 20 comments
Closed

arduino:arduino in boards.txt is not supported (for upload) #158

xaljox opened this issue Jun 26, 2014 · 20 comments
Labels
Help wanted If you want to become a active contributor, start looking at this issue. importance: improvement request

Comments

@xaljox
Copy link

xaljox commented Jun 26, 2014

When opening the Arduino dialog of the project Properties (e.g. for selecting another USB port), then some path variables are reset to a wrong value. As a result the resource paths to the "arduino->core" and "arduino->variant" are wrong.
Lets show the original values of the path variables:
schermafbeelding 2014-06-26 om 09 26 12
Next select "Arduino" in the left pane of the Properties dialog:
schermafbeelding 2014-06-26 om 09 26 40
See that the "arduino->core" and "arduino->variant" items in the "Project Explorer" are directly marked as erroneous.
When looking at the path variables, some of them are set wrong, the starting '/' is gone. It seems they are somehow reset to a wrong initial value.
schermafbeelding 2014-06-26 om 09 28 55
When those path variables are edited to at '/' at the front, the "arduino->variant" resource path is repaired, but the "arduino->core" is still fault.
schermafbeelding 2014-06-26 om 09 30 04
This must be repaired by editing its Properties, somehow this resource path is reseted to a very strange value with arduino:arduino in it. Magically the ':' expands to '::', but perhaps that is my lack of understanding eclipse.
Note that I used version mac64.2014-05-22_02-07-31.tar.gz of the eclipseArduino. I've no idea if Windows or Linux version suffer from the same issue.
I develop both on an iMac and MacBook air and transfer the projects between them. When switching to the other machine, I have there another USB port identifier, so I must alter it.
Then I must always repair the resource paths, the first time it occurred, it took me a while to discover what was going on and how to repair it. Now I'm more comfortable with Eclipse and I'm able to fix it fast. I've added a path variable of my own, which is left untouched, so I just reset "arduino->core" to that variable. As for the other variables, after visiting the "Arduino" part, I visit immediately the path variable part, double click on the wrong ones and add a '/'.

@jantje
Copy link
Member

jantje commented Jun 26, 2014

It looks like the fix for issue #34 gives problems on the mac
If so the problem is introduced in mac64.2014-04-01_02-06-12.tar.gz and mac64.2014-03-26_02-06-13.tar.gz should be fine.
Would you mind checking these to versions to confirm my thinking?

@jantje
Copy link
Member

jantje commented Jun 26, 2014

I've been looking a bit ore in detail.
In my setup the 3 pathvars that are wrong in yours all start with ${ArduinoPath} which is the change done in #34
in your setup the ${ArduinoPath} seems missing.
What is even more strange to me is that adding a / fixes the issue because that is not the same value as what is in ${ArduinoPath}

The only explanation I can think of to explain the arduino:arduino is that your boards.txt is not the default arduino boards.txt file and there is a arduino:arduino in there.
For instance
yun.build.core=arduino:arduino

Are you sure the plugin is properly configured on your 2 machines?

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

I'm using a sparkfun pro micro. I will check the board.txt file.

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

promicro8.build.core=arduino:arduino

is in the board file, what should it be? I will play with it and see what happens, but suggestions are welcome ;-).

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

I think the source of the problem is that the sparkfun uses the "normal" core files and have only a pins_arduino.h as variant.
When supplying a board file it seems that all paths become relative to that, which is correct for the variant, but not for the core files.
Thus my relative start point become:
/Users/xaljox/Arduino/hardware/sparkfun/avr
and the promicro8.build.core was "arduino:arduino' in the board.txt file. It seems that the ':' messes things up.
I tried to use:
promicro8.build.core=../../../../../../Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino
promicro8.build.variant=promicro
Now the path variables are not touched, so they stay correct however the core files now resolve to:
Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino
instead of:
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino
I will copy the standard arduine core files somewhere into the:
/Users/xaljox/Arduino/hardware/sparkfun/avr
so I can use a relative reference to them, instead of using the files in the Arduino IDE applications.
This does work better! If I first visit 'Resource->Linked Resources->Path Variables' and then the arduine view to change board or USB port then all goes well.
If however I directly visit the arduino view, then most of the times the starting '/' gets gone.
Thus changing the board.txt file does certainly help, but there is still some small glitch about the starting '/'.

@jantje
Copy link
Member

jantje commented Jun 27, 2014

ha now I get (at least part of) this one.
The arduino:arduino thing is something I have not yet implemented. As you correctly concluded this is a way to use the arduino core file from the arduino hardware folder instead of the local arduino hardware folder.
Copying the hardware/arduino/avr/cores folder to the hardware/sparkfun/cores is a good work around.
the ../.. as you propose is also a good work around but I'm not sure this will be compatible with the arduino IDE.
A thirs work around is to copy the sparkfun boards.txt content into the arduino boards.txt and the sparkfun variant files in the arduino variant files.
Can you point me to the sparkfun download so I can test support for arduino:arduino?

@jantje jantje changed the title Project Properties->Arduino messes up resource paths arduino:arduino in boards.txt is not supported Jun 27, 2014
@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

I did some further testing and stumbled into some other problems that are solved now.
What I did was, edited the board files to have the following entries:
promicro8.build.core=arduino
promicro8.build.variant=promicro
Created a symbolic link from the place of were the sparkfun stuff is to were the "standard" core files are.
while at:
/Users/xaljox/Arduino/hardware/sparkfun/avr
in my case, create link:
ln -s /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores cores
Now I can open the arduino view in the project properties. However it is ESSENTIAL not to go directly to the arduino view, but first(at least that worked) go to "Resource->Linked Resources", next go to teh arduino view, to change port, or select other boardand press apply. Next go back to "Resource->Linked Resources" and close dialog with "ok", or otherwise the next time you open the project properties you go immediately to the arduino view and then 3 path variables are stripped from teh first '/'.
However when changing the core file path, you get strange compile errors about simple functions it can no longer find. This can be solved by doing a "Clean Project" followed by a "Build Project".The normal treatment via the "Index" commands do not solve these problems. See screenshot about the strange errors you can get and the commands done in terminal.
So most of the problems are solved, but it remains strange that the '/' gets stripped away sometimes. I will now download and try the suggested older version of the plugin and see what happens then.
schermafbeelding 2014-06-27 om 12 25 50

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

I've got the files via:
http://www.forward.com.au/pfod/ArduinoProgramming/FioV3/index.html
there you can download a zip file.
The original file at sparkfun are for the older arduino IDE, which have a different directory structure as far as I known
the zip file is here:
https://github.com/sparkfun/SF32u4_boards/archive/master.zip
Information about the board is at:
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/all

@xaljox
Copy link
Author

xaljox commented Jun 27, 2014

Downloaded version mac64.2014-03-26_02-06-13.tar.gz and tested it, indeed the starting '/' is never stripped with this version. There are some compile errors, but I guess that has to do with that in the project there is a ino.cpp file and that the older version have no direct support for *.ino files.
But what the test was about, if path variables are sometimes altered that does seem better with that version.

@jantje
Copy link
Member

jantje commented Jun 27, 2014

mac64.2014-03-26_02-06-13.tar.gz doesn't have ino support yet.
I made a tweet to try to find out whether the path is a problem on your system only or a general problem.
For this type of things the behaviour should be the same on mac linux and windows.
Lets hope I get some response.
(FYI I do not have a mac machine to test this)

@jantje
Copy link
Member

jantje commented Jul 1, 2014

@xaljox
Did the missing slash issue go away with the upgrade of the java version?

@xaljox
Copy link
Author

xaljox commented Jul 1, 2014

Nope go to the Arduino item on the project properties and it is gone on 3 path variables. If I first go via the resource view of the path variables, then go to the arduino view and then back to another view, it goes ok. Leaving the arduino view is only a precaution, so the next time you open the project properties you will not go to the arduino view immediately and have the slashes gone.
Once you know you can easily work around it.

Op 1 jul. 2014, om 13:46 heeft jantje [email protected] het volgende geschreven:

@xaljox
Did the missing slash issue go away with the upgrade of the java version?


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Jul 1, 2014

#34 created a bug for due as well so I'll temporary use the old code in case of mac.
That is unless someone finds a smart solution that works on mac linux and woindows very quickly

@jantje
Copy link
Member

jantje commented Jul 3, 2014

I have been working on trying to get this working but not much success now.
I found that the installation instructions were wrong (they missed to create a avr folder.
The good news is that I get the same errors in the ide as the plugin.

Starting C++ compile
"/home/jan/programs/arduino-1.5.2/hardware/tools/avr/bin/avr-g++" -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DF_CPU=8000000L -DARDUINO=152 -I"/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino" -I"/home/jan/Arduino/hardware/SF32u4_boards/avr/variants/promicro" -MMD -MP -MF"arduino/IPAddress.cpp.d" -MT"arduino/IPAddress.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/IPAddress.cpp" -o "arduino/IPAddress.cpp.o" -Wall
/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/Tone.cpp:110: warning: only initialized variables can be placed into program memory area
/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/USBCore.cpp:86: error: ‘USB_VID’ was not declared in this scope
/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/USBCore.cpp:86: error: ‘USB_PID’ was not declared in this scope
/home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/USBCore.cpp:89: error: ‘USB_VID’ was not declared in this scope
Finished building: /home/jan/programs/arduino-1.5.2/hardware/arduino/avr/cores/arduino/IPAddress.cpp

do you have a clue what is going on?

@jantje
Copy link
Member

jantje commented Jul 3, 2014

The build of tonight has a fix (hard coded arduino) given the comment above I'm not sure it'll work ok.
Can you give it a spin tomorrow?

@jantje
Copy link
Member

jantje commented Jul 11, 2014

Issue seems to have gone. Please reopen if it is not fixed.

@jantje jantje closed this as completed Jul 11, 2014
@jantje jantje added importance: improvement request Help wanted If you want to become a active contributor, start looking at this issue. labels May 27, 2015
@jantje
Copy link
Member

jantje commented May 27, 2015

reopening due to new labelling.
If anyone want to implement support for arduino:arduino please take ownership of this issue

@jantje jantje reopened this May 27, 2015
jantje added a commit that referenced this issue Jul 7, 2015
@jantje jantje changed the title arduino:arduino in boards.txt is not supported arduino:arduino in boards.txt is not supported (for upload) Jul 27, 2015
@jantje
Copy link
Member

jantje commented Jul 27, 2015

it works now for core and variant.

@jantje
Copy link
Member

jantje commented Mar 25, 2016

I wonder if this is used in V3

@jantje
Copy link
Member

jantje commented Jul 22, 2016

In v3 this should not be used

@jantje jantje closed this as completed Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted If you want to become a active contributor, start looking at this issue. importance: improvement request
Projects
None yet
Development

No branches or pull requests

2 participants