Dave & David installing the software required for the uSupply development.
Yep, one whole hour of installing software, for all you software installation aficionados.
Microsoft Visual Studio Code, cMake, Ninja, OpenOCD, and ST ARM programmers.
Doxygen and how to do automatically documenting code.
Forum: https://www.eevblog.com/forum/blog/eevblog-1264-usupply-software-development-setup/
#ARM #Code #Doxygen
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog
Yep, one whole hour of installing software, for all you software installation aficionados.
Microsoft Visual Studio Code, cMake, Ninja, OpenOCD, and ST ARM programmers.
Doxygen and how to do automatically documenting code.
Forum: https://www.eevblog.com/forum/blog/eevblog-1264-usupply-software-development-setup/
#ARM #Code #Doxygen
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog
Hi I'm chopped off. it's David I was stretching my mouth when you started. That'll be weird. Hi Um we're gonna talk about and well we're gonna have a look at the micro supply.
There it is. should I go fullscreen on that David There we go There it is there. It is the micro supply. Some that look sexy.
Yep. Alright so um oh I can just turn it on for you. Ah come on there we go anyway. Um yep Micro Supply it's coming along.
We just have a look at installing the code of the there what are we installing? code and chip? Yeah we're installing the the IDE so that you can work on the code and other people can work on the code. I sped. This video could be kind of instructional for anyone who wants to contribute to. Sure it is open so the code is all open source.
it's on the Github or the Get labs. Yeah and the library is pretty well documented. the the system specific code less well documented right? Yeah, so I'll link it in down below. We will have the code so if you want to check it out and yeah, I'm doing some funny things at the moment to fit it on a micro.
So right Yeah, it's insane. Yeah we've talked about it's better on the amp out today. Talked about fitting the code on the 32 K, but I did that in my Ast video earlier this week or last week. Was it Yeah where we talked about fitting the code.
Oh and by the way we have our Flex PCBs Flex PCBs are in, but we don't have the chips yet. The board's actually turned up early. Check out the date. Yeah, there we go.
Check out the date on it. It's got the 25th of November and it is what the 22nd today and if they print that on there if it's late, probably time. Anyway, they got delivered early so my chips are still so yeah. You were remarking that they were able to manufacture these from scratch quicker than what funnels can Element14 can pick a couple of chips off the shelf? Yeah, A truck truck? Yeah, yeah, they made it faster.
Yep. Amazing. Anyway, so we're going to install the entire tool chain to get it components. That's right.
All right. I'm gonna set up Vs code with the new GCC toolchain and C make which is like build system generator which is I'm gonna get to what that is when we start talking about Ninjas. Cool and I actually mean that and you know I know. But we're all about this because I don't have any way.
Visual Vs is Visual Studio No, it's not. It's a Visual Studio. Its Visual Studio Code and Code is the difference which supports any compiler that you can. If you write your own compiler, you can write a plug-in to support.
Yeah, work it in here. So just GUI Basically yeah, you can write and it calls up the it, calls up the command-line compilers and they pause the command line. You basically set up what it, what it sends to the command line. We don't have to do that though.
Other people have done that for us right? Got it? Sorry about the audio. The mic is not. We're not particularly close to the mic here today. Alright, so we've installed Visual Studio code that was easy anglich and we've installed the C C++ extension. Yeah, what else do we need to install? We need to install the thing you currently have on the screen there. see: Mike I See my tools and you're you are very excited when you realize that Microsoft bought Vector of Bull. Yeah, so a Vector of Bull. Hadn't been maintaining the plug-in for a while.
So this is a plugin which is used a lot for people who develop in Vs code and for embedded systems. and with the C Make. Yeah, the guy hadn't updated the plug-in about a year. so it's great that someone's taking on the project.
Microsoft take it over. and what does C Make Tools do? C Make Tools is just a wrapper. I suppose for a tool called Semuc, which we're gonna have to install. Um, so C Make is a system which generates a build system.
a build system generator. So it doesn't build your project for you, right? It doesn't make a pro. It creates a project and then calls the compiler from with the project kind of thing kind of thing. Yeah, so so I'll give you a few examples.
Alright, if you create an italic project, there'd be like a approach file atto like it's a cotton italic project. So our topic is a IDE for ARM processors. the Rice's okay, right? Like that. St have their own version of it, right? Q: MX ID All right.
Okay, yep, so that's it's. an Eclipse-based Ide and it has its own project files. Those tell you like the structure, what things to pass to the compiler and stuff like that. and it also has what compiler to call and stuff like that, right? But the the project files aren't very flexible right? so you couldn't swap out the compiler or at least not easily - for example, an an updated compiler which has a particular bug fixed.
God Yes. Which we have done which is okay, which is exactly what happened. So this is the reason that you're using Visual Studio code instead of the Cube instead of the St software the cube. MX Yeah, we started in Cuba Max, right? Okay, it's net.
When we started it was called the TOEIC Just right. Oh, it was. it was called actually called Yeah, it's doing okay. Yeah, right.
So yeah. I gave that that rings a bell. All right. So that's what we started with and then well, maybe it was like roll Eclipse I don't remember.
but it was an Eclipse thing, right? and we couldn't I couldn't get the latest GCC to run which had some fixes for a part of the GCC tool called what is it D It's the name D Mangling tool named Amanda Lean Tool. Yeah, all right. I don't remember the specific name of it all right, but it basically caused a memory overload like a stack overflow in Rila when you had lots of symbols. so when you have specific types of template code in the only precise, it should just be fine.
but it would. It would just blow the stack right just by poof and you're like why'd that fail like there's no no message at all, it just gives you a stack overflow. Okay, so we want to install this. see Make tools. Yeah, we were talking about why we changed so there was a problem with the old. Compile This and See Make is something. It's a a project generator. It like generates projects for different build tools.
all right. like I Suppose you could call. So there's a thing in italic called the internal Builder I'm not really sure if that's the project the thing that I'm talking about, but it has a build tool in it and it's linked to those project files right where see make. It can just target any IDE and generates it those project files for you got with the settings for the compilers that you gave it with the compiler you gave it.
I Assume all that setup stuff is in some sort of setup file somewhere that we can in the get lab. Ease. Thank you. No, no, you won't even like am I Not even flinch.
Oh okay, yeah, just a lot of clicking install for things. Okay, let's do it Alright, so we've installed that. What's what's next? All right. So let's go get C make itself so that's just see.
make dot Org slash download. Oh Oh I've got to go to a browser. You do need that plug into their art. that TWC's nice one.
Yeah, that'll be nice that one. Yeah, that just gives you syntax highlighting for scenic. Oh okay, well yep, that's that's actually what you were talking about before you were saying. how does the S code? Yeah, the first thing I cuz I don't know anything about this.
And my first question was when I heard that you could if you wrote your own pidgin, English compiler or whatever you could install, you could write support and add it to Visual Studio code. Yeah! and then I asked, well, how does Visual Studio code do the color syntax highlighting for your language Even though yes, Well, yeah, I mean the plug-in work, right? Yeah, fine. Okay, this these are variables. this will be this color.
Yeah, it's not enough to be in too intimidating, right? Okay, well. I'm sure that if you wrote a compile art then you'd be able to live. Yeah, then you just that'll be a lazy day on the beach. Yep, Yeah, technically I have written a compiler I wrote am I wrote a my own programmable logic compiler a PLC PLC compiler.
Yep, so back in the day? huh? Yep. Well it's a generator, assembly and stuff it. No, It generated EEPROM images because it was a for a finite state machine. Okay, so it would so is compiler language.
I made up my own language. that then high-level language that then compiled into an EEPROM image that would yet use it as a finite state machine. Yeah, so you use an EEPROM as a processor basically as a finite state machine processor. So yeah, that was a thing.
Maybe I'll go with code somewhere. Yeah, Anyway, um right. So we installed CMHC Makes Tools and now you're saying the source gives you see I Don't know? All right yeah, where are we? Where? Where are we going to today? Okay, CMAC Org and then just the first one under platform. no source I Love how they've told the difference. This has new line line feeds and it says character tone lines. The difference. So when we install in Visual Studio code we didn't actually install the actual C make. We just installed support for C Makers it.
Yeah, you're probably going to have to restart Vs code. Do Not add C mate to the system path. Should I add it. No, Totally add it.
Add it. Yeah. System Park for all users. Yep, Yep, yeah.
so um, we're gonna use C make with a with a build system called Ninja Ninja. So the built it's a it's a fast write build system gives you some pretty good project files and seems to work with basically every target embedded not so we could avoid. Avoided all this if we simply use Q BMX Right, cuz it's all integrated sort of. you wouldn't be able to use the compiler we're going to install.
Oh okay, but it we'd be using their compiler. but I thought this was just the GNU. It's so special. So the naming is like yeah, EAB I slash none, GCC or whatever.
right? So you see so you can put customized So so there's it's on its italic. So therefore the GCC compiler. Is that what you say? Yeah, I Suppose it could be the same thing with a taluk inserted in the name, right? Okay, got it. Okay, so but we will be using the GCC compiler.
Yeah, right. Okay, right. Yeah, because it's more up-to-date It's like it's more. It's more better.
Well, better. Is that installed right? So should Visual Studio needs to be restarted? Definitely, it'll start trying to configure the project folder. Let's just list start off with a dummy project. No.
so just hit open folder yeah and then make a folder for a dummy project. Okay, but you have dummy cool. All right. Um, now configure the workspace I think Oh God Oh That'll be easy.
Just click file file and save workspace as save workspace s And there's type of name dummy digger. Now you're in. Let's see if C Make Okay, that's that's the dummy workspace. Yep, so now we're just going to type C Make: Let's see what it's found on your computer already.
Yep, it's probably found. Find nothing. But let's just see for now. scan Looks like it's found a whole bunch of stuff.
Yeah, let's have a look. Yes, configure the project can fit so you can't see that. Yes, configure the project. Uh, you'll probably want to leave the camera there.
It'll continuously do that, ya know? C Make kits are available. Would you like to do scam kits? There you go. You got none. It's like we're gonna install one.
Yeah, what is it? We're gonna install the Arm embedded compiler. No, no, you have to go to the browser. I'm gonna have to install it. What? You're gonna have to click install many times. All right. Don't much work, not difficult, just lots of pressing the same button and I wouldn't see someone like me. Well I would never figure this out. Yeah, would anyone looking at your if we just oh it's gotta say if you got hit by a bus but without those instructions would people have been? Oh yeah, right they would have C Makers Standard.
All right I Don't know, how do you see me, You don't have to use it I Do so it would have been obvious that you're using C or that yes, all the all the Linux people would just be like ya know and they'd run it from the command line. Yeah, of course I would. Yeah, it's easy. What am I doing? Yeah, what am I doing? So what do you want to do? First, let's get the build system because we can't use anything without it.
So its type Ninja Dog Yeah and then install it. It's just an executable download the ninja Binary Obvious Yeah, One Nine zero. Yeah, you want to get the zip for Windows Don't want a bloody zip? You'll like this. This install is easy.
It's an X scene. Okay, you don't have to run what you don't want to run. Why? Cuz we got to put we got to put it in a folder. Yeah, don't run? No point.
All right. So go to your C Drive or whatever drive you. So no I copy that. Ah, just leave it there.
For now, we're gonna drag it out of it into a folder. You want to have this at a preload directory. So listen, yeah. put it right on.
This route almost ran you see route in my sea route. Yeah, you'll want it. Well, if you have a space in the path, you'll get problems. So let's just oh no no.
let's make a folder called Dev Tools or something in there cuz it's gonna be a few of them. Dev Tools? Yeah, Yeah, cool. Okay, we've just put Ninja in one folder up from one folder up from Brute. Alright, we're outta space.
And next, what? What's next? Okay, next we're gonna go armed Embedded. Yeah. and I Recently bought at the project to nine? I'm Embedded comm. No, that's annoying.
Yeah, those sneaky P Who who owns Embedded Arm comm? Nikki And they put an ad first? Yep, they did. Probably a consultancy. Alright, Alright, so I'm gonna click some things. tell us what you're clicking.
I'm all drink gonna add the word toolchain. Okay, oh wait. yeah. good, yeah.
and we're hoping to see, um, the the New Nine. Yeah, there we go. Good New Nine 2019 Q4: I Think the italic one is limited to renew Seven Point Four or something. so somewhat out of date.
Okay, yes, so there's a 64-bit 32-bit There is no 64-bit installer. really. Seriously, well sign for Windows 10 or later. There you go.
Yeah, someone doesn't like 64-bit Someone's a 32-bit fanboy. Whoever developed this and that's all that's all you gonna get. Sunshine 94 megabytes. The philosophy is probably more like you get nothing extra out of it.
Yeah, it's probably like why? shoot, You know we get nothing out of this. All right. Are we operating on four Gig address? No ridiculous boy. All right. come on, you can do it. Oh minutes to download? What are we living in? There Isn't it pretty? Yeah. Oh yeah, right. Beautiful.
Beautiful. it. says hello regularly. So this is the GCC viola.
Yeah, by the by. Armed by armed? Yeah. All right. So they've forked it.
Have they? And it's there's no. they managed this project. they banished it because this is the arm version of GCC Oh okay, right. it's not GCC with support for our meets I mean I suppose they it but they managed it.
Okay, Yeah right. got it. 500 Meg for a compiler Mm-hmm I was in er yeah. I've only got five gigs left on my C Drive yeah, I was in.
No, we're not gonna install anything that requires five. You going? No, not anymore. All right? Visual Studio Is it huh? Mmm, that wasn't that big. No incentives.
simply? no. No, really. Yeah, it's pretty lightweight. Yeah this visual Studios like knowing gigabytes the real one.
Really? yeah. hmm. maybe bigger. Need 12 if you put on things I normally do for mobile stuffing and pass to environment variable.
Yep, now you see Michael just pick it up easy if it often picks it up anyway cuz he makes clever. Do we need to read me? No? no and what's what's it doing here I don't know. let's type version. Well that's because I didn't take the executable name and the executor was not in that directory.
Mm-hmm and oh, is it L I don't remember the net command for list LS Is it in Linux You've just lost your Linux badge? No. this is Windows and Windows Okay, do we care if it was the latest version? No, not really. Ea bi? yeah, obviously. Yeah.
I know the fact that I've remembered that is not a good sign. There you go. So it's a 25th of October so it's really new. All right.
All right. So I can I shut that down? Mm-hmm All right now. restart this code code I believe. Have a scanning icon at the bottom right? What if it doesn't uninstall? Windows Alright, it's time to get rid of Windows Yeah, got my gout sir.
Oh, there we go. Yes, it gave up last time because you had no kids. Oh okay. there you go.
No, it's injected it up the top. Yeah. so click that. Know that that one? Yeah, the real one.
Now it's gonna do some things and tell you nothing will work because we don't have A/c makefile. This is all so obvious. How does anyone like learn how to do this? Okay, well by watching this video I suppose. So now we're gonna go to mine.
keep my C make repo which is used to help people like this. Oh really all right I get lots of requests. Yeah okay so browser again. Yep this is a the most simple C make I could do where are we going? Yes! so here we have dude lose the photo of you with the bowtie.
It's funny. No I lose it I Want to make a cringy about in the comments down below. Should he lose the photo? lose it? or should I and get a bigger glow? I've got the glow tie and what up the legs right now I'm building as one, not like a normal one I cept it's way too big for his head. you don't have get. let's just all get That's gonna have to be an additional step that I I Read that a scam get scam. Is that how it's pronounced? Someone in the comments left to say with a phonetic spelling which I won't be able to do. download that one. Oh yeah as it automatically detected our OS has 45 me when I was a boy.
yeah they added tip. tell us to it and then it was big. What's TLS um the secure transport layer? Oh yes, right Yeah yeah. Do I have to change any of this? I don't know.
Let's see. check daily. forget for Windows updates. Oh now I don't like that it's not checked Why? or do I want to check that you I'm reading Okay, yeah.
is there another option? What Vim will be confusing for you? Oh okay yes. no notepad plus beers. could ah use that? Yep, yep. What's this code? Insiders? You don't have that? What is it? They just have extra features that are unstable.
You taught me that there was no paid version of studio I Soon, no no insiders, it's still free I was like Peter you get from come online only get from use get from git bash only. This is also obvious though, which is recommended. Yep open. SSL Definitely check Windows styles that yep default Assistant: you? you haven't seen it before? No no no I probably have I just click next really quickly right? Yes, fine next.
Yep. I Use Minty. Yep, fine. way matter to be added to Path will use PowerShell and consistent ation.
they will get correct. Potential Manager: Yes. All right. Yes.
All right. Naval Experimental Build: Mmm No No No. so install. Yes, It's also obvious what we want to do is compile a source code for a little embedded project.
You will be clicking many buttons. There are still buttons to go. This is ridiculous. Anyway, this is the documentation for anyone who wants to play around with the micro supply code and build it yourself.
Yeah, the long long form launch git bash sure do really? Ah no, come on, you just want to get this finished. Yeah, all right. go finish. Alright next.
What? I have to do Risk that? probably a whole computer. No I'm not restarting my old computer alright type git that's annoying. Alright, uh. restart this code I Hope it have to get to Path that'll be annoying Install: this should add themselves to PI If you check a box like the all the other ones didn't we pay attention when we install it dummy workspace then just type get - - version needs - doesn't matter.
It'll say not a command. That's fine. All right. So let's type the press start.
you know type path press ENTER click environmental variables, then click path double-click on it. The one that says good new tools are embedded that one there. Double click Edit Double click Edit It doesn't matter. Click on the bottom. Hmm. dump it in, dump it in and backspace until get rig it. Do I have to get rid of the quotes? No, yes you do. You have to also go to get I Just wanted the format to be the same way it copies.
Um, get rid of the word get a XE Oh really? Ok, yep. Ok ok um your path may not have refreshed so just type git you might work. Yeah and we have to restart thing. Yay! No, it's not recognized coming out so maybe this code has it already.
Let's see cuz BS code integrates to get it just. you didn't have get so that was confusing but it might have been stalled with it that I'm just a bit confused Wyatt Okay, so get so you see. this is this is the get mmm thing. So get is set up now it's just not appearing in PowerShell Okay I Think you have to restart your login logout the PowerShell path hasn't refreshed or something, right? Ok, well stop recording with that Get Yay! So now we're gonna pull the project.
We're gonna close this workspace. We don't need it anymore. Yep, Done. Perfect.
Now do we get our one out of Get Labs? We do. I'll take the mouse for a second. This will be difficult to explain. Yeah, so we're just gonna clone this repository because you IANA and the way you work with get you don't work I don't work on the actual code that's in the get Got to pull it out.
Yeah, so clone is like pulling it out. Yeah, slight downloading pool is actually another command. Alright, so clone is like take everything alright from scratch. And yeah, cool is like get the new stuff and where does it put it apparently in your root directory because I forgot to save it So we're gonna have to what we have to fix that.
Why not putting users Dave It should put it in a folder. What? I Won't like to configure this project? Hang on. Yes, so we're So where's my code? It's in users see make Users day, it's in. Yeah, you can delete that folder later.
It's no important. This is another intermediate step just to make sure that See, Make and the build process works. But this is how you'd really import your code though, right? Yeah, Okay, so this is the Ronnie It's just a tiny project so it's simple. So this is how it runs the build, How it runs debug.
So it runs this file using Open OCD Yeah so this runs using a plug-in called Cortex Debug so we have to get that. kind of hoping. Microsoft Also take this project on I Don't think it's been updated for a while then maybe Markus can get some money for all the work he's done for free for some reason. Moriss Moriss I Am Martha Thank you.
He's done a fantastic job so somebody didn't want to use all this crap and wanted to use You can Install, Open You, BMX or any other compiler. Can they just take your source code out of get lab and just yeah. And they they can. You see me generate a few different project types, not all project types, but a lot of the right. So they have a lot of options. That's a sure why you often want it because you know you got a little bunch of people working on a project and they all want to use their own. IDE right? Is their own system? Yeah and see, Mike lets them do that right? So that's installed now. Now that launch script actually makes some sense to something.
So did we already installed open? Oh City I Think we did. Yes, we did, didn't we? And then we're gonna install that. That's gonna probably link you SourceForge Geez, this is old SUSE WordPress Yeah, but still updated. You wanna go getting open a CD and then we're going to go to the Windows one managed by some random name.
Pretty choppin' one obviously Freddie Chop ins the man. Yeah, alright, he's done the right job. I think at least news. Yep, that's not the one I use.
try the other one. Just leave you is you live, you live you. It's not the websites changed from when I got it I think so what's open it? OCD do For us, that's what actually connects to your debugger and that's what programs your device. Oh right.
yeah, this is a really important. Oh okay yeah yeah of course this is the main part for this is something that regardless what people use, you know this code or Eclipse or whatever they still have to use opener to do. There are a couple other they might be able to use the jailing thing or st right. We've just got a like a library now and like a where do we install it like it's not an executable install.
Been 64? Yeah good. The X is there. So now what we do, we move that into that Dev Tools folder C slash Dev Tools and this is where I'm a little sketchy with my memory but go File Preferences: Yep, Yep. Yep.
type Opener City Edit: JSON crap What? I Don't remember this one got a Google this index I Know that's helping you a lot. Really? Yeah, it's telling you that path will input wrong because the slash is that this way instead of this way so those are actually escape characters. So oh, it's actually telling you everything you need. Oh really? yeah, yeah, it looks wrong, but it's telling you you're wrong.
Ah yeah. Super useful. It's cleverer than I am. Oh Oh I think it's in here.
so in in I mean that's the command, right? We have to. We have to add this: I Just in the hell. never gonna search this. Someone's added it to a project somewhere I believe I can put this in a project, but we can also do it as a global setting for your all of your Vs code progress.
which I was going to do because doesn't seem like you can use this and I'm likely to use it for something else. Seeds want to work all the time? Uh-huh Yeah, just wanted to see if it already knew it. This is maddening. Really? Oh Allow access' bigger windows blocked it? huh? Look at that.
that's open ICT Running cool. They just worked it. Must have found it. Alright, just using that path that I pasted in. it may have already known where it was or it came with the plugin, right? Oh, let's just let's just see something. I think this is I don't think this message is real like I don't think that's telling me it's running I think that's the command it uses to run it and so I don't think it's working. Change your mind. sorry I forgot this one.
I've done pretty good so far. Wait, what? it's just. it's exactly exactly verbatim. What if? Yes, what? I thought it was.
That's so frustrating. Sorry I Wasted some time. Okay, um, we're gonna run that. That'll work probably.
So just try. right? Okay, allow access to the oh hey executable nice and right? Yeah, but obviously on nothing because we plug nothing in. Yeah, and now I can't find anything so it timed out. All right.
But all right. Next, good stuff. What's our next task? We have to configure your get right? What do you mean? Two different codes. the USB one and the other are the right.
Yeah. So we've got two processes inside this for those who don't know. Yeah, so one is the USB isolated USB side which handles the USB PD the USB in the USB serial comms. And you know how though? yeah, primary side housekeeping.
The other one actually runs the user interface with the LCD and controls the power line. Yeah, yeah, that's on the isolator side and we've just got a little serial opto. Yep, going between I think it's capacitively coupled things. one of those clever digital that's right, this capacity.
Yeah it's got a modulator and demodulator and a signal in Pico farad capacitance inside it I think So Yeah, all right. yeah they're much loop at the the old one. used like way too much power for the board where it's all right. All right.
So we're gonna configure your get user name. Okay, yeah, no idea. Oh maybe I must have had a random password in there. That's what password managers for.
Yeah, yeah, good thing. Okay, so now we got the most of our USB setup. That's fantastic. So let's open up Main: I guess in Maine So do we want the other code as well? No Yeah, no Okay, no no Yes, Oh yes yes yes, you're right.
Let's do it all at once while it's working. Why? Cuz it might not work tomorrow. it'll break something a hundred percent. saves it I can tell you that and it's already got my credential.
so I shouldn't have to have password that again. mm-hmm it's not bad. Yep, so what if I just manually copied the code out of Gitlab and put it in that subdirectory myself like this? Yeah, if I actually download it as a zip and I'm put it in that subdirectory. Does it not set up things or doesn't set up, get right? Okay, so if you change like there strings all over the place right? Yeah, if you change like instead of saying hello it says Batman All right, right and then you pull it, push it to the you want to do that okay or a few things like that I mean I suppose you there is ways to set it up I Don't know. Oh yeah. Okay, so how do we push you? get back to Visual Studio as the altie support? Forget Yes, right? So we don't have to do all this terminal not yet. All right. Geez, how BIG's your source code? Blame St.
We will henceforth blame St. Yeah. 131 Meg for a source code that goes into a power supply 131 Meg's not our fault, it's just T's fault because they bloated libraries. Is that correct? David I'm checking.
but I think so. it could be a I could have like installer in there or something. so you got data sheets in there or something like I might not. It's possible right? I'm checking.
Get back to you and you haven't Mixed hardware in their hardware is a different different yet? I don't know. Whatever more, there's a Nestene library path there are it's there for sure. Our library is pretty big to that over and show people this isn't the documented one. but yeah, yeah, there we go.
Yeah, this isn't up to date because they've been modifying in the US or third five months ago. mm-hmm Normally did show your last deposit were the last ones from the USB So this has a yeah oh yeah, you haven't worked on the main code for ages have you? It's all being us I worked on it yesterday that support right? yeah thing. but it's really got nothing. You all right? Yeah, so let's open up this like ice Fly.
Okay I want you? We want to open a folder we want to reveal it in Explorer reveal That's really useful. Are you being sarcastic or no? It is really reasonable. Look at this cuz you could be like let's get the binary to build it to load and using the programmer and open it for you and and it selects it for you. Alrighty, it's opened and selected.
Got it? and then you can display Whoop There it is. Go there's the binary file. Let's build it sir. Let's press ctrl shift P and then just type build I Guess Yes! Well I think I need to do configure and I probably have to select build mode - it'll be debug so it definitely won't work.
who because of the binary size thing? Yeah, it's like only just feeding. Code is literally a couple hundred bytes short of the the capacity. Yeah, why wouldn't it work? It fits. the link under bite in I'll only fit on mince.
RL All the Deebo I mentioned must go. All right now I Need to setup Ninja Ninja? Gonna do first. So that's the actual build system. That's what Coordinates are.
This is your script. Yeah, right. So that's what coordinates the calling of the calling of GCC and LD + G + + + object or whatever what have you use I Think that's what does all that Wow Yeah, lots of stuff. lots of stuff.
Ninja. Just like. use Visual Studio code and just install that plug-in for the arm and that's it and just generically use it Do you need all this other stuff, all this make stuff and all this ninja stuff. and I think so right? So you could. You're just using these tools cuz she liked them because they're more. No, No. I think you need to? Well, you need to use them. Yeah, Wow, Yeah, wow.
So anyone who wants to use Visual Studio code to develop generically for an ARM processor has to do all this. I mean I'm running a lot, but alright. I think so? Yeah. Wow Hence, one of the advantages of just using the vendors tools, right is that you download it and you're just going to go from day one.
Just go. Yeah. Like this isn't Again, it's not complicated. it's just lots of things that have to be done in the right order.
Yes. and you have to know what they roughly the right order? Yeah, yeah, of course. Yeah, it's probably no strict order. Yeah, he's You're fussing over your tabs II Just - you go all the way tab.
OCD Yeah, Get it? Yeah, Yeah, yeah. I'm here all week. Okay, so at least we know where it is now Dev Tools and that's why it's easy. This might not work fine.
Path: Variable it is. Let's do it the wrong way. Sounds good? Yep. going into the environment variables folks.
Yep. Knee-deep windows, environment variables and Dr.. restart? What? No, no, no. that we don't know yet.
We probably have to do that Logan Lookout thing. Well, you know you have two windows to get the path to working in. Yeah, yep, we'll be back. All right.
So we were in like: Flynn Yep. so press Ctrl shift P Ctrl shift P This is the shortcut in Vs code. Press enter configuring. It's doing things.
Press Yes. Oh geez, you're in the dummy workspace. Oh I mean the dummy workspace? Okay, all right, Ctrl shift. Actually wipe those loading buzz.
Let's listen. What? You can see you. This project. Heck yes.
you could have said that before. Exactly what if we wanted it to say too before. By the way, right inside, it's this is that thing you were talking about. Do you want to be an insider? Oh I don't want to be any inside and I know.
don't show me this again. Cool. Alright, let's do it anyway, because I'm not entirely sure if this is all good. Press Ctrl shift P Press Enter Nice.
Wow, that's promising is actually really good. Press Ctrl shift P Type rebuild Press ENTER And that's it that's building our code that's compiling. Yep, there it is. 30,000 811 bytes of 32,768 and this isn't even I Think that's mine.
You said there were like three under bytes left. I think there's one more push I think it's one version behind. Oh, okay, right. Oh okay, right.
we didn't write so you hadn't dealt. you hadn't committed the latest to get I Don't think so Yeah, right. Yeah, this is the hacky thing I had to do to make it just a lookup table of clans. Anyway, it doesn't matter.
Thank you, right? So this is your code. So this is the code for the micro supply The USB idea Department We probably want people's help with the most right rich tech? What's in there? That's just their code. Yeah, have you touched that or is that just theirs? But yeah, yeah, we have to. We have to do some user implemented. Fine. Okay, so you've you've tweaked that? Yeah, yeah. Is that that's what user is? Yeah, right. So that stuff's not important.
All right, that is. That is okay. yeah. sourcing capabilities.
so don't do anything because it's already a pretty compiler. My writers don't get inserted. Okay U.s. BPD's this is your code? Yeah, oh yeah.
bit bang you? yeah? Why do? Why do we have to be bang? Because they went on the right pins. We didn't have an I squared C Yeah, yep thing. Yeah, they were shared with the programmer or something or not. you can we just like click on that to go see that code? Oh sure, yes we can I I just did ctrl click without even knowing That was the thing and I did it.
Microsoft has predicted your behavior. they have. They have. Totally yeah.
there you go. I've never used this before and I knew how to use it. Yeah, you'll like this one. Anesthetic lab.
Look at the decide. just Wow Give it a go. You like this, you can Weezer and holding it down -. alright.
Oh, that's kind of neat, right? It's kind of neat. I've seen that before though. It's good if you're like cuz you can't read that. but it's good if you can visually see and you remember that.
Oh yeah. I I nested that eight tabs deep so that that's the code. that? Yeah, right. Yeah.
I Think this is the So. this isn't the. this isn't the peripheral. So as I said, the library is documented for Common.
They're not so much system specific row go to comment and that's where you get all the documented code. comrades in. Maine You mean now, scroll up. There's a folder called Common.
Oh, it's a file called Common. Okay, is that just your you Typically just that's how you develop your projects. just have a prod. There's a sort of just happened yeah I have another structure that I have been trying to use, right? That's how I did this one.
and we have the implemented a Kalman filter. Yep, really? Basically that lets you I'm So if you're trying to calibrate the device, yeah, and you got a little bit of like ripple on the output, you don't calibrate on a ripple value. Yeah, you want to. You filter to the stable version of it.
So just run a Kalman filter on it. You want to. be careful to turn off though, because if you don't, it looks like the supply is broken because it doesn't change so it doesn't have a timeout. Converges to the yeah, the point of stability forever.
Yeah, doesn't have it? Yeah, no time. No, what's a packed tupple at Apple I Dunno, toddlers. No, it's like a struct. except you give it a bunch of types, right? and there aren't.
You don't have to name them all, right? Yeah, it's useful for so impact because all the binary is like right next to each other, right? There's no sir, I padding between it yep and then topple because they're like unnamed fields. all the variables like a destructor. unnamed. Got it? Yeah, and you retrieve them. We'd like a key or an index or something. There's our yeah, the normal tuples broken because it doesn't do it, doesn't It's not packed. So that's our code for the USB PD the rich tech. Yeah, that's our code that the one that doesn't turn on.
Yeah, that does mend the device on when you mean doesn't turn the valve ice on. Stupid rich tech. and it's not rich text fault, really? probably. but the stupid chip wouldn't turn on.
Oh okay, right, even though you're trying to force it to I tried. Yep and these are basically I squared C commands that year. Yeah, yeah, I had it I had it send into it so I can I can get the chip ID and all that stuff. but I can't actually get it to initiate the damn transaction the second it got I got something back I was ready to go.
All right I'm like I'm like ready to go with the library and yeah, that I couldn't something I don't I was doing something really stupid. Okay, probably. but for the life of me I couldn't figure out what it was. Got it all right? So we've built our code and we got our bin file.
Yeah yeah and that's what will go in our chip in the USB set and then we'll just use the web. We haven't downloaded it yet but we're go to download the MST that there. sorry the what is it? the St link code? Yes T link or you can app. Now you have this set up.
you could just press F5 and what's that gonna do that'll load it all these oh you don't need the oh okay so this will talk directly to it. Yep, okay and it'll debug. You can step through code if you're bored. Sweet.
you'll be able to step through No code in the USB said nothing because that because I've stripped away all the symbols and everything you could possibly get will give you assembly. Though you wanna look at assembly, it'll step through that. Alright, Okay, goodbye. yeah yeah.
Oppa. No city or code. The Cortex Debug does a disassembly of the binary, right? Awesome! I'm looking for my cable that I got and also looks it's not here little box. It looks like someone.
no no I actually tossed the box because this thing does not connect. It's got a header. The Stm32. this is STM 8.
Stm32 does not. Uh, uses a 16 way and no. 20 way. Is it yeah.
20 way. 0.1 each pin header whereas we need a 10 way. What is it? Point: One point, two five millimeter pimp each one. What? One millimeter pin pitch? Yeah, yes.
yeah. I think it is I think you're right. No, it's alright when not gonna program it now. Anyway, Yes, yeah yeah.
I've set this up so we don't II - OH Cuz the bootloader? Yes. Do it. Let's get the whole the whole process. There's one micro supply. I'll plug it into just any. USB You'll need to rip the bottom of the micro spy off. Yeah, but I don't want to put an older version of firmware on II Know it back. No I want to keep it? Yep.
Look, yeah, this video has been long enough. So let's um, so yeah. so all we do anyway. The point is, let's just explain what we were going to do is: we're just gonna plug this into the USB and the esti chips actually contain a bootloader in them.
They come pre-programmed Is that correct? Yeah, we can actually boot it up without programming it. So yeah, we can do that. So this this open This OCD open. OCD will talk to the debugger over talk to the bootloader and we'll be able to upload the firmware over USB But that only applies to the micro.
That's this USB side. We we did have it working at one stage where we actually programmed the secondary processor over the isolate a little. take some time. Yeah, but it doesn't work anymore.
It's broken. It's not broken. We just don't have the same serial port. Okay, yeah, we got the Hid Hid system.
Okay, this thing expects a serial port right? The St thing. Yep. Fortunately, the main help we need at the moment from contributors is on the USB side, so it's probably not a big deal. show.
Show the peeps drag it over. It's old. Nice. Yeah, So you Studio 2012.
That's all that seems about, right? Yeah, All right. Do you accept this? It's new. It's a good new public license thing. That means you can probably ask them for the real source of the project.
Yeah, they'll protect like two months for it. Yeah, the recipients have applied with regulations. Do you plan on combine the regulation? Yeah. Piss off.
Did the login? You must. Yeah, No. I know in my video I Used a disposable log in. Regret Richard I signed up as Marty McFly Regret.
Much regret. No joke. really. Yep.
Email address a password does not match Eric You have to make an account. Ah Oh Piss off. Look at this was your salutation. Look at this.
Nine, nine, nine, eight it. You need it for cube as well. Lately, it won't let me verify my email. No, it's not about me, don't I See that sister? Oh I can't Maybe that's just a rendering glitch through us Right out.
Is it balked? Yeah, yeah, it's completely routed. Email Verify: I wasn't doing that before. Oh wow, it's it's careful. Look at the arms and spam lists a sign.
Yeah no. I can see why. I've got to put my phone number in. Make sure to edit this out.
Oh my God. that's not your number. It's totally my phone number. Hey testy, where the hell the Dalit I went through all that.
Now my buttons. let's click. Plus What The Us get software. ah what exactly are they trying to do? Piss everyone off is what they're trying to do worked.
Congratulations let's click inside my screen. Capture the Hat It's not the right prey I Heard something that's your phone. How was it? Alright program. it's getting another one. You know they don't even login or anything. the down their veins just there. but I thought it was supposed to work directly from Visual Studio. It does win the open OCD it does for debugging and stuff like that when you have it connected with DST link right? But if you wanna use the bootloader, that's you.
Sakura Oh okay, all debug ability. but you know you don't get debug. Oh well, we don't want to do the debug tonight. I Mean we don't want to.
We were just gonna download this to show people quickly. So yeah, we're just kind of show people how to actually get it right how to program it. but the flippin' program is not listed and Google at the moment? Yeah, because ordinarily we wouldn't do it via the bootloader. we just do it via the arm st you would have the cable coming from.
Yeah yeah yeah, and you just it doesn't make it. Doesn't make a huge difference using the bootloader to the St from the USB side at the moment because we get no debugging either way, right? And they're about the same speed. That's the program. Flash Loader Demonstrator Thank You Flash Loader Demonstrator very intuitive name for something.
There we go and it's just a demonstrator because they rode as a demonstrator and they know it's a useful tool, but they didn't bother renamed it. As you know it's very useful. You're still when you think you think a tool to use the USB boot line, use the USB boot loader which is main feature of your product. They probably another way.
It's probably some other way. No. I've seen this with other manufacturers as well. There we go.
flash Boot Loader thing. Oh yeah, so right. So ordinarily we would just open the back up, pull the button down, and plug it in. Alright, and then you'd select the port and then just hit next.
And by the way, the button on there is goes to a physical pin. What's the pin cord? Boot Zero Boots Zero goes to the Boot Zero pin if you pull it high Old ever? Yes, not No No GPA No, it's a it's you can't use it. It's not Julius No. So the waist of the peon dedicated to thank it's literally only a letter, right? So if you put that, if you put that pin low or high if you put it low low when you power on, can you do any time? Is it interrupts? Its when you power on when you pair it on.
so it must be doing it. it doesn't Nothing otherwise or I can read it. You can read it right. That's using a special register inside the right.
The debug module or something like that got it. There is a boot thing that tells you what its statuses okay so you could use it as an in my oh you know wait as an input if you wanted to. there's a you regular input. If you so desperate that you need one, you use it as an input right? Yeah, All right. So all right. So then that will then upload. Yeah, you select a hex file or you select a bin file and then you just hit next and it goes well. Where do we select our file from right? and it's a sharper support? Yeah, a Sharp is a comport.
I Mean you could do it. It does take any minute. This part says she fast. Yes, it will show up as a convoy.
Yep, ordinary. Why doesn't show up as comp ox? We don't the driver. but I install the driver the other day. Yes, Too young.
No, this isn't a comport. You're it's working as is. That's why it said device is not recognized. That's why I didn't say that.
Oh, because we haven't pushed the button. No, no Oh yeah, you're talking about the comport thing. Yes, yes, because we haven't press the button, we can undo it and do it. It only takes about a minute.
Yeah, very fast. Anyway, here you go. That's some how we would update the Yeah: If you're working on the device, there's a there's a hole in the back of the case and you just press it. Yep through the pin.
There's no hole in that case because we didn't have the button back then. and what happens if you press it and you don't go through off the process? Screwed? You can always. You know you can always do it again. No no the buttons find press.
Oh I Can there you go If they if they start the update process, if they start as interrupts interrupted then this group but then there's still not screwed. they can always do the process again. Alright, but ordinarily we wouldn't do that. We would be using the this and just plug it into the back of it.
Yeah yeah, Oh yeah again the USB side. There's no benefit either way. All right. Well, that was incredibly painful.
David Yes, at least you understand now. I was like can I just open the project I'm like yes and then no I I'd seen the source code before but I'd never seen me. it's like yes and no yeah no I'd never seen that I'd never set up the fool oh no environment I've just realized something. What one more tool.
What Doxygen, You need? The docs. Oh, it's got a mentioned oxygen. You need the docs. that's easy to install her just as installer.
No login. Quick quick. We have to make it quick. I'll do it then.
Yep. If you don't know, Doxygen is a tool that will allow you to generate auto generate documentation for your code. as long as you document your code in a certain way using certain script language that definers that doxygen. No, probably talking out my ass here but knows them, then it'll generate.
Yeah, client documentation. Yeah, show you. and so these turn them to brief. but oh, this is the device specific stuff if you took here.
Yes, a brief. these are instructions. So a brief is an instruction - Yeah. And then T's parameter is template parameter their various sister in the tupple.
And then you get things like that. This is a meta class, so you don't get very effective documentation in those. but I am there you go. Things like that? Your document all the parameters so we have an output example. Hey yeah, I'm gonna be generate for you. Yep, thanks. It's quite quick, so it's part of the build process scene. It runs it.
Got it? Okay, so gonna install that? It's great tool. Everyone should use Doxygen. or if you use one of those Xml equivalents, egg or two. Okay, so there's others.
Yeah, there's other competing one, so let's copy this path. There's fanboys of each. I Guess yeah, Yeah, they're all fine there. Yeah, but they're not compatible with each other.
so you've got a peak one, right? So I Think Doc String can open some different formats? Okay, all right. What? I What? Okay, Whew. Okay, it may actually just detect Doxygen The media. I What? What is the word immediate mean that that's not a word media.
It's not a word. Found Oxygen So you seem like immediately found it. That's what seemed Acres for. All right.
That's what it does. Well, it's a beast. That's pretty impressive. Yeah, so it'll fail the build because it won't fit.
That Doxygen will build anyway, right? Or it won't because it failed. Build. Whoops. Hold on like women's water skips and build process build steps.
or will uncomment the Doxygen code if the oxygen said yeah. Apparently I'm a wizard and uncommented the code that does it yeah I mean commented the code that did it wasn't on purpose I Just know you're mucking around. Yeah, yeah, yeah. See how that's lighting? That's because it's generating mini files, right? It's probably got a fault.
See how it's suddenly changed color, some other things or it's a HTML for each one with a yeah HTML Yeah. See how I did reveal an explorer? Yeah, it selected the file. That's why it's useful for. And here we have some wonderful documentation.
This is our code. Yep. and so it slowly gets more organized as we go. But yep, here's all we got so far.
So we've got some of these things here. We've got a date and then it gives you some different. the inheritance diagram. You have all these different member functions.
Very impressive. Yeah. and you get the function documentation down here. Yep.
and then inside the documentation it can. you can link into other documentation. so the day function returns a date day. Here it is.
Yep, very cool. And then there you go. That's that's Doxygen Oxygen. it generates auto, generates your documentation for you.
Yeah, and if you search over here just 7-segment for a cool example and then segment ya segment digit, that'll do. Yeah, Yeah, yeah. nice. Yeah.
so it's all got I'm It's all about documents, but if you scroll over top you might even have a picture. And yeah, so you can embed pictures. And how did you invent the pictures? You can embed files, split the file path relative to your project, and then oh okay. so when it compiles, if the image is there, it'll pull it yeah and embed it as there as part of the HTML Yeah. Wow Nice. Nice. That's pretty impressive. Yeah, and the whole library is like documented like this.
Nice. The common code is all documented, the device-specific stuff, not so much. Sweet. Still, gotta get that's something that's coming.
All right. There you go. I Think you realize David that is a setup. Well how he sets up anyway, you didn't have to.
as we said, you could have just installed this TM cube or whatever it is and use GCC seven GCC So whatever it is, it doesn't come with it when you download it, it's just as a packer doesn't know what oxygen it does. assistance to help you met. All right. The syntax are Dustin yeah I don't think so.
that's the plain vanilla version which I would have used your files writing this, you know, or if I always had to take over the code I Just like the light in the code into that, but this will work more for a longer period for you, right? Because you know, see Make will let you change compilers as they update right if you. Oh yeah, then this is the professional way to do it right. This is a second. GCC Ten comes out.
You just select it from that list at the bottom of the screen. Yeah, you got GCC Ten. Nice. Yeah, that's but sometimes you don't want that.
No, sometimes you wanna. you want stick around. You want to see you want to. You want to archive that version that you use to build it? Yes, it.
alright. Well that's very cool. Thank you very much. That was like an hour and a half video or something to our probably longer two hours.
maybe. Now we're gonna edit it and get a USB C Power Supply. Yay! Yep, catch you next time.
Soo… is this project dead?
Don't know if I am barking up the wrong tree but I have 16GB of RAM installed on my computer and GCC runs like a dream no problems by the way I am running Linux Mint 18.3 CINNAMON (Sylvia) 64bit edition I also have developers_essentials which includes the GCC tool-chain and MonoDevelop you could use Code::Blocks, just having a poke through the GCC tool-chain on my computer and om my system gcc was installed with Developer_Essentials than a reboot then installing MonoDevelop and a final reboot and I was good to go, I wound not use Ninja I would use MonoDevelop which lets you read C,C++ and C#
you can optimize your code using……
-march=arm
-mtune=arm
Where's the repository?
Spent weeks getting VSCode working well for ARM, but well worth it.
This is exactly why Arduino is so popular. Despite having many flaws, imperfections and not being suited for professional development, you download the IDE and you can program your micro!
This remind me of how much more painful it is when setting up open source tools in windows, especially those built for *nix
I think the reason POSH wasn't recognizing git in your path, was because you added it to your user path instead of global path.
You can check with $env:PATH, but that only shows global ones.
It's quite weird though since it worked after a reboot.
Any ideas?
I've spent the past three years developing on ARM, and I've had the fortunate luck of working with a mentor that is an embedded systems guru. At first I wanted an ARM vendor toolchain (IDE, compiler, linker, etc.) that would simply install and compile blinky within minutes (currently, STMCubeIDE, MCUExpresso, etc. fit the bill). But, one quickly learns that the compilers are customized (e.g. arm-atollic-eabi-gcc) and often based on older versions of gcc (e.g. gcc version 7 versus 9), and obfuscate the user from the project creation and build process. On the other hand, the guru preferred bare metal (no vendor libraries) and command line tools, but used Eclipse as a nice and full featured text editor and code organizer.
I've also installed a VS Code ARM toolchain and I can say there is an easier path that doesn't require cmake or ninja (search gcc VS Code ARM), but these seem to be good additions. I was even able to get gdb working providing a nice debugging interface with VS Code. Personally, the next challenge is leverage Segger SystemView for FreeRTOS debugging within VS Code. Based on my experience it seems this toolchain is a great option for those that want to know whats going on under the hood and affords greater customization, albeit at a steeper learning curve.
Thats so useful 🙂 Do you plan to publish firmware from 121GW?
You don't need all of that, it's just Davids choice to develop. E.g. you don't need the CMake Tools if you do not want to modify the build system, you do not need OpenOCD if you do not want to debug the software by stepping through it (spoiler alert: You can flash the chosen STM32 MCU simply via USB DFU). And a system which does not have git installed already is deeply flawed anyway since it's an absolute essential for anything even slightly more advanced than using Office products.
Today it's thumb down. It's just advertising for the piece of crap.
Use of anything from Microsoft in development is paintful and dangerous (due to licencing, incompatibility with the rest of the world and telemetry).
I prefer CentOS + Eclipse + Git + GCC + GDB + KiCAD. Why? Because Eclipse is a standard and let's try for example rebuild DviceTree and push it to the developed board via SCP.
Or let's develop some HW and try to test it with PC. Un Windows you have to install VisualStudio, Driver development kit and so on, spend a week by reading the documentation… On Linux you just fill a structure in C, append it to your code, build it and use modprobe command. Then you have your new HW in /dev directory as a file. Let's testing…
Another chellenge on WIndows is to long test of the prototype. Some times you need to turn on the prototype for few weeks and getting the data (for exapmple from thermal chambers, stability tests etc.) It's ideal when the operating system parody decides thet it's time to restart just two days before end of the test…
And last but not least, you cannot develop safe system with unsafe tools. Safe means from known source , with all safety patches and latest standards available. On Linux you have signed repos and if enabled you can update all by two clicks. Let's do it with fifteen third party apps on WIndows that you have from some unknown mirrors with Yahoo toolbar bonus.
Wow! Great job David!
Hi chopped off, I'm dad
I think "OCD" sums it up quite nicely.
Dave or David, do you plan to make a guide for Ubuntu also (or any other Linux distro)?
I can't wait to see a product battle of uSupply vs miniware mdp-xp-digital-power-supply-set
Keep the bow tie, get one with RGB
PlatformIO for VSCode.
David runs the show now? Good. Dave, your time has passed.