-
Notifications
You must be signed in to change notification settings - Fork 39
Add Linux Support? #4
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
Comments
Hi @kd8bxp, thanks for the issue! This is good stuff for us to know - so far we've been only developing the core on Windows. In Windows we cannot be positive that users will have Python3 installed (which we would use to perform actions that are described below), and if they do we probably won't be able to guess where to find it. To get us started as quickly as possible we avoided dealing with a board manager package like the Arduino SAMD core uses, which might allow us to direct installation of additional software. So as a stop-gap solution we have simply converted the Python3 scripts that we use into executable (.exe) files that Arduino can call from the command line. So you are right, at the moment Linux is not fully supported. However we want to change that! It sounds like you are able to compile your example into a binary file - is that right? Or perhaps the check that failed occurs before compilation... If that is the case then I'm just assuming that you'll be able to compile since we've had Linux users successfully using the Ambiq SDK and because Arduino supports Linux with the SAMD core. If that's all true then that means that the main problem on Linux is that we are not running the necessary post-compilation code that performs these steps:
What needs to happen is for Arduino to switch its behavior depending on the operating system that it is running on. This kind of feature is described in the Arduino 1.5 3rd Party Hardware Specification.
So we should definitely re-write the tools section of
@kd8bxp Do you have a preference for which option to take in the near-term? I'd lean toward the first, with plans to ultimately pursue option 3. If you are curious and want to take a shot at any of these methods yourself that would be awesome as well, and we'd welcome the pull request. |
@oclyke Thank you for the update, and all the information - So is the SDK required for use? I didn't install it. The other boards in the package appear to at least compile, but give the error with the exe file. I think at least in my case python and python3 are both already in the path when I installed them. As far as me trying to make a board core work that would be a yikes! While I'm pretty good with making sketches, how the board cores work is still a little (or a lot) outside my range. I know, and understand the Apollo3 board and this project are new, and I'm good at waiting - I just wasn't sure if I had installed the core wrong, or if I missed something, or if Linux was just not supported. I'm quite happy at helping with error checking and other issues that might come about. |
@kd8bxp As far as your compile error goes you should just pull the latest from this repository. We recently trimmed up our variants a little bit and no longer plan on including an Apollo3 Evaluation Board variant (at least until someone needs it... are you using and Edge or an AP3 EVB?) so chances are good that that variant is just malformed. In case you don't already I highly recommend using GitHub Desktop so that you can use the I just got out my laptop (Mac) and I will start testing out option 1. I could definitely use your help to test it out on Linux. I'll give you a shout out when I have something to test. Thanks! |
With commit a5f3e21 you should have access to a proper upload script that works on Mac and Linux. Since this is option 1 that we discussed above you may need to modify the path to Python3 on your machine. Do this in 'platform.txt' Anyone reading along for a unix-like OS could try Although the script runs, and on my Windows computer the upload is successful, it was unsuccessful on my Mac. I think this is related to these problems: @kd8bxp Can you try this out and let me know how it goes? |
@kd8bxp Have you gotten a chance to try again with the v1.0.0 release in the Arduino boards manager? If you don't already have it add this link (below) to your Arduino preferences 'additional boards manager URLs:' field Then open the board manager and search for Apollo3. |
Here's some more data from TomWS on the SparkFun website (tutorial discussion page: https://learn.sparkfun.com/tutorials/artemis-development-with-arduino/discuss#comment-5d0d8b2e6f716d282877fc23 )
|
My response from the same page:
|
I'm getting this "tool is not available for your os" error too. It won't let me install the board into the IDE, and it's preventing me from using my Artemis Nano board. I'm using the latest version of Arduino IDE (1.8.9) on the latest version of Ubuntu with the latest boards package (1.0.1). |
…i-gcc" tools This is intended to fix [this issue with the Apollo3 Arduino core](sparkfun/Arduino_Apollo3#4) and also anticipate a similar issue with Mac OSX. However, this is a shot in the dark -- no new binaries are added and instead the new host specifications just link to the same files. Hoping that these binaries can run across the different architectures. If not then specific binaries for these hosts may need to be added.
I've just updated the boards manager JSON file in an attempt to fix this. See this commit from the SparkFun Arduino Boards repository. I added two new host definitions for the "arm-none-eabi-gcc" tool for x86 architectures. There may yet be more host definitions needed to get full coverage, and it also might be required to actually use binaries specific to those hosts. But let's give this a try as a band-aid solution. Now that the JSON file is updated you should be able to re-try the installation through Arduino boards manager. Please let me know how it goes, good or bad. Thanks! |
That allowed me to successfully install and compile a program. In order to get uploading to work, I had to move
Otherwise it would say that it couldn't run artemis_svl because "permission denied". Oddly enough, it also did this when Arduino IDE was run with But, I've run into a new problem, which I don't think is related to Linux support (but it could be). When I try to upload the code, I see this:
|
Never mind, turns out that I just had to reduce the baud rate down to 460800. |
@Merlin04 - That's really good info to know. We designed the variable rate bootloader just for this situation. Some OSs combined with the CH340x drivers have a variety of max baud rates of adequate baud accuracy. Thanks for letting us know! |
@Merlin04 Thanks for the notes! I just made a patch to the core (v1.0.2) that is intended to make the bootloader tools work out of the box. Can you do a fresh install of the core and try them out? I'd appreciate the results from out 'in the wild.' |
I've installed 1.0.2, but I still get the error |
Thanks, I'm working on a permanent solution for that. In the meantime you can add executable permissions by navigating to |
@Merlin04 The permissions error should be resolved now. You will need to do a fresh installation of v1.0.2 (use the boards manager to remove the old installation and then re-install it). This was fixed by directing Arduino to download the release through the ".tar" archive instead of the ".zip." |
@oclyke Including this here - I am also having issues using the SparkFun:apollo3 core on a linux machine and some of the fixes you provided above have helped me move forward. If I should move this somewhere else let me know and I can. Subject of the issueWhen attempting to program the SparkFun Thing Plus - Artemis using a Jetson Nano I am having trouble uploading to the board Your workbench
Steps to reproduceI've tried to get the Thing Plus - Artemis working using the Board Manager. I am successfully able to get the program to compile but when I attempt to upload it returns the error message listed below. Originally I was having issues compiling similar to the posters above. Using the fix above as guidance I manually updated the package_sparkfun_index.json file by adding (my custom version located here)
After this I was able to get my code to compile. The After the update to the package index, my example code it is able to compile but not upload. The returned error message is at the bottom of the post. Expected behaviourI expect the code to compile and upload. Actual behaviourThe code compiles but does not upload. Attempted FixesMy attempted fixes were mostly focused on dealing with the package index files to get the code to compile. The non-verbose error that is returned during my upload attempts is
which is pretty generic and googling hasn't yielded much good info. I've successfully tested the board and the cable using my main computer running macOS High Sierra 10.13.3 and didn't have any issues. Verbose Console Output During Upload Attempt
|
@rmcsqrd Let's move this to Bootloader SVL aarch64 Support #105 |
Subject of the issue
My Apollo3 board is suppose to arrive in the mail today, so I decided to go ahead and setup the Arduino IDE.
I followed the manual install for core.
no examples show in the example list - but there is a space for "examples for Ambiq Apollo3 Evaluation board".
I manually browsed to the ~/Arduino/hardward/SparkFun/apollo3/libraries directory, and selected the example0_compilation, and the example1_compilation
The Ambiq Apollo3 Evaluation Board from my board choices.
when I click on the verify button, I get a Error compiling for board Ambiq Apollo3 Evaluation Board
In file included from sketch/example0_compilation.ino.cpp:1:0: /home/lfmiller/Arduino/hardware/SparkFun/apollo3/cores/arduino/ard_sup/Arduino.h:42:10: fatal error: am_bsp.h: No such file or directory #include "am_bsp.h" ^~~~~~~~~~ compilation terminated. exit status 1 Error compiling for board Ambiq Apollo3 Evaluation Board.
If I switch to any of the other boards in the package "SparkFun Edge" for example and click on the verify button I get this error.
Build options changed, rebuilding all fork/exec /home/lfmiller/Arduino/hardware/SparkFun/apollo3/tools/apollo3_scripts/artemis_bin_to_blob.exe: exec format error Error compiling for board SparkFun Edge.
.exe file is clearly a Windows thing - leading me to believe that Linux isn't supported yet - but when I goto the above directory, I see python scripts.
So I changed the permissions of the scripts, and the exec files to allow for executing.
And get the same error. Which lead me to believe (???)
Did I miss a step in setup somewhere or is Linux not supported yet.
Your workbench
Steps to reproduce
Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue to a gist.
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
The text was updated successfully, but these errors were encountered: