-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Update avr toolchain to Atmel 3.5.3 and avrdude to 6.3 #5021
Conversation
Does it also enable LTO? |
aehm... I don't know :-) is the LTO support compiled in the toolchain by default? or it needs some extra configuration parameter? In the latter case then, no, it must be enabled. here the build scripts: I remember that @facchinm did something with LTO maybe he can give some hints? |
I'll give this a whirl soon. Interesting to see what differences appear between gcc 4.8.1 and 4.9.2 |
The new toolchain is working but has no LTO support. Also there are some enhancements in the compiler so that some libs wont compile. The included avr-libc has buildin time support. This conflicts with other library time implementations. The code is much smaller. Is it possible to have more than 1 toolchain (like the custom toolchain with gcc6.1) and select them via the ui? Thanx |
is it really wise to add this ?
the code in the libs should be fixed. the compiler warning us about bad code is agood thing. |
It seems that gcc 4.9.2 has tightened the checks and some of the (former) warnings are now turned into errors, the result is that a number of libraries stopped working. This forces us to set the flag at least until we understand the impact of this change. From the gcc manpage I see:
so |
The compiler tells us about ill formed code not bad code. |
Hi, as i wrote LTO with only the changes in the platform.txt is not working. You will get this error: If you remove this entry you will get this error: It seems that the toolchain is not build with LTO support. |
I've replaced also the toolchain: this one have LTO support compiled in. (here the changes to the build script arduino/toolchain-avr@cd131c7) From our preliminar tests we see that LTO is working well, so I've made it the default for this build. |
@harryboo I've tried the windows build and indeed it produces the error you reported, the other builds instead works as expected. There is still something to work on... |
36b63d8
to
4b17e96
Compare
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-5021-BUILD-566-linux32.tar.xz ℹ️ The |
Hi, it seems it is working now also with windows builds. Let me check some more tonight. Thanx |
Looks good on mac os x and also compiles again the code mentioned in bug #2752 now avr lib 2.0.0 is included |
Toolchain 3.5.3 available. |
@PaoloP74 ArduinoBot should produce a build shortly. |
The avr toolchain has been updated to the Atmel bundle version 3.5.3
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-5021-BUILD-579-linux32.tar.xz ℹ️ The |
Sorry coming late on this but I would like to know if the avrdude has been built against the 6.3 release tag or from trunk. |
It's from 6.3, not trunk. |
It seems that avrdude-6.3 is creating a lot of problems with the burn-bootloader command, here a bunch of issues that people are experiencing since the release of the IDE 1.6.10: It seems that a proper fix is something that cannot be expected soon becuase it requires a fix in avrdude code and needs extensive testing with a lot of different AVR-programmers that may be not available at hand. At this point we are wondering to revert to avrdude 6.0.1 for the coming IDE 1.6.11, and wait until avrdude has all the issues sorted out (hopefully with a 6.4 release). The Please let me know your thoughts. @per1234 @matthijskooijman @PaulStoffregen @descampsa @markaswift @awatterott @logicaprogrammabile @johbell @meoudon @PaoloP74 @Testato @NicoHood |
no opinion really since I don't use avrdude, but stable sounds good |
I came across this when I was playing with later avrdude builds some time ago. It looked like avrdude was moving closer to what the atmega datasheets say in terms of how unused/reserved efuse bits should be reported: 1. Can we not send the efuse bits to avrdude in a more "correct" way? Logical OR 0xF8 (previously said 3E...not sure where that came from) Lots of people who use this functionality are moving to ATMEL-ICE and it would be good to keep that supported. |
Unfortunately not, because that means putting a parsing logic into the IDE (read fuse from config files -> do AND with 0x3E (or other constants depending on the fuse?) -> replace value), we have removed almost all the "magic" from the IDE, in favor of configurations, and we don't want to go back on that. |
Ok I see why that is the case. Is it just the efuse that's causing this? I'm not convinced we'll see avrdude change this behaviour back so I'm keen to look at all options. |
Actually, changing it in avrdude like this (ignoring unused bits) is the "proper fix" @cmaglie was referring to. @facchinm created an avrdude patch for that, but it needs more work, testing and preferably review from people more involved with avrdude to consider applying it to the Arduino avrdude version already. |
This is indeed what avrdude is doing, which seems good. The obvious fix here seems to be to change boards.txt to use 1s for unused bits too, which would indeed work (for some programmers, a patch to avrdude is needed for some other programmers). However, this leaves third-party boards hanging, since they also need to update their fuse values which means that a lot of third-party boards will be broken for a while until they update, and once they update they'll be broken when used with older Arduino / avrdude versions. This problem disappears when avrdude is fixed in the proper way. |
I don't fully understand the changes made between avrdude 6.0.1 and 6.3.0. Are these changes unintentional bugs or are they improvements that were thoroughly thought out and discussed? My limited understanding is they are the latter and are meant to improve consistency of how fuse bits are handled. My testing indicated that the issues for Arduino AVR Boards were all solved by the original changes proposed in #5202, which were only edits to boards.txt and avrdude.conf. avrdude 6.3.0-arduino2 does cause serious issues for many 3rd party AVR boards. The original changes proposed in #5202 even more so. The only solution for 3rd party boards I have come up with that maintains backwards compatibility is for them to add their own avrdude tool. This quite easy to do for Boards Manager installation but more difficult for manual installation. So there is definitely a downside to staying with the new avrdude version but I hate to see Arduino take a step backwards. Whether avrdude 6.3.0 is actually a step forwards is the question. Can anyone with more knowledge on this give an opinion? I was very happy to see the new versions of avr-gcc and avrdude added in Arduino AVR Boards 1.6.12, not because I was dissatisfied with the old versions but because it shows that Arduino is continuing to progress and stay relevant. If the community has to scramble a bit in exchange for modern tool versions with real improvements I think that's acceptable. It would be nice if we were given more time to prepare for these sorts of releases and maybe a beta release package_index.json file for upcoming Arduino AVR Boards versions. The hourly IDE build doesn't allow easy checking of how the new Arduino AVR Boards version will affect previous IDE versions. I've already seen the new avrdude version fix two long standing issues(#2986 and https://github.com/arduino/Arduino/issues/388 for Arduino as ISP). I'm sure there are others. |
As for the question at hand (downgrading avrdude or not): I think it depends on what upload problems avrdude 6.3 fixes. If significant "regular" upload problems are fixed, in exchange for new "burn bootloader"-only problems, that might be a worthwile tradeoff and we can consider keeping 6.3. If not, reverting is probably better. |
@per1234, I think my previous comments answer most of what you write, but our comments crossed. In any case, I believe downgrading is intended as a temporary measure, buying some time for the proper fix to happen in avrdude (either in an upstream release, or if not in an Arduino-specific patch). |
@per1234 I find acceptable to delay the proper release of avrdude 6.3 (or 6.4 with mEDBG support) for a month or less, so we can workout all bugs which were discovered in this bunch of days (like #5173, which solution needs indeed an updated 6.3 build). It will help sorting out a proper .12 release with brand new tools working well for everyone |
@cmaglie in my case I need to have more stability from the IDE. These problems lead me to lose more time to finish my projects. I think that new releases need to be more tested. your solution is good for me. |
If you revert, please make it Arch compatible (static libs). |
I would stay at avrdude 6.3, because the handling of unused fuse bits from the old avrdude version is not right. It is confusing if you look into the data sheet and find there other values. |
Maybe this new Efuse management solve the most famous and old arduino bug ? |
@Testato No, it will not resolve #2075. The cause of the problem is that the ATmega8 has no extended fuse bits, but the IDE tells avrdude to write the extended fuse bits (parameter |
But the team must solve this, |
Updated tools: