arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.11k stars 7k forks source link

Bootloader cannot be built with up-to-date compiler #5604

Closed LukasJaeger307 closed 7 years ago

LukasJaeger307 commented 7 years ago

Dear Arduino-Team, I am currently trying to build an Arduino-Bootloader with some crypto extensions (secure IoT and so on) and as a base I wanted to use the existing optiboot-bootloader. I am running an Arduino Uno with an Atmega 328P. This monday I downloaded the code and I spent until just now to build it. The reasons were:

My solution to all those hassles was to roll back the code and the toolchain to a version uploaded to github in 2011. Looks like the hexfiles in the repository weren't touched for a long time so I thought I'd give you a heads-up, that the bootloader has a problem with current compilers. If you wanna fix this, I'd be happy to support you.

NicoHood commented 7 years ago

You should use the upstream optiboot or lufa booloader. They are way better and improved nowadays anyways. But you are basically right.

cmaglie commented 7 years ago

The bootloader of the Uno has been out for very long time now: it has been tested by a lot of people, many of them build their shield/products testing them with that bootloader. Changing it now means only looking for troubles and we are not going to touch it, unless there is a very good reason to do so.

The provided source code is the one that we used to build it, at the times, and upgrading it doesn't make much sense becuase it will just make it out of sync with the hex file.

As @NicoHood said you can use the upstream version.

WestfW commented 7 years ago

The "upstream version" is presumably this one: https://github.com/Optiboot (This does explicitly have the fixes need for new compilers up through at least 4.9.2) (although several new "board" packages have their own slightly-modified versions.)