 This works. It's been a few weeks. I'm still getting everything settled but we'll get things going. Hello, hello, let me know how it's going. Restrain chat down here. Hopefully the audio is okay. There's some sirens right now but it should be pretty quiet still. And I'm also like my window is up above a fire extinguisher place and they like vent it out the top. Some too. Jeff hears me. Great. Thank you. Hello, DCD. Restrain down my private. I think we're going. I think I did everything on my list. I updated the titles which is what I sometimes forget. This is not John Park's workshop. This is deep dive with Scott. So I guess we'll get going. I hope I don't have it quite the way I normally do. All right. So let me say hello's and then we'll get started. So hello, Jeff. Hello, Todd. Audio sounds good. Video looks good. Great. Dexter, hello. Snowy afternoon in the Beehive State. Tim did a great job. Yeah, great. That's a great segue. Oh, hello, Beata and Dave as well. First and foremost, a huge thank you to Tim, aka foamy guy who has really held down the deep dive fort for me when I've been able to stream both when I was on paternity leave with the first kiddo and also in the last few weeks. And I'll let you know what's been going on. But first let me introduce in case folks don't know. Hello Darwin and Ushash. Welcome. So my name is Scott. I work for Adafruit. Adafruit is an open source harbor and software company based out in New York City. I work remotely for them. So I'm actually in Seattle. So probably by the time the stream is done about two hours maybe as as long as my voice holds up. It'll be a lot darker probably because we're in the really gets dark really early period here in Seattle. And what I do for what I do for Adafruit is I work on Circuit Python. So Circuit Python is an is also open source. It's a firmware or a piece of software that runs on little tiny computers called microcontrollers. And I always when I say that I always look at my desk and see what I have. So here's an ESP32S3. It's got a lid on it. So there's a smaller chip in there that is basically a full computer. And this is a sneak peek. This is a prototype camera board which I'm holding my finger over the camera here. I think no the camera's here. Sorry I haven't actually used it yet. I haven't tested it yet. Yeah I think the sunset let me see my phone has a sunset time on it. Sunset is at 419 Pacific time tonight. And we've got about three weeks until that starts to turn around and it gets lighter again. So yeah it's pretty rough. Pretty rough. Although this is probably the first time in my life I've appreciated getting having it lighter early in the morning because that's great not John Park's workshop. Because I have a little one. I have one girl and he likes to get up about like 637 o'clock. So having it lighter in the morning is somewhat nicer. Before I had a kid I would just sleep through it. And I was like bye I don't care. Anyway so yeah thanks again to Tim who's been covering for me the last few weeks. And we'll probably cover again kind of going through the holidays. Usually I'm out in the holidays anyway so that's no surprise. But I wanted to stream this week because I kind of knew I would be able to. Or at least I had a very... Oh Jeff I'm sorry to hear that. Used to live Pacific standard time but not since losing my spouse. Being sad is not why I'm here. I got a little bad news for you because I have something sad to talk about that I just wanted to let everybody know. It does look like I'm clipping on the OBS side so hopefully I just moved it down a little bit. So hopefully that'll be a better time. So the sad bit and the reason that I've been out is that my mom got diagnosed with terminal cancer. Basically like late stage pancreatic cancer which I did not know. So I didn't fully appreciate how bad that is. So she's still alive which is good. So she got diagnosed at the start of November and was in the hospital and then in hospice and actually didn't... She thought once she left the hospital she would degrade and that's why she went to hospice. But then she was at my house for a week over Thanksgiving which was amazing. Had lots of time with my family, with my mom and my dad and then I had a sister and her kids and they were sick. So my mom actually is at home now which is great. She got to go home which she didn't think she was going to be able to do and see a bunch of friends there as well. So that's why I've been out is because I'm in this mode of like I don't know, like I'm going to spend a bunch of time with my mom, not every absolutely every waiting minute. Obviously that's why I'm here. But it is a big unknown kind of how she'll be feeling in the next weeks or maybe months. So that's definitely my priority and Adafruit and Phil and Lamor have been super supportive everybody at Adafruit and in our circuit by the community is super supportive. So if you want to help keep that good thing going you can always support me and Adafruit through Adafruit.com but I know that's a little bit of a thing. Yeah thank you it's been... November was really rough. She was in the hospital for like two weeks and then hospice for a week and then my house for a week. But it's been really nice to spend a lot of time with them so that's been good. Yeah so thanks again to Tim for you know and Adafruit in general for giving me this the spaces I've needed it as our families grown and as going through this. Grab that with both hands yeah totally. Jeff says I wish I could tell you it'll be okay but it's harder than I could ever imagine. Oh yeah I understand that. I understand that I'm I'm still in the start of it for sure yeah but I know we'll get through it. That doesn't mean it won't be hard but I'll try. So yeah lesson is spend time with your family tell them you love them because you never know. I'm lucky enough that we you know we know ahead of time so we can spend lots of time together first. Okay I think that's enough of the sad part sorry Jeff. I have been so this week I actually worked more than I've worked in a fair number of weeks I think went and saw my family on Wednesday so it was out Wednesday but worked Monday Tuesday and yesterday and today which is great because I like my work so yeah we'll see what next week brings deep dyes will be kind of like as things happen we'll see and I'll work with Tim on as well he's super flexible so expect to see Tim on deep dyes some more he does really awesome work he's been working on circup which I've like it took me a really long time to kind of get on the circup train so if you don't know circup is a python command line program that runs from your computer and can be used to automatically update libraries on your circu python devices and it took me a really long time to get on board with that but I started using it it's really nice it's really nice like copy a code.py over and then you just say or you can do like circup install it's kind of like pip like the the c python corollary is pip but circup is great too so Tim was working on adding web workflow support to circup so that you can use circup talking over the wi-fi network to a circu python device which is going to be super handy as well and so that's what I was doing earlier in the week one thing that LaMoure and I had been kind of had on our radar to work on is improvements to the web workflow yeah hats off to Adafruit for their unsurprising compassion and empathy yeah they've been great um I really like I got so lucky with this job like the timing was perfect the topic was perfect it just worked it's worked out so well um so yeah yeah very lucky not everybody's that lucky but I do now pay into like Washington state which is the the state I live in has a a paid family leave program and as I'm technically self-employed so Adafruit contracts my company to do all the work that you see um and so when I was when we were expecting our first kid um I opted into the paid leave and now that paid leave it's a great program because it gives everybody in Washington state that flexibility of like if you need to take time for caregiving or you need to take time for having a child like that's a that's a cool program and as a self-employed person you opt in so I've opted into that which has been great um yeah so one thing that was on the radar was uh spending some time improving web workflow uh LaMoure had designed LaMoure Lady Aida had designed a board to go into that like children's toy um and she was hoping or thinking that it would be the first kind of product where the expectation is that you're only communicating to it wirelessly so she was really spending some time with um she was spending time with uh the sorry I just looked at a list of files on a random sd card and thought is there anything on there that I shouldn't show but I don't think there is um I saw this like shop nearby online which was like a product I did project I did like briefly during the pandemic which is why I triggered my brain um so she was doing web workflow for this uh playback uh PCB and she found some issues with it including reliability so I uh one of the issues that Melissa had filed after working with LaMoure um had to do with reliability of uploading large files um and so some of the work I did uh this week yeah we all know if you don't know deep dives include tangents and I didn't say this actually I don't think um if you want to take me on a tangent you have questions uh that you think I could uh if you have questions you think I could answer then um yeah let me go ahead and ask them I'm happy to wander um hopefully that's charming and not annoying I think the benefit of deep dives is that you get to see every single step because I do it raw and unedited so um put on your snorkel and dive with me um and now I lost my train of thought um anyway I was working on web workflow um so I did a few changes and maybe we'll switch to the desktop here and no I don't think my finances are here although I do have a project that is finance related web workflow thank you David very surprising things on those thumb drives oh yeah yes okay so let's switch to the desktop before I forget and I'll switch this one out of the way we have a lot to a lot to talk about I'm gonna wander I got a new laptop I we could unbox some boxes because it's been sitting over there and I haven't done it um but we won't we'll resist the urge at least for a little while so there's a couple fixes I did on the web workflow so it's not in the latest alpha yet um but if you do use web workflow it'd be great if you could use absolute newest and I think we'll probably have another alpha release next week or maybe even a beta um so circuit python 9 is the next major uh version of circuit python that we're going to release and we're I was talking with Dan and Jeff and I and and we kind of like had the feeling that it's time to we're we were in this mode of like changing everything and adding stuff and um but Dan and Jeff thought it was more time to like strip down and move to this like bug fixing mode so that we can get 9.0 stable we have 8.2 8 already and and that is our current stable release but uh we're going to have the next eight a box I won't tell you people don't know what eight a box is um sorry uh don't let me spoil it anyway for the next one we'll likely need well people will want to use nine um and so getting 9.0 stable is going to kind of be the next the next thing uh for us to do and working on smaller tractable issues is like totally a better thing for me to be working on right now because I don't know what my schedule is and my brain is not like my brain can't take on two weeks of like solid work on a topic right now so it's a good time for us to pivot kind of in the bug fixing mode and I think I think we'll call those betas and then um and then uh like when we don't think we have any more bugs we'll do a release candidate and that's when it's pretty much done um so we did a pass through the bugs today and we had four left forward 40 40 bugs left um to go over so uh hopefully we'll get through those pretty quick and uh get a release candidate out which will be awesome uh anyway so packed the tangent uh sometimes I think of it as popping off the stack so uh PRs I did this week um was mainly two fixes um one was just web workflow improvements um and there's a bunch of different things there so when you close a socket there's not really a way to say flush like don't close until you're done but um there is an option that you can set to basically say don't queue the next thing that I give you um so I did a lot of work in the web workflow to designate kind of like the last bit of a string that we send out so that it hopefully flushes like error responses in particular um before closing the socket um what I was seeing is that like some uh some stuff was getting an error response but you'd only get part of the error error response um so that was one thing I did um this was all around lost twitch okay let me just take a peek at restream restream is going it looks okay destinations let me see it it looks okay on the restream side perfect okay thanks for letting me know tyeth I can't take a peek I have it open and I have a second browser kind of under here um that I can check it out so I was debugging uploading files that were too large because that's pretty concrete sort of like let's make this work better and I saw the partial error responses and I also realized that so what it does is it knows how big file is up front it tries to take if the file exists it tries to seek uh till the largest thing which actually will like will tell you whether um there's enough room or not so that kind of like sets the file size the appropriate size and then you seek back to where you want to write files as it comes in but if it's too big we were seeking as far as we could but not all the way and I wasn't resetting it back to the old state of the file so I did that um also if uh the web browser uses a put call and so it sends the whole file so you'll see this is this is kind of unfortunate but basically even if when you on the web browser try to upload a file that's too big it takes a long time to know it's too big because the the device still has to read all of the data and just throw it away unfortunately um there is a way there is a part of the HTTP protocol that um curl will do that says like hey this is about this is how much data I'm going to send you is that okay and you can escape earlier but browsers don't do that so if you upload a large file that won't fit it will still take time to discard but it should work correctly and I got it to the point where the browser did get the response correctly which it wasn't doing before this um I bumped the the API version number to three uh because I changed there's um I think the funny guy added this there's a disc info dot jason file you can request from circuit python and it tells you how how much disc you've used and how much you have free um and I made that a list because uh one of the other items on the like web workflow to-do list was to support accessing SD cards um from the web workflow so that if you had a large file like an audio file and in the the toy case like you could use web workflow to upload a large file directly to an SD card um and that is something that I'm still kind of working on um so preemptively I changed disc info dot jason to a list instead of instead of a single object but it only returns one item right now I have a working or I have a work in progress branch that is trying to get SD cards working but it doesn't work yet um that's one thing I did and then the other quick thing I did is there was also a bug from Melissa about um if you do a very simple while loop uh like a while true print sleep uh and then do control see it doesn't work um and this is something that used to work in early 8.0 and then broke along the way um I figured out what broke it there was some reliability changes that somebody actually someone else actually made a web workflow that um had broken this and so this is a simple fix to make sure that we call the web socket background stuff every time um so hopefully that'll work better as well and then yesterday I was working on the SD card stuff that is we might get to today um but I'm not actually sure um there's a couple of different code ways we could go um and also if people have questions just ask um I'm happy to wonder in any direction you want to you're curious about um but there is a little bit of other exciting news which was surprising um so one of the things that we did in circuit by the nine is we updated from the ESP IDF four to version five and version five uh or the IDF is like the vendor provided software software for the expressive chips and we had updated already to 5.1 which is like kind of the latest but since we did that they released a minor version of 5.1 so they they've released two weeks ago they released 5.1.2 um and so I have and the thing that I kind of want to finish is a pull request that is updating uh circuit by the main to 5.1.2 hoping that you know maybe there's some latent bugs that people have found indirectly through circuit by bond that just magically get fixed um and it's kind of nice like we're still relatively early in like this stabilization process and also updating minor minor versions of the IDF really shouldn't be too destabilizing um so I'm working on that I just started working on it unfortunately there's some changes that are taking more code or like flash size space so that's what I've got to work on the exciting part about this though is uh leave it to Dan to say like let's read let's read the the release notes um for it so in the release notes which are here I was just like tooling it around like okay these are thread changes we don't have thread support yet zigbee so thread is the thing that underpins the matter spec I love but also fear when bugs get fixed automatically yeah it's true a lot of the bugs that we went through today we're just like some of them are really old like 8.0 bugs and we just had to say like we need to retest this we have a label for issues that just needs retest and actually if folks are looking to help that's a great way you could look at say what needs retest and see if you have the board and just try the try to reproduce it again because like more than half the battle I think of issues and bugs is just being able to reproduce it once you can reproduce it they're usually not too hard to usually not too hard to fix um anyway so I was looking through these release notes and I saw let's see so this is a lot of like c2 c6 h2 support which we don't really we support now but we don't really have any devices that use it like we have a c3 cutie pie that but that's pretty much it um this is controller side but then there's also blue droid host nimble host and somehow I saw this there's this thing here that says added support for dynamic services addition and deletion and I just went I did not know this was coming but this is the thing that has been holding up BLE support on the ESP for those of you who have wanted BLE on ESP this is the functionality that really hung me up when I was trying to add it because the way that we do BLE kind of assumed BLE would work was that um Cal blades asks is this video about debugging for raspberry pi this is more debugging on a microcontroller level if you're talking about raspberry pi single board computers um generally we're talking right now we're talking about expressive microcontrollers so esp32 chips um and we're probably going to end up just debugging uh like code size issues there's the exclamation points um yeah so dexter and Todd bot say this is pretty great for BLE yes so the way that we assumed BLE worked in the way circuit Python uses it is that um we'll start it up before user code runs um we'll start it up before user code runs and then we'll add the BLE workflow services or servers start those up so that you can get access to like the repel and the file stuff and then user code runs and once user code runs it can add additional services um to it that if you want to make those more services available now this wasn't supported when I went to add BLE uh support to ESP so I didn't realize that immediately so that's why you see partly part of that um part of that uh support in expressive already because like I realized this and it was like uh and and we kind of said like well like there are some uses where you don't need to create a service you just want to talk to another one um and so we kind of like and Dan just fixed it so um anyway this is the thing that was blocking like there really took the wind out of the BLE sales on ESP so uh I'm super I was super duper excited I just saw it a couple hours ago that they had added this um this support so we have this issue here it's 5926 and that's the tracking issue for getting full BLE support in the expressive port so if you want to follow along if that's exciting to you and you want to see when it's fixed this is the place to do it now I don't think I was tempted to jump right on it but the problem is that although that was that support and the idea for blocking the work that we were going to do for BLE there is more work on top of that to do on the circuit pipe on side uh specifically bonding which is like the encryption uh the the encryption encrypted like communications channels stuff um wasn't done either so there is like it's not a small piece of work to do um what is the meaning slash history behind nimble nim BLE I don't know it comes out of the minut project um which is pretty defunct in my opinion um minut has kind of had their lunch eaten by zephyr there was a point where it was like unclear which way people were going to go and basically I forget who I think it was Nordic actually Nordic kind of like just decided to go the zephyr route and that really put the I'm using this analogy again but um really put the the wind behind the zephyr sales when Nordic decided to switch to it they do a ton Nordic does a ton of work with zephyr um so I don't sorry I don't I don't know the background of nimble I don't know what to name that um but I like it because like my criticism of of zephyr and this is deliberate on their part is they're trying to be a very monolithic project basically like everything and all in one thing whereas with because circuit python is kind of its own monolithic thing it's really hard to integrate the two what we'd rather do is use something like nimble which is like a more standalone bili stack uh in circuit python so we had hoped at one point that we would actually be able to just use um nimble for all of our bili including the nrfs um which maybe we can I'm not sure I don't actually know release notes I don't know if the nimble dynamic services is actually for upstream nimble um host api additions see I think I think the dynamic services thing might be specific to ESP nimble so they have their own forked version of um nimble it's quite dead yeah when I see release notes that mention nimble I mean I also know that like um I know that the es expressive like it's under the bili larger header but then I also know that like they have two bili stacks in in the idf one is nimble and one is blue droid um so I kind of I already have that background so when I'm looking for it um okay Dave asks the question that I'm not really the person the answer says uh would adafruit industries ever design and have their own MCU manufactured I doubt it I think you know adafruit can play the role of influencing them more than doesn't really like adafruit itself doesn't have the expertise to do it like you see raspberry pi you know they they were doing single board computers and they still are but but like their background is in chip design like a bunch of those folks in raspberry pi trading like they used to work on chips for broadcom and then like and which is I think what Evan did and then he knew that these these chips have these like arm cores on the side and then he could make these single board computers out of it so they're really just kind of getting back to their bread and butter which is chip design um and the rp2040 is a great chip so so they have a first good showing um adafruit doesn't have that history right like like nobody adafruit has chip design background so I don't I don't think you'd ever see that like I I personally am interested in like system on a chip design particularly for FPGAs but that's not that's not a reason to like make your own chip um especially when the chips that are out there are great right like there's there's lots of good chips to to build upon and what the other thing is that you really need scale to make them economical um which is a challenge in and of itself I think largely largely adafruit scale is does not compare to like I'm going to make a microcontroller that goes in all cars or you know every iPhone or things like that um so it's not really my position to say whether we will adafruit will but I wouldn't place I would bet against it uh for sure although I do have opinions because I work with a lot of different microcontrollers so I definitely feel like you know it's great to be able to uh if we can influence it then that would be cool and I do follow uh Jeff says it's super expensive to design your own sock yeah um the FP the open FPGA community is the one that I kind of work in and they're doing some really cool stuff around a chip like ASIC design as well so tiny tape out is really cool where it's kind of like Osh Park for chip designs where it's like a hundred different designs all kind of mucked together in one chip so you just you you produce one chip but you get a bunch of designs out of it which I think is really neat um so yeah I'm interested in it but I would I I don't think it makes any my personal opinion is it makes no sense for adafruit to get into that business for sure it's a whole different set of skills okay well that stuff is really exciting but I'm not going to work on it I'm going to work on something that is uh a prerequisite for it so I've made this um pull request here which is uh to update our copy of the IDF to 5.1.2 and it's pretty simple I made a new branch on our fork version of the IDF which updates a bunch of files and then I also now have one config setting set to it I love the idea of sock design like I there I was telling somebody I was like you know I have started I have a google doc somewhere I'm just like why doesn't it do this or why doesn't it do that um one thing I was talking about is like there should be a bit in a right a peripherals register space that tells you whether the clock is running so that because there's usually a clock peripheral that controls the clock signals to all the other peripherals like it would be nice to know if you managed to got route a clock to the right place so I do have kind of like a wish list of things but that doesn't mean that I need to make my own to see those come to fruition I think a lot of a different role in the industry is like trend setting and kind of setting requirements as well and there is a lot of there potentially is a lot of power in that as well like going to manufacturers and saying like hey like for you for a circuit pipeline we really want to do dual USB so that we can do one device and one host or like things like that purchase off the shelf products if they're available yeah yeah and like I even came to the same conclusion I had one idea I thought for like making an FPGA more accessible would be to have a a STEM a QT board that was an FPGA that you could load code onto the mock exos from lattice are great example or a great potential chip that because they have I squared C FPGA loading but then they're still like not very cheap and I was thinking like well I could actually do the same thing basically but with a microcontroller for a lot less money and just you know you need another CPU core you do Semicut to another microcontroller and then I realized that the STM chips have I squared C boot loaders on them and you can buy STM 32G zeros for like 50 cents like FPGAs are cool but you really like at the data rates that we're doing for anything circuit python you don't need you don't need FPGAs like FPGAs are really like data rate heavy stuff would be kind of cool to have a feather or QT pie that was actually an FPGA running some software so there is a good feather if you want to get into this so a third-party person made a thing called the orange crab and and if I had time this is what I would do if I had time this is what this is what I would work on so it's a it's a feather shaped um it's a lattice e uh eCp5 and you can buy two different versions um with uh depending on how many like lookup tables you want um it's like a hundred bucks it's not cheap but it's also not that expensive 120 or 180 so it's gone up a little bit but they're available which is great and these eCp5s are supported with the open toolchain so yeah if you if you want a feather that runs uh that is is an FPGA this is the one I recommend but there's a lot on the software side that I would like to do and that's the whole I'm trying to stay out of no Scott you need to get hardware threading in circuit python right I mean the future will probably be more cores now as I think that is in our future but not anytime soon meaning I think at some point we'll want to move circuit python on top of an RTOS that can manage multiple threads of execution across multiple cores but you know at like the Raspberry Pi's like we actually support the Broadcom chips and they have multiple cores like four cores but anything else we have um at most dual cores so the s3 esp32 s3 is dual core and the rp2040 is dual core and like we really don't need to run user code on two cores so on the esp side we just there's free rtos that the idf uses and it just runs all the networking stuff or most of the networking stuff on the other core and that's fine that's totally fine and it does actually help speed uh if you do comparisons between the s2 and s3 like getting all the networking stuff on a second core does help you uh on the speed of circuit python and then like on the rp2040 like we've heard you know we heard people at the launch being like but there's two cores I want access to them and only recently have we like started using the second core for usb host for the dvi output and like having that as a resource for us to use and truly has been really beneficial um Dexter says my rp2040 system has six cores um yeah so I wouldn't be surprised we got there but there's other things that we can use the cores for on the behalf of the user not directly for user code pio on the rp2040 has much been been much more seed lately nice bite size programmable logic yeah I think I still do like this idea of like a stemmyqt that has a separate arm core right like like yeah and there was actually an interesting I subscribed to we we lurk on the micro python side of things and somebody is working on open amp support I think is what it's called so there's this pending pr on the micro python side uh open amp is open I believe asymmetric multiprocessing um so it's like some sort of like standard for running like managing code on another core I think um so I'm subscribed to this just because it's like interesting so instead of like circuit python running user code on multiple cores it's more like using circuit python as the thing that's managing multiple cores like code running on other cores so like it's loading l files it's really low level but it's it's kind of interesting to me um okay any other questions before I try to fix so this pr uh is a prerequisite for the BLE stuff um but uh even though I was hoping to fix it fix the code size issue so when I change the IDF it reruns everything and there's some builds that are too big so although this is interesting because this is an N32 huh okay so this is a different problem well that's interesting so we'll fix that too we'll see if we can reproduce that locally and then I was sort of looking at JP's issues with display interfering with sound whereas if we can get the run display code on the other core while synth I was running on the other core that might have mitigated the issue yes so that is totally within the realm of um what we could do um and that to me is like circuit python using the second core it's not using it for a user code um I think that's totally cool we can do that and I think and that's why I think we do want to move to uh an RTOS at some point they can help manage that um but there are there are definitely simpler things you can do so right now the way that the displays are updated is that um you pre you compute some of the display update you send the pixels over and then you go back to computing it and if we had an asynchronous spy transmission API we could actually overlap the computation with um the sending but we don't do that right now so that's one like one area where it's like yeah two cores would be great but like we could actually change the code and be better off anyway um and then there was also another I think it was a Todd about issue with the Neopixels in audio playing where the Neopixels were having trouble and that was a like um a tuning issue with um if you transmit a few Neopixels it doesn't use DMA but then if you do a bunch of Neopixels it does and and if you're not using DMA there's a loop that fills up the FIFO and then that loop we do background tasks so circuit python doesn't use an RTOS internally but it does have this mechanic of I'm idling let me let me run things that I I may want to run which we call background tasks and that includes filling audio buffers so if you're outputting Neopixels on the RP2040 a few Neopixels you may choose to do some audio work between filling that buffer which is a bummer um yeah or a GPU another ball of strings so yeah the higher end IMXRTs have the thing that you find before a GPU is a 2D DMA for blitting stuff together and we are moving more to that world where circuit python has a frame buffer on board for the like qualia stuff like those displays um have the frame buffer on board and that changes kind of the dynamic of display IO sum too um but yeah so those I would say that's not user code that's that's not a user code problem that's a circuit python problem like user code can send set up all the audio stuff and just synth IO could run on the second core and circuit python commit instrument and the user doesn't have to do it I just rather have that like flexibly is the core of circuit python modular I don't know exactly what you mean by modular uh there's like a core vm and then a lot of the a lot of the like if you import a module a module module and python that usually corresponds to like some chunk of c code um but I yeah I the task stuff is not well structured it's it's better structure than it used to be like the background task stuff is but it's not an artist it's not threads not separate stacks and things okay let's see let's let's build this board locally pio is a chunk of programmable logic in oh oh I think dcd knows what pio is but he was just asking about how you're counting up to six I don't think pio is used for cap touch cap touch 10s like the the cap touch where you have the external resistor is just um is the you read the adc you you set it high and then measure how long it takes to drain through a through a high resistor oh meaning you can like build a light version yeah so um we basically have knobs for building um at the module level and that's one change that we did in um circuit python nine is I actually split out um what I called bus bus um bus display which is there used to be display i o dot display and that was used with like the four wire spy displays um but then there's also um there's also I split that out into a bus display module so basically we we we enable and disable things on the the python module level um and the reason to do it at that level is that when you you import early usually and so you get errors uh error early as well um and then we also had different implementations for different apis potentially as well touch pio library uses pio interesting oh see I didn't clean it first so what I'm trying to do is just get it to the point where I can build um or all of the boards build with the new idf version and then I was like tempted like I kind of like oh let me turn on this new feature of the bilie stuff but the reality is is that the bilie when the bilie code is actually finished it's going to pull in a lot more code and we're going to have to figure out how to get to fix or how to yeah we're going to have to decide so the the builds that are usually a problem and this is not one of them the the troublesome builds are usually the four megabyte flash builds because we've um we do like a meg and a half of firmware uh and we have two spots for that for ota and then we leave a meg for the circuit pi drive um good night dave thanks for hanging out sleep tight so we're gonna have to either decide like the trend has been people disabling the dual the dual firmware locations but if we're moving to this world which the web workflow work is doing where we actually do want to like have it well supported that you only connect over wi-fi you're really going to want those two um those two spots so that you can do like actual circuit python updates um without that you can't actually do circuit python updates um so what happened to this one location i wonder if this is something that we add in feel free to ask questions if you have them components bootloader support bootloader flash source i'm thinking this might be a mismatch because i rebased we have a few changes we did it might be a rebase problem oh this is esp nimble components bootloader support bootloader flash source bootloader flash config esp32 s3 so this doesn't look like it's implicit declaration of get spy mode 276 spy flash octal 32 bit address enable this probably exists this might just be a problem in the idf which probably means that we just want to disable that or did they really not test it with they actually have a branch for five two but it's not been released yet fix ota fail on octal flash and that sounds i bet that's when they introduced it ah but here it is in there it is in bootloader flash dot c so how why is it not an argument is 32 30 where are those different the dot c file this one's 867 mom looks like i need to learn to use the github tools to browse code better it's gotten immensely better like this when they redid the code search it's been awesome i definitely default to browsing code here first over 23 this is completely different this is on 512 oh this is on master 785 so it we are matched up but i don't see how this will work this flash mode yeah so it it bumps me to the a different branch i think 32 bit address enable where do we use that i don't know why it's enabled components spy flash k config then maybe we'll just have to fix this like this is like a missed back port text messages referent telling me i put stuff in there recycling we shouldn't have right chunk looking for 32 bit address default yes if flash size is it's invisible for users default yes if it's an octal flash and the flash is 32 max 64 max 128 max i know it's getting darker isn't it the sun is up it's just behind clouds i could uh turn down the lights and i'll make it look a little more natural maybe hey there's an update available better that look less blown out i have to do that so it's basically like a normal light level in here okay so i don't know i wonder if there's a if somebody saw the bug this is not our bug somebody has let them know expressive is pretty responsive no issues no pull requests but it's in like newer versions oh my font could be bigger when i stream yeah just tell me i can maybe i can make it bigger i think i did that and previously uh so what i was looking at is that if there's this setting here of 32 bit address enable and i'm a little curious what we used to do because if we if it if this is relatively new so let's go a to fruit psp idf but this time we're going to look at the branch that we're currently using which is just the 511 so now if we look at components maybe let's do boot loader support boot loader flash source s3 yeah so it didn't use to have that setting at all which is probably why it was it was probably added because it was a bug but they didn't fix it correctly and apparently they didn't test on a 32 meg board and this this board or this module is one that they sell so it's just just a problem up there and i don't actually know what this boot loader support a thing as well you know what we can do is we're in release five one we can hit blame ota fail on octo flash with 32 megabytes of memory so this is what they were trying to fix flash mode is either fast read or slow read mode so if we wanted to cheat it is there any ci on the esp idf distribution why don't they see the error you see i assume there is i'm sure they have lots of testing they just don't have this testing like i think they have build farms and stuff like like device farms that they run stuff on they just must not have anything that this applied to invalid magic bite i think the safe thing to do like the minimal thing we can do is like there's these two modes of fast and slow and i assume that either for idf esp nimble this we don't need but in in the expressive stuff and master in the main branch we can do components boot loader support boot loader flash source slash 800 something oh there's my morning coffee i switched back to nights again okay so you're just waking up the auto you're getting up with me get spy mode so it's actually reading a register default is fast read the else condition is slow read like i think slow read is probably a good default so i think what i can do is um because the problem is is that it's missing the function call that finds this thing and i could basically say we're just going to use slow read and it's only related to the boot loader like so doesn't really matter i don't think we're not doing ota stuff anyway i bet that'll fix her completion issue medic smoke enable yeah they'll probably add a test case once they submit an issue anytime i have a problem building the idf i always clean i'm glad i turned the lights down it looks a little bit better i think i could also open the window like raise the shade i gotta be very careful like i zap scrunching around if i had a second camera that was like more reliable and maybe cat cam is is working now but i could do window cam overhead no it looks like it's on i've had so much trouble with this c920 and i don't know why anyway it used to work the light was on now it's off i triggered Alexa all right so it looks like we got further in the build so that's a that's a a simple tip is if you're having build problems clean it again then oh no it did fail did fail still unknown type name in that function oh my goodness they did not do a great job of this this is the old version all right the other thing i can do is just delete it so if zero if false actually let's if we're gonna do that so this just means ota is gonna be broken on this but we don't have otc ota support anyway and that's only on the the one like the n32 are whatever's clean build again just to be sure a small humidifier helps with the zap but with electronics you want to feed it with distilled water a white coating on all my high voltage things pointed that out that's a good idea this says it's 37 degrees 37 percent humidity in here which i didn't think was that low but i was actually yeah like i've like zapped my usb bus and stuff it's much more it's much more electrostatic in here than it is at that at my house it's nice having the shade up and sun's going down and it's 315 we do have a humidifier in the kiddo's room right now because he's he's in the like cold phase my my partner is cold too i've seen to skirt it so far i call it the biohazard phase because he's in daycare so he gets all the stuff this is the the window i was like wait am i showing something i shouldn't be some random sd card i was working on the sd card over what web workflow stuff but i got distracted and with the idf update that's the sort of thing we definitely want to get into like a early release sooner the better we get the idf update and it still failed bootlitter flash did this just come in so i didn't actually update to the release i updated to the release plus a single this was committed last month is this the one thing that got pulled in maybe that's my problem like they've done a lot of testing but i picked up one more one more commit no that's not the commit that i picked up so i'm here but i think well no 36623 what version is this set up to 482 three weeks ago okay so i'm still quite ahead of it 482 is it even on this page 482 okay so i'm like updating it said three weeks ago it was 482 right there it is okay so i'm on a bunch of untested stuff adc calibration and i assume we're gonna find that other i'm ahead of the idf release so they're working on you know 5.1.3 but there's like fixed ble bugs oh here it is ota fail on octo flash 51 okay maybe the simplest thing is to not go all the way new because we still do we still do get the yeah maybe the better thing to do is to actually okay let's do that we'll actually make it 5.1.2 so esp idf get status get log so if we look here we have four changes five changes for me or four changes for me one for micro dev and then this shows the branch and tags would show up as well but there is not a tag so i think you know i think this is good for security so we're gonna want to update again when they do 5.1.3 but this sort of bug that we're hitting now is like they should find it before they do a release so i think what we could do is we can get switched to circuit python v12 which should be the same minus our let's check out so that the checkout just removed that change that i'd made and now i'm gonna rebase or let's say tag and tag should show a 5.1.2 here yeah there's a 5.1.2 so we can do a git rebase i v 5.1.2 and that's annoying that's not what we want let's not do it ah no git rebase support once again deep dive turns into git foo okay so that didn't work but git rebase has a it i want interactive but i think i want to do onto and then give it the root as well so because it because it was trying to rebase all of those other expressive commits and i don't want those so i'm going to do rebase dash i onto v 5.1.2 and then i'm going to give it the base of expressive release v 5.1 that's what i want i want the five the five commits that are circuit python related and now if we do git log we can see that we have that and as we go down we hit the tag for 5.1.2 okay let's get status again we will get sub module init recursive so that checked out other stuff which is probably what we want and let's see if the build works now usually it's fine usually usually we do take like somewhere in the middle of those release branches but there is i think they do do extra checking before they do a proper release so and we don't we don't need the absolute latest there's nothing nothing there that i know that we actually need and if there is it's probably a reason for them to do a 5.1.3 so this is probably it's probably better because the branch is actually called 5.1.2 it's probably better to make it 5.1.2 like actually based on that tag try this again it'd be nice to get all these other fixes but we'll have to see when they're gonna release them it's never it's probably not a good idea to control c during a rebase but i couldn't help myself i do like doing rebases this is a like a window setup that i've been liking for my expressive work so the setup i have here is i do all my builds and my loading up here and then the left hand panel here is the serial debug output from the idf and the right hand side is the sort of type on usb serial i do all like printf debugging on on the expressive boards so that's how i have it set up oh and we're an hour and a half in the deep dive and i mentioned that i got a new laptop and nobody's like what laptop did you get although maybe you know already okay great it compiled okay so let's um see if this solves all our problems hit add esp idf oh but you know what we need to do we need to change to the esp idf and we need to get push a to fruit circuit python force with lease force with lease is a way to force but only if your local copy of a branch matches what upstreams is it prevents if somebody else were to change upstream then this wouldn't work which is nice um okay so i force updated it hit add esp idf and now we want to base on the latest high end macbook pro wrong that is not what i got i'm like i i was a mac person for a while because it just worked and then i the file system is not case sensitive by default and so i had a sparse bundle file system that was case sensitive and then it got corrupted at some point and i had like all my git repos in it which really drove me bonkers and so like once that happened i was kind of like didn't necessarily want to do it anymore so i actually didn't get a macbook pro i got a framework laptop which is a so it's running linux and it's pretty much set up like this desktop is um and the reason i did that is because one i like to set up in two like i i have more control over the file system and things base on two exactly so we'll push it again and hopefully we'll have fewer build issues we probably will still have an issue with like some of the other build issues were the tft feather which is usually just a matter of like was it russian or japanese show me the webpage good idea okay framework so this is the 16th this is not what i got and i don't know if we're actually shipping it yet um but some of the framework developers have actually tried running circuit python on like the keyboard for this new one which i'm kind of like should i have waited and got the new one but it's also a bigger one um this is a this is their 16 inch and they're working on this fancy like modular keyboard sort sort of system um um so this is the newer the newer one um i got the the rise in 740 13 inch which is over there um it's smaller than my 15 inch backbook pro that i was coming from um but yeah i'm pretty happy with it i was just like web browsing with it and uh it's like quite quick like i really like the the the latest andy chips are really great um and these are like super upgradeable and repairable which is like that's kind of one of one of their sticks so here's like if you had bought a previous one you could buy a main board um to upgrade the the one that you had already bought which is really cool so like for 450 or for 700 you can get a new one and and replace it there's a guide for it um and you can buy the individual parts and and all that so it's it's quite neat um what you did did yeah so i got a framework framework 13 inch rise in running running linux oh you didn't want to spend $5,000 on the mac i bet ate a fruit would have been happy to do that but like i said i like i i got kind of burned by the mac and i've been like i do have like a bit of a like political activism streaking me and right to repair is definitely part of that so frameworks like they're like three they started with intel's they have like three generations it tells and the amd this was their first amd one and they've been around a long long enough that i'm comfortable it was like 1500 bucks or something not too bad it's definitely oh the audio that's what i noticed like the sound nowhere near as good as my macbook pro but like do you care how good your speakers sound on your laptop maybe but um i don't use the audio on it that much yeah and then dexter points out sonoma sonoma the latest mac os has been having trouble with circuit python devices which is unfortunate okay 47 52 with japanese let's just see if how far our build is 11 successful 60 in progress it goes quite quick the dcd says i remember paying more for my gateway dx266 i mean microcontrollers are great i wonder how like i've always had my eye on the stm 32 g0s or the g4s i wonder how available they are now because the access line has too little ram the performance line would be better i think you know i think the g0s actually have more ram g0 i love these charts these charts are great okay so they only have up to 128 as well i don't think that's true i think that this is out of date i thought they had a high ram high ram parts in this family 144 so a little more i was looking at the reason that the g0s had caught my eye was because of um they come in really small packages so like thinking if we ever redid like the gemma or the trinket um you'd be able to fit these in there this this graphic is old hey look at that part availability in stock xcd 17 including the 32 lqfp so this is like oh yeah like six bucks five bucks in singles but program memory size if you want that one three dollars like that's pretty expensive that's like if you wanted to run circuit python on it that's the one you'd want to pick k focus has a nice laptop yeah and i've always followed what is the other company that is in colorado i think they're in colorado that make the desktops too including like the cases i want to like this series but six three dollars at quantity it's a lot when an rp20 40 is like 50 cents at quantity and this is still an m0 it's a single core m0 with less flash than an rp20 40 like rp20 40 not that small though okay so are we just waiting for this to run 70 successful i wonder if we're all the feathers built nice okay this looks really good we had one other one i think further down that broke okay this should be good um all right we have like 25 minutes left does it do folks have any yeah i did mean less ram you're right i did mean less ram that's true and the nice thing those g zeros are really they're they're single power source or like so you just need like a capacitor next to it like it's a single capacitor it's a lot less like supporting supporting circuitry as well okay so we have like 20 minutes what do anything that people want to talk about the only other thing i have is that i could switch to so what what is going on here is i was like doing some internal reworking hope with the hope that sd cards could be used in um web workflow so i'm like in the middle of that but i also don't really feel like moving my brain into that i can do forum support i was like 20 minutes before the stream i was like oh i didn't go through my email um so we can do forum support as well actually that's i think that's kind of where i'm at unless obviously i'll take requests as well have you seen this uh extension called vim vimium so if i hit f it labels all the different lengths um and then you can type to press them nice i2s with the quali board shouldn't you open the second update 5.3 before launch i don't i don't think so because the bug i was seeing was introduced after 512 so by being on 512 we should be okay and that does include the like ble support as well so it's not critical that we do i don't think it's critical all right rg mixed images i'm using an lcd screen with a raspberry pi i assume pico superimposing the image can so please help me so the way that i approach forum support is i ask myself am i the only one that can answer this because aida fruit also pays people to do technical support on the forum um and it's actually also not clear that this person is using any aida fruit hardware um and generally we prioritize supporting folks that have purchased actual aida fruit hardware um so this is generic a lot of people can answer this i don't need to do it so i'm just going to return to the forum struggling using a pi pico on a windows computer which i don't have a background um so i don't i don't know this either so this is probably just going to be me being saying like oh i don't know i'll just i just mark it all as i look at everything but i don't always reply um and for example here like dan already replied um oh vim um it's like vim plus chromium that's what this one is how did did you describe the vimium extension okay so it's think vim is in the editor so you hit f and then it labels all the links with uh with different letter combinations so it like it i'm i'm pointing to my screen and you can see it actually so if i wanted to click this here i type the letter l if i want to click this i type s and then l um and i can also do shift h will send me back as well it's just like and you can use it on any page but for some reason i just i generally just use it for forum support um it's just a really easy way to like click through everything um i have an 11.9 display i want to use with rp2040 dvi it's a wave share again this falls in my bucket of like you should really ask wave share um again i'll leave it to somebody else or it'll just go unanswered circuit pi really impressed great i've got a c3 board from seed so not interfrew hardware connected to something from the pi hot um i've got it connected it runs without ever the display doesn't work like it's okay if somebody else helped them but like somebody who's paid by adafruit it's like i i kind of question like i mean obviously i'm biased because i get paid by adafruit but like you went to the adafruit technical support forum and asked for help with no adafruit hardware i don't even know if we carry in of it like i get it that it's micro python or the circuit python but like we don't actually support everyone that uses circuit python we support the people that buy from adafruit hopefully this kind of like helps we try to walk that line of like we're happy to have other stuff supported in circuit python but we're not necessarily the folks that are going to do the work for that i've been using the max 31855 which i don't know with a pic and c i don't know anything about that either mouse move only 100 hertz this is in the weeds which is cool i don't know this either please help me harbormasters i just want to achieve 500 hertz or a thousand hertz head mouse i don't know i can't be that i think in your screen is only updating it like 120 tops so like somebody's saying thank you to me just great so you can also do down and up for d and u for up and down that's why i'm making a scroll can carter so this is how you if you do have bad hardware from adafruit you'll go to the tech forum they'll say replace it you email support linking to this and then this portal queue up last one it's about motor so i probably won't know either phase enable interface that requires a single pwm signal in the direction signal they don't really pay me to do foreign support so i don't feel obligated to like answer everybody so that was done i do have other tabs open here but i can do that later any other final questions otherwise we could wrap up early as well it's getting darker and darker here let's see can i think of anything else i could look i could show off my laptop or i could do a box unboxing you know the boxes that i have up here where you can't see anymore hello this these boxes i have more of these to unbox and fold this is my esp32 s3 box hi oku i have unexpected makerboards in here okay focus find your model these are custom sized boxes designed to fit in ikea bookshelves kind of like pizza boxes oh i do like ade and two oh interesting they have small small things as well display these are all intel intel cpus yeah i really like the these more more recent amd's are great have a great weekend jeff i wonder if there are others watching that are further north oh perfect okay tod has a has a question any good resources for debugging circuit python with a debugger does debugging the sandy 21 with gdb still largely apply it does it's definitely out of date but that is generally my approach with the debugger it doesn't it doesn't really cover expressive because that's extensive and that's kind of weird but anything that's arm can pretty much fall under this um out of date guide it is still pretty much how to do it um and i i think i mentioned to you tod but the the best place to break when you're debugging a safe mode issue like you are is there's a reset into safe mode function call um and so that will the debugger will catch um the back trace that caused that to be called but that's before the reset happens so what that function will do is it will set some memory that lasts over a reset and then it resets so um the debugger is the way to do it because that function if you stop it before it resets then you have all the state that got you there um so you'll you can do a back trace usually you can do a back trace and see exactly like you know okay which function called reset into safe mode and why um and i'll do the full back trace for you usually unless the stack's corrupted and that's a little bit trickier um but yeah when debugging a safe mode that's the way to go um and in fact on expressive i've actually added there's a function you could call in the idf that gives you a back trace i've added it to that to that function before uh for that same reason and you can also like in the expressive side you could just put a loop that never returns so that you don't restart as well um other tips about debugging the rp2040 is a little tricky because it's dual core um generally you just want to break in core zero which is where circuit python runs um there are a few times where you want to like when i was doing the dbi stuff i was actually looking at core one um but generally core zero is the way to go um i don't know so if you're debugging usb you probably well the beagle is kind of expensive but the beagle is also great um if you're debugging usb so there's a a beagle 12 which is a like a usb sniffer it's maybe not called beagle 12 yeah it's like 500 bucks yeah 495 like it's not cheap um but it is if you're having usb problems being able to see every individual usb um packet is really helpful oh but oh tiny usb so there is a way to enable tiny usb debug logging which is probably what you want um oh you got a beagle well that's helpful too but there is also tiny usb debugging and it's in supervisor shared usb t usb config has a um it's this is the thing that tiny usb does but if you can you can set um circuit pi debug tiny usb um and it looks like it needs console uart as well but then that will spit out uh all of the the tiny usb debugging stuff which is a lot and actually it takes multiple numbers um so higher numbers will spit out more stuff as well um if you're crashing during enumeration but i thought you were having problems with the midi library if it's crashing then yeah you want to be at this level but if it's just the midi library the host midi library that's having problems then you you it may just be a like a pecan side descriptor thing but yeah be a beagle's nice as well already doing console uart yes and i had forgotten that tiny usb debugging you can enable as well um what else was i gonna say oh um there's also and i don't think i've added this guy is so old i haven't put it in here but there's also um a really helpful project b na hill is the person that did it called pi cortex and debug um this is great it integrates so gdb has python embedded in it now um and you can write extensions to gdb in python so what this one is doing is this one allows you to load an svd file um problem is plugging circuit by the device into usb host circuit by the cause of the device to panic yeah i think i saw that i've seen that before i don't know why it causes the device to panic yeah i think i did see that um you can make sure you file an issue about it as well because tac who does tiny usb and is funded by adafruit um and i think other people give him money too but it's mostly adafruit as far as i know um he can look into it too uh yeah so svd system view descriptions this is basically a a description of all the different peripherals where they are in the memory map and the registers and the bits the bit level stuff so if you are in gdb land um this is great this is really great um for for browsing uh for browsing all of the different uh registers so i i recommend pi cortex and debug as well i'll just post that there because i imagine david's going to snag it but yeah circuit python dev is a great place to get help i know you know this dodge but for other folks as well um svd files are kind of like uh i believe it does um it's it's uh svd files are kind of like an arm thing so like not only does arm provide the cores but they provide like a lot of the tooling to assemble arm system on chips because they also do like you know arm also provides your stuff and the memory buses and stuff they they provide that as well so generally anything with an arm core is gonna you you can find the svd files for it um in fact they have a link find simsys vendor oh i don't see him there i'm sure that exists it might be in here this implies that there is an svd file where exactly i find it is see like this says svd file is missing it's got to be in there why haven't i found it why didn't it find the file name i think i can find it on my own source or between 40 hardware registers svd here we go so this is what the file looks like it has like a top level device a description cpu information so what revision is it because you can actually configure it as well and then you can see peripherals so like xip control is the name and then here's where the address box starts and this is the interrupts it has and then here's a register here's what the bits are here's the description of it it's very similar to like the tables that you will find in a day sheet but it's like more more like machine readable because it's xml so yeah it should work with rp2040 as well it's a big long file 46,000 46,000 lines they auto generate it so i i assume that they have a system that generates this and also generates the day sheet okay i think that's it um it's just about four o'clock and i've run out of topics that don't involve me getting my brain back into some space actually you know what before we do that let's look it's a green check mark great so moving back to five uh five one two seems to have fixed the builds it's lucky us and it yeah 475 i had to disable this new optimization uh to make it fit but that was it all right so hopefully over the weekend or early next week we'll be first based on IDF 512 which brings the new BLE stuff although we won't use it yet um but yeah thanks texter uh thank you all uh let me wrap up and actually i'll switch the camera to you so this has been uh another deep dive with scott uh i'm gonna be kind of like maybe maybe not maybe yes maybe not uh week to week uh especially through the holidays um independent on how my mom's doing uh so you'll kind of i'll i'll communicate with him and he'll he'll he'll plan on doing it probably if i if i'm not able to um yeah so uh thanks if you want to support me you can do that by going to adafruit.com uh and purchasing hardware there they pay me to work on this stuff and pay me to stream so it's been great um if you want to join the discord server which is a chat that lasts all the time not just during the streams and that's the middle thing right here when i got the slide right uh you can go to the url adafru.it slash discord um i'm on there doing the wake usually when i'm working uh take the weekends off and uh thanks again to dcd who's in the discord chat for taking time codes i'm usually does i'm assuming he did today uh thanks yeah thanks for all the support um we're we're gonna have some really cool stuff coming out uh more next year i don't know anything like immediately but uh lemours working her way through the uh the re-spin list the stuff that she's got to redo uh and it's going to be exciting when she gets past that um and hopefully have more stuff early next year um check out sacrifice of nine it's got lots of great changes in it um and uh yeah thank you all for your support and it's wonderful to hang out and and have some normalcy so thanks again and uh see you on discord and maybe deep diving next week i don't know right now