-
-
Notifications
You must be signed in to change notification settings - Fork 114
run arduino-builder on ARM Linux box #76
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
After reading around a bit more, I added the lines from that partial platform.txt in this repo to my Arduino/.../platform.txt, with
modified to
This let me get a bit further and now the resulting output is:
That last error aside, to stay on topic, how exactly can the specific runtime.tools.< specific tool > variables be set when trying to use separately compiled/installed tools and not a pre-built Arduino IDE installation? There seems to be more to it than just setting -tools "< path >" since I had to modify those lines in platform.txt. |
You dag well into the code @spiderkeys. That said, stock ctags will not work, because it does not output functions return type. We compile and bundle a modified version, which you can find here. You'll have to clone and compile it on your own, since we don't provide ARM binaries |
Hi @spiderkeys One topic at a time 😄
cd $HOME
wget http://downloads.arduino.cc/arduino-builder-arm/arduino-builder
chmod +x arduino-builder
mkdir -p hardware/tools/
wget http://downloads.arduino.cc/arduino-builder-arm/ctags
chmod +x ctags
mv ctags hardware/tools/
wget http://downloads.arduino.cc/cores/avr-1.6.9.tar.bz2
mkdir -p hardware/arduino/
tar xvf avr-1.6.9.tar.bz2
mv avr hardware/arduino/
wget https://raw.githubusercontent.com/arduino/arduino-builder/master/src/arduino.cc/builder/hardware/platform.keys.rewrite.txt
mv platform.keys.rewrite.txt hardware/
wget https://raw.githubusercontent.com/arduino/arduino-builder/master/src/arduino.cc/builder/hardware/platform.txt
mv platform.txt hardware/ and compile with
You need to have |
@ffissore I had arm binaries for |
@facchinm good to know! |
Thankz @facchinm for the binaries to play with .. :)~ |
The sources are exactly the master branches of http://github.com/arduino/arduino-builder and http://github.com/arduino/ctags compiled for armv7 😉 |
Thanks for the help everyone. @facchinm following your guide, I was able to almost get everything working in one shot. Unfortunately, arduino-builder didn't automatically pick up the directories for the tools so here are the changes I had to make:
Then for my build command:
Once I did that, I was able to build my simple test.ino. Any ideas why I still need to provide absolute paths to tools in my platform.txt files? It's not a big deal, since our use environment is pretty contained, just curious. I decided to push my luck a bit and tried building our entire firmware stack for our robot: https://github.com/OpenROV/openrov-software-arduino/tree/30.0.3/OpenROV. Everything seemed to work, and I got my hex file as expected. Now, to get to the real aim of this endeavour. We are developing a new controller board for our robot using the J18A variant of the Atmel SAMD21 32bit arm as our MCU. The core supplied by Arduino is for the SAMD21G, so that doesn't work right out of the box. Luckily the fine people at Sodaq made a custom core for the J18A which can be found here: https://github.com/SodaqMoja/SodaqCore-samd Do you have any recommendations for what steps I will need to take to get arduino-builder working using a sam core package? I imagine if I could even get the Arduino provided sam package working, the same steps would carry over to Sodaq's core. I've already taken the steps of cloning their package to hardware/arduino/sam/ and installing the arm-none-eabi-gcc toolchain. I notice in the sam platform.txt file that there is a {runtime.tools.CMSIS.path} referenced, so it's worth asking if there is any Arduino specific version of it required, much like ctags. Again, thanks for all of the help. |
Hi @spiderkeys , |
Progress! I was able to build the same test.ino using both the SAMD21G and Sodaq SAMD21J18A cores. Still some more manual path specification pain points, but luckily only a few. Here are the steps I took beyond the last steps I provided getting things built for the ATMega2560:
For building with the Sodaq Core, I simply had to clone their core package to hardware/arduino/sodaq/ and make the same changes as above to the platform.txt file, with the added step of undoing a change that they had made for some reason: SodaqMoja/SodaqCore-samd@2639679
My build command:
One thing to note is that I originally tried to use the option "-tools /root/workspace/hardware/tools/CMSIS/" and "-tools /root/workspace/hardware/tools/CMSIS/CMSIS/" to get arduino-builder to correctly find the path variable value for it, but neither worked, resulting in the hardcoded path in platforms.txt. @facchinm I'm curious, could you describe your environment that you tested this in a bit more in terms of where and how you installed your packages, directory structure with relation to the arduino-builder executable, your hardware/ folder, etc? I'm wondering if my issue with needing to manually modify the platform.txt files is a result of things not being perfectly named or placed as expected by arduino-builder. On that note, is there any insight into how the tool is actually searching for and populating those environment variables, particularly with respect to when you supply the -hardware and -tools options? It seems like it is ultimately finding the executables themselves from the options I provide, but is unable to set the runtime.tools.x.path variables. Once I've cleaned up the process a bit and written some a script to automate most of this, I'll link it here. Hopefully I can figure out how to negate the need for any modification of platforms.txt to make that script a bit nicer. Thanks and cheers |
Could you please explain me how you build the arduino-builder for arm? On x64 (with prebuilt 1.5.2 binary from website) I get an error here:
On arm I only have the apt-get 1.3.3 package and no chance to recompile the 1.5.2 source myself. git clone https://github.com/arduino/arduino-builder.git
cd arduino-builder/
sudo apt-get install golang mercurial
export GOPATH=`pwd`
go get github.com/go-errors/errors
go get github.com/stretchr/testify
go get github.com/jstemmer/go-junit-report
go get golang.org/x/codereview/patch
go get golang.org/x/tools/cmd/vet
go build If this is solved, we can possibly enable the IDE for arm, beaglebone included: @ffissore please improve the compiling instructions, this is very unclear to me. |
Another "out of the box" ARM issue: Tests fail due to "Unknown OS: linux-arm" Command: go test -v ./src/arduino.cc/builder/test/... | bin/go-junit-report > report.xml My test output XML: My verbose output from arduino-builder: |
@spiderkeys a lot of efforts has been put into this recently, please have a look at this branch: https://github.com/arduino/arduino-builder/compare/arm?expand=1 you can see that we use http://downloads.arduino.cc/packages/test_package_arm_index.json as the url for downloading tools, this is a small hack to run tests because we are still testing the tools for arm. Once tested the tools will be published in the main package_index.json and the hack removed. See also: |
Hello,
and my output.
Any ideas? I'm guessing that I did something dumb while building ctags or something of the like. |
There is now an experimental hourly build of the Arduino IDE for ARM: |
I am trying to do something fairly unconventional, which is trying to use arduino-builder on a Beaglebone Black (armhf single board computer) to build an Arduino sketch with the latest 1.6.6 Arduino files. arduino-builder is required, since the distribution itself is CLI only, no display (and no one has built an armhf port of 1.6.6). Here are the steps I have taken (all on a beaglebone):
Following is the resulting output. The apparent error is "ctags pattern is missing"
I tried grepping through the arduino-builder folder, but couldn't find that specific error string anywhere. I then realized that the machine itself didn't have ctags installed, so I ran apt-get install exuberant-ctags, which added ctags to /usr/bin/ as well. No change observed.
Any ideas on how I might fix this problem?
Also, I notice that there is a arduino-builder/src/arduino.cc/builder/hardware/platform.txt file which sets the variables:
Where are these being used? They aren't present in my Arduino/hardware/..../platform.txt file, and as far as I can tell, the arduino-builder executable doesn't know anything about the platform.txt file in its build folder (unless those options were built into it somehow when I ran the Go build?)
The text was updated successfully, but these errors were encountered: