No-IDE Arduino Programming! Hex/Bin File upload from Command Line - AVR/ESP8266/ESP32

Поделиться
HTML-код
  • Опубликовано: 22 сен 2019
  • Need to program 1000 boards quickly? or maybe you want to upload a pre-compiled binary/hex file? Well, this might be the solution for you! Might be common knowledge for some people, but just in case you didn't know about this, here you go!
    Check out my Tindie store (trigBoard is available) www.tindie.com/stores/kdcircu...
    Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
    / kdarrah
    Twitter: / kdcircuits
    For inquiries or design services:
    www.kdcircuits.com
  • НаукаНаука

Комментарии • 85

  • @RADICAL931
    @RADICAL931 4 года назад +6

    That was super helpful!
    It's really beginner-friendly and well detailed.
    Thank you for sharing this ;)

  • @JenishJain6
    @JenishJain6 4 года назад

    Just had this though few weeks before and here we are with this video. Thanks a lot man.

  • @soovui
    @soovui 4 года назад +4

    Wow... what a wonderful tutorial, thanks a lot bro for sharing such a good piece of information.

  • @AJRobinson
    @AJRobinson 4 года назад

    Great stuff! I was glad to learn this. Will be looking forward to a video explaining more of what's going on in verbose output.

  • @AzCcc
    @AzCcc 4 года назад

    love your videos. Informative and right to the point.
    Thanks Kevin !

  • @ivandzombak8234
    @ivandzombak8234 Год назад

    Perfect -- exactly the info I was looking for! Thanks for posting it 🙂

  • @TheDefpom
    @TheDefpom 4 года назад

    I could have used this tutorial a few weeks ago, thank you for taking the time to do it.

    • @Kevindarrah
      @Kevindarrah  4 года назад +1

      thanks - loving your channel by the way!

  • @hellmag123
    @hellmag123 4 года назад

    Again and also - Thanks for doing these!

  • @dtecdynosystems6382
    @dtecdynosystems6382 2 года назад

    One video just answers questions i spent days trying to solve. thanks.

  • @anullhandle
    @anullhandle 4 года назад

    Short and to the point thanks for posting

  • @WistrelChianti
    @WistrelChianti 3 года назад +2

    Useful little tip. I like the approach of simply copying what the IDE does rather than try and figure the tools out from scratch. Nice thinking! Some windows folks might appreciate this too. Stick it in a file with a .bat extension (replacing the echo command with the flash command) and run it. That way you only have to keep whacking space every time you connect a new device to flash.
    @echo off
    :here
    echo "put your flasher command here"
    pause
    goto here

  • @rfdave3980
    @rfdave3980 4 года назад

    Hey Kevin that's so kool. Thanks for sharing this.

  • @MarVtec
    @MarVtec 3 года назад

    You saved my Project, thank you very much!

  • @billjuv6010
    @billjuv6010 Год назад

    Easiest to follow directions I've found for this - Thanks!!!

  • @ajaybnl
    @ajaybnl 4 года назад

    Good. Your videos are very easy to understand. Keep it up. Some suggestions: videos about sensor readings hourly plotted on chats (offline or online). Cheers

  • @Checkmate1500
    @Checkmate1500 4 месяца назад

    Thanks for this, been doing long way

  • @brenthiggins8995
    @brenthiggins8995 4 года назад +2

    Do you have a video on pushing the bin/hex through WiFi to use the Esp8266 as a master for programming some slave uC?

  • @InfoRoboteaK
    @InfoRoboteaK 4 года назад

    Do you know how to generate the .bin file for esp32 from command line? Very well explained! Thank you!

  • @NoMoreFossil
    @NoMoreFossil 3 года назад

    Thank Kevin you save my day, Merry Christmas!!HO...HO!!

  • @sidlori1592
    @sidlori1592 3 года назад

    Super helpful. Only listened to the first 3 minutes before I got my answer ;-). Thanks for a simple solution. Now to make a just need to make a GUI for batch programming, also including support for ESP32 encryption (not that hard, actually) and ESP32 Sketch Data all in 1 step...a true "batch programming" method. I know Arduino is slated to the DIY guy, not us development people...but that just means there's still room for improvement ;-).

  • @PedrinbeepOriginal
    @PedrinbeepOriginal 4 года назад

    Nice! How can I do this but with an Adafruit with SAMD like SAMD51 Cortex M4 (like Adafruit Grand Central M4 or Adafruit Metro M4)? Thank you in advance

  • @PaulHuininken
    @PaulHuininken 4 года назад

    Keep up these gems

  • @GaneshHosur97
    @GaneshHosur97 3 года назад

    Great video! But say, I have to load my sketch into an nRF52840 chip for example (which is not on a development board. Just a bare chip) then how do we do it?

  • @MasoodOfficial
    @MasoodOfficial 3 года назад

    How to generate C code ino.Hex file with C# or any alternative library for it?

  • @michaelboldt
    @michaelboldt Год назад

    Very cool and just what I was looking for. Many thanks from an old man ;-)

  • @JoshuaG1000
    @JoshuaG1000 4 года назад

    am i right in thinking that if you use the file that doesn't have "bootloader" in the name it will remove the botloader?

  • @tuberworksjones
    @tuberworksjones 4 года назад

    is this be done over the network to 1000 devices simultaneously ?

  • @quanghai32
    @quanghai32 2 года назад

    Great! This is upload existed *.hex file, how can we Export compiled Binary (*.hex-similar Ctrl+Alt+S in Arduino IDE) use CLI?

  • @muhammadbilal2000
    @muhammadbilal2000 3 года назад

    Hello, I am using windows 10 and it gives me the error "Access is denied" in cmd. What is the possible reason?

  • @alibayat504
    @alibayat504 4 месяца назад

    it was so helpful but is there any way to upload bin file on esp32 without using COM port? I mean using OTA update feature without webserver . I havenot access to my esp32 device

  • @pete_codes
    @pete_codes 2 года назад

    Thanks... Great video...

  • @madhavanmarimuthu6409
    @madhavanmarimuthu6409 3 года назад

    It's possible upload bin/hex to stm32 with same procedure?

  • @offendingshadows9118
    @offendingshadows9118 3 года назад

    HELL YES. Thanks!

  • @chrisliddiard725
    @chrisliddiard725 2 года назад

    Very helpful . All the same i wonder how you would make this fool proof, so future 'firmware updates' could be sent to a 'dumb customer'. It seems to me you might have to create a tiny front end , with a prompt to select the bin/hex file, which then auto finds the connected board. Or a 'setup' bat file in the same directory as the bin/hex file which just has the task of finding the connected board.

  • @markwarren5954
    @markwarren5954 4 года назад

    Hi Kevin. Very useful info. 2 questions: #1 what about the fuses to set the ATmega328 clock to 16Mhz? I think this is accomplished when using the "burn bootloader" command in the IDE. But what about "fresh" chips that are still set to factory defaults?
    I am using the standalone programmer from Robert Patterson (based upon the Nick Gammon code), and this does burn the fuses to set the clock speed.
    Question #2: From the video it looks like you are using a 6 pin Serial to USB FTDI (as opposed to ICSP port). Maybe I am doing something wrong, but when I tried to communicate with the 328 chip using the serial connection, it would not work until I executed the "burn bootloader" command using the ICSP port and a NANO configured as a programmer.
    We have close to 1000 boards to program every year, and I am looking for the best solution for this process. Thanks for your help.

    • @superdau
      @superdau 4 года назад

      Well obviously you can't program an AVR over serial if it doesn't have the Arduino bootloader on it. That's the whole point of the bootloader.
      Just ditch the bootloader and serial programming and program via ISP. As soon as you got a hardware programmer (as you do with your nano that you flashed to be one), there's no point of having the Arduino bootloader on any AVR anymore. It only uses up flash and delays the startup.
      avrdude (the program that does the actual flashing of the chip) can be used completely independently of Arduino (as shown in the video). It was around long before Arduino came around and used it. Even better get a GUI front end for it, like AVRDUDESS. It will show you the command line it uses to program the chip, which you can then use without even running the GUI. That makes batch processing easy, one command that sets the fuses, another line to flash the hex (and maybe also write the eeprom). Put it in a script file and it's a single command.
      ISP programming is much faster. Just connect the 6 ISP pins (even easier with ISP programmers (like usbasp) you can get on ebay for less than 2$ in case you want a ready made thing), hit program and you are done.
      If it has to go even faster, instead of installing a pinheader, I just stuck pogo pins into the ISP programmer's connector, pushed them against the six contacts on the AVR board (those mini, micro or nano boards often come without the header soldered), and with the command line ready hit enter with my other hand. I'm done programming an AVR chip in 10-15 seconds.
      There are plenty of explanations on the internet about the details.

    • @superdau
      @superdau 4 года назад

      Check out this video: ruclips.net/video/hY5aydgilTk/видео.html
      It explains a lot.

  • @DiyintheGhetto
    @DiyintheGhetto 2 года назад

    What if you don't have Arduino IDE or know how to install or use itl, Is there a easier way of uploading the Bin file without having to have all that there?

    • @Kevindarrah
      @Kevindarrah  2 года назад

      I got something coming soon - standalone flasher. contact me for more details

  • @danieldiasdornelles5136
    @danieldiasdornelles5136 4 года назад

    Cube led 16x16x16 ?

  • @NickelCityPixels
    @NickelCityPixels 4 года назад

    If I understand this correctly, you still need the sketch to generate the verbiage used in the command line. What if all you have is the hex file?

    • @HugoPlaVentas
      @HugoPlaVentas 3 года назад

      did you figured it out? i'm asking it myself

    • @chrisliddiard725
      @chrisliddiard725 2 года назад

      The verbose mode was so you could find the commands which sends the files to the board. Im guessing that same line of code has the switches which turns on , or turns off verbose mode. If you only had the hex file, then you would have to first make sure it was compatible with your board ;) , then create a test ide script in verbose mode to obtain that command line which sends that hex to the board. Im guessing there's would be some kind of identifier in the hex file to say which board it was compiled for.

  • @mradulbhardwaj3147
    @mradulbhardwaj3147 Год назад +1

    How to convert .bin file to .ino ?

  • @davey2k12
    @davey2k12 4 года назад

    Can't it be scripted then with board detection

  • @Nono-hk3is
    @Nono-hk3is 4 года назад

    If you needed to load many many boards, then you should write a shell script. On Mac and Linux, a bash shell script. The simplest one is:
    while true; do ; done
    When you've done your last board, hit control-c a few time until you get here your command prompt back.
    The only problem is synchronizing each call to avrdude with the act of disconnecting each complete board and reconnecting the next one. The simplest way to handle that is to have the script block for user input between each call to avrdude, like this:
    while true; do ; read x; done
    Now you have to press enter after you connect each new board to be programmed. That isn't a whole lot better than pressing up arrow and enter. So another idea is have the script beep and sleep a few seconds:
    while true; do ; echo ; sleep 5; done
    Where it says , you hold control key and press v at the same time, release them both, then hold control key again and press g at the same time, then release both. When the script runs, this will make a beep. Now you have 5 seconds (or whatever number of seconds you want) to remove the competed board. I believe that as long as there is no board on the programmer, then avrdude will block until one is detected. If I am wrong about that, then this sleep method may not be suitable.
    Check out the man page for avrdude, as it may have command line options to assist with automation and scripting.
    On Windows, you could do an equivalent power shell script, I suppose. Powers hell is nice to have as an option, but I never look forward to using it.

    • @Kevindarrah
      @Kevindarrah  4 года назад

      nice, thanks for the info! I'll have to try this out some time

  • @martjeenmarkoppad1355
    @martjeenmarkoppad1355 4 года назад

    Hi Kevin, Om my mac I get: [Errno 16] Resource busy
    Whats up? I use a TTGO V1 LoRa Oled

  • @mauriciopreve4963
    @mauriciopreve4963 3 года назад

    Bien Excelente sigue así !!!

  • @NamasenITN
    @NamasenITN 17 дней назад

    How long did it take to flash 1000 boards?

  • @DesignitBuilditRepairit
    @DesignitBuilditRepairit 4 года назад

    Why don't you just export it as a bin file and then flash it that way over and over by hitting flash by using a program like ESP easy or something like that

  • @Ingenierie-Projets
    @Ingenierie-Projets 4 года назад

    thanx itsi nteresting

  • @PerfectElectricalDevices
    @PerfectElectricalDevices 4 года назад

    thanks

  • @GeekRedux
    @GeekRedux 4 года назад

    Kind of glasses over the bit about sending the precompiled file to someone else and why the target path needs to be changed, and that sort of thing. Good info, though.

  • @pepecalixto2790
    @pepecalixto2790 4 года назад

    For sure there will be a special space in heaven for you! Thanks!

  • @ameethsutarr7742
    @ameethsutarr7742 3 года назад

    make this video for windows os please

    • @Kevindarrah
      @Kevindarrah  3 года назад

      if you watch entire video, you'll see windows as well

  • @inqonthat1463
    @inqonthat1463 3 года назад

    Your title implies that you don't need the IDE. You even mention several times shipping off the hex/bin to people without an IDE. However all your video is using command line copies that use utilities that are only loaded on with the IDE. A standard windows box without the IDE won't have those utilities. What do you do when a "customer" that can't program needs to upload the binary on a box without the IDE? How do you adjust the command line to take in account their ESP8266 will be on another USB port than is in the command line?

    • @chrisliddiard725
      @chrisliddiard725 2 года назад

      The point was to not send out the source code. He didn't say you wouldn't need to have the Arduino IDE installed on the target computer system.

  • @AxelWerner
    @AxelWerner 4 года назад +1

    Windows ?!? Oh you mean the ancient crappy os prior #LINUX

    • @krass76
      @krass76 4 года назад

      The main thing keeping many people on Windows is available software. I get that there are alternatives on Linux e.g. Photohop and GIMP but they aren't really equivalent. The open source community is great but I don't think they will ever be able to replicate or even innovate like programmers working full time on a piece of software, from inside a company. And things like wine won't ever be perfect. I think if the Linux community built solid and user-friendly software protection into the kernel and developers wouldn't have to worry about coding their own DRM, that would invite a lot of developers to consider Linux as a target platform because by now, some distros have become "easy enough" for normal people to use.

    • @AxelWerner
      @AxelWerner 4 года назад

      @@krass76 clearly you never really used a modern #LINUX distro. Your are just replaying ancient old pseudo arguments. there is plenty of excelent open source software out there. mostly free of charge. often better than "originals" . if YOU find yourself unable to use them instead of your beloved obscure closed source unsecure version, then the problem is within yourself. not the OS, not the software. Linux is for people who care. not for dummies who just rant and without knowledge.

    • @Fedreal_Bureau_Of_Investigaton
      @Fedreal_Bureau_Of_Investigaton 3 года назад

      @@AxelWerner how i pirate games and programs on linux?

  • @TonoNamnum
    @TonoNamnum 4 года назад

    If you have a windows computer and want to have access to the WindowsApps folder watch this video ruclips.net/video/lEB9_JCaqFY/видео.html. That way you do not have to reinstall your IDE and can install arduino using the windows store.

  • @MikeysLab
    @MikeysLab 4 года назад

    I honestly have no idea why anyone uses the Arduino IDE anymore, with the availability of Visual Micro for Visual Studio, programming the Arduino inside visual studio is a much better experience, plus you get all the features of the language instead of the limitations the Arduino IDE imposes.

    • @Fedreal_Bureau_Of_Investigaton
      @Fedreal_Bureau_Of_Investigaton 3 года назад

      can you be more specific

    • @MikeysLab
      @MikeysLab 3 года назад

      @@Fedreal_Bureau_Of_Investigaton yes I can, but what specifically do you want me to be more specific about?

    • @Fedreal_Bureau_Of_Investigaton
      @Fedreal_Bureau_Of_Investigaton 3 года назад

      @@MikeysLab how programming the Arduino inside visual studio is a much better experience? What you mean by limitations of the arduino ide?

    • @MikeysLab
      @MikeysLab 3 года назад

      @@Fedreal_Bureau_Of_Investigaton the Arduino IDE prevents many of the object oriented aspects of the language by removing .h and .cpp file, well forcing them into seperated libraries. Feature like auto complete and find all references, plus actual run time debugging make developing with visual studio a much better experience. There is a reason it is in the top 2 IDE's used professionally

    • @MikeysLab
      @MikeysLab 3 года назад

      @@Fedreal_Bureau_Of_Investigaton not to mention memory profiling, proper project management, multi developer support and integration with GIT

  • @MaxDiscere
    @MaxDiscere 4 года назад

    like the information, but dislike that its strechted to 10 minutes if you could have done it easily in under 2 minutes

    • @AzCcc
      @AzCcc 4 года назад +2

      I think a detailed walk through like most of Kevin's videos can be helpful to more people. Keep in mind some viewers might lack some knowledge that seems trivial to you. More knowledgeable viewers can simply watch @ 2x speeds and voila! problem solved.

    • @Nono-hk3is
      @Nono-hk3is 4 года назад

      @therealnightwriter Well said.

    • @Kevindarrah
      @Kevindarrah  4 года назад

      lol, when I watch my own videos back to preview them I watch them at 2x... :)

  • @madhavanmarimuthu6409
    @madhavanmarimuthu6409 3 года назад

    It's possible upload bin/hex to stm32 with same procedure?