Getting started with ESP32-C3 on VS Code using ESP-IDF Plugin

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
uh hi guys uh this is syed from hyderabad india so in this quick video i'm gonna walk through the process of setting up os code for the esp32 c3 and flashing uh the device so espresso recently launched a new family the esp32 which is a single core device with bluetooth and uh wi-fi and very interestingly it has risk 5 at the core now this is a very interesting uh offering they are moving over from their popular extensor platform family over to the risk 5 which is interesting in a couple of ways but then there is a lot of support to be added in the future which is uh rudimentary at this point so uh these guys uh released or asked for developers to apply for a beta program to test out the esp 32 c3 chipset around december and i applied as well and i was lucky enough to receive the esp32 c3 dev kit m1 which is uh something like this uh they have given out these devices to all hundreds of developers across the world too and they have been posting all their hello world programs and stuff now the reason for this video is to introduce how we can use vs code to flash this particular esp32 c3 variant i recently came across the expressive so so i'd say came across this very amazing video by expressive where they were walking us through the process of using the expressive idf plug-in for vs code wherein it automatically installs the whole uh stk the tools sets up the environment and uh allows you to directly uh flash from within the vs code ide now this is different than the platform io id extension this expressive plugin specifically allows us to play with the esp idf directly i thought this was pretty interesting and the moment i received my esp32 c3 today's ipod man i should really try out this vs code plugin on vsp plugin and try to flash my uh expressive esp-032 c3 devoter the board comes with a pre-installed rainmaker firmware which allows us to directly provision it from our android or iphone devices and start tinkering with it right away they have a very interesting offering called as the esp rainmaker uh which allows you to directly uh push devices so without having to worry much about the backend architecture or managing the cloud and stuff they provision it through their aws uh integration have so pretty interesting stuff out there so uh i'm going to let's walk through the process of setting up the vs code this is a quick hack or a hardcore kind of stuff not good but it works i really spent around to one day a couple of hours trying to figure out this stuff but it wouldn't work on my 32 c3 so i was really frustrated and then eventually you know there was a hurricane movement and i thought why don't i hardcore the values and see if it works out and it did so i thought i'm going to share this with folks who are interested in trying this out and here we go so uh i really would recommend that you have followed this video the link i'm going to share it in the description of the video first make sure that you have the vs code completely set up you have a hello world program blinking uh for the esp32 version now the drawback of the vs core drawback the limitation yet the vs code for expressive currently supports compilation flashing debugging etc for only the esp32 and the esp32 s2 family it doesn't yet support esp32 c3 which is what we are going to uh get support for now in this particular video so uh if you can see there was mention of it somewhere blah somewhere over here yeah so here it is so they have no support for 32 c3 yet but uh this quick hack will make it uh compatible now now uh assuming you have followed the entire video over here and have a proper working esp idf setup inside vs code let's uh open vs code and modify the target.cma file my pc is pretty uh slow so excuse me bear with me while this loads uh let's navigate to this particular folder which is oh my god my pc really stack up so uh if you have your esp idf installed to a particular part open it up you will find a folder called uh tools inside the esp idf folder open up the tools folder you will see the cmake folder inside will have file called targets.cma yeah this is the file now you have to open this file and hard code it with the value esp32 c3 for more better clarity i'm going to show this in the vs code itself so this particular thing which you see these three changes is hard coded by me for making this whole setup or environment compatible with esp32 c3 now if i saw that if i show that to you in a comparison video in a diff video you will see the original file uh as this this is the original file you would have the enrollment id of target setup as the environment variable which is id of underscore target we are going to replace this with the esb cellular c3 we have to replace it thrice in these three uh locations and i am gonna show uh share a link to this cmake file and also you can directly uh copy paste and replace in your setup environment and you would also have to comment out uh this if condition and that's it once that is done you can now compile the example code so that support uh esp32 c3 and flash it directly from your vs code platform so let me show that to you live well we're going to open up the examples uh from the esp idf esp idf examples esp idf show examples project it's going to pop up and ask for the adf select the current edf oh sorry idf and let's select the uh hello world program and mind you the blink example won't directly work because the gpio8 in the esp32 c3 is actually a ws2812b new pixel led so your typical blink hello will won't work but for the sake of understanding i'm going to simply run hello program that simply outputs some information of the ic and a message you have to really bear with me so this is pretty slow uh i need to upgrade my pc real bad now let's navigate to the getting started with programs where is it where is it i think it went up oh my god it went up here we go let's go slow get started hello world program and let's say create project using hello world select a directory i'm going to say f drive somewhere in your pc all right select folder and it should open up the workspace uh it is supposed to open i'm not sure i don't know why it isn't opening is it because i have to close the workspace or no i have to change over the workspace it's still in the same workspace it's not opening the hello world program i'm going to select f drive and hit select folder and create now i am not sure what's going on it could be that my system right error copying esp idf example why is there an error i don't know uh i'm going to retry this i'm going to select uh a different folder let's select my d drive and see right now let's hope this bugger opens up okay i see something happening wow so uh it opened up damn it i have some existing uh sd config in my d drive so this is showing up the previous stuff let me uh clear out the build directory and make it uh fresh uh you would not i'm not sure if the sd config is supposed to be shown over here it is actually generated when we run the cmake and stuff so i'm deleting it let's see our code real quick if that is our intended code all right fine i actually messed up so what i'm going to do uh uh this is a different code and this has some bugs because i was trying to play around with the ws2812b let me quickly uh put this into some other weird location issue examples project and let's go and uh put it somewhere the screen so it doesn't cause any error where are we where is the hello world program get started hello world and create project and now let's select t drive and uh okay uh yes i'll see hello world program is already there i was not quoted i would say say it drive i do rnd so let's select rnd i hope this opens up now because so it's been some time and you guys must be getting waxed up as to when the hell is this really gonna happen so this is due to my pc being damn slow i have to upgrade to a better machine but i can't tell you take some time please god please don't let it happen oh it's happening wow why is it still showing the oh i really went and messed up the esp32 source code in the examples thing and for that reason this is with this thing so i'm gonna i'm really sorry for this time wasted here i'm gonna go back uh i'm gonna actually trim out this video and uh you might probably have to see this whole mess again f1 let's go to esp show examples project and uh let's use the same thing let's use the blink example because now this is a little embarrassing for me because the examples uh template is fetch from the esp id folder which i went and manually uh messed up before i went over to vs code and this is causing all these issues so uh blink project let's open this up in somewhere in say rnd and call it select folder and let's hope it opens up this video should not become so long i really don't want to become really long then it becomes irritating because this is like a three minute four minute hack uh i have also given out a link to a small tutorial with screenshots of this process so you can use that directly step to the video and get it done fine uh we have the bling stuff with us let's hope this is not messed up [Music] all right basic uh free at our task creation i'm gonna simply remove the existing sdconfig well i'm actually gonna better ways to clean the build blah blah blah fine all right this is because of some crap issue uh with the that being said with our uh target of cma properly set let's go and uh flash uh no first build the projector now let's say and wait all right there we go see me now this is gonna take uh maybe two to three minutes i have some cold so you should really excuse me this is not so slow uh could probably be because of me running so many uh stuff in the background actually nothing but the obs recording studio could be really ram intensive so not sure it is not it's not this slow but who knows this bugger could be the cause of the ram being eaten upper come on oh i don't really know can we pause this thing i hope i am recording yeah not bad this is actually my first uh recording after many many years so i hope it goes good come on expressive wee something we see this should not take the more than 45 60 seconds on a very on a decent machine because i am using a bugger this is so slow i have 4 gig ram only and some stupid uh quad core intel oh good so this is interesting because otherwise you'll always see esp32 c2 or s s2 or a32 only now this is a good indication that we are on the right track notice that it is picking up the compiler properly the risk 5 esp elf folder that's good news fine not bad and the sdconfig is generated and you would now see the sd config pop up over here yep it popped up and uh it would now have efc3 inside it yes we have it now here we go this will take uh maybe a minute to two but i'm gonna make sure i see through this entire thing so you guys can step out pause so take a break grab a cup of coffee or tea and come back in three or four minutes so because this is really gonna take time especially on my pc so meanwhile it's 1133 ist in india where i'm based out of i just went to an awesome wedding party and came and i think my brains are all running up because of the awesome delicious food i had wow good yeah one out of 956. now let's see this through so while this happened so i would maybe ramble around i'm not sure if platform platform mu that's how they wanted to pronounce the platform you has uh released an update uh for including the esp32 c3 tool chain i'm not sure if that is yet out there the last i checked two three or four days back they didn't have anything up there and this is pretty interesting to use esp idf uh inside vs code the earlier ide which was supported was eclipse but then the recent the vs code plugin is actually a couple of years old i think i think it's around a year or two years old here but in the recent video which they launched was really helpful this is a very interesting video a very politely daughter i don't know who the author is he has really done a very good job of explaining it in such a nice way with such an awesome melodious voice and not rant and fumble like i am doing over here oops see let's see fine so this is 10 percent here and then 90 percent to go while this happens so i haven't yet tried out uh debugging and stuff because i don't have a jtag adapter but if i re read the docs i think it said one i'm sorry the dev versions does not support jtag debugging yet i think yep they sent out a quick start note along with the dev kit and i finally remember it said that it does not support debugging yet that's interesting oh it's 15 percent a couple of more uh time to go maybe five or six minutes uh i would really fast forward this video snip it so you don't have to worry about me rambling and blampering brb [Music] so many users actually received i think the other version the def kit c1 which is compatible pin to pin compatible at least with the vroom esp8266 offering now i'm not sure why i received the dev kit m1 which is actually good in a way because it's so cute and small and tight vs code was released at least one year or more than a year [Music] many twitter users posted pictures of the 32 seat and why this guy open up anyways what is this is hyperlink to the dev kit i really love this new espresso website i don't know when they're crib it's pretty amazing it's a pretty futuristic look on the website with the ics and stuff shown pretty amazingly but there it's all hundred percent used up this is taking some time as i said it does this is actually taking more time because i'm not sure is it because of the obs studio which is recording in the background or because i haven't restarted for quite some time now i don't care as long as it works as long as you guys understand how to do it and enjoy vs code for the esp32 c3 so [Applause] so right 36 percent some more to go you guys must be laughing at how damn slow my sister has imagined working with such speech and churning up high impact project wow come on you bugger so so me all right 50 percent [Music] so so so i don't know there seems to be some other module called as the dt bl-10 now i don't know what that is is that also risk five base core seems to be quite compared with the this one online for sure all right 61 percent so [Music] [Music] oh [Music] so um right seventy percent [Music] i just hope my son doesn't come running out from inside he is having his dinner so it's pretty peaceful and calm out here and that's my mom laughing in the background that's my stupid nose [Music] me yeah it seems the dt bl-10 is made by the buffalo labs folks bl 602 risk 5 processor used with the modulus pl 602 i have to check it out while this happens vl 602 i would not check it out i'll do it later why why ruin the fun of esp yeah this is what i actually received uh other folks actually received this version i think but most of the folks on twitter showed pictures of receiving this one now this is actually compatible with the vroom esp8266 pin out could be intended to be used as a drop-in replacement for that all right so we are at 80 percent now this is the dashboard this is good actually interesting is where where are we with this uh 91 percent almost completing this is good this is worth the wait [Music] right fingers close cross [Music] i'm so excited that i'm not able to speak properly because if it fails now or something out of the blue happens so it's not good [Music] all right come on baby come on [Music] man four more steps to go come on [Music] please okay okay come on all right so finally that was worth the wait i don't know how many minutes went away over there and this is amazing so we have the binary generated now let's flash it select the uart port we are supposed to select the com port earlier which i have done already and this is flashing right now and it has flash so flash them successful let's open up the terminal from within we as code and we should see it showing some boot messages and hello world and restarting in nine ten eight seven six five four blah blah blah and keeps on rebooting this supposed to happen very fast but my machine is really a bugger right now so it's good that it's happening so i can see what script is running all right there we have success turning off the led on off on off this is connected to some pin i think it's for something i know but not bad it's working so let me kill this terminal let's quickly check from our hoodie just to make sure it's really happening we are on com13 1152 and bugger it's happening let me manually restart my device and all right so this is happening this was a quick not a quick actually a very long demo of doing a three minute job in 30 minutes so a quick recap go and change the targets.cmake file inside the cma folder under tools replace the env idf target with uh with the es182c3 stuff comment out to this part and go compile have fun if you guys have any questions uh probably drop a comment or better still go and create uh or open issues or tickets on the github page for vs code because i am pretty naive to this whole setup and i thought i would simply share what i know happy hacking thanks see you around bye
Info
Channel: Syed Anwaarullah
Views: 4,190
Rating: undefined out of 5
Keywords: ESP32-C3, Espressif, VScode, ESP32
Id: a9pAEvRUN00
Channel Id: undefined
Length: 41min 26sec (2486 seconds)
Published: Thu Feb 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.