Skip to content
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

Board options not found in Ubuntu #29

Closed
serjche opened this issue Jun 7, 2020 · 4 comments
Closed

Board options not found in Ubuntu #29

serjche opened this issue Jun 7, 2020 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@serjche
Copy link

serjche commented Jun 7, 2020

Hi,

I've been trying to get the toolchain running on Ubuntu 18.04, but after following the steps on https://github.com/a9183756-gh/Arduino-CMake-Toolchain/blob/master/Examples/README.md
the BoardOptions.cmake file it creates is empty:

# Copyright (c) 2020 Arduino CMake Toolchain

###############################################################################
# This is an automatically generated template file for board options.
# You may edit it to comment/uncomment selected board and board options.
# However do not change the structure of this template, which is fixed and 
# any change to the structure gets overwritten.

And I suspect it simply is not finding the installed Arduino framework, which I'm not really quite sure is installed properly in the first place. I followed the normal instructions to install it in the main Arduino page. I'm a bit of a newbie on Ubuntu so I'm not quite sure if I have everything configured properly. The installation path of arduino is on /usr/share/arduino.

I have tried the same examples on Windows and it works like a charm, it finds the Arduino installation and boards just fine, and the BoardOptions.cmake is populated properly.

Maybe I'm missing some environment variable, or the path of the Arduino installation is wrong, I'm not sure, or maybe is something completely different.

I'll look into the code to see how it determines the Arduino installation path, but I figured I asked for help anyways.

Thanks!

@a9183756-gh
Copy link
Owner

a9183756-gh commented Jun 7, 2020

You are probably facing a known issue in Ubuntu as explained below taken from here.

Installing via apt
While there is a package for the Arduino IDE on current APT repositories, it has not been updated for a while. As such, while it is still possible to install the IDE by running sudo apt install arduino, it is not recommended to do so, as asking for support when using outdated software is more difficult.

Although older arduino installation path is detected by the toolchain, it is not able to enumerate the boards due to incompatibility and thus the empty BoardOptions.cmake.

If this is the case, please remove the older version of arduino (sudo apt-get autoremove arduino) and then follow the tutorial for installing via tarball.

If you extract the tar in non-standard location, the toolchain may report the error that Arduino installation is not found. In that case, please provide the installation directory using -D ARDUINO_INSTALL_PATH=/path/to/arduino-<version>.

Note: Just pushed PRs to report warning in case if the installed arduino version is < 1.5, and also to identify the installation paths better in Linux. Although not required, you may use that patch if needed.

@a9183756-gh a9183756-gh added documentation Improvements or additions to documentation good first issue Good for newcomers enhancement New feature or request labels Jun 7, 2020
@serjche
Copy link
Author

serjche commented Jun 13, 2020

Hi, thank you for your quick response, and sorry for my late response hehe...

I've tested your latest commit on the fix/install_path_dev branch, and it detected the arduino installation paths perfectly.

I forgot to mention I did uninstall and install again as you indicated in your previous comment but it didn't make a difference, but the latest changes did fixed the issue.

It created the BoardOptions.cmake just fine:
Screenshot_2020-06-13_13-48-05

And I was able to generate the build files and compile as well.

Thank you so much!

@serjche serjche closed this as completed Jun 13, 2020
@serjche
Copy link
Author

serjche commented Jun 13, 2020

Also, I see you are waiting for a review to merge the PR, would you like me to add that? I'm not sure if you have a review procedure, or just approving with comments would be enough?

@a9183756-gh
Copy link
Owner

Surprising, because the change was not intended to fix the issue you reported. It worked for you probably because you have another folder named 'arduino*' somewhere, which the toolchain picked up earlier. Now with the change #30, the toolchain possibly picked up the more relevant folder that worked.
For review, comments should be sufficient. Anyway, will merge the issue as it worked for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants