-
Notifications
You must be signed in to change notification settings - Fork 446
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
Add support for Arduino 1.5 #45
Comments
This commit modifies a few things in Arduino.mk to be able to support overriding the necessary configuration options to support the chipKIT build, and also includes an example sketch configured to build for the Max32 platform. In addition the following changes were done as well - Control C standard with a CFLAGS_STD flag, GNU99 by default. - Duplicate show_config_variable in each sub-makefile. - Remove redundant output of ARDUINO_PREFERENCES_PATH from config table. - Defer Priting ARDMK_DIR until Arduino.mk. - Define names of compiler tools earlier to use for path checking. Duplicating show_config_variable is unfortunate because the code is duplicated, but I don't see a good way around it since we need to dupliacate the check for ARDMK_DIR before we can find Common.mk. Fix #98
Soon, development in Arduino 1.0.x branch will stop and Arduino 1.5.x branch will come out of beta. I quickly had a look to see what all changed in Arduino 1.5.x
I am thinking of creating a new branch to start development for 1.5.x. Once it becomes stable, we can merge it back to master. |
Also, boards.txt can be present inside a submenu. This should be supported as well. See xxxajk/Arduino_Makefile_master#2 |
Yes, I did an unclean fork. I also now auto detect libraries. :-) Please feel free to pull bits from mine. |
@xxxajk I saw your repo the other day and made a note to steal code from you for library detection ;) Jokes apart, would you be interested in merging both our repos? |
Certainly, as long as my projects, and others still compile. But before we
|
You are now welcome to check out what is new. I will be adding support for the Teensy series from pjrc.com very soon, hopefully today. You are (of course) welcome to pull in the bits from that as well, and do with them as you please. As far as merging the two, I don't see that as really possible because of the vast differences in installation and use. For one, my version does not depend on knowing where you sketchbook is located. It does not need to know, because it expect that you have all the needed bits in ../libraries. This allows for independent trees for various boards and private trees automatically. I am considering, however to do a scan of where Arduino IDE WOULD look between the current search and the Arduino home directories searches. Another thing that is really needed is to gather this information more logically by doing a normal dependency gathering via the C Pre Processor, this way, nothing not needed is not compiled, and includes that won't be seen in the include path, won't be included in the path. That will increase compile speeds. Still, one feature at a time :-) |
Sure will do that, as soon as I get some free time.
After your last comment, I was wondering the same. May be it is too much work to merge them right now. But if at all at any point you wish to merge them, I would be happy to help out. Meanwhile, I will be looking into your makefile to grab the code that works for Arduino 1.5.x branch :) |
is there currently a branch somewhere which works with latest ide ? I just got a yun so I need the latest library which killed my current setup (inotool) :/ |
@schmurfy unfortunately, we don't have any code that is compatible with Arduino 1.5.x yet |
do we know the basic 1.5 changes - from a quick glance it seems to be that the hardware directory is split into avr and sam, making the paths to bootloaders, variants, boards.txt different. boards.txt has what looks like cosmetic changes, preferences.txt is pretty different..... |
@sej7278 Those are pretty much the important changes. Also if we decide to support sam based boards, then we might have to provide a way to detect the proper compiler based on the architecture. |
You may want to look at the additions made to mine for support. Ours
|
I ended up making my own build script, one thing I noticed was how horrible the boards.txt was to parse xD |
Easy to use sed, it is just java properties.
|
yeah but the structure is pretty stupid with those .menu. items. |
@schmurfy you can just use split() on '=' to make a nice array. or awk:
or grep like we do in the makefile:
oh yes the new splitting of cpu/board into menu's is pretty naff as they're kind of defining how the gui looks within boards.txt, assuming people are using the IDE.... @xxxajk is that it? surely there's more to it? although that's not backwards-compatible with 1.0 is it - or is that worked around by defining THIRD_PARTY_HARDWARE and/or ARD_HOME? |
I've just made a quick'n'dirty 1.5 proof-of-concept branch which just inserts the architecture anywhere the hardware folder is referenced. its not a full-blown build but it does work unmodified with 1.0.5 and only requires a single variable in the Makefile to build on 1.5.6, so its not going to be too hard to implement. References: library spec / hardware spec |
Wow!! this is definitely a great start :) |
i've added a few more commits including one that replaces hardcoded "arduino" wit a $VENDOR variable, i think we're going to have to replace the ALTERNATE_CORES routines though, as its kind of built into 1.5 with build.core etc. |
@sej7278 While it is desirable to have support for both 1.0.x and 1.5.x in the same branch/release, I am even open to having separate branch/release, if it proves to be too much work to make them compatible. But I will leave the decision to you. |
yes, we'll see how it goes. you can't have 2 versions of the ide installed at the same time so it wouldn't hurt to split the makefile into 2 versions. it certainly needs a different git branch, so we can continue with the odd patch to 1.3.3 my branch is just a test really, but if you want i can make a pull request if you create a branch to pull it into |
Actually we can run two versions of the IDE, at least in mac and linux :) I downloaded both the IDE's as zip files (not the installed) and extracted them into different folders. I change the PATH variable based on which version of the IDE I want to work with.
I agree.
Let's wait a little more till your branch is slightly stable. After that I can pull in all your changes as a separate branch and maintain it till we merge it back to master. |
Here's what happened when I tried to make blink from @sej7278's repo:
|
👍 |
@ladislas i meant no offence, i just meant that we've had a lot of very similar issues lately regarding directory structures, which coincides with the release of BAP, which itself uses subdirectories and such, so I assume that's where the issues are coming from. It would be nice to get a PR or two from users rather than just new feature requests ;-) |
@sej7278 I know :) I think we can blame node.js
Agreed. I'll try to do my best with the different things I've been asking for :) |
i think its safe to blame node.js for everything ;-) |
The arduino "IDE" is a really poor substitute for anything serious, and we As far as a real IDE I just use netbeans for everything except Python. Not trying to start a pissing contest over editors or IDEs, use what you |
eclipse, especially for arduino development is horrible. the eclipse plugin for arduino requires you to have a copy of the core (and i think libraries) for every sketch! what annoys me is that the IDE is pretty much the arduino product - atmel makes the chips, gnu makes the toolchain. just using the libraries and cores like we do with the makefile should be the de-facto way of working, but i guess its a barrier to entry, people want a crappy gui. |
Well, unfortunately, they already drank the kool-aide when they start using On Thu, Sep 18, 2014 at 12:27 PM, sej7278 notifications@github.com wrote:
Visit my github for awesome Arduino code @ https://github.com/xxxajk |
Has anyone gotten the Arduino Makefile to build for the Arduino Due platform? Changing my BOARD_TAG to arduino_due_x or arduino_due_x_dbg throws an error:
but I suspect that this is because avr-g++ is trying to compile code for an arm platform, whereas I'd like to invoke some arm compiler (I'm not sure how Arduino-1.5.8 is actually compiling for ARM platforms). |
no, building for arm is a completely different toolchain. our 1.5 efforts so far are really just building for avr. |
Got it. So the Arduino Makefile project doesn't have plans to extend to the Due and Zero platforms in the near future? |
It's not that we don't have plans to extend. We want to get avr to work first properly with the new 1.5.x library format and once that works we will extend it to other platforms. Unfortunately we don't have an ETA for it. |
If you are on macos or Linux, you can always try mine, which supports 1.5.x :-) |
@Poofjunior Yes. Should support the Due. |
Looks like I'll have to do some things a little bit differently for the Due. Expect support in a day or so. |
|
I works on my IDE 1.5.8. It also autodetects all the environment variables. |
it works with the Arduino IDE 1.6 too |
@mulderp which are you talking about, this Arduino-Makefile or xxxajk's Arduino_Makefile_master ? this makefile supports 1.6.1 for a lot of the AVR chips and teensy, not ARM, although the IDE 1.6.2 that just got released has broken a lot of it (well the IDE itself is broken on linux at least). |
I tried this project with the Blink example and Arduino 1.6.0 In fact, I think this project is great. I wrote some thoughts about command line usage for Arduino here: http://thinkingonthinking.com/an-arduino-sketch-from-scratch/ |
We can probably close issue sudar#45 and maybe open a new one for ARM SAM support, as 1.6.3 is supported now (and 1.5 is dead).
As of today, master supports Arduino 1.6.3, hence closing this. Support for SAM and other non-avr boards is not available yet. It will be tracked in #343 |
Oh and happy Easter, I'm just not one for traditional holidays. On Sun, Apr 5, 2015 at 11:40 PM, Sudar Muthu notifications@github.com
Visit my github for awesome Arduino code @ https://github.com/xxxajk |
Arduino 1.5 has changed the directory structure.
Add an option to specify (or auto detect) Arduino version and then based on that change the directory paths.
Changes should be compatible with 1.0.x version of Arduino as well.
The text was updated successfully, but these errors were encountered: