Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. OpenHardware.io
  3. 💬 Various bootloader files based on Optiboot 6.2

💬 Various bootloader files based on Optiboot 6.2

Scheduled Pinned Locked Moved OpenHardware.io
optiboot
164 Posts 18 Posters 63.7k Views 18 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bjacobseB Offline
    bjacobseB Offline
    bjacobse
    wrote on last edited by bjacobse
    #92

    I have upgraded my Arduino to 1.6.8, running Ubuntu 14.04LTS and downloaded the GertSander great optiboot :-)
    I use Arduino Pro mini clones from ebay. I have removed power LED and LDO, since those shall be powered from 2pcs AAA . I can read "80e" on the crystal - I assume this is 8MHz
    But I get weird troubles, I can flash bootloader via TinyUSB and upload sketch via FTDI, but not the lower frequencies like 1MHz or 4MHz, my working sketch upload is with 8 MHz (I have not tried with a higer freq). I can upload both using internal and external crystal settings. I use BOD=1.8V
    I have been suspecting my USB cable to MiniUSB to FTDI, but it's working when I use the 8MHz frequencey and 38K4baud rate
    any good ideas?

    GertSandersG 2 Replies Last reply
    0
    • bjacobseB bjacobse

      I have upgraded my Arduino to 1.6.8, running Ubuntu 14.04LTS and downloaded the GertSander great optiboot :-)
      I use Arduino Pro mini clones from ebay. I have removed power LED and LDO, since those shall be powered from 2pcs AAA . I can read "80e" on the crystal - I assume this is 8MHz
      But I get weird troubles, I can flash bootloader via TinyUSB and upload sketch via FTDI, but not the lower frequencies like 1MHz or 4MHz, my working sketch upload is with 8 MHz (I have not tried with a higer freq). I can upload both using internal and external crystal settings. I use BOD=1.8V
      I have been suspecting my USB cable to MiniUSB to FTDI, but it's working when I use the 8MHz frequencey and 38K4baud rate
      any good ideas?

      GertSandersG Offline
      GertSandersG Offline
      GertSanders
      Hardware Contributor
      wrote on last edited by GertSanders
      #93

      @bjacobse

      You should not flash the 4Mhz bootloader to a pro mini, because it works in 2 ways: with 8Mhz crystal or using the internal oscillator.

      When using the internal oscillator, you can use it at 8Mhz (default) or at 1Mhz. In this last case, the fuse for clockdivision by 8 need to be set.

      I have not experimented with a clock division by 2, which would allow the 4MHz boot loader to work.

      I have some 4MHz crystals, so that is why I compiled the 4Mhz version of the boot loader.

      When uploading via FTDI, you need to keep the settings at which you flashed the bootloader.

      I found that when using the internal oscillator, there is a difference when you flash at 5V or at 3V3 for the same processor. If you flash the boatloader while it is powered at 5V, and then use the processor at 3V3 you may have issues with loading via FTDI at higher speeds, because the actual speed of the internal oscillator is different at 5V or 3V3.

      So I think it is best to always use the crystal.

      If you do need to run the processor at slower speed, keep the 8Mhz crystal setting, but use clock division. This means you need to change the fuse settings to make that work.

      1 Reply Last reply
      0
      • GertSandersG Offline
        GertSandersG Offline
        GertSanders
        Hardware Contributor
        wrote on last edited by
        #94

        @hek I wanted to upload a ZIP file of my hardware sub folder so people can just expand that ZIP into their <sketches>\hardware directory, but the Openhardware.io site unpacks the ZIP and puts the files in various places.
        Is there a way to upload a ZIP without it being unpacked ? Is a RAR file allowed (not tested this). I tried renaming the extension to .unzip_this but that "file type" is not accepted by the import function.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Samuel235
          Hardware Contributor
          wrote on last edited by
          #95

          Good afternoon @GertSanders, I'm over the moon with your bootloaders than you provided me. Is there anything that would make you advice me not to use your 'optiboot_atmega328_08M_038400_NOLED.hex' bootloader full time on my light switches?

          MySensors 2.1.1
          Controller - OpenHAB (Virtual Machine)
          Gateway - Arduino Mega MQTT Gateway W5100

          GertSandersG 1 Reply Last reply
          0
          • S Samuel235

            Good afternoon @GertSanders, I'm over the moon with your bootloaders than you provided me. Is there anything that would make you advice me not to use your 'optiboot_atmega328_08M_038400_NOLED.hex' bootloader full time on my light switches?

            GertSandersG Offline
            GertSandersG Offline
            GertSanders
            Hardware Contributor
            wrote on last edited by
            #96

            @Samuel235
            I see no reason for not using it. The fact that you do not need the led, make no difference in the actual work of the boot loader.

            1 Reply Last reply
            1
            • bjacobseB bjacobse

              I have upgraded my Arduino to 1.6.8, running Ubuntu 14.04LTS and downloaded the GertSander great optiboot :-)
              I use Arduino Pro mini clones from ebay. I have removed power LED and LDO, since those shall be powered from 2pcs AAA . I can read "80e" on the crystal - I assume this is 8MHz
              But I get weird troubles, I can flash bootloader via TinyUSB and upload sketch via FTDI, but not the lower frequencies like 1MHz or 4MHz, my working sketch upload is with 8 MHz (I have not tried with a higer freq). I can upload both using internal and external crystal settings. I use BOD=1.8V
              I have been suspecting my USB cable to MiniUSB to FTDI, but it's working when I use the 8MHz frequencey and 38K4baud rate
              any good ideas?

              GertSandersG Offline
              GertSandersG Offline
              GertSanders
              Hardware Contributor
              wrote on last edited by
              #97

              @bjacobse

              Just to be clear for me: did you try to upload a 1Mhz bootloader and then try to send a sketch via FTDI to the same 1Mhz boot loader, and this fails ?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Samuel235
                Hardware Contributor
                wrote on last edited by
                #98

                @GertSanders said:

                @Samuel235
                I see no reason for not using it. The fact that you do not need the led, make no difference in the actual work of the boot loader.

                Thank you!

                MySensors 2.1.1
                Controller - OpenHAB (Virtual Machine)
                Gateway - Arduino Mega MQTT Gateway W5100

                1 Reply Last reply
                0
                • bjacobseB Offline
                  bjacobseB Offline
                  bjacobse
                  wrote on last edited by bjacobse
                  #99

                  oki I got it 4 MHz wont work on Pro Mini. but I would assume 1MHz bootloaders should be ok?

                  1)I have first selected board: atmega328 based 32pins TQFP, then the frequency.
                  2)Flashed bootloader via tiny USB
                  3)Then put Pro Mini to FTDI, and then tried to upload sketch. (no changes at all to which board type, speed, or BOD)

                  (I use 1 USB port on laptop for tinyUSB and another USB port for FTDI.)

                  Then I change speed/frequency, and do the step 1,2,3 as above

                  Selecting 8MHz-crystal-38k4-D8 is working flawless.
                  None of the 1MHz selection is working for me...

                  GertSandersG 1 Reply Last reply
                  0
                  • bjacobseB bjacobse

                    oki I got it 4 MHz wont work on Pro Mini. but I would assume 1MHz bootloaders should be ok?

                    1)I have first selected board: atmega328 based 32pins TQFP, then the frequency.
                    2)Flashed bootloader via tiny USB
                    3)Then put Pro Mini to FTDI, and then tried to upload sketch. (no changes at all to which board type, speed, or BOD)

                    (I use 1 USB port on laptop for tinyUSB and another USB port for FTDI.)

                    Then I change speed/frequency, and do the step 1,2,3 as above

                    Selecting 8MHz-crystal-38k4-D8 is working flawless.
                    None of the 1MHz selection is working for me...

                    GertSandersG Offline
                    GertSandersG Offline
                    GertSanders
                    Hardware Contributor
                    wrote on last edited by GertSanders
                    #100

                    @bjacobse
                    Strange, I'm using the 1mhz with 9600 upload on 2 narrow nodes. I will investigate tomorrow.

                    bjacobseB 1 Reply Last reply
                    0
                    • GertSandersG GertSanders

                      @bjacobse
                      Strange, I'm using the 1mhz with 9600 upload on 2 narrow nodes. I will investigate tomorrow.

                      bjacobseB Offline
                      bjacobseB Offline
                      bjacobse
                      wrote on last edited by
                      #101

                      @GertSanders
                      I it's quite strange, I believe your bootloadser are in good shape and also your boards.txt
                      Thats why I suspect my USB to miniUSB cable to FTDI to behave odd.
                      Do you have Arduino Pro Mini 3,3V 8MHz that you can try at your place?

                      GertSandersG 1 Reply Last reply
                      0
                      • bjacobseB bjacobse

                        @GertSanders
                        I it's quite strange, I believe your bootloadser are in good shape and also your boards.txt
                        Thats why I suspect my USB to miniUSB cable to FTDI to behave odd.
                        Do you have Arduino Pro Mini 3,3V 8MHz that you can try at your place?

                        GertSandersG Offline
                        GertSandersG Offline
                        GertSanders
                        Hardware Contributor
                        wrote on last edited by
                        #102

                        @bjacobse

                        I uploaded two boot loaders on a pro mini 3V3 version with 8Mhz resonator.

                        On this board I loaded a boot loader for 1MHz clock frequency and upload speed of 9600 baud. This worked fine. Then I tried the 4800 baud upload speed version: same thing. Both boot loaders uploaded fine, and I was able to load sketches on both with an Adafruit FTDI friend at the specified upload speeds. 4800 is really "sloooooow".
                        Just to be sure I also used a cheap Chinese FTDI interface: same good results.

                        bjacobseB 1 Reply Last reply
                        0
                        • GertSandersG GertSanders

                          @bjacobse

                          I uploaded two boot loaders on a pro mini 3V3 version with 8Mhz resonator.

                          On this board I loaded a boot loader for 1MHz clock frequency and upload speed of 9600 baud. This worked fine. Then I tried the 4800 baud upload speed version: same thing. Both boot loaders uploaded fine, and I was able to load sketches on both with an Adafruit FTDI friend at the specified upload speeds. 4800 is really "sloooooow".
                          Just to be sure I also used a cheap Chinese FTDI interface: same good results.

                          bjacobseB Offline
                          bjacobseB Offline
                          bjacobse
                          wrote on last edited by
                          #103

                          @GertSanders
                          Thank you Gert for checking with Arduino Pro Mini 8Mhz 3V3.
                          Then I will try with windows laptop, different FTDI and another cable. something in my current setup is behaving weird

                          1 Reply Last reply
                          0
                          • bjacobseB Offline
                            bjacobseB Offline
                            bjacobse
                            wrote on last edited by bjacobse
                            #104

                            This is strange I tried to use win7 + Arduino IDE 1.6.7, and things are behaving normal, but it's not possible to at the same time, have FTDI + tinyUSB connected on each USB port, it's only working when 1 USB is used. I have 3 pcs Arduino Pro mini, 2 is working as they should. and 1 is only to be flashed with 8 MHZ bootloaders. I will have to look at this Pro Mini in a microscope at work - maybe it's a 5V 16MHz?!?

                            Something else I use Ubuntu and Arduino IDE 1.6.8. The Arduino IDE is behaing weird.
                            I now only use the 2 pcs good Arduini Pro Mini, both bootloader flased with tinyUSB and Win7 IDE 1.6.7. with 1MHz 4k8 bootloader. when I use FTDI in Ubuntu IDE 1.6.8 I get error message that upload failed. But is is working.
                            I can first upload sketch "bare minimum" upload and get error, no LED is flashing in Pro Mini (Expected), then I upload "Blink", upload shows error, but Pro Mini LED is blinking.
                            so Arduino IDE 1.6.8 in my Ubuntu is uploading sketches with FTDI fine - but shows an Arduino error. So I can flash Gert bootloadesr with windows7 and Arduino 1.6.7 :-)

                            False error messages from Arduino 1.6.8...

                            WARNING: Category '' in library UIPEthernet is not valid. Setting to 'Uncategorized'
                            
                            Sketch uses 1,060 bytes (3%) of program storage space. Maximum is 32,256 bytes.
                            Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
                            avrdude: stk500_recv(): programmer is not responding
                            Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
                            

                            Now I have to try to verify if my Ubuntu can flash bootloader with tinyUSB

                            1 Reply Last reply
                            0
                            • bjacobseB Offline
                              bjacobseB Offline
                              bjacobse
                              wrote on last edited by
                              #105

                              My Ubuntu won't let me successfully flash a 1MHz bootloader, only 8MHz with speed 38k4, it's not working with 8MHz 9k6 either,
                              but at least I can also confirm that Gert's bootloaders are working as they shall, since it's working for me using windows7 laptop

                              1 Reply Last reply
                              0
                              • bjacobseB Offline
                                bjacobseB Offline
                                bjacobse
                                wrote on last edited by
                                #106

                                when I run the below command in Ubuntu I can flash the bootloader

                                sudo avrdude -c usbtiny -p m328p -U flash:w:optiboot_atmega328_01M_009600_NOLED.hex  -U lfuse:w:0x62:m -U hfuse:w:0xDE:m -U efuse:w:0x07:m
                                
                                

                                And then I can use the Arduino IDE and upload sketch with settings for 1MHz external 9k6 BOD=1V8

                                GertSandersG 1 Reply Last reply
                                1
                                • bjacobseB bjacobse

                                  when I run the below command in Ubuntu I can flash the bootloader

                                  sudo avrdude -c usbtiny -p m328p -U flash:w:optiboot_atmega328_01M_009600_NOLED.hex  -U lfuse:w:0x62:m -U hfuse:w:0xDE:m -U efuse:w:0x07:m
                                  
                                  

                                  And then I can use the Arduino IDE and upload sketch with settings for 1MHz external 9k6 BOD=1V8

                                  GertSandersG Offline
                                  GertSandersG Offline
                                  GertSanders
                                  Hardware Contributor
                                  wrote on last edited by
                                  #107

                                  @bjacobse
                                  Efuse 0x07 actually means no Brown Out Detection. Should save you some nano Amperes during operation.

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    msebbe
                                    wrote on last edited by
                                    #108

                                    @GertSanders

                                    Hi, and thanks for your amazing work! I am trying to make your Narrow node with a Atmega 328P-PU and the pcb you made. I have low understanding of how I am going to upload "optiboot_atmega328_08M_038400_D6.hex" via a arduino uno.. Do I need to make anything with fuses or so? And how do I do it if that is the case?

                                    GertSandersG 1 Reply Last reply
                                    0
                                    • M msebbe

                                      @GertSanders

                                      Hi, and thanks for your amazing work! I am trying to make your Narrow node with a Atmega 328P-PU and the pcb you made. I have low understanding of how I am going to upload "optiboot_atmega328_08M_038400_D6.hex" via a arduino uno.. Do I need to make anything with fuses or so? And how do I do it if that is the case?

                                      GertSandersG Offline
                                      GertSandersG Offline
                                      GertSanders
                                      Hardware Contributor
                                      wrote on last edited by
                                      #109

                                      @msebbe

                                      There is a very good tutorial how to do this:

                                      https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5/1

                                      M 1 Reply Last reply
                                      0
                                      • GertSandersG GertSanders

                                        @msebbe

                                        There is a very good tutorial how to do this:

                                        https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5/1

                                        M Offline
                                        M Offline
                                        msebbe
                                        wrote on last edited by
                                        #110

                                        @GertSanders Okey, thanks so In my understanding, that takes care of the fuses also.

                                        GertSandersG 1 Reply Last reply
                                        0
                                        • M msebbe

                                          @GertSanders Okey, thanks so In my understanding, that takes care of the fuses also.

                                          GertSandersG Offline
                                          GertSandersG Offline
                                          GertSanders
                                          Hardware Contributor
                                          wrote on last edited by
                                          #111

                                          @msebbe

                                          It does if the board definitions are set right. Check out the tutorial to understand how it works, then you should know how to adapt to other boot loaders (like mine).

                                          M 1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular