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.
  • S Samuel235

    @alexsh1 If you haven't touched the ATmega328p then it should be sitting with fuses of; L:0x62 H:0xD9 E:0xFF, which would run the uC at 1MHz

    alexsh1A Offline
    alexsh1A Offline
    alexsh1
    wrote on last edited by
    #41

    @samuel235 This is strange. The serial monitor was working only on 74880 - I do not think the AVR was running @ 1Mhz

    1 Reply Last reply
    0
    • alexsh1A Offline
      alexsh1A Offline
      alexsh1
      wrote on last edited by alexsh1
      #42

      @GertSanders Thanks for a detailed write-up!

      @GertSanders said:

      You can also use an external 8 mhz crystal, and combine this with clock division by 8 to get 1mhz operation.

      And you can choose an external 1mhz crystal.

      How is this influencing low power though? My understanding is that such setup (external crystal) takes more power.

      GertSandersG 1 Reply Last reply
      0
      • alexsh1A alexsh1

        @GertSanders Thanks for a detailed write-up!

        @GertSanders said:

        You can also use an external 8 mhz crystal, and combine this with clock division by 8 to get 1mhz operation.

        And you can choose an external 1mhz crystal.

        How is this influencing low power though? My understanding is that such setup (external crystal) takes more power.

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

        @alexsh1

        Using a 1mhz crystal would not be the best thing for low power use, you are correct there.

        But it gives a more accurate clock base for the timing functions.

        1 Reply Last reply
        0
        • alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by
          #44

          Not sure what happened, but the following error returned:

          
          
          
          
          Board atmega328p:avr:atmega328pO5M8c doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328PO5M8C
          Board atmega328p:avr:atmega328pO5M16c doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328PO5M16C
          

          I did not change anything so very strange why it comes up.

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

            Actually, i have no proof but i've been informed from the arduino standalone microcontroller forums, that using a external 8mhz crystal is good for power consumption. ONLY if its a sleeping module though, it enables it to perform its tasks quicker and then sleep quicker, resulting in more time sleeping.

            That error code is something i ran into, i'm guessing you're working inside of arduino IDE, if so its to do with your boards.txt entry. Its missing that entry that it speak about. Check that its there, if not enter it in manually.

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

            alexsh1A 1 Reply Last reply
            0
            • S Samuel235

              Actually, i have no proof but i've been informed from the arduino standalone microcontroller forums, that using a external 8mhz crystal is good for power consumption. ONLY if its a sleeping module though, it enables it to perform its tasks quicker and then sleep quicker, resulting in more time sleeping.

              That error code is something i ran into, i'm guessing you're working inside of arduino IDE, if so its to do with your boards.txt entry. Its missing that entry that it speak about. Check that its there, if not enter it in manually.

              alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by alexsh1
              #46

              @samuel235

              Thanks - yes you are right it is about boards.txt.
              However, the problem is that I did not change anything. Two days ago I uploaded severa sketches and no errors were coming up and now two different boards are showing the same error. This is just odd...

              S 1 Reply Last reply
              0
              • alexsh1A alexsh1

                @samuel235

                Thanks - yes you are right it is about boards.txt.
                However, the problem is that I did not change anything. Two days ago I uploaded severa sketches and no errors were coming up and now two different boards are showing the same error. This is just odd...

                S Offline
                S Offline
                Samuel235
                Hardware Contributor
                wrote on last edited by
                #47

                @alexsh1, have you performed an Arduino IDE update? I had this exact issue simply because I updated my IDE.

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

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

                  This message pops up since IDE 1.6.7
                  The new IDE expects this entry for all boards, just add it or ignore (it's more a warning then an error).

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

                    And there you go, the forever informative @GertSanders has andwered your questioning ;)

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

                    1 Reply Last reply
                    1
                    • S Samuel235

                      @alexsh1, have you performed an Arduino IDE update? I had this exact issue simply because I updated my IDE.

                      alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #50

                      @samuel235 Looks like you are right - without realising I did press update button thinking about a sketch rather than about the update :(

                      Corrected this issue aleady in the boards.txt

                      1 Reply Last reply
                      1
                      • GertSandersG GertSanders

                        This message pops up since IDE 1.6.7
                        The new IDE expects this entry for all boards, just add it or ignore (it's more a warning then an error).

                        carlierdC Offline
                        carlierdC Offline
                        carlierd
                        wrote on last edited by
                        #51

                        @GertSanders Hello ! I am trying to upload a sketch without success for the moment.

                        Burning of the bootloader was done correctly (led on pin 8 lit three times) but impossible to load a sketch.

                        For easy deployment I choose to create a new folder to include your bootloaders:

                        0_1458389134219_2016-03-19 13.05.30.png

                        But it seems that something is missing as upload is not possible:

                        Le croquis utilise 1 030 octets (3%) de l'espace de stockage de programmes. Le maximum est de 32 256 octets.
                        Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2 039 octets pour les variables locales. Le maximum est de 2 048 octets.
                        /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbmodem1411 -b38400 -D -Uflash:w:/var/folders/2y/_n7gfzjx5_sgmtyh9t_lp0wc0000gn/T/build8919458311701309495.tmp/Blink.cpp.hex:i 
                        
                        avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
                                 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                                 Copyright (c) 2007-2009 Joerg Wunsch
                        
                                 System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
                                 User configuration file is "/Users/carlierd/.avrduderc"
                                 User configuration file does not exist or is not a regular file, skipping
                        
                                 Using Port                    : /dev/cu.usbmodem1411
                                 Using Programmer              : arduino
                                 Overriding Baud Rate          : 38400
                        avrdude: ser_open(): can't open device "/dev/cu.usbmodem1411": No such file or directory
                        ioctl("TIOCMGET"): Inappropriate ioctl for device
                        
                        avrdude done.  Thank you.
                        
                        Problème de téléversement vers la carte. Voir http://www.arduino.cc/en/Guide/Troubleshooting#upload pour suggestions.
                        

                        Any suggestion ?

                        David.

                        GertSandersG 1 Reply Last reply
                        0
                        • carlierdC carlierd

                          @GertSanders Hello ! I am trying to upload a sketch without success for the moment.

                          Burning of the bootloader was done correctly (led on pin 8 lit three times) but impossible to load a sketch.

                          For easy deployment I choose to create a new folder to include your bootloaders:

                          0_1458389134219_2016-03-19 13.05.30.png

                          But it seems that something is missing as upload is not possible:

                          Le croquis utilise 1 030 octets (3%) de l'espace de stockage de programmes. Le maximum est de 32 256 octets.
                          Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2 039 octets pour les variables locales. Le maximum est de 2 048 octets.
                          /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbmodem1411 -b38400 -D -Uflash:w:/var/folders/2y/_n7gfzjx5_sgmtyh9t_lp0wc0000gn/T/build8919458311701309495.tmp/Blink.cpp.hex:i 
                          
                          avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
                                   Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                                   Copyright (c) 2007-2009 Joerg Wunsch
                          
                                   System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
                                   User configuration file is "/Users/carlierd/.avrduderc"
                                   User configuration file does not exist or is not a regular file, skipping
                          
                                   Using Port                    : /dev/cu.usbmodem1411
                                   Using Programmer              : arduino
                                   Overriding Baud Rate          : 38400
                          avrdude: ser_open(): can't open device "/dev/cu.usbmodem1411": No such file or directory
                          ioctl("TIOCMGET"): Inappropriate ioctl for device
                          
                          avrdude done.  Thank you.
                          
                          Problème de téléversement vers la carte. Voir http://www.arduino.cc/en/Guide/Troubleshooting#upload pour suggestions.
                          

                          Any suggestion ?

                          David.

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

                          @carlierd
                          I am almost certain that you are NOT using my boards.txt because you put the bootloaders outside the reach of the IDE (must be in the sketchfolder and within the hardware subfolder of the sketches folder).

                          carlierdC 2 Replies Last reply
                          0
                          • GertSandersG GertSanders

                            @carlierd
                            I am almost certain that you are NOT using my boards.txt because you put the bootloaders outside the reach of the IDE (must be in the sketchfolder and within the hardware subfolder of the sketches folder).

                            carlierdC Offline
                            carlierdC Offline
                            carlierd
                            wrote on last edited by
                            #53

                            @GertSanders
                            No doubt that I using your file as I got the same problem as @alexsh1 with the arduino pin file.

                            Look at my board choice:

                            0_1458392127846_2016-03-19 13.53.48.png

                            I find this method very good for deployment but only when it's working ;)

                            I check the bootloader with Nick Gammon sketch and it seems good.
                            David.

                            1 Reply Last reply
                            0
                            • carlierdC Offline
                              carlierdC Offline
                              carlierd
                              wrote on last edited by
                              #54

                              I burn the bootloader one more time and now I can upload without any change on configuration.

                              Perhaps I made a mistake the first time :)

                              I will continue my test.

                              David.

                              1 Reply Last reply
                              0
                              • GertSandersG GertSanders

                                @carlierd
                                I am almost certain that you are NOT using my boards.txt because you put the bootloaders outside the reach of the IDE (must be in the sketchfolder and within the hardware subfolder of the sketches folder).

                                carlierdC Offline
                                carlierdC Offline
                                carlierd
                                wrote on last edited by
                                #55

                                @GertSanders One more question on the LED connected on B0.

                                When you wrote that the LED lit on arduino reset, it's when the reset button is pushed ? when the arduino start ? or both ?

                                David.

                                GertSandersG 1 Reply Last reply
                                0
                                • carlierdC carlierd

                                  @GertSanders One more question on the LED connected on B0.

                                  When you wrote that the LED lit on arduino reset, it's when the reset button is pushed ? when the arduino start ? or both ?

                                  David.

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

                                  @carlierd

                                  When the atmega328 is reset, the LED will flash three times if the boot loader is in memory. This also happens when you send a new sketch via the Arduino IDE to the atmega328.

                                  So if you connect pin 1 shortly to GND, the led should flash.

                                  The first time you load a boot loader, the atmega328 will "loop" between the startup procedure of the boot loader (and will flash the led), and then try to load the sketch. If there never is a sketch, it will start the boot loader again and again ...

                                  carlierdC 1 Reply Last reply
                                  0
                                  • GertSandersG GertSanders

                                    @carlierd

                                    When the atmega328 is reset, the LED will flash three times if the boot loader is in memory. This also happens when you send a new sketch via the Arduino IDE to the atmega328.

                                    So if you connect pin 1 shortly to GND, the led should flash.

                                    The first time you load a boot loader, the atmega328 will "loop" between the startup procedure of the boot loader (and will flash the led), and then try to load the sketch. If there never is a sketch, it will start the boot loader again and again ...

                                    carlierdC Offline
                                    carlierdC Offline
                                    carlierd
                                    wrote on last edited by
                                    #57

                                    @GertSanders

                                    So it confirms that your bootloader was correctly burnt in the atmega as the first time I failed to upload a sketch the LED flash three time again and again !
                                    Thanks !

                                    David.

                                    1 Reply Last reply
                                    0
                                    • carlierdC Offline
                                      carlierdC Offline
                                      carlierd
                                      wrote on last edited by
                                      #58

                                      Hello,

                                      I tested two bootloaders today:

                                      • optiboot_atmega328_08M_038400_B0.hex
                                      • optiboot_atmega328_01M_009600_B0.hex

                                      But I am pretty sure you already tested them.

                                      I got some issue with 1MHz bootloader but probably because I am using signing feature.
                                      I will check the forum to be sure.

                                      David.

                                      GertSandersG 1 Reply Last reply
                                      0
                                      • carlierdC carlierd

                                        Hello,

                                        I tested two bootloaders today:

                                        • optiboot_atmega328_08M_038400_B0.hex
                                        • optiboot_atmega328_01M_009600_B0.hex

                                        But I am pretty sure you already tested them.

                                        I got some issue with 1MHz bootloader but probably because I am using signing feature.
                                        I will check the forum to be sure.

                                        David.

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

                                        @carlierd
                                        Indeed I am using these two boot loaders already. The 1Mhz in my very slim nodes and the 8Mhz in the red board battery based nodes.
                                        I also use the 16Mhz in my AC based board (as a repeater or as SMS gateway).
                                        I will make an AC board with a 20Mhz crystal just to test the faster versions of the bootloader.

                                        carlierdC 1 Reply Last reply
                                        0
                                        • GertSandersG GertSanders

                                          @carlierd
                                          Indeed I am using these two boot loaders already. The 1Mhz in my very slim nodes and the 8Mhz in the red board battery based nodes.
                                          I also use the 16Mhz in my AC based board (as a repeater or as SMS gateway).
                                          I will make an AC board with a 20Mhz crystal just to test the faster versions of the bootloader.

                                          carlierdC Offline
                                          carlierdC Offline
                                          carlierd
                                          wrote on last edited by
                                          #60

                                          @GertSanders

                                          Hello, as I got some issue with the 1MHz bootloader, I tried without the signing feature and I still got st=fail.

                                          One question for you, perhaps stupid but I need to be sure ;)
                                          Do you need to set the same serial speed on both node and gateway ?

                                          David.

                                          GertSandersG 1 Reply Last reply
                                          0
                                          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