NEWER New Optiboot bootloader

if there is something on your laptop that actually starts serial communication, it is normal for this to cause a reset and run the bootloader (causing the three flashes) (whereas a clean power-on with no serial involvement SHOULD go direct to the sketch.) This is due to the auto-reset circuitry of the Arduino. (which is somewhat sensitive; it wouldn't surprise me of certain power-up situations result in an "external reset" rather than a "power on" reset. I'm not sure whether USB enumeration (without actually opening the serial port) will do anything. But it's possible.)

Thanks for the quick reply, I've tried turning DTR off and shorting the RST pin to the GND pin with a 10uF capacitor as stated in the serial auto reset disable guide but those didn't help either. What confuses me is that this doesn't happen at all with my uno v3 which also has optiboot installed.

Party_Waffel:
Thanks for the quick reply, I’ve tried turning DTR off and shorting the RST pin to the GND pin with a 10uF capacitor as stated in the serial auto reset disable guide but those didn’t help either. What confuses me is that this doesn’t happen at all with my uno v3 which also has optiboot installed.

From my experience using the UNO V3 as an ISP programmer, and from what I’ve read, the V3 doesn’t need the 10uF nor does it seem to be needed with the Pro mini I’m actually using as an ISP programmer. In both cases the DTR was left enabled.
Dave

Hi there,

I'm searching HEX file for the ATmega8-16PU MCU named "optiboot_atmega8-16.hex", can someone please upload it?

I was unable to find on the internet!

I need it for this entry to be able to burn Bootloader to my fresh ATmega8-16PU's!

##############################################################
opti8.name=Arduino Optiboot-Atmega8-16
opti8.upload.protocol=arduino
opti8.upload.maximum_size=7680
opti8.upload.speed=115200
opti8.bootloader.low_fuses=0xbf
opti8.bootloader.high_fuses=0xcc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_atmega8-16.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=16000000L
opti8.build.core=arduino
opti8.build.variant=standard
##############################################################

Thank you!

Here it is. I’m not sure where you got that boards.txt file from; I’m pretty sure that the atmega8 hex file has never had the -16 suffix (somewhat irrelevant since the currently provided .hex files don’t include any atmega8 binaries.)
You’ll probably have trouble using the “burn bootloader” command with any modern IDE; atmega8 has been broken for a long time. Using my OptiLoader Or Nick’s (enhanced!) Bootloader programmer would be easier…

Edit: it won’t let be attach .hex files. Zipped.

optiboot_atmega8-16.hex.zip (822 Bytes)

westfw: Here it is. I'm not sure where you got that boards.txt file from; I'm pretty sure that the atmega8 hex file has never had the -16 suffix (somewhat irrelevant since the currently provided .hex files don't include any atmega8 binaries.) You'll probably have trouble using the "burn bootloader" command with any modern IDE; atmega8 has been broken for a long time. Using my OptiLoader Or Nick's (enhanced!) Bootloader programmer would be easier...

Edit: it won't let be attach .hex files. Zipped.

Hi westfw,

I was Googling a few day now to find the easiest and the best solution and I came a cross to this page on Instructables.

And I got that boards.txt entry from that post, but it was strange to me also because of that suffix.

Thank you for your fast reply! 8)

westfw: Here it is. I'm not sure where you got that boards.txt file from; I'm pretty sure that the atmega8 hex file has never had the -16 suffix (somewhat irrelevant since the currently provided .hex files don't include any atmega8 binaries.) You'll probably have trouble using the "burn bootloader" command with any modern IDE; atmega8 has been broken for a long time. Using my OptiLoader Or Nick's (enhanced!) Bootloader programmer would be easier...

Edit: it won't let be attach .hex files. Zipped.

Me again and confused a little bit.

In the Arduino's "hardware\arduino\avr\bootloaders\optiboot\" there is a HEX file optiboot_atmega8.hex and it's 1.36Kb (CRC32: 6d4bc037), but what I got from your zip file is optiboot_atmega8-16.hex and it's 1.28Kb (CRC32: 1336439d), so what is basically the difference between those two HEX files?

Thank you!

The Optiboot from the IDE is version 4.4; the .hex file I posted is version 6.2 ... There are probably not any changes that are particularly relevant to the m8 (ie no reason to use the newer one) Most of the edits have added other chips, corrected for new compiler behavior, or enhanced the build system. (You can view the edits at https://github.com/Optiboot/optiboot

Hello,

I just saw You made support for the 328PB Chip.

I asked this some time ago, but did NOT got definitive answer.

Can be those boatloader used in commercial Products like Arduino UNO "clones"? Which kind of bootloader those boards from China are using as bootloadeR?

Regards, Maverick

I asked this some time ago, but did NOT got definitive answer. Can be those boatloader used in commercial Products like Arduino UNO "clones"?

Yes. The original author licensed Optiboot under GPL2, and it would certainly be painful to change the license since he disappeared. I'm not sure that it's clearly defined what GPL2 means WRT bootloaders, but I'd put them in the same class as Desktop Operating Systems - of course you can write commercial products that run on open source operating systems! If you make changes to optiboot itself as part of your commercial product, you should be prepared to release those changes as open source as well. Personally, I lean toward less viral licenses (MIT or BSD.)

Which kind of bootloader those boards from China are using as bootloadeR?

How could anyone possibly know that? Reports have ranged from Optiboot (but I don't know what version) (especially for Uno clones), Atmegaboot (especially on Nano clones), Adaboot (on Pro Mini clones, as per Sparkfun?), and "doesn't seem to have any bootloader at all".

Thanks,

I would not going to change anything on the software. But without the software the hardware is useless.

I want to use 328PB under the IDE, but have got some problems here. I have changed the board file and placed the hex file to the correct directory. I also changed the pins_arduino.h file.

optibootxmini328pb.name=Optiboot Xplained Mini 328pb

optibootxmini328pb.upload.tool=arduino:avrdude
optibootxmini328pb.upload.protocol=arduino
optibootxmini328pb.upload.speed=57600

optibootxmini328pb.bootloader.tool=arduino:avrdude
optibootxmini328pb.bootloader.unlock_bits=0x3F
optibootxmini328pb.bootloader.lock_bits=0x2F

optibootxmini328pb.build.f_cpu=16000000L

optibootxmini328pb.build.board=AVR_UNO
optibootxmini328pb.build.core=arduino:arduino
optibootxmini328pb.build.variant=arduino:standard

optibootxmini328pb.upload.maximum_size=32128
optibootxmini328pb.upload.maximum_data_size=1024

optibootxmini328pb.bootloader.low_fuses=0xBF
optibootxmini328pb.bootloader.high_fuses=0xCE
optibootxmini328pb.bootloader.extended_fuses=0xFF
optibootxmini328pb.bootloader.file=optiboot/optiboot_xplained328pb.hex

optibootxmini328pb.build.mcu=atmega328p

I'm still not able to upload anything over IDE.

Any Ideas why?

Regards, Maverick

I get this error:

Warning: Board arduino:avr:atmega328bb doesn't define a 'build.board' preference.
Auto-set to: AVR_ATMEGA328BB

avr-g++: error: unrecognized argument in option '-mmcu=atmega328pb'

avr-g++: note: valid arguments to '-mmcu=' are: at43usb320 at43usb355 ... and so on

Do You know where can I add my board (mmcu) ?

Regards, Maverick

Supported processors are burned into the compiler. You need a newer toolset.

Hello,

Newer toolset?

I made the hex file with atmel studio 7.
The IDE is package version 1.6.9

What exactly should I update?

In the past, I have just copied the toolset from Atmel Studio to the correct location in the Arduino IDE directory. I have also copied the entirety of... http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx ...to the correct location in the Arduino IDE directory. I believe I have even posted detailed instructions on this forum.

Yup... http://forum.arduino.cc/index.php?topic=168152.msg1252235#msg1252235 But that may be out-of-date.

The easiest way to get a PB working is to pretend that it's just a 328P. After that is "working" (bootloader burnt, sketches uploading successfully) you can start to think about how to access the PB features... (in fact, the current optiboot PB support pretends to be a mere P, because of the state of the Arduino IDE compiler/etc.)

(The AS7 (7.0.943) that I installed TODAY does seem to support the 328PB.)

westfw: in fact, the current optiboot PB support pretends to be a mere P, because of the state of the Arduino IDE compiler/etc. (The AS7 (7.0.943) that I installed TODAY does seem to support the 328PB.)

Yes, I saw that line in our code -> optibootxmini328pb.build.mcu=atmega328p

I try to get a solution to get it work under the Arduino IDE.

Regards, Maverick

Hello

I have downloaded the newest Optiboot from github and placed it under 'Documents/Arduino/hardware/'. However whenever I try to burn the bootloader (Optiboot 28pins, 8Mhz) to an atmega328p with an USBasp I get the following error:

java.lang.NullPointerException
    at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:363)
    at processing.app.Editor.lambda$handleBurnBootloader$42(Editor.java:2752)
    at java.lang.Thread.run(Thread.java:745)
Error while burning bootloader.

Also when I try to compile Blink, I get:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x4b39ba]

goroutine 1 [running]:
arduino.cc/builder.(*SetupBuildProperties).Run(0x692034, 0x12054000, 0x0, 0x0)
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/builder/setup_build_properties.go:86 +0x10ba
arduino.cc/builder.(*ContainerSetupHardwareToolsLibsSketchAndProps).Run(0x692034, 0x12054000, 0x0, 0x0)
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/builder/container_setup.go:59 +0x4e6
arduino.cc/builder.runCommands(0x12054000, 0x12025dc4, 0x3, 0x3, 0x1, 0x0, 0x0)
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/builder/builder.go:181 +0xe2
arduino.cc/builder.(*ParseHardwareAndDumpBuildProperties).Run(0x12025df0, 0x12054000, 0x0, 0x0)
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/builder/builder.go:170 +0x157
arduino.cc/builder.RunParseHardwareAndDumpBuildProperties(0x12054000, 0x0, 0x0)
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/builder/builder.go:217 +0x35
main.main()
    c:/jenkins/workspace/arduino-builder-windows/src/arduino.cc/arduino-builder/main.go:307 +0xfd7
arduino-builder returned 2

Error compiling for board Optiboot on 28-pin cpus.

Obviously the paths are wrong (There is no C:\jenkins\workspace). I'm sure I've missed a huge step during install, how can I fix this?

Did it work for normal platform builds before you tried to add the ne optiboot? What ide version are you using?

westfw: Did it work for normal platform builds before you tried to add the ne optiboot? What ide version are you using?

When "Atmega328 on a breadboard 8Mhz" (from tutorial) is selected I can burn the bootloader and upload sketches without problems, is that what you mean?

I'm using Arduino IDE 1.6.9