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

  Рет қаралды 49,900

Anton Maurovic

Anton Maurovic

Күн бұрын

Пікірлер: 246
@DownhillAllTheWay
@DownhillAllTheWay 7 жыл бұрын
It's such a pleasure to see a video really well edited and presented - and without music! I liked this a *lot*, though KZbin 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 жыл бұрын
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.
@radresk34
@radresk34 5 жыл бұрын
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!
@illusivec
@illusivec 7 жыл бұрын
That production quality though.... Great vid man.
@ammauro
@ammauro 7 жыл бұрын
Many thanks, flanker :) My next round of video work is delayed, but I hope to be back on track very soon!
@davidf8749
@davidf8749 7 жыл бұрын
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 :)
@SlykeThePhoxenix
@SlykeThePhoxenix 5 жыл бұрын
This is probably one of the best tutorial methodologies I have ever watched on youtube. Keep up the good work!
@vor946
@vor946 2 жыл бұрын
Dude created one of the best tutorials I have ever seen on youtube and dipped.
@CRISAP94
@CRISAP94 7 жыл бұрын
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.
@czypherth
@czypherth 5 жыл бұрын
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.
@xennelul
@xennelul 7 жыл бұрын
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!
@blackhunter2310
@blackhunter2310 7 жыл бұрын
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 :)
@andrewpalm2103
@andrewpalm2103 7 жыл бұрын
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.
@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.
@Pownyan
@Pownyan 7 жыл бұрын
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.
@psf6141
@psf6141 7 жыл бұрын
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 жыл бұрын
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!
@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.
@kamisama7043
@kamisama7043 7 жыл бұрын
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.
@GrayCo
@GrayCo 7 жыл бұрын
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.
@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/.
@stomachcontentz
@stomachcontentz 7 жыл бұрын
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.
@eriklaken1025
@eriklaken1025 6 жыл бұрын
Thank you very much, i am startend and i could not start without your video, Thank you so much. :)
@cupdejello
@cupdejello 7 жыл бұрын
Excellent video. I am liking and subscribing and looking forward to more videos.
@ammauro
@ammauro 7 жыл бұрын
Ah good to hear, thanks GrandBizkit :)
@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.
@yltfy
@yltfy 5 жыл бұрын
Very excellent tutorial!!! For the surface all the way to the depth, in such a pedagogical way! 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);".
@kionmahuermicio9860
@kionmahuermicio9860 4 жыл бұрын
Wow, you mustn't be human. That explanation was PERFECT!!!
@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
@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
@RaadYacu
@RaadYacu 7 жыл бұрын
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.
@iuri.castro
@iuri.castro 7 жыл бұрын
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!
@sergioaiello4760
@sergioaiello4760 6 жыл бұрын
First of all congratulation: impressive teaching technique!! Incredibly professional :)
@pastudan
@pastudan 6 жыл бұрын
Direct and to the point. Love it. Cheers!
@ivanceasario5309
@ivanceasario5309 6 жыл бұрын
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?
@thomaspatrick4564
@thomaspatrick4564 6 жыл бұрын
Very good information. Very high production in your video. You could charge money for this.
@jayare7750
@jayare7750 5 жыл бұрын
Why are you not more subscribed?! *goes and checks out more videos* oh... just 3? your videos are great!
@alpagutsencer
@alpagutsencer 7 жыл бұрын
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 жыл бұрын
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
@YuriyBrazhnyk
@YuriyBrazhnyk 5 жыл бұрын
This is exactly what i was looking for. Thanks dude!!!!
@zrogles
@zrogles 5 жыл бұрын
Thank you! You just saved me hours, I'm sure!
@Hamster170780
@Hamster170780 6 жыл бұрын
Good job!!! Thank you for this video. I am looking forward to more such videos.
@zodak9999b
@zodak9999b 7 жыл бұрын
This is very good information, and very well presented.
@ammauro
@ammauro 7 жыл бұрын
Your feedback is very encouraging, as is everyone else's. Thanks zodak9999b :)
@gaedu62
@gaedu62 7 жыл бұрын
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 жыл бұрын
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 (kzbin.info/www/bejne/d4i3Y6ptq56msNU), be sure to check it, along with his other works. Great guy :)
@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..
@Abosobaie
@Abosobaie 6 жыл бұрын
This is the best guid to use the esp. (Y) Keep it up!
@koufdell
@koufdell 4 жыл бұрын
this is a hidden gem thx sir for the effort :)
@AJSquirrel53
@AJSquirrel53 3 жыл бұрын
You are a true hero💪
@transientaardvark6231
@transientaardvark6231 Жыл бұрын
About time for AMMAURO #4 ?
@juergenwickenhaeuser3329
@juergenwickenhaeuser3329 7 жыл бұрын
Very good explained! Thanks a lot!
@ammauro
@ammauro 6 жыл бұрын
Thanks Juergen! I hope it helped a lot.
@AntsPantshere
@AntsPantshere 6 жыл бұрын
This blew my mind, going fishing to cool down!
@sergioalejandrogonzalez9755
@sergioalejandrogonzalez9755 5 жыл бұрын
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?
@victorkrook9251
@victorkrook9251 4 жыл бұрын
Thank you for this insanely informative video!
@MrHubert1710
@MrHubert1710 6 жыл бұрын
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 .
@jaycansino630
@jaycansino630 4 жыл бұрын
This is gold!!
@AnilKumar-zp2sh
@AnilKumar-zp2sh 7 жыл бұрын
you are amazing ! more videos plz! :)
@ammauro
@ammauro 7 жыл бұрын
Thanks anil. Hopefully more are coming soon :)
@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
@RuggieroGuida
@RuggieroGuida 4 жыл бұрын
Amazing video. Thanks!
@chlopakzwildy
@chlopakzwildy 6 жыл бұрын
Great tutorial, very professional
@gustavominnucci5862
@gustavominnucci5862 6 жыл бұрын
Great video ! Thx Anton
@jrfoliveira
@jrfoliveira 6 жыл бұрын
Congratulations, excellent video
@novak6882
@novak6882 3 жыл бұрын
U saved my day n night n week n month :)
@sqoob7082
@sqoob7082 5 жыл бұрын
Instructions for linux start at 7:53
@azbukaChisel
@azbukaChisel 5 жыл бұрын
great explanation!
@RajathKumareyes
@RajathKumareyes 7 жыл бұрын
Thanks a lot for the Great Tutorial.
@ammauro
@ammauro 7 жыл бұрын
No problem :) You're welcome. I will hopefully have more soon.
@ralfm.metzing8407
@ralfm.metzing8407 6 жыл бұрын
thanks alot for this excellent explanation
@CmdrColstel
@CmdrColstel 4 жыл бұрын
Outstanding !!
@fahadfarooq155
@fahadfarooq155 4 жыл бұрын
Dude, you are awesome
@joaovictorsoaresdacunha489
@joaovictorsoaresdacunha489 3 жыл бұрын
Really nice video. Thanks.
@Cubetech
@Cubetech 6 жыл бұрын
Great tutorial 👍👍
@H2oRiz
@H2oRiz 5 жыл бұрын
Make more videos please, you deserve crowd funding.
@amirudin4859
@amirudin4859 5 жыл бұрын
You're a hero sir, thankyou so much
@excite236
@excite236 3 жыл бұрын
Wow, I always hated Linux but this is cool. Thanks dude 😉
@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?
@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
@eXtremeElectronics
@eXtremeElectronics 3 жыл бұрын
Can't we use the toolchain available on Espressive website? Because this open source tool chain is no longer maintained ...
@yasha8951
@yasha8951 7 жыл бұрын
"This works in Windows and macOS because is running in a Linux vm" it's a good one :)
@ammauro
@ammauro 7 жыл бұрын
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 жыл бұрын
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.
@PatrickRoux04
@PatrickRoux04 7 жыл бұрын
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 : kzbin.info/www/bejne/hWO2hKychZuCg5I 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 (kzbin.info/www/bejne/oYqoq3h8fZp_n68), 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 (kzbin.info/www/bejne/il7ShJ2DeNKBj80m20s). If you don't have a Linux VM, let me know, as there are other options still available for both Windows and macOS.
@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?
@blackdave8525
@blackdave8525 Жыл бұрын
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 .
@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.
@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?
@Benjamin-hl9gj
@Benjamin-hl9gj 7 жыл бұрын
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.
@Davedarko
@Davedarko 7 жыл бұрын
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!
@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 :)
@Phidelux
@Phidelux 7 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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.
@ayu12641
@ayu12641 7 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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 :)
@caroman6761
@caroman6761 7 жыл бұрын
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!
@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.
@csbluechip
@csbluechip 7 жыл бұрын
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 6 жыл бұрын
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.
@emanuelstone2131
@emanuelstone2131 2 жыл бұрын
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.
@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
@muhammadahmedzafar8324
@muhammadahmedzafar8324 7 жыл бұрын
Excellent ☺
@ammauro
@ammauro 7 жыл бұрын
Thank you Muhammad :)
@tinkerer67
@tinkerer67 6 жыл бұрын
Unfortunately, some things do not work as of December 2017 (on the same system using the same virtual machine set up).
@eefoops2u
@eefoops2u 6 жыл бұрын
Do all c applications produce 2 .bin files? what determines the load address?
@xelegia
@xelegia 7 жыл бұрын
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?
@eriklaken1025
@eriklaken1025 6 жыл бұрын
One questions, rx and tx have to be Just On One site reverse, or am i wrong?
@oladapoajala7100
@oladapoajala7100 5 жыл бұрын
I get this error everytime I try to use make in the blinky folder: blinky.c:1:21: fatal error: ets_sys.h: No such file or directory #include "ets_sys.h"
Aggressively Low Power with the ESP8266
10:18
CNLohr
Рет қаралды 78 М.
Зачем ставить Микроконтроллер в простые устройства?
16:38
ElEnBlog - блог об электронике
Рет қаралды 110 М.
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 3,9 МЛН
Dad gives best memory keeper
01:00
Justin Flom
Рет қаралды 24 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
Je peux le faire
00:13
Daniil le Russe
Рет қаралды 19 МЛН
ESP8266s without the big SDK "nosdk8266"
7:44
CNLohr
Рет қаралды 74 М.
Electromagnetic Aircraft Launcher
15:09
Tom Stanton
Рет қаралды 1,4 МЛН
My thoughts on framework after daily driving it for 2 years
16:34
Louis Rossmann
Рет қаралды 704 М.
ESP8266 + Arduino + database - Control Anything from Anywhere
13:51
Electronoobs
Рет қаралды 634 М.
ESP32 WiFi Range Testing - 10km using Directional Antenna
5:42
The Making of Linux: The World's First Open-Source Operating System
11:33
ForrestKnight
Рет қаралды 1,2 МЛН
Intro to Hardware Reversing: Finding a UART and getting a shell
12:07
Tony Gambacorta
Рет қаралды 893 М.
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 3,9 МЛН