 Well, we're just gonna get going here Hopefully you can hear me. Hopefully you can see me. I'm not too shadowy looks like restrooms going and YouTube is going Hi folks, welcome to deep dive. We'll wait a little while and we'll get started Hi, Beata. Hello, David. I was thinking I was gonna have to restart to get my My audio going but it turned out I just had to change it to the right input and then it worked Hey, Hams Labs Welcome. Welcome Good afternoon, Sea Grover. Thanks for making it All right, one more minute and then I'll get going Sorry, I'm a little late. I I remember to check my audit and check my audio and in OBS before I got things going Jack in the shop says I forgot I had this open. I was setting up for a fiber laser burn. Oh fancy That sounds more makery than my software world I Had the AC on running. I do have AC now, which is good But later in this dream. I might have to turn it on again. We'll see I've got this clock thing from the shop It's currently 79 in here and it's happy, but a Couple more degrees and it'll be unhappy and I'll be unhappy too All right. Hello everyone. My name is Scott. I work for Adafruit on circuit Python Adafruit is a open-source hardware and software company based out in New York City I work remotely for them and have since I started Here in Seattle. I'm now in this brand new office. This is stream number two from the office Hopefully it goes as well as the first one and circuit Python is a an open-source Version of Python that runs on tiny computers called microcontrollers. Here's an example That is blurry This is my custom hacked metro M7 so this is the microcontroller here and The USB port here you plug in it shows up as a drive There's a code.py file on it and you can edit that to get your code running It's meant to be super quick and easy for lots of small embedded projects making it making it really easy Hello Isaac Ben and hello, Yanni. Ham's lab says I'm curious about your shirt. This is super con 2019 It's one of the one of the conferences that I kind of Think it about going to again. I'm not planning on going this year But it's one that I did enjoy so I I think it's in my My list of places to go This is deep dive. I work on the software the C under side of circuit Python So in deep dives we tend to pick up topics that whatever I'm working on for circuit Python Which happens to be upgrading the vendor SDK called the IDF for expressive chips I'm just about done with that. So I'm hoping we can polish that up today But I also love to answer questions and go in on tangents. So bear with me as I do that And if you have questions, feel free to ask them. I I love being directed that way as well So why don't we just dive right in and as if folks have questions ask them Oh Hey, dishipoo, I guess what I should say first is I did get the hover cam set up and it looks like it's active still Which is great It's a little funky because I have these these are the PC bike probes which I'm just currently using for Connecting to the UART output which is kind of funny, but It is quite convenient This board is the it's a little reflective. I don't I don't know exactly that must be the like The room light that's reflecting, but this board here is a prototype board of I think what's going to be called the qualia Jeff just renamed it, but it's a in a dot clock display driver board. Unfortunately, I don't have it working Um, I haven't gotten this display working and I'm not sure why and I'm not sure I want to work on that Um, but yeah, so this this display is coming and and Jeff's been doing most of that work But um, I had to update I updated the id of five stuff stuff on top of Jeff's work and The api has changed so I have to update Jeff's work Uh to id of five. I've got it compiling Which is kind of my bar Um, there's going to be a lot of issues probably with uh the id of five update and and uh So I'm not going to like hold myself I'm not going to worry too much about bugs like if you can use circuit Python generally so I Hey unexpected maker So the tests I have been running this week, uh on the id of five update is just a basic wi-fi test That does both http and https Requests And the reason I was doing that and I'm glad I did is because I changed a bunch of tls settings, which is used by https They were all okay, but um some of the Configurations of the boards were a little too ram heavy so that I couldn't actually create An ssl socket So I had to change some idf settings to make that happen change them back to basically what the the current settings are I don't know how they got unset Like the number of tcp buffers and things like that. I've changed Which gives enough ram to to do this test so That's mainly where I was at I I tested on the c3 the s3 the s2 and the esp 32 Um, and I tested the c3 dev kit and the c3 qtpy Because the dev kit for the c3 uses a usb 0 to 0 converter not the native one I think um So yeah, that's where I'm at um I was just getting boards building that have the dot clock frame buffer active And that's why I was using this board to test. I was hoping it would work um After I like got everything compiling Compiling and running without error, but unfortunately that's not the case. Um, I can show you My desktop Let's just dive right into it. So Um, these are the changes that I've got currently happening and before I commit it I want to remove these debugs. So that's something we're going to have to do um And I changed the way so it was using this esp error check macro um Be out of squeaking and I'm not sure why Um esp error check macro, which is like an esp idf thing um But uh I switched it to this cp check esp error, which will raise a python exception We already have this thing that maps esp errors to python exceptions So this will raise the appropriate section, which is quite nice. So when like I didn't have enough memory um That that we uh Then I get a like proper python error message Unexpected maker says new office is looking messy and lived in as it should um Yeah A lot of the stuff on the shelves. I just threw up there. I didn't spend a whole lot of time. Oh, it looks like The cat cam is glowing. I wonder if cat cam would work um This camera just like these cc 920s just don't like to work for me I have it like on the bench as well. It's another way to look at the bench um Yeah, so I like brought everything in I got it up on the shelves and Haven't uh been organizing too much. I ordered more of the boxes because I'm Ah, I see I ordered more of the these boxes. I'm really started to like I'm really liking it. You can see I have my esp 32 s3 box here um That I've actually you know started to collect Collect them in you can see that I've got these unexpected maker boards here for any testing there And then I've started also these are what I was using this week So I took the time to organize them, but I also used my label maker to actually like write what modules on there Um instead of having to discern the like font. That's really hard to read on the module itself um Got myself a matrix portal s3 as well in there So yeah, I'm I'm liking this system so far This box is out because I'm going to put this Qualio board back in there soon enough Cedar Grove says using a unexpected maker feather s2 for a circuit python iot project um Great board design smooth sailing William says are we going to be getting esp 32 bluetooth support in circuit python? um It depends on when someone adds it This is a snarky snarky response. Um, I did actually try to turn on uh The bluetooth support that we have Um kind of existing in circuit python. It's not complete um I did try to turn it on for esp 32 and it actually, uh It's like 200k bigger. So I think We should think about whether we want to do it in 9x because it probably will change the partition layout Unfortunately, just because it's like a giant ball of cool ball of code to support it on the esp 32 Um, and 9x is a good time to do that. So I I don't want to do that in this change um, but it's something we could think about for, uh Something we could think about for 9x There's extra work to to support the full circuit python bili api And that's a limitation of nimble last I looked so unfortunately that's That's even like Kind of underneath the idf that we that we'd have to work on so that That's gonna be a lot of work. My goal right now is to get this 5.0 update um Out for pr and then merged And once it's out for pr I want to start on the 5 1 update And the thing that's kind of interesting to me is adding c6 Support which I looked into just a little bit more. Um, it's in the c C3 family, but it has more ram, which is interesting to me. Um So I'm gonna take yeah, so I I was kind of hope like depending on our timing here Kind of hoping I can clean up um These 5.0 changes confirmed. There's like I have a branch On github of mine that Runs all the ci and there's like five builds that aren't building so I want to make sure Those five are building and then um And then I'm gonna push those changes The ci will run again, and then I can make the I want to do a rebase and squash everything together Um, because there's like I don't know a dozen commits that you know are May include debugging and stuff like that. So I want I do want to squash um Before I make the pr uh either today or on monday, I'll do that Maybe I'll I'll prep it today, and then I'll um push it to ci, you know, I I could I could just Push it today And then once the pr is out, I can do in another branch the 5.1 update, which I'm I'm keen to try um Unexpected maker yet says yeah straight on the 5.1 for sure C6 and h2 support. Yeah, I'm I'm interested in that h2 Unfortunately, it's less interesting because it doesn't have wi-fi So like h2 would be would be better if our bluetooth support was Complete on esp which is unfortunate and something we should do. So I don't know We'll see Gotta get through 5.1 update first But see like 9.0 or 9x should be in pretty good shape once we're on 5.1 And um, we're on the latest micro python as well, which is what dan's working on I saw on the master branch of um esp idf that uh That they are adding p4 support there, which is very cool too. So there's a there's a Chance I and I think generally we're okay updating like from 5.1 to 5.2 Not on a major branch as well. So We could get a like a 9.0 or a 9.1 that had support for um Had that as well okay, so Here's what I was doing is this is the debug output Let me get taller again This is my current like kind of debugging setup as I've got This is used for flashing and this is the this is both like the circuit python output and the the esp logging output So you can see that there's like lcd Debugging stuff coming out and it's not crashing. It's just not showing anything unfortunately um And jeff has a lot more experience debugging this so I kind of want to just say okay jeff try this and and figure it out um My main concern right now is that it compiles So let me find this Window I have a a browser window off screen here. This is the C i output so we can see this qualia s3 didn't build And it didn't build because of This uh include this is like an old include from 4x Um, so that's why I was fixing the build and I have fixed the build so now If we do just the The build itself will see that it it succeeds So I just want to do a quick Let's remove the debug prints that I added that I don't need anymore Oh, and I did I did have some fixes that I made to The idf unfortunately, so I'm gonna have to do that too um Adriano cacamo Says I'm trying to set up a racing drone track with drones to be controlled remotely over the internet from players over the world Can anybody help with the technical aspect? Uh, I assume you mean fpv, so you're gonna have to figure out how to stream video and Controller input The video is probably the hard part and being able to fix them when they get crashed I have experience with that with crashing drones um Okay, where are my Just about to the point where I'm gonna turn the ac on hopefully it's not too bad I thought I might need to do a refresh call, but I'm I'm not gonna worry about it Uh, we don't mind too far out of topics, but It's not an easy problem logging Yeah, one thing that's nice about 5.0 is they have an accessor for the frame buffer now So this hack where we store the same Struct info and then get it out of the struct. We don't need any more So that's a nice cleanup that we get from 5 Uh, I made the camera build smaller by osing it. So we want that this one. I switched to quad I think this is correct as well I just was able to delete these two Includes that didn't work. I don't know why they were included, but we don't need them anymore, which is great And this is the hack where it does this like container out thing um Unexpected maker asks I missed last week. Did you solve that wash dog issue from two weeks ago? What was it in the end the watchdog issue was um Circuit python wasn't correctly protecting the ps rampins. So it was um resetting No, it wasn't it wasn't resetting them It wasn't resetting the ps rampins, but it was allowing other code to change what they were doing It wasn't marking them in as in use And there's a fix on a 2x for it now um But yeah, like the watchdog issues I've found and I I ran into this similarly is if your ps ram is If you're if you're settings to ps ram or house, then you're gonna have a problem Okay Let's stage that This is the news circuit by then check esp errors. So if it's okay, then we're done Otherwise we raise the error You want that as well? We want this This is a not something we want. I was just doing that for um The kconfig updating Oh, and I wanted this error message although this I don't want I was unable to use all the pins that I wanted because it was sort of reserving them for j tag So this is just a heads up now that it does that Um unexpected maker the other thing I wanted to show and this will be interesting to you Is um Now in expressive boards I have And maybe maybe we should just show this so like for your nano s3 We now have these uh explicit flash and ps ram modes um and uh I think 80 is what I was seeing you were doing an sdk config, but um A lot of boards at least for eta fruit stuff is like this is set to dio Because it used to be only used for like the flash setting, but now it's not So now it's quad and then we also have the like speed set here as well So that's going to be a new thing that all of the circuit all of the esp boards will have All right, um lashanda asks, uh, how do you typically debug lcd issues? Find any implementation that works compare the two with a logic analyzer and work towards the one that functions Yeah, that's that is a good approach. Um to have a known good Example for my debugging here My next step was going to be to use the oscilloscope to just make sure that I'm getting output at all um But as I was saying, like I think it's a little too far from like where I've been working And so, uh, it is a better, uh Task for jeff because he's he's done that a bunch Um, and the code that I'm using to test it is all his code too. So there's like There's this weirdo like initialization stuff that has to happen for the screens as well where, um You have to do spy commands to initialize the screen But because the the rgb displays takes so many pins for the colors You typically have the spy bus for initialization over an iSquad C's expander So there's stuff that's just just been doing that as well. So Um, if I were to continue to debug it, I would just verify that I'm getting output on pins. Um And maybe we'll Yeah, I'm not going to do that now, but uh Kind of that's where I would go Anytime where you're like not you think you're checking all the errors, but it's still not working getting insight into um The signals that are coming out is a good idea. I do have like a a salier that I could use here too, but um Like I said, my main concern is is getting it to compile and then the nice thing yeah, so like Something like idea five is like a giant change where you got to get everything compiling and hopefully working um But it's also one of those things where like if you have this big change, you're the only one that can kind of fix it I mean get you could have other people working on that branch But it's like a lot of coordination Rather than kind of like getting it all back in the main line And once it's in the main line, we have this infrastructure for like absolutely latest builds that people can test and everything like that um So So I think yeah, like even though it's not perfect I'd rather get it in early Um unexpected maker says yeah awesome. So have you updated all of the existing boards or do we need to go back and update our own boards? so when I Switched it. I was trying to go based on the stk config That was in the existing repo. So if I saw stk config there that would say like oh actually use 80 megs I I tried to change this The setting to match that and then with the updater script the k config settings then go away Because it's doing diffing between like circuit python defaults and esp defaults and all that stuff You'll see here that like the the stk config here is really simple. It's just like the lwip hostname now But I haven't what I haven't done is I haven't like there's a lot of boards I think even adafruit boards where we haven't like pushed the boundary of What those flash and ram settings are and I haven't done the testing to make sure that like You know a particular board can run at 80 or even 120 megahertz for a flash or ram Um, and that's actually part of why I'm not doing it now is because with 5 1 you have the ability of setting it to 120 So I kind of don't want to kind of do a full sweep or a test uh test run yet until I I can um do the 120s on the s3 at least Another reason to do 5 1 And the the other thing to do 5 1 is like I don't really want to debug 5 0 I'd rather debug 5 1 Because you know the the problem we find might be actually fixed in in 5 1 so Um Yeah, my plan is to like get 5 0 in and have that be a benchmark, but then um, and and I kind of like a Benchmark or um A testing point. What's right a checkpoint, right? So like if if there's an issue on 5 1 Uh, we can then check to see if it's in the 5 0 it Thing as well to just kind of like better better understand where an issue was added Okay, I'm gonna turn the ac on Because it's 82.8 now. So um, if it's too loud We can figure something out. It is pretty loud And I'll turn I'll turn it down here A little bit So how's that is that terrible? um, graham says Will this idf 5 update fix the reporter problem with memory leaks crashing wi-fi during extended use That's really hard to know any um any issues that happen over a long period of time are really hard to debug and uh And decide whether it's an issue or not so Sorry, I I I can't I can't tell you Um, if if it was an idf bug then yes, probably but I don't really know. Um, I don't know and I think we're probably gonna change So micro python has updated to idf 5 as well and they they Sound very industrial, uh, sorry Um, I don't know if there's like a filter or anything I could do Hopefully it's not too bad. I bought this acu's So it's not like the very the absolute Absolutely quietest one I can do I probably hopefully won't need it throughout the whole year Um, once it's cooler, uh, I should be able to just open the window But getting a cross freeze is kind of tricky Um, I can turn it off when when it gets cooler in here again. Otherwise Otherwise I'm gonna spend the next hour and a half sweating Um, okay So yeah, graham. Sorry. I don't have something more definitive. It's just a matter of like you should test it and see um I generally I do have one device here that's running kind of all the time and it does crash from time to time but Um, I've I mainly just like catch the crashes and and restart and it's okay um Yeah, it anything any long running problem is really hard to debug Um, okay. What was I doing? You can filter out the fan noise as the acu need to be near the window it does because um There's a exhaust It feels colder here just with the sound Um, yeah, there's an there's like an exhaust tube that goes That goes out um out of the So there's a like port Here just you can barely see It's like a tube coming out the back and that goes out a little little hole So the the window does have to be open, which is nice Knots filter at 120 can help with fan motor noise. I don't know how to do that with obs But that's not a bad idea I'll just sound industrial today and maybe play around with it later Uh, okay. So the qualia builds And then I wanted to look at the other qualia didn't build s3 camera didn't build which I think I fixed already 80 fruit s3 The noise is fine. Thank you. Lashonda. Appreciate that You want me to stay cold true like my my brain goes super fuzzing when it's too hot Yeah, I think it would be hard The ac works better if it's closer to the port too, I think Maybe I I could get something like that would like sit between me and it Hopefully won't need it too long All right, let's run the other ones. Oh, and I have to do the idf I have to do another pr for our version of the idf So I think most of these boards that didn't build are ones that jeff added to test the lcd stuff Or the dock clock stuff So hopefully these ones are are fixed already Oh, did I say that if I get this pr updates all going I Was hoping to actually start the five one update today I don't know how bad it's gonna be but I thought that could be cool See how much progress we can make on it. Oh DCD says another trick would be to pre cool the room ahead of time. I did that I turned it off right before I started streaming I ran it for like an hour And I was down to like 78 but it got hot real fast. It doesn't help that it's like the afternoon, right? So I could probably put the shade all the way down and that would maybe help a little bit Yeah, I did I did think about that. I Maybe I should have done it more but All right, so we're running this hack tablet thing. We'll see if it builds it didn't It failed for the same reason the dock clock stuff. So It's probably fine now. I'm just gonna run it and then we'll do this next one Which is also like the s3 eval kit Or the lcd eval kit as well um, yeah, so we'll I'll make a pr for the idf changes. We can just go here and This is sublime merge And it's a great way to keep track of changes that are going on and also undo the ones So I like I do printf debugging a lot, especially on expressive So, uh, this is a really easy way to revert, um, the printfs And in fact, you can like highlight certain lines and then just discard those as well um So this is an existing change here that jeff did but um is not on the 5o branch and then um Here's a typo that I was like I'm gonna fix the typo um I was having a problem where it was trying to disable the clock Even though the clock had never been set up. So I added that And I also added the I had the problem that um, it wasn't able to allocate the frame buffer um, and it wasn't Actually like recovering from that failure, you know, ideally when it can't allocate something it should Like raise a python exception and not completely fall over but the is the idf wasn't um The existing version wasn't actually correctly, uh airing out It wasn't airing out correctly. So this this fixes that by um A pattern that they have further down in the file where they capture the return value and then um And then go to error And you can see here that error returns the return value from the sub thing So in the original version, they're not actually setting return to the error when they return And this destroyer was not working either because we never set up the clock blah blah blah So this is the change that I've got to propose to Um The idf and actually I could just do that right now Oh good. So this uh, this board built. So let's do this next one The board builds take a little time because they're not set up to be I never do them in parallel Because we've had problems in the past This is the circuit python 8 version. I do not want that We're not using this anymore. So status switch branches to dot dot clock eight of roots origin So here I just want to rebase on the merged version And I guess what we'll do is we'll do a five one branch as well Oh, I haven't actually ESP lcd louspyram allocation only memory maps also Successfully on frame buffer Just trying to make sure my pace buffer doesn't have a password in it The fan that is controlled with circuit python 8 It crossed my mind to like make an ir blaster so I could turn it on When I'm not here That the ac but I had this problem where Well, I just bought it and there's a plug on the back that was open And so it leaked out all over the floor. So now I'm like I only want to run it when I'm actually here Which is fine. It does a pretty good job cooling stuff down even though this doesn't show it. It feels cooler to me Um, okay, so that was I think the second the last one that failed. There's this maker fab's tft 7 which again is like a another lcd board So we'll just do a quick build of that as well. It should be fine maker fab's 27 Okay, so I committed that and now I'm going to rebase it push that to my own branch and then I'm going to go to at this level Dj def 3 says how are devs working on 9 when 8x is main? Is there a 9x main? So main is not 8x it is 9x All of the 8 2 releases are coming out of the 8 2x branch Yeah, so main is 9.0 Or 9x We'll do alphas and stuff But we're waiting to do official alpha releases for 9.0 until we have MicroPython 120 merged because it changes the npy format again So 119 changed it, which is why you have to use py files with main right now And then 120 will change it again, but it we won't change it a third time We don't have to change it again after that. We'll be up to date with MicroPython So, yeah Let's go back to slime merge Uh This we want stage so bindings should include the common hell headers And the reason is that is that sometimes they have data structures that they're importing This is the change we just made so we want that as well This we don't want Um, so let's commit all that And we built So Update dot clock Blah blah blah. That's fine It'll format stuff because I don't format things perfectly Oh, we should make a pr for that So here you can see that like we carry our own branch of the idf with fixes Isaac ben says so if we want to contribute an issue with uh milestone 9.0 Do we need to pull from main? Not necessarily. So if it's marked with milestone 9.0. That's really just a Like we want to make sure and look at it on the Adafruit side before 9.0 But if you would like to see if the fix If the problem is in 8 2 and you want to fix it for an 8 2 release do it in 8 2x first Because uh every so often will merge 8 2x back in the in the main So all the all of the fixes you do on 8 2x will get moved over to main as well And that's the easier direction to go. It's it's a little weird You have to basically have two two copies of a commit if it goes in main first So back going to 8 8 2x first and then in the main is is easier than the reverse because we don't want to with With 8 2x changes. We're okay getting them all in 9.0 but with 9.0 changes we don't want them in 8 2x so it's easier to go one way than the other Yeah, so if it's in 8 2x and you want to stable anytime soon, then it should go in the 8 2x release branch But I mean it shouldn't be that long until well, hopefully Dan's actively working on the 120 merge So we're hoping to get to the point where we're starting to do uh 9.0 alphas again It's kind of like That'll be good because then we can all do all of the mpy and bundle structure as well So it's it's something we want to do for sure okay, so This pr we'll we'll kind of want to wait For the idf 5 circuit python pr until this is in so If you're having fun with main or if mains working just fine then that that's fine We can we can if it fixes in main We can always cherry pick it onto 8 2x. I mean it's a little annoying, but If we find that we need it in 8 2x, they're like we have options Okay, so now I made that pr I made I haven't made this I haven't made oh wait. I did I did make this commit. This is I just made that commit and now I'm going to push that to my update idf branch Which is what? This ci run is running off So hopefully all the boards will build We'll update the idf Commit once the idf changes are merged in and then it should be ready for pr Hopefully hopefully it'll be ready for pr I know it's not perfect, but I've been working on it a while micro dev did the vast majority of work already So yeah Let's uh, any other questions or should we try to do 5 1? I don't know exactly what is involved in 5 1 But this migration guide will tell us Gcc Is upgraded which should be fine We might need to do this pulling items are deprecated Like there's not that many changes I wonder I want to try this. It might be really quick Like this this says there's not that many changes. So it could be Free art us now always uses internal memory power management stuff Okay, this should be this could be really quick um So I definitely I want to give this a shot So what do we have to do? We have to I'm going to just uh switch myself to an update idf 5.1 branch And now I'm going to go into esp idf and I'm going to switch To a circuit python The 5 1 branch And I'm going to create that LaShonda asks, uh, do you do local Completion with a native idf install or using a Docker image? I am using native idf Yeah Yeah, so usually when I set up I'll do uh, and I use fish. So it's a little weird I'll do export idf path And then um, and then I'll do dot export Dot fish and then the first time I use one and actually we'll have to do this right now Um, so let's Let's close these So yeah, I'll have to show my idf setup right now actually So because we're going to want to do a Get let's see whatever remotes are so we're going to want to pull Get fetch expressive And I don't actually care Usually we don't track releases. We we track Release branches of expressives um So so my goal is to switch us from the release 5.0 branch to the release 5 1 branch So what I'm going to do and I think If we see our git log Um, we've got a couple of that uh fixes that I've done Um, and then there's more so I think we want to get fetch Unshallow That should remove this grafted thing And the reason it says grafted is it's just an optimization for um, It's an optimization So that you don't need the whole git history Um, but that makes it harder to do Rebases which is what I'm about to do. So I'm going to rebase um These commits after so you can't see where I'm pointing Let me point with my mouse. So here is a 501 tag So this is an official release from expressive and then everything above it are changes that either micro dev or myself Or the folks that like did the changes that micro dev pulled in Have done on top of it. So there's just a few fixes that we carry And now what we want to do is we basically want to rebase so we want to do these four changes But we want to do and maybe we'll just do it as a as a Kind of catch all again But we want to do it on top of 5 1 and not 5 0 So we should be able to do git rebase I And we can actually use the expressive release 5 1 Let's see what that does invalid upstream. Oh, but I have an extra e So I started typing it and that doesn't look right So that's not right. That's too many way. We should only see four things there So now I'm going to do git rebase abort And hopefully that'll send us back to where we want to be On to I think we could do on to and then um The what was it 5.0 1? There we go. Holy moly. I got it right. Um, so it's That Finer syntax is saying where do I want to move it and what am I are my existing changes based on? All right, so it applied cleanly So now if we do git log we should see That this is the latest change to 5 1 and if we go to Express is expressive idiot IDF and seed commits we can see that this is the 697 is the latest from them And now these commit hashes will have changed because they got rebased Um, at some point there's a they did a 5 1 1 update, but I'm not sure where that was So if we look at here Maybe they'll show us where the 5 1 1 tag is. I don't see it. There must be a lot of changes Anyway, so I think we're in the right state Git rebasing seems like black magic to me So rebase the way that I like to think of it is that you're replaying Changes that you made down something on something else. So it's kind of like a it's a It's it's like cherry pick except it's more than one commit kind of all in one go So cherry pick Chate takes the patch from an individual commit and tries to apply it on top of where you are now Whereas rebase tries to to take a number of commits and do that Kind of in sequence. So it's replaying all of the commits on top of a new starting point Okay, so we want to do the export again and now we'll do install so because it said it uses a new gcc We'll do this new install And that's why I started a new terminal. So I didn't have State from my old version So here is it it's installing all of the new What if this just works should I just do a 5 1 update then? I mean if if it's really simple then I might Maybe I should just do Instead of doing two prs. I should just do one. I could do it as two commits But like if if nothing Significantly changes and maybe it is easier Let's we'll find out All right. So now my environment set up. I did the install and I did the export and It's telling me there's old versions of stuff that I could delete that I probably should but I do move I do shift around So let's just Make A board let's do this quality one Because that's what I have plugged in The tab probably doesn't work very well But we're going to do a clean first I because I don't want to Pull in any of the idf stuff And we're in a new python environment. So I've got to install the Circuit python requirements because The idf sets up its own python environment. So we have to install Our dependent season into that as well. All right. Well It doesn't work Um So this is telling me to update some modules So if I look at get status and you notice that here it's not green. It's red Um So I need to do is get some module update All right. I always do this. This is the worst I need to figure out how to take commands that don't work out of my new history okay, so embed tls has new commits and modified content. So let's just Switch to it. I think I turned on some debugging or Let's see what happened. Yeah, I just Changed it so it printed out correctly So let's just do some module update and knit again. So we get the correct version. Now we're green New project. This should be quick and easy and gratifying and then it doesn't work at all All right, it looks like we're up to date on the idf side Uh, we have the correct sub modules. So let's do A clean again And then try to build it I just want to start from a Like a blank directory. All right We have things to fix Silly me. I thought it would be easy Okay So these this looks like include issues. Um, this can be So we have this like weird hybrid builds Um with the idf so We'll build a bunch of support libraries using the idf tools and then we'll build circuit byte. I'm using our kind of like normal make setup um And so and we link in that normal make setup. So we have this big long list of This big long list of like State that the idf would manage for us, but because we're using our own link step. It doesn't So, uh, it include files is one of the things that it, uh Doesn't usually we don't usually update automatically so Oh, and we did see that the le ledc thing did change A lot of these are the same thing So usually the way that I'll figure these out is by This is just I don't know why that debug shows up So let's just start from the bottom So let's try to find this file Like it it might have changed Like maybe they updated free rtos or something and So here we can see that it's in, um idf components free rtos esp editions architecture blah blah blah Free rtos uh config arch so like the free rtos part is the same um But our Included for it must be wrong now. So let's let's see what we see Our include path so here we go Free rtos Yeah, so here we can see that we have this esp editions But it doesn't have architecture Or it's like kernel portable Whereas we now need editions arch Architecture include I wonder if that's Well, that's free rtos kernel. Let's just take a quick glance and I'll do this in Here I I want to know if like I I need to remove Like should I replace the ones that we have or update them or I should I add an additional one? So i'm going to look in components free rtos esp editions so there's no include here anymore So These two includes aren't valid Or no i'm not in esp editions yet. Okay, so there is an include in free rtos So I think What I want to try is I want to do arch adf target And I want to give it give a try to remove that and see if it works Oh, I got so excited it's just gonna be so easy Okay, so this is Uh We saw this file, didn't we? This is probably because we Changed it and where the file is I don't care what references it Okay, so yeah, we I shouldn't have done it that way and we saw a bunch of errors, but hopefully it's a different file nimble transport ellipops GPIO H Like at some point we're going to have to update from legacy apis So there's GPIO driver slash GPIO H is in components driver GPIO Which I'm a little surprised components driver include driver components driver ESP private so We can circumvent it by we could add driver GPIO include driver And this is all stuff we have to deal with because of our like hybrid system components driver So I think it probably means that we're kind of circumventing The notion of private We haven't gone full-on C make and every time I every time I look at C make I'm like, why did I have a new language and the language doesn't solve the problems? I think we need to be solved it doesn't solve problems we have um And I talked to other people that use C make and they said I don't like C make So it's just like hard for me to pull the trigger on that Even though tax been moving Tack has been moving Tiny USB over to it Okay, so this is a similar change, but for the two wire TWA I which is the uh Can it's a different name for their can peripheral TWA I Do do do so they move some files around blah blah blah go with the one that we see Same thing Do do do I bet you that's what this problem is too C make is bad, but it's much better and cleaner than make uh Yeah, I'm Part of the reason that we're still on make is that like our make system is Kind of hairy, but it's hairy in the same way across all our ports Like this giant list of includes from vendor SCK is like a common thing So it's like It's bad, but it's consistent and consistent. It's really valuable So I bet all of these um component driver things are the same problem um Like I bet this spy stuff is the that way too So maybe what we do is we do components driver So we look for components driver in common. How and we'll just update them all There's not that many dot clock frame buffer has a components driver PWM out as a It's in the header This is a little inconsistent Whether you use the full path or the like include path I do well I realized I basically navigate my code by file path a lot And I don't think that's true for everyone But because I do I bias towards having like the full path here Oh, now I can do Da da da da da da All right, let's do a build again. I want to make sure I'm making the right progress Do do do do do do I don't know what this L what ops thing is So it's not in examples L what port include is where it is So let's go back to our make file components L whip include So I wonder if Let's pull up our food. So there is an L with L up include L what Port So there's no esp 32 x x anymore so I'm gonna Where was it porch? Let's guess that we take that esp 32 off. We're gonna have other problems, but that's fine This is like very methodical sorts of stuff to fix So now L with ops is unable to find arch sys arch H So let's fix that first because that's related to the thing we just changed So it's in L what we don't want tests. So it's in port free our toss include port Free our toss include Yeah, and if folks have questions please ask Otherwise, I'm just doing the like pretty methodical Fix all the compilation issues Uh We're looking for cc.h Um, and that's okay. So that's in this esp 32 xx So Port free our toss we probably want to We don't want that old one because that one doesn't exist anymore They must do more and more development on Linux Because they're factoring that out So the nimble transport thing is still an issue and then more driver stuff I bet the transport thing is similar That there's like a linux transport and uh So these ones we're looking for exact stuff So we want this last one Yeah, l whip is the low I don't actually know it. It's an ip stack I forget what it stands for Okay, so now we're looking at bt host nimble Look at this host nimble nimble nimble three nimbles Transport include one two three Include I bet we still need it Of course, we don't have a good way of knowing When we don't need it transport and let's be better and alphabetize that Do-do-do-do-do-do-do All right, we're doing driver stuff This looks like all driver stuff Let's fix the driver includes Plus I owe you are starting from the bottom again My I'm gonna hazard a guess and say it's you aren't I wish there wasn't this giant blob. I'm not sure where that giant blob is coming from Oh, it's from this called process error Which is being oh, it's a failure of make cuester definitions So the cuestering process is is doing all of this include stuff And then it's failing and raising an exception Okay, so driver spy master Um, so let's see. Hopefully they renamed it But they didn't It's in driver spy So we'll probably just need to add more here and i squared c So again, I'll just assume it's us touchpad It's part of touch sensor. That's why I didn't I wanted to look it up And I think the other one was i2s types, right? Okay, it's also under i2s Let's do that too Oh, it's like I feel like I keep streaming because it's like a reasonable temperature in here Oh, so it still didn't find touch sensor This one we have to change in bus. I am which we have open Is in driver. Let's see Thought touch sensor should work. I thought I fixed that. Oh That was less wasn't it Touch sensor didn't work. But look it fits almost on a single page We've got alarm and digital in-out to fix on our side And this is the argument Why you shouldn't put the full path Like the full path I like to Know where things come from But we should standardize it. There's really good tooling in the claim world for knowing like includes that are used or not used Is like that So why is this touch sensor one not working? It's possible Oh there's a Port specific target specific one That's why touch sensor in that Do do do do do do do so now we're only missing espbt.h We're down to our last one Our last header that moved on us Okay, so now it's in espbt include target include that's bt include id of target include Interesting, but it's not in the s chips at all Why is that? This espbt chip bt header is not for the s3 It should be there for the s3 Let's investigate Because we're building for the s3 and that's why It's a problem maybe they did some c magic c C make magic to like share c3 and s3 or some some garbage like that Okay So we're now looking at bt Components include And there's no So let's see what c make list is doing Ah, yeah, so here C make is saying oh, and if it's an s3 then we include the c3's directory Because that makes sense Like you couldn't even sim link it Or how am I going to fix that? Well, I think I will do bt id of target We will say bt if equal id of target esp32 s3 Then we're going to make bt id of target equal to esp32 c3 otherwise bt id of target equals id of target I mean it makes sense to have one file but when you have things split like that It should be consistent. It's going to ruin my kconfig as well My kconfig updater Assumes that hey, there's an h4 in here I haven't seen the h4 before did they announce it? h4 And all the readme's they say like the h4 Oh, and nobody replied They haven't announced it yet These are modules but with a different name Let it fool you hardware h Yeah, see so they only say h2 here Well, there's probably an h4 at least that they're prototyping h2 Yep, no h4 yet Oh, so this is um A warning that we saw in the migration guide Um About address checking so let's see what they say Warnings address enhanced version of address warning which is now more eager and detecting the checking of pointers It's an array and an if statements if array Eliminating the unnecessary checks resolves the warning Okay, so let's take a look at um Bindings like I'm all forward deleting code Lightweight IP, thank you Lashonda. Sorry. I missed that earlier I expect to make yours as expressive or trying to beat stm with the number of product skews they have I don't know. I feel like stm is a lot like I showed my boxes. Oh I don't know if unexpected makers saw my boxes. I guess I showed it earlier But I've got one two three four five six seven eight nine Nine different st boxes and that's just for the like stm 32c0 or g0 or g4 so I don't know stm has a Pretty good grip on that Okay, so esp now pure 86 it says pure info Will never be none. So let's just do that And it should go away And then peer at 199 Set encrypted. I wonder why this is here. Oh, this is saying LMK is none. So let's peer make new Maybe what we need here is just a self Peer Oh, no, it's saying it's part of a struct and it's in the struct there So it's never going to be none I guess what we should do is We want to set pure info That LMK zero to equal the null character Oh your own sorry I need to work in on a big screen Right have the code is under chats Francois ucc code. Yes. So this is the c code underneath circuit python, which is python on microcontrollers And uh We're working on updating the esp idf to 5.1 actually We finished finished the work on 5.0 and just wanted to see how far I could get on 5.1 Which turns out to be pretty far Um Okay, so we always know that like we have this LMK string Um, but we're I'm gonna set it to null And then Get bytes length How do we know we actually set it because it's possible the encryption is Get bytes length like should we just assume that if the key is Zero, what are the odds that the first byte of an encryption key is zero? Maybe what we actually need is Um, oh no We don't need this what we need to say is in this Set encrypted Whether or not to use encryption Need to sleep. Good luck. Thanks for stopping by Is there a default value for this? Is there a a flag for an encryption key that is not valid? I don't know this esp now stuff I'm k esp idf Oh dear esp wi-fi It's an exactly one spot So I don't yeah, I don't know how It's a mark like to say that you Didn't set a key like it's trying to check But it's not or what we could do is we have peer info here Um, we could just add a bull that says Key provided LMK set and then in here Of course, this is all We'll just track it We'll set track it separately and try and instead of trying to use some like fancy Sentinel value The longer it takes the better it's working, right? The builds do take like a minute and a half When they're not parallelized at all No return function does return That's not good common, how I had I was seeing this earlier 216 It's marked no return But this esp deep sleep must not be marked as no return In general the function does not return but if the sleep is rejected then it returns from it Okay, so we can't mark it no return because we may actually return But it doesn't tell us how to detect whether it was rejected Oh, all the other implementations don't return Oh Okay, so I guess what we could do is Instead of doing that We can We could just while loop But we could does reset into Safe mode nor return It's no inline We'll see if it fixes it if it returns it was rejected Unfortunately our api doesn't account for return. So how do we Handle handle an exception that we're not It doesn't give us a reason It doesn't give us a reason it was rejected which would be nice I'm pretty sure that we could raise an exception as well But this is going to be called outside of the vm. This is called after Like do we shut down? We could do light sleep The light sleep returns We're building something Building the idf stuff No such directory Oh, I think that worked Uh So there's no lab coexist for the s3 Ah, it's moved It's in esp coexist Coexist would be too long Okay, so this is in nice It would be too easy So we want to move this out of binary wi-fi blobs And we add it Getting closer. It's true. We're to the linking step. It's true I have a c6 here Although we have 20 minutes till my two hours is up I do feel pretty good. It's only 80 in here Oh Undefined references Lots of them Load segment with wrong permissions MMU map and net ESP MM So I think this is um This components to link Bits that we must not have so like this ESP MM is probably new So let's just try Fitting it in here Were these library changes mentioned in the migration guide? Um I don't No I I glanced at it, but I didn't look at absolutely everything. I don't think No, I I did look at everything. It's it's not Which I'm not surprised by Lashana says coax is the industry abbreviation for contending protocol accommodation I'm sure it's covered by cmake tcd But we're weird we're weird here and we just do it the manual way Okay, so there's Maybe we need to do the same thing for coax Like I bet there isn't ESP coax component So link as well Like we're linking in the binary blob, but we're not linking the The one we actually should build Do do do do do do Another section called libraries in the guide Yeah, but not under migration Multiple versions with different numbers of handshake wires Yeah, I like that. I don't have to worry about it. Hey We gotta build All right, let me put That's pretty good I don't think it's a debug build though. I should have done a debug Let's put top bottom to the serial by id usb silicon labs So this is the probes that I've got on the board And then let's do port equals that and cleaning Sometimes I do cleaning flash, but it's slow Let's do a debug build Now the ops build works Hopefully the debug build will work too We'll compile too Yeah, bluetooth and wifi is not stopping on each other Yep, that's what I figured Although I guess the hchips are bluetooth and thread or something, right? I wonder how hard the c6 would be to add It showed the kconfig live stuff I expected port 295 I think this is an error that's in my I think I added earlier the warning about jtag config pins Oh, I'm outside of my port That warning warning Yeah, see the up arrow. That's why I didn't uh Didn't want to do the cleaning flash because I would have just I started it all over You only need to clean on the expressive port if you're changing the idf So like Because we're not using the cmake CMake through and through we'll only build all of the libraries from the expressive If If we're clean And then Flash Boot crash as first result. All right On this one or on the c6 That's why I'm doing a debug build though So I can see what crashes I I get Any questions I can answer while we're waiting for it to build I think that might be all queue string stuff right at the start. It's real slow Probably do h2 just because I'm I'll be there even though the ble is not gonna work that well and the workflow won't work I have h2 board dev kits for the h2 as well. I think Flash flash flash flash flash because everything changed right. Let's reset and see what happens Did I bump it gpio 42 in use? So this is yeah, this is the jtech thing Um, but we did get a drive and it didn't overwrite it either. It's a little slow Ha ha ha It worked. It didn't crash Yipee And this is the module. I don't think we can do it 120. I think we can only do it at 80 um Let's just do a quick run of Let me grab my Let's do the wi-fi test script That I've been running I have a folder I call random backups. I ran the backup Just going to drag code settings.toml Which has my wi-fi settings in it and And this won't change at all because um, we're getting the debug logging there too So let's open the actual cvc So you can see we're in the repl and it's going out the urport. Oh and interesting. We're getting the esp logs Okay, so now it's doing wi-fi And we rebooted but we did get so wi-fi status is here in the title bar So we do have an ip Oh, and we hit an assertion Because we're doing nano interesting Unsupported format character Hmm. Well, I'm glad we had that open ship it. Well, I just crashed it. So Not quite there yet And our and our usb is dead Um unsupported format character failed the mp print 585 That is weird because I ran this test assert That is really weird Where are we we're getting in it and it doesn't It doesn't tell us what the character is Is there a way to get an assertion a call stack on an assertion failure? I would hope so Oh, I kind of expected it to honestly, but because There's a panic handler You can just do another flash I'll reset into downloader The answer is I don't I don't actually know a quick way to get a call stack We download Restart I'm hoping that Format character l what it looks like, um Maybe It's the info print itself that is failing Feature complete now. It's just bug fixing. It's always bug fixing We can just make it not crash We can remove the assert But yeah a backtrace would be nice There is a way to one like there's a Like there's a function call. I think we can call Like there's this esp Trying to look at the headers esp debug headers Print the backtrace out of the current stack 100 isn't just in like debug helpers. Yeah, that's a good idea to get logging though It looks like it doesn't it's adjusting the original It's not holding on to the original now that would be too easy. I could log it. Yeah, that's true We hit save mode that time memory access or instruction error It's weird though that we're not getting in that panic handler Like we're in debug mode. We shouldn't be Going all the way around the safe mode Here's the I feel like I'm so close Yeah, maybe I should just do it as one I feel like I'm close And if I'm close do I really want to do a 5.0 and then a 5.1 update I wonder jeff changed the thing so that I'm a I'm a little worried we're infinitely recursing and if prenefs Which kind of would explain this Have a good one. I'm an unexpected maker Thanks for stopping by Oh, yeah, I'm I'm out of time But that's what I suspect what is happening is that we're like doing some sort of inception where um The prenefs from the idfs code is using Micro pythons version And but it micro pythons version doesn't support all the features that the idf is using So another thing we could try actually is just turning debug back off now that we know it kind of works um Because then we won't use it hi, aid But that's what that's what that feels like to me is it's it's infinite recursion Like we're calling ourselves to format the thing to say that we're formatting the thing. Oh, I didn't clean today That was way too fast Okay, uh, I'll start to wrap up even though we're gonna I want to see if this works um If you just joined welcome. Sorry. I'm about to head out Uh, this is a deep dive, uh, where I scott work on the core of circuit python Usually fridays at 2 p.m. Pacific um here on the aid of root YouTube streaming channels Uh, if you want to know more about aid of root, you can go to aid of root.com You can purchase hardware there. They pay me to stream. They pay me to work on circuit python. So Please support them for that And if you want to hang out uh on the discord server, which is the chat above me You can join by uh going to adafru.it slash discord the nice thing about that chat is that it sticks around after streams And a lot of circuit python development happens in the circuit python dash dev channel So that's whenever somebody's trying to get into the hacking on the core and building circuit python themselves I recommend the circuit python dev channel Me and the other folks that work on circuit python are Paid for well Those of us who are paid by aid of fruit and those of us aren't um are generally around During us work hours during the work week Um, so that's a great place to get help of things as well um I think that's mainly it. I think next week will be on for normal Um, so check that out as well And i'm stalling because I want to see if this works before the stream ends I have a tick measure to fidget with Um as well Oh, can I run under gdb and have a break point? I've not used gdb with expressive actually Um, I expected the back the back trace feature to work But I think like I was getting it. I think we might and told it to use our own version of printf And I suspect that's the problem So figure out why Figure out why that is It might be like a microphone setting actually all right. Let's see what happens Hey, there we go All right. This makes me wonder if this is actually an issue of five one So it looks like I don't want to jinx it But this is this is doing pretty good I think the reason that it dumped into the repl here is because I do have it It's still set up to use the console and when it's set up to use the console and the Rx pin is floating it gets Noise on the urt, which causes random characters to come in and get you into the repl So I actually probably want to turn that off I think this setting that is causing this problem is Because I know I know jeff changed this stuff a little bit In the qualia build there's this sdk config for turning the urt on and by default are So they did that and then rebuild again, which is going to take a while but That'll stop the the circuit python serial output from going to All that and there's also this console Which I don't want as well, but yeah, so that is Exciting stuff I it does make me feel like I want to just skip straight to five one Like if the wi-fi is working, that's a really great sign Um, so yeah, maybe next week we'll have a pr for five one um, I think Because I did a bunch of k config stuff as well. I'll probably do h2 and c6 just uh There's um, like shared sdk configs Per target, so I kind of want to make sure that those targets work Um, I wanted to do that with five one, but besides that it's looking really good to go into five one Uh, which is great news, um five. Oh was a huge thing and and um, I should also just Thank micro dev for the work that they did to get us On five one. I didn't tell on five. Oh, I did not have to do a lot micro dev Did a lot of the hard work for that So I'm just they're they're a student so they're They're uh at school right now, so I'm picking up from them and finishing it. Anyway, uh, see you on discord See you next week. Uh support me through by through By supporting anifrew blah blah blah anifrew.com. Thank you all have a great weekend