AMMAURO #3 - ESP8266 IoT 2017, native C SDK Getting Started for Windows, Mac & Linux

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024
  • НаукаНаука

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

  • @radresk34
    @radresk34 5 лет назад +1

    This took 6 months for me, to gather that information. And you are clearing everything in 26 minutes. Excellent reference, which even Espressif people would like to refer to their customers. Interested ones can easily start and work on details like memory maps and their own application just after wathcing this and taking notes. Thanks for packing and sharing all this information with us!

  • @DownhillAllTheWay
    @DownhillAllTheWay 7 лет назад +23

    It's such a pleasure to see a video really well edited and presented - and without music! I liked this a *lot*, though RUclips would only allow me to like it once. Subscribed. I'll go back and look at installation of Linux before re-watching this and trying to emulate it.
    I'm glad you noted the Tx/Rx crossover error. When I saw it in the vid, I thought "huh?!"
    Your web site looks excellent. Do you think it may one day develop into a forum for your followers to swap ideas, get help, cross-pollinate, etc?

    • @ammauro
      @ammauro  7 лет назад

      Oh thank you so much Mike, that's very kind of you. My blog has been neglected a bit since I started making videos, I must admit, but I will hopefully keep it fresh wish some hard technical details as time permits, and maybe grow it more as you suggested :)

  • @pacsmile
    @pacsmile 5 лет назад +1

    This video is so well done and really matches the quality of any big youtuber, and now i'm sad because this was your last upload; i watched this video expecting a whole series of esp8266 programming stuff.

  • @SlykeThePhoxenix
    @SlykeThePhoxenix 5 лет назад +4

    This is probably one of the best tutorial methodologies I have ever watched on youtube. Keep up the good work!

  • @davidf8749
    @davidf8749 7 лет назад +5

    Excellent tutorial for driving the ESP8266 variants via linux cmd-line. As per a previous comment, the production is top quality. Thanks for making this available.

    • @ammauro
      @ammauro  7 лет назад

      Hey, thanks David F, it's great to hear that you liked it. It seems me inspired :)

  • @illusivec
    @illusivec 7 лет назад +9

    That production quality though.... Great vid man.

    • @ammauro
      @ammauro  7 лет назад +1

      Many thanks, flanker :) My next round of video work is delayed, but I hope to be back on track very soon!

  • @czypherth
    @czypherth 5 лет назад +1

    The best esp8266 tutorial I've ever seen....

  • @m3chanist
    @m3chanist 7 лет назад

    Some of the best tutorial/help video production I've seen, and I'm a retired cgi lecturer. You are a natural educator, bravo.

  • @CRISAP94
    @CRISAP94 7 лет назад +4

    Excellent recopilation of information, i've been using the esp8266 since it was released and believe me, if i had had this kind of videos before, my learning curve had been more fast, btw you should keep doing this kind of videos with the SDK.

    • @ammauro
      @ammauro  7 лет назад

      Hi Cristian, thanks for your praise :) I agree that, even now, there is still a lot of a learning curve when using the SDK, particularly as there is a lot more information (and current projects) that use Espressif's official ESP8266 SDK V1.5.4. In my opinion, too few explain how things are different with V2.0.0 and V2.1.0. I will try and work on this; I've been studying it a lot recently.

  • @xennelul
    @xennelul 7 лет назад +1

    Very informative! I appreciate the high tempo and high level of detail! Its a bit long though, but the fluid delivery had me come back to watch the whole thing.

    • @ammauro
      @ammauro  7 лет назад

      Thanks for giving me your feedback, xennelul :) You hit on a few points I hope to engender in my videos. In future I will go for shorter videos that get to the point faster. Cheers!

  • @kamisama7043
    @kamisama7043 7 лет назад +1

    Outstanding video! step by step and HQ quality! awesome! Thank You Anton

    • @ammauro
      @ammauro  7 лет назад

      Thank you very much, Erick :) I'm glad you like it. I hope it was informative and gets you going on some cool projects.

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

    Thank you very much for this tutorial. You saved everybody weeks of headache. Accurate and detailed as a tutorial should be, but so rarely is. Thanks again. Really!

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

    Great job Anton! I wished I had found this video before spending 4 hours figuring these things out myself.

  • @stomachcontentz
    @stomachcontentz 7 лет назад +1

    Zero to hero indeed! Thank you for your efforts! This is definitely going to help me get started quickly.

    • @ammauro
      @ammauro  7 лет назад

      Glad to hear it, Christian. Let me know if you get anything interesting built.

  • @blackhunter2310
    @blackhunter2310 7 лет назад +1

    Truly a great tutorial. I couldn't find any decent vids but this one is easy to follow all the way through. You've got another sub by making great vids keep it up

    • @ammauro
      @ammauro  7 лет назад

      Ah fantastic, great to hear. Thanks B1tW0lf :)

  • @eriklaken1025
    @eriklaken1025 6 лет назад

    Thank you very much, i am startend and i could not start without your video, Thank you so much. :)

  • @GrayCo
    @GrayCo 7 лет назад +2

    A very impressive demonstration ! I finally got the damn thing flashing. Many thanks from Alaska.

    • @ammauro
      @ammauro  7 лет назад

      Ahh that's excellent. Great to hear, GreyCoLLC. Again, thanks for the feedback :) I am working on a new video now to hopefully show some more useful coding and how to create projects that are a little larger.

  • @yltfy
    @yltfy 5 лет назад

    Very excellent tutorial!!! For the surface all the way to the depth, in such a pedagogical way! Thanks

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

    Wow, you mustn't be human. That explanation was PERFECT!!!

  • @andrewpalm2103
    @andrewpalm2103 7 лет назад +1

    Anton, this was a very good video indeed. I've gravitated to PlatformIO Core + Geany for my non-PIC embedded IDE needs, but I was disappointed that PlatformIO only supports the RTOS version of the esp8266 SDK and not the non-OS version. Your video has shown me how I can fill that gap should the need arise. Fortunately my laptop runs Linux, so I won't have to deal with the VM. And the video was very well produced.

    • @ammauro
      @ammauro  7 лет назад

      Ah fantastic, and thanks for letting me know, Andrew. If nothing else, this should help with understanding the depths of how the compiler and its dependencies work. My next video will elaborate on that and cover potential issues as a project grows, borrowing from techniques employed in things like the NodeMCU and Micropython firmware sources.

  • @bencharlesrhys
    @bencharlesrhys 5 лет назад

    Fantastic video, thanks for putting in the hard work to make this really high quality and easy to follow. Most other tutorials would be 60+ minutes for this kind of thing, so it's easy to see the hard work you've put into this.

  • @OlegShumihin
    @OlegShumihin 6 лет назад

    thanks a lot for you time Anton, followed every bit of it. The best introduction to the ESP SDK!

  • @GingerBeker
    @GingerBeker 6 лет назад

    I see a lot of work, dedication and passion in this fantastic video. Thanks a lot and gratz

  • @psf6141
    @psf6141 7 лет назад +2

    This is by far the most informative video about two things: 1. installing and using esp-open-sdk and 2. how to flash the code to the ESP module.
    Congratulations, too bad you're like 3 - 4 months without any new videos. I hope you'll be back with more soon.
    For those like me who would like to go deep, check out the API Reference Guide: espressif.com/en/support/download/documents?keys=&field_type_tid%5B%5D=14
    Cheers.

    • @ammauro
      @ammauro  7 лет назад +1

      All of the positive feedback is very encouraging, so I thank you Pedro... and you're right that has been too long without any updates! As it happens, I'm just starting to do research now for my next video, after an extended hiatus. Stay tuned.

    • @psf6141
      @psf6141 7 лет назад

      That is great. Keep up the good work.
      It's a shame to see useless channels with 10k subscribers or more. And those with good information with so less. Anyway, cheers.
      ps: great books you have there :P

    • @CRISAP94
      @CRISAP94 7 лет назад

      What do u have in mind, if you need some help let me know it!

  • @ostheer
    @ostheer 5 лет назад

    Amazing tutorial, got me started smoothly!
    One thing that I'd like that add is that sometimes you need to flash the "SDK Init Data" to the chip as well, or it'll crash, bootloop and make the LED flash uncontrollably.
    Exact description is here (nodemcu.readthedocs.io/en/latest/en/flash/#upgrading-firmware), but essentially you need to flash the esp_init_data_default.bin file to 0x3fc000 (location may differ for boards different from the NodeMCU). You can find the binary file in esp-open-sdk/ESP8266_NONOS_SDK-2.1.0-18-g61248df/bin/.

  • @iuri.castro
    @iuri.castro 7 лет назад +1

    Excellent video! Very clear, objective and walk through all the inicial steps! Subscribed!

    • @ammauro
      @ammauro  7 лет назад

      Thank you very much, Iuri :) Good luck with your projects!

  • @ToniLopezMM
    @ToniLopezMM 5 лет назад

    the best esp8266 tutorial on youtube. like it, subscribed and notified. i'm the 1k subscriber :) Congratulations ! I hope you do more videos about esp8266 and esp32. thanks

  • @wmd19421
    @wmd19421 6 лет назад

    Great video. One of the best.
    I'm not sure if somebody else has pointed out. When pin change is necessary, you need to modify the line (in the initialization function) to configure the pin to digital output. For example, for GPIO2, it should be "PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);". For GPIO4, it should be "PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO4_U, FUNC_GPIO4);".

  • @sergioaiello4760
    @sergioaiello4760 6 лет назад

    First of all congratulation: impressive teaching technique!! Incredibly professional :)

  • @Pownyan
    @Pownyan 7 лет назад +4

    Your should add Linux to the list of operating systems this tutorial covers :) Thanks for a great video

    • @ammauro
      @ammauro  7 лет назад

      Good point, Pownyan. Thanks for your great feedback :) I've tried editing the title... let's see if that changes anything.

  • @pastudan
    @pastudan 6 лет назад

    Direct and to the point. Love it. Cheers!

  • @cupdejello
    @cupdejello 7 лет назад +9

    Excellent video. I am liking and subscribing and looking forward to more videos.

    • @ammauro
      @ammauro  7 лет назад

      Ah good to hear, thanks GrandBizkit :)

  • @RaadYacu
    @RaadYacu 7 лет назад +3

    well worth it - learned a lot from this video - thanks Anton

    • @ammauro
      @ammauro  7 лет назад

      My pleasure, Raad. I'm meanwhile learning a lot myself, for the next video.

  • @thomaspatrick4564
    @thomaspatrick4564 6 лет назад

    Very good information. Very high production in your video. You could charge money for this.

  • @zodak9999b
    @zodak9999b 7 лет назад +1

    This is very good information, and very well presented.

    • @ammauro
      @ammauro  7 лет назад +1

      Your feedback is very encouraging, as is everyone else's. Thanks zodak9999b :)

  • @gaedu62
    @gaedu62 7 лет назад +1

    Great video ! Everything is so well explained, a bit lengthy but that's ok. Hope you'll make more in the future :)

    • @ammauro
      @ammauro  7 лет назад

      Thanks gaedu62, I hope it helps get you going with something cool :) I do have some shorter videos in the pipeline now... so stay tuned!

    • @gaedu62
      @gaedu62 7 лет назад +1

      Can't wait for it to be available ! I'll let you know if I do anything nice, thanks again for the content ! I've also seen the other comment you posted about Cnlohr's nosdk and that's what brought me here, to find out how you could come closer to a bare metal esp8266 :)

    • @ammauro
      @ammauro  7 лет назад

      Ah, excellent. I didn't want to dip down that far straight away... but it's definitely something I'd like to try out soon. Hopefully this video is enough to fill in the gaps for anyone wanting to get onto the "nosdk" approach. If you haven't already seen CNLohr's nosdk8266 video (ruclips.net/video/AWT2w7v9szs/видео.html), be sure to check it, along with his other works. Great guy :)

  • @Hamster170780
    @Hamster170780 6 лет назад

    Good job!!! Thank you for this video. I am looking forward to more such videos.

  • @juergenwickenhaeuser3329
    @juergenwickenhaeuser3329 7 лет назад +1

    Very good explained! Thanks a lot!

    • @ammauro
      @ammauro  7 лет назад

      Thanks Juergen! I hope it helped a lot.

  • @YuriyBrazhnyk
    @YuriyBrazhnyk 6 лет назад

    This is exactly what i was looking for. Thanks dude!!!!

  • @AntsPantshere
    @AntsPantshere 6 лет назад

    This blew my mind, going fishing to cool down!

  • @ivanceasario5309
    @ivanceasario5309 6 лет назад +1

    Excellent how to video, Anton! I just started to get into programming the ESP8266 and ESP32 on my Ubuntu environment and this got me up and running in no time. Just a couple of questions, any plans to do one for esp-open-rtos? how about ESP-32 for both sdks?

  • @zrogles
    @zrogles 6 лет назад +1

    Thank you! You just saved me hours, I'm sure!

  • @Abosobaie
    @Abosobaie 7 лет назад

    This is the best guid to use the esp. (Y) Keep it up!

  • @koufdell
    @koufdell 5 лет назад

    this is a hidden gem thx sir for the effort :)

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

    Wow, three videos and the response is 1,180 subscribers. Why did you stop producing so early? Clearly the content is well received and had the potential to grow the channel into something profitable. I'll sub just to see if it will elicit a new video maybe with the current ESP-IDF on a Linux system and an ESP32-S2 dev board for hardware... We need more "C" based tutorials.

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

    Thank you for this insanely informative video!

  • @jayare7750
    @jayare7750 5 лет назад

    Why are you not more subscribed?! *goes and checks out more videos* oh... just 3? your videos are great!

  • @nuculabs
    @nuculabs 6 лет назад

    Thank you very much for creating these videos. They are really helpful and are done very professionally. Could you also add some resources in the description of the video? For example where to get help, documentation, etc..

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

    Amazing video. Thanks!

  • @jrfoliveira
    @jrfoliveira 7 лет назад

    Congratulations, excellent video

  • @H2oRiz
    @H2oRiz 5 лет назад

    Make more videos please, you deserve crowd funding.

  • @chlopakzwildy
    @chlopakzwildy 6 лет назад

    Great tutorial, very professional

  • @RajathKumareyes
    @RajathKumareyes 7 лет назад +1

    Thanks a lot for the Great Tutorial.

    • @ammauro
      @ammauro  7 лет назад

      No problem :) You're welcome. I will hopefully have more soon.

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

    About time for AMMAURO #4 ?

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

    Can't we use the toolchain available on Espressive website? Because this open source tool chain is no longer maintained ...

  • @amirudin4859
    @amirudin4859 5 лет назад

    You're a hero sir, thankyou so much

  • @sergioalejandrogonzalez9755
    @sergioalejandrogonzalez9755 6 лет назад

    Wanted to thank you for you excellent video. Very well presented, carefully explained and technically sound. I usually program bare-metal ARM with eclipse and the GNU toolchain, it took me several days getting everything prepared to use eclipse and the esp8266-devkit-master from Espressif. I could have saved a lot of time seeing your videos first!. Do you think could be worth preparing a video explaining SDK usage?

  • @PatrickRoux04
    @PatrickRoux04 7 лет назад +1

    Thank you, I can't wait to test all of that ! DO you think your second approach would work with a ESP8266-12e ?

    • @ammauro
      @ammauro  7 лет назад

      Hi Patrick! Most of what I've demonstrated should work with the bare ESP-12E module (the castellated one). Note that while it does have a native serial interface compatible with RS-232 (but at 3.3V levels), it does NOT include its own USB-to-serial adapter.
      So, if you wish to program an ESP-12E or otherwise communicate with it through its serial interface, you will either need a suitable 3.3V USB-to-serial adapter, or some other controlling device that can speak 3.3V RS-232 (e.g. an Arduino, possibly with a 5V-to-3.3V level shifter?).
      On a NodeMCU (or clone) board, you will see there is usually an ESP-12E module soldered onto a larger board that has extra circuitry: That circuitry includes: USB-to-serial adapter chip (often a CP2102, CH340G, or FTDI chip), voltage regulator from USB's 5V to 3.3V, and other GPIO breakout lines and support circuitry.
      Does that all make sense?

    • @PatrickRoux04
      @PatrickRoux04 7 лет назад

      Wow, thank you for your long answer, I really appreciate it ! I just want to make sure not to transform this comment section into a troubleshooting area :)
      I followed this video to try and use a USB-to-Serial adapter : ruclips.net/video/O2SSyfP6OM0/видео.html
      Here is the adapter I used : www.banggood.com/PL2303-USB-UART-TTL-Convert-Mini-Board-LED-TXD-RXD-PWR-3_3V-Or-5V-Output-p-1089582.html
      My issue is my Arduino IDE that doesn't recognize any seriel port. I already scouted the web to find a solution, and installed a bunch of drivers through my research, but none of that worked. My nano is recognized fairly, but not my setup with the ESP.
      In despair, I tried to "unsolder" a NodeMCU's ESP to put some female headers, to transform it into a development board, but ended up trashing it. Anyway, maybe I'm just using the wrong adapter, would you have some in mind that could be foolproof ?
      Thanks again for your help and your work !

    • @ammauro
      @ammauro  7 лет назад

      Hi Patrick, I will look into this a bit more, but first it sounds like your PL2303-based serial adapter is not being recognised by your OS. What is your OS?
      I will admit that I've had mixed results trying to get various USB-to-serial adapters to work under Windows and macOS, and that's why in the video my approach is to lean on a Linux VM (running within Windows or macOS) instead... it works more often than not, and without complications. This is a good way, at least, to get started and prove that all of your hardware is working properly.
      If you DO have a Linux VM set up in VirtualBox as per my previous video (ruclips.net/video/kYEzEFH5LiM/видео.html), then when you plug in most USB devices they should show up in the menu of the VirtualBox "USB" status bar button... even if your host operating system doesn't have drivers for them. See 05:20 in this video (ruclips.net/video/T-oSjMCmNYk/видео.htmlm20s).
      If you don't have a Linux VM, let me know, as there are other options still available for both Windows and macOS.

  • @alpagutsencer
    @alpagutsencer 7 лет назад +1

    Hey Man! Let me say this. You are just amazing. I cant tell how happy i am. I am working on this issues for a long time and you save my ass. Thank you very very much. I wish i could buy you a beer.

    • @ammauro
      @ammauro  7 лет назад +1

      Thanks alpagutsencer! Very kind of you to give such good feedback. Maybe in time I'll go down the Patreon path or something and you WILL be able to buy me a beer ;) Good luck for whatever project you're working on.

    • @alpagutsencer
      @alpagutsencer 7 лет назад

      Absolutely my friend. I am waiting your good news! Keep it up :D

  • @AnilKumar-zp2sh
    @AnilKumar-zp2sh 7 лет назад +1

    you are amazing ! more videos plz! :)

    • @ammauro
      @ammauro  7 лет назад

      Thanks anil. Hopefully more are coming soon :)

  • @syedalishan4986
    @syedalishan4986 6 лет назад

    awesome video, really helpful. thank you

  • @Tuscani2005GT
    @Tuscani2005GT 6 лет назад

    Thank you for this video. For any one using the Wemos D1 Mini Lite use the --flash_size=detect and --flash_mode=dout when running write_flash. I found that if I did NOT do this the write_flash command would seem to succeed but the firmware wouldn't work correctly, i.e., not Blinky Blinky. ;)
    For the Blinky example in the video its:
    esptool.py --baud 57600 write_flash --flash_size=detect --flash_mode=dout 0x00000 blinky-0x00000.bin 0x10000 blinky-0x10000.bin

  • @ralfm.metzing8407
    @ralfm.metzing8407 6 лет назад

    thanks alot for this excellent explanation

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

    U saved my day n night n week n month :)

  • @Davedarko
    @Davedarko 7 лет назад +1

    Have you tried to run the open SDK on MacOS with the homebrew approach? Or did you went down the road with virtual machines because you also want to program on windows machines?

    • @ammauro
      @ammauro  7 лет назад

      Hi Dave, I decided to go for the VM approach for overall portability and consistency (including covering Windows), but there were other reasons. For instance, the CH34x USB serial adapter drivers were causing kernel panics on my (admittedly old) iMac running macOS Sierra (10.12).
      I've recently been frustrated also by how much time I seem to sink in keeping everything working with homebrew whenever something gets updated. It feels very "nondeterministic" ;) Still... better than Cygwin!

  • @Benjamin-hl9gj
    @Benjamin-hl9gj 7 лет назад +1

    good quality your video i'm french have fun

    • @ammauro
      @ammauro  7 лет назад

      Thank you Benjamin, I appreciate your feedback :) I hope it is helpful. I hope to have some more interesting videos available soon.

  • @gustavominnucci5862
    @gustavominnucci5862 6 лет назад

    Great video ! Thx Anton

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

    Wow, I always hated Linux but this is cool. Thanks dude 😉

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

    You are a true hero💪

  • @MrHubert1710
    @MrHubert1710 7 лет назад

    wow, aren't u putting this circuit on a reset button? I mean is you place this board on a reset button it can sometimes catch reset command which lead to exiting programming mode you mentioned in 26:00 .

  • @caroman6761
    @caroman6761 7 лет назад +1

    Super Video, thanks. In the Video I had some problems with your definition "Firmware". What you define as a Firmware, I define it as sketch or an App for the ESP because Firmware in my definition works as a Operating System beween Processor and the (in my definition) sketch or App.
    As I heard about 'compile your Firmware" I thought WOW, exactely what I'm looking for, since past Weekend.
    What I'll try to say is, there are Firmwarefiles call i.e. "Ai-Thinker_ESP8266_DIO_32Mbit_AiCloud_v0.0.0.4_20170308" and so on.
    In my (possibly wrong) understanding are this Files a kind of Operatingsystem. And in my optinion it is more interesting to see, howto compile this for dedicate use of sketches. An Idea in this way is to compile a operating system as Firmware, that includes just, whats really needed for use. For expample, a Display output with values of a sennsor doesn't need any Part of networking and works more secure, like an OS with Networking (an Internet connection). And a Video in this I've never seen before ;-) Maybe an Idea for you?

    • @ammauro
      @ammauro  7 лет назад

      Thanks for the feedback, CaroMan. There are a few layers here, but I'll focus on the parts that I know a bit better, and which I think are relevant to your needs... Bear with me here ;)
      Espressif's official "ESP8266 NONOS SDK" (which is typically included if you install the "esp-open-sdk") contains more-or-less the minimum libraries and definitions, on top of which you write native code. The code you write is free to access (or not access) hardware as needed, within the ESP8266 itself, as well as control its GPIO pins. In the "blinky" example I demonstrated in the video, this was just a tiny bit of native code using only a handful of SDK-based functions... not much of a firmware, and certainly not enough to be called an OS. Nevertheless, it's "firmware" in the sense that it is native code, loaded and executed during boot, from non-volatile storage on the module.
      If I recall correctly, the Ai-Thinker, AT-Command, and NodeMCU firmwares are all built on top of this SDK. For those interested, too, most people I think now use nodemcu-build.com/ to build a custom version of the NodeMCU firmware with just the modules included that suit their needs.
      Using the SDK will suit most people creating embedded applications, who need somewhat low-level access and really compact/efficient/fast code.
      NOW, while this approach is probably what most would call "low level", I have seen examples that cut out even the SDK's "minimum libraries" and go very close to "bare metal". I suspect this is what you're referring to, but then there's a great deal more work you may be required to do yourself, to just get the most basic stuff working. If you're interested in examples of this, see: github.com/cnlohr/nosdk8266 and github.com/pvvx/SDKnoWiFi
      Let me know if this takes you down any interesting paths!

  • @yashpandit832
    @yashpandit832 5 лет назад +1

    Great video.
    One more thing
    Where can I get examples on how to write the codes for esp8266. On the internet, I only find the blinky sketch everywhere but how do I write the wifi part or other important functions like i2c etc? Are there any useful examples that can help me get started writing the firmware?

    • @Deadgray
      @Deadgray 5 лет назад +1

      Well, if you want serious programing in C and SDK, not those blinking LEDs in Arduino IDE, maybe try new esp32 boards. But if you want simpler way Arduino IDE is way to go. If you install 8266 into it, you will find many examples in menu. But if you use vi and make... maybe try esp32 + esp-idf + Eclipse, you will find many good examples in git repo :-)

    • @yashpandit832
      @yashpandit832 5 лет назад

      @@Deadgray I have ordered the esp32 board and going to start with it now.
      Any idea on how the micropython environment for esp compares with ESP IDF.
      Can we do anything extra using the IDF that can't be done with the micropython environment.
      Thanks for help !

  • @xelegia
    @xelegia 7 лет назад +1

    Excellent video. I was able to run a program on my ESP01 following you step by step, from wiring to software installation. However, I did it via my Mac Terminal (i.e. without the Linux VM) and still it worked perfectly. Do you think I was just lucky with my simple program or the Virtual Box can just be avoided on a Mac?

    • @ammauro
      @ammauro  7 лет назад

      Ahh, that's good to hear, xelegia. I chose to use the Linux VM to keep everything isolated and consistent, but generally most (or all) of the same steps are expected to work directly in macOS, as you have seen :) Were there any differences you encountered?
      There was one thing I had trouble with: When using the CH340G drivers (kext), my Mac would Kernel Panic as soon as I plugged the board into a USB port. I have been using an older 2009 iMac, if it makes any difference.

    • @ammauro
      @ammauro  7 лет назад

      Oh, I have a question for you, xelegia: Andreas Wilhelm pointed out that, conventionally, RX and TX pins should cross over between a master device and a slave device, unlike what I showed in my schematics around 20:18 in the video. What serial device did you use to connect the ESP01 to your Mac? Did you indeed connect RX to TX and TX to RX?

  • @azbukaChisel
    @azbukaChisel 5 лет назад

    great explanation!

  • @GrayCo
    @GrayCo 7 лет назад +1

    Any chance of a video on making & using tool chains?

    • @ammauro
      @ammauro  7 лет назад

      Anything in particular that you are looking for? esp-open-sdk effectively builds the whole toolchain, in terms of providing the cross-compiler, assembler, linker, and other supporting tools. It also brings together the libraries, etc.
      Maybe you're looking for more of an IDE (GUI) approach, rather than command-line...?
      I will admit that I've had to spend a lot of time studying Makefiles and how to use them to help effectively create build scripts. Stay tuned for more information on that, as there are a couple of tricks as I've found with SDK V2.0.0 and V2.1.0 compared to most older examples for V1.5.4 and below.

  • @RajathKumareyes
    @RajathKumareyes 7 лет назад

    Please continue video for installing Eclipse for ESP8266. It would be great for ESP8266 Amateur like me.

    • @ammauro
      @ammauro  7 лет назад

      It might be a while before I look into Eclipse. I prefer, first, to understand how the toolchain and stack works at all levels. In fact, that is what I will try to show in my next video. That may help to figure out how to make this work with Eclipse anyway :)

  • @pastudan
    @pastudan 6 лет назад

    This is a great video :) As a beginner, I'm curious why someone would want to read the contents of the flash mem off the chip? For verifying? Or is there another purpose I'm not considering?

  • @sergioaiello4760
    @sergioaiello4760 6 лет назад

    You mentioned CH340G and CP2102. One week ago I bought FTDI FT232R based USB to serial adapter. Do you know if it would be workng properly as well?

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

    Very good video, thanks for that! Is there a way to debug the software using the espressif sdk? As there is no JTAG on the ESP8266 using sw breakpoints may be an option. But I'm wondering if it is supported.

  • @Phidelux
    @Phidelux 7 лет назад +1

    Great tutorial. Thanks. However, shouldn't tx and rx be swapped, such that the rx pin of the is connected to the tx pin of the usb serial adapter and rx to tx correspondingly?

    • @ammauro
      @ammauro  7 лет назад

      +Andreas Wilhelm you may well be right! I thought I had read at the time that the ESP-01's pins were actually labelled to *match* the respective pins of the Arduino's serial interface, given it was originally intended to be used like that at the time of its release... but on closer inspection I may have that wrong and yes: the TX/RX pins should cross over. I will confirm this and do an amendment. Thanks!

  • @romel554
    @romel554 6 лет назад

    Hello friend! Very well explained video, good job! I have a problem adding the bin folder to the PATH, I run the line echo 'export..etc but when I check on echo $PATH the sdk folder isnt there, what could be wrong?

  • @meowsqueak
    @meowsqueak 7 лет назад +1

    I'm using the non-standalone toolchain+SDK option (make STANDALONE=n) and running 'make' in the Blinky project is giving me trouble with the linker script file 'eagle.app.v6.ld' - no such file or directory. I can see it there in the sdk/ld/ directory. Note: I added the appropriate LDFLAGS for sdk/lib. Any ideas?

    • @ammauro
      @ammauro  7 лет назад

      I haven't yet tried with the non-standalone option, but evidently there is more information (e.g. environment variables) that your environment needs to direct the compiler (and all the sub-processes it calls such as the linker) on where it should look to find the respective files. It should be possible to fix this properly for all builds you do in the future, but to just get you going along for now you could try one of the following...
      Option 1:
      Edit the Makefile to add the absolute path where you know the .ld files are, by adding this beneath your existing LDFLAGS line:
      LDFLAGS += -L/home/user/projects/esp-open-sdk/sdk/ld
      ...and add this, perhaps, to help a little with debugging:
      LDFLAGS += -Wl,--trace
      Option 2:
      Specify an absolute path to eagle.app.v6.ld, e.g.:
      LDFLAGS = -T/home/user/projects/esp-open-sdk/sdk/ld/eagle.app.v6.ld
      ...but note also that I think "eagle.app.v6.ld" internally tries to include "eagle.rom.addr.v6.ld" too. Not sure if you need to edit its path, too.
      Option 3:
      Copy "eagle.app.v6.ld" and "eagle.rom.addr.v6.ld" both into to same directory as your Makefile, then edit the last line of "eagle.app.v6.ld" to change the path it uses to find "eagle.rom.addr.v6.ld".
      To help with other debugging of this:
      * Run this: export ESP_ROOT=/home/user/projects/esp-open-sdk
      * Run this and verify it contains "/home/user/projects/esp-open-sdk/xtensa-lx106-elf/bin": echo $PATH
      * Run this to find out where GCC will start looking for certain supporting files (mine gives "/home/user/projects/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot"): xtensa-lx106-elf-gcc --print-sysroot
      * Likewise, you can do this with the linker: xtensa-lx106-elf-ld --print-sysroot
      NOTE: I'm working on a better (simple) Makefile template that also works better with SDK V2.0.0 and SDK V2.1.0, especially with the esp-open-sdk. I intend to feature that in an upcoming video.

    • @ammauro
      @ammauro  7 лет назад

      Just to follow up on my previous comment: For me, with the standalone build, the "eagle.app.v6.ld" file exists in two places (as does the eagle.rom.addr.v6.ld file):
      * esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/lib/eagle.app.v6.ld
      * esp-open-sdk/ESP8266_NONOS_SDK_V2.0.0_16_08_10/ld/eagle.app.v6.ld
      ...and I've tested the default Makefile... It appears it only finds the FIRST of those two automatically, and not the second.

    • @meowsqueak
      @meowsqueak 7 лет назад +1

      Thanks, I worked my way past this issue by adding the path of the .ld file to LDFLAGS: "-L/path/to/esp-open-sdk/sdk/ld"

    • @ammauro
      @ammauro  7 лет назад

      Great work meowsqueak, and thanks for letting me know :) Is everything compiling fine, now?

    • @meowsqueak
      @meowsqueak 7 лет назад

      Yes, although frankly I have given up on the ESP8266 for now because I'm finding the ESP32 a much nicer device to use, and the ESP-IDF seems much better to me than the ESP8266 environment.

  • @fazuelle
    @fazuelle 5 лет назад

    nice videos, so complicated to deploy c firmwares into esp8266, lua programming seems so much easier.
    what would be the main advantages for running in native C comparing to running on LUA?
    thanks

  • @Cubetech
    @Cubetech 6 лет назад

    Great tutorial 👍👍

  • @ayu12641
    @ayu12641 7 лет назад +2

    After I uploaded the blinky.c to my ESP 12, the blue led just stays ON, On my board the LED is wired to GPIO1 which I verified by flashing the blink sketch from Arduino IDE. It works but not with the C code. Any Idea why? Also I noticed that you haven't changed GPIO01 in PIN_FUNC_SELECT function to GPIO2 after you changed the led pin to 2.

    • @ammauro
      @ammauro  7 лет назад +1

      Hi Ayush, your observation about PIN_FUNC_SELECT might be correct. Someone who uses GPIO2 could try replacing that line with this:
      PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
      As for your specific problem: Is the Arduino sketch using the ESP Arduino SDK instead of the Espressif SDK? Also are you using the ESP-12 or ESP-12E?

    • @ayu12641
      @ayu12641 7 лет назад

      I tried using ESP arduino SDK and it worked but not with the Espressif SDK. The board is 12e with led connected to GPIO01 an early release board I think.

    • @ayu12641
      @ayu12641 7 лет назад +2

      It worked when I passed the flash arguments.
      esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m -ff 40m 0x00000 blinky-0x00000.bin 0x10000 blinky-0x10000.bin

    • @ammauro
      @ammauro  7 лет назад

      Ah, thank you Ayush. I see you have posted this comment for others. Good on you :)

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

    This is gold!!

  • @fahadfarooq155
    @fahadfarooq155 5 лет назад

    Dude, you are awesome

  • @MaxGoddur
    @MaxGoddur 5 лет назад

    My search on how to learn to program for the ESP series of boards like ESP8266, NodeMCU has yielded nothing other than the reference material. Everytime I ask for "How to program ESP devices" I get answer pointing me to C++. How do you ask for help programming for the ESP series? What is the name of the language used for programming on the ESP series?

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

    Hi personally i do not know how all this works but i have windows 10 plugged the usb in shows com port 6 but does not show the actual board at all on audrino , the board itself is a NodeMCU Lua ESP8266 WIFI Internet Development Board ESP12E, with CH340G USB. UK , any help welcome so this board shows up on the audrino software i am using .

  • @ivanot88
    @ivanot88 5 лет назад

    Dear Anton, Thank you so much for your videos.
    I found it very informative and detailed, I'm trying to follow your instruction, I've encountered an error during the "make" process, I past the problem with the hoping that someone can help me about, maybe a very stupid thing but I newer to linux so for me is really hard also to find the build.log file that the error mentions... please give a look when you have a bit of time to waste.
    Thank you
    make
    Makefile:186: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    Makefile:181: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    cp -f 1000-mforce-l32.patch crosstool-NG/local-patches/gcc/4.8.5/
    make -C crosstool-NG -f ../Makefile _toolchain
    make[1]: Entering directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    ../Makefile:186: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    ../Makefile:181: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    ./ct-ng xtensa-lx106-elf
    make[2]: Entering directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    IN config.gen/arch.in
    IN config.gen/kernel.in
    IN config.gen/cc.in
    IN config.gen/binutils.in
    IN config.gen/libc.in
    CONF config/config.in
    #
    # configuration written to .config
    #
    ***********************************************************
    Initially reported by: Max Filippov
    URL: www.esp8266.com/viewtopic.php?f=9&t=224
    ***********************************************************
    WARNING! This sample may enable experimental features.
    Please be sure to review the configuration prior
    to building and using your toolchain!
    Now, you have been warned!
    ***********************************************************
    Now configured for "xtensa-lx106-elf"
    make[2]: Leaving directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/home/ivands/projects/esp-open-sdk/xtensa-lx106-elf"% .config
    sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config
    cat ../crosstool-config-overrides >> .config
    ./ct-ng build
    make[2]: Entering directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    [INFO ] Performing some trivial sanity checks
    [INFO ] Build started 20190211.170937
    [INFO ] Building environment variables
    [INFO ] =================================================================
    [INFO ] Retrieving needed toolchain components' tarballs
    [ERROR]
    [ERROR] >>
    [ERROR] >> Build failed in step 'Retrieving needed toolchain components' tarballs'
    [ERROR] >> called in step '(top-level)'
    [ERROR] >>
    [ERROR] >> Error happened in: do_expat_get[scripts/build/companion_libs/210-expat.sh@12]
    [ERROR] >> called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
    [ERROR] >> called from: main[scripts/crosstool-NG.sh@591]
    [ERROR] >>
    [ERROR] >> For more info on this error, look at the file: 'build.log'
    [ERROR] >> There is a list of known issues, some with workarounds, in:
    [ERROR] >> 'share/doc/crosstool-ng/crosstool-ng-1.22.0-60-g37b07f6f/B - Known issues.txt'
    [ERROR]
    [ERROR] (elapsed: 0:24.81)
    [00:25] / ct-ng:152: recipe for target 'build' failed
    make[2]: *** [build] Error 1
    make[2]: Leaving directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    ../Makefile:135: recipe for target '_toolchain' failed
    make[1]: *** [_toolchain] Error 2
    make[1]: Leaving directory '/home/ivands/projects/esp-open-sdk/crosstool-NG'
    Makefile:130: recipe for target 'crosstool-NG/.built' failed
    make: *** [crosstool-NG/.built] Error 2

  • @aryakumar9571
    @aryakumar9571 7 лет назад +1

    Sorry if i have missed or i am being silly but in both the two hardware u have used the same make, Dont we need to make changes in make file. How will compiler detect the two different hardware for code generation. Anyway excellent video. Thanks

    • @ammauro
      @ammauro  7 лет назад

      +arya kumar the hardware isn't much different from the ESP8266 chip's perspective: The ESP8266 just talks directly to the serial FlashROM in both cases, where each binary file is written to the same memory map. That's why, at least in this case, the Makefile can be the same. Also, because the example code is quite simple, it's not trying to use any other exotic hardware besides a single GPIO pin. Of course, you could choose to have the Makefile support parameters that alter the way the code compiles through preprocessors, if you needed to target the specific differences between the ESP-01 and NodeMCU boards, but that's not needed in this case :)

    • @aryakumar9571
      @aryakumar9571 7 лет назад

      yeah got it. :p
      Any plan of video doing similar setup in eclipse. "Building ESP in eclipse?"

  • @Plrang
    @Plrang 7 лет назад +1

    I would be be interested even if I wouldn't be interested, it's totally pro

    • @ammauro
      @ammauro  7 лет назад +1

      Thank you, Phototric :) Getting good produciton values takes a bit of time for me at the moment, but hopefully I'll get faster and better at it.

    • @Plrang
      @Plrang 7 лет назад

      Sure it isn't easy, just can't wait for more

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

    Outstanding !!

  • @brinckau
    @brinckau 6 лет назад

    I had to connect the ESP to the USB-to-serial adapter differently (ESP TX to adapter RX and ESP RX to adapter TX). All the explanations I saw say to connect TX to TX and RX to RX, but it didn't work for me.

  • @fabriciocgf
    @fabriciocgf 7 лет назад +1

    realy good content thanks a lot

    • @ammauro
      @ammauro  7 лет назад

      +Fabricio Gomes thank you for the feedback :) hope you subscribed: I am starting work on some more videos

    • @fabriciocgf
      @fabriciocgf 7 лет назад

      Glad to know that i'm subscribing right now

  • @yasha8951
    @yasha8951 7 лет назад

    "This works in Windows and macOS because is running in a Linux vm" it's a good one :)

    • @ammauro
      @ammauro  7 лет назад +1

      It's probably not a completely authentic way to say "works on Windows and Mac!" is it? ;) To be honest about my experience, of getting it all to work consistently and well under both Mac and Windows using native builds for those platforms, is not a lot of fun and wastes a lot of time when you could be building good code... even code that others can use well.

    • @yasha8951
      @yasha8951 7 лет назад +1

      I use the same approach, Linux vms for everything that needs USB and docker containers for compiling stuff

    • @ammauro
      @ammauro  7 лет назад

      Yeah that sounds like a good idea to me :) You get a great deal of flexibility and transparency when using a Linux VM for USB.

  • @csbluechip
    @csbluechip 7 лет назад +1

    At 20m21s you connect Tx to TX and Rx to Rx ....In serial comms Tx and Rx are crossed (ie. {Tx-->Rx, Rx

    • @ammauro
      @ammauro  7 лет назад

      You are definitely right, csbluechip. I can't edit the annotations of the video anymore, so I have instead noted it in the description of the video, and my next video will address this.

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

    [ERROR] >> Build failed in step 'Retrieving needed toolchain components' tarballs'
    [ERROR] >> called in step '(top-level)'
    :( i dont know what wrong, i just made all of your steps

  • @ericgamess275
    @ericgamess275 5 лет назад

    Hi, I followed all the steps. My hypervisor is VMware Workstation. Every thing seems to work. I can flash the firmware, and no error is reported. Every thing looks good. But the led does not blink. I was able to make the led to blink without problem with the Arduino Editor. Can someone post two flash files that work? I just want to discard a problem when flashing. Thank you.

  • @bt97gml
    @bt97gml 7 лет назад

    Where do you reference documentation to actually USE the dev environment you set up?

    • @ammauro
      @ammauro  7 лет назад

      Hi bt97gml, do you mean documentation for the dev environment, or documentation for how to write code for the ESP8266 and this SDK? I'm not sure how much documentation there is to be found for this environment or the esp-open-sdk in general, but there is a lot of documentation available from Espressif on how to write code using the SDK. For example:
      * ESP8266 Non-OS SDK API Reference: www.espressif.com/sites/default/files/documentation/2c-esp8266_non_os_sdk_api_reference_en.pdf
      * Other documentation, including "Getting Started" guides: espressif.com/en/support/download/documents
      * LOTS of other examples: github.com/CHERTS/esp8266-devkit/tree/master/Espressif/examples/ESP8266

    • @bt97gml
      @bt97gml 7 лет назад +1

      The latter, writing code for the ESP. Thank you! I wasn't sure if I should have looked for documentation associated with the pfalcon repo or Espressif themselves, so this is great, especially the PDF.