Hello.
Welcome back.
In this lesson we are going to clean up our esteemed 32 cube IDC project and one thing I'm gonna do
is I'm going to include a deep port supports package of what SDM 32 discovery board.
This board supports package provides us with two functions to easily interact with the touch screen
and the other you know nice peripherals that the board provides.
So I mean my project folder over here I remember my project to score what I missed.
I'm gonna come here Dreyfus and then I'm going to paste this over here.
I'm going to paste BSP over here.
And if you take a look at BSB it's core SDM 32 F for nine I discovery.
This basically talks about the LCD the prom the D T S for touchscreen etc..
This is the broad support package for its core components and other things yeah.
So I'm going to be uploading my project to the to the video so you'd need not worry you would have access
to all of these right.
So once off thunder I'll just simply come back here and then open our projects so that we can clean
it up like we said we are going to do today.
I'll come over to Cuba mix and then open our project double click.
Click allow over here and then launch
right or click allow again.
It's taken a while I can see there was something going on in the background over here.
It's down now just minimize this.
Right click over here come to properties and then General parts and symbols and then I'm going to fix
them one by one.
The first one here is drive as seems this include so we're going to get the proper parts for that to
direct one not the reference
um.
Yeah we are.
So if I hear it says drive it seems this include.
So I'm gonna go open.
I'm gonna I mean my project folder I'll come to drive us I'll come to see them sis and then include.
Then I'll copy this
and then I'll come back to my project and then I'll edit
control fee and then.
Okay.
I can see this is the new one I just pasted and that one hasn't got a yellow mark underneath.
I mean and this is fine.
The next one is CMC is it s Dreyfus CMC this device the blah blah blah.
Include okay CMC s over here.
Device and then S T 3 to EF 4 x x and then include controversy to copy and then come over here.
Edit control V to paste and then okay the next one here is driver's a 32 a hall driver.
Include legacy.
So I'll come back to driver's SDM thirty two how.
Driver include legacy and then I'll copy this control controversy to copy and then I'll edit this.
Sorry bother.
Yeah.
Windows likes messin with me
it's horrible.
So we are back a pace this controversy then okay.
Right.
So the next one is simply include meaning from our roots.
Rhoda does a according Klute.
I'm going to come back over here to a project for that this project forward.
This is include I n c o opened this controversy to copy and I'll come over here.
Edit clean and paste
the one off to the S S to drive us a estimate that A to F for hard drive I include.
So here we go.
Driver's stem 32 F or ho driver.
Include
a quick hit edit
control fee and then okay the next one is middle were S T A I include and this actually is the neural
network when you're in network so come over here.
Is my project for the go to MIT it was SD 8 I then there's include over here.
Um yeah.
This include a copy this copied it.
Then I'll edit this post this over here like this.
Okay.
Right.
So we fix all of these.
Next let's go to the library stop the library spots over here.
It's got the same issue too we've got to fix this.
It says middle way.
STV SDI lip to it I should be if it should be a folder in middle way.
SDI and then there is over here so it is the library.
This is what it looks like okay.
We call this this the path and then I come over here.
Edit paste this over here and an okay right.
So the next thing we've got we going to do is we going to include the path to the um the port support
package we just included.
Remember I copied and pasted a PSP we've got to make that accessible.
So I'm going to come to Amnesty does the name of my project driver's PSP and then I'll go just him that
to it for discovery
see.
Okay.
Yeah.
We've got us here.
Controversy to copy and I'll come back to include this time I'll click out cause I'm adding new control
fee and then.
Okay.
Right.
So we can just keep these parts when we receive an arrow about a resource that cannot be identified
or has no reference.
We'll come back here and add more you know parts if that is what's required.
But for now these standard ones should be fine.
Or click apply over here apply in close and then I'll rebuild a project simply click over here to rebuild
in
right.
It's done built in.
We've got no arrow no warning.
Okay so let's let's conclude this lesson here.
Well before we do this actually let me show you the neural network we have when we simply expand our
project tree come to application and then use.
We have network to see remember in the cube emacs I give the neural network and name simply network.
That is why it is called network or see over here.
If we had called it m network it would have been called M this network and this is that data for the
neural network hence the name network underscore.
Let's see.
So let's take a look on network C and this is network go see it s converted a while topology the topology
of our model into these C functions for us and then we've got network data.
See this is a large file.
So you receive this warning you can simply say no and we've got to wait over here right.
Okay.
So there's a network dot h as well that allows us to be able to access the functions in network to see
in and out of house.
So the reason we have this is let's say we have an updated version of our model.
All we have to do is replace this network does see a network underscore data I see and then the network
dots each file with the new model.
We simply need to replace these three files and then we have a Y system updated with our latest a model.
And we're going to see how to do that.
This face model with convert it might not have a good performance and we're going to replace it with
a newer model just to show you this process.
We've got you say here.
Let's see.
Okay.
Yeah we can conclude here in the next lesson we show starts dealing with our actual project stop building
D we should stop building the LCD interface that you are you should see the touch screen and D and D
D graphical user interface to make this work or to bring this to life.
So this then s what s h i wanted to show you this before we leave.
Where was it.
There should be a network H somewhere.
Okay so one way to find a network to see that age is to simply come over here.
Network dot H is included in network those see we can simply right click an open declaration and if
I do this we know its location it's an amnesty include forward.
So in order to update our embedded system would at latest a model we simply need to replace the network
dot si network dot H and network underscored data dot see false these three files will be the new three
files generated from the latest model and we shall see how to do this.
I'm not gonna talk much about this I might confuse you but that's all there is for this lesson and I'll
see you later.
Hello.
Welcome back.
Okay in this lesson we're going to focus on um dealing with the touch interface and the LCD screen for
a y amnesty use case.
So I'll come back to I mean that see fall and stop populating it.
But before I do that I'm going to run a simple test.
I'm going to I'm going to check out of a clock to make sure the clock is correct.
I'll just clean this a bit often I don't like these comments here.
If you're find with them you can keep them but I'd rather have it rather have that far shorter.
Okay so what I'm going to do is oh make sure I can download onto my board by creating a global verbosity
count and then I'll simply increment the count in the end infinite loop.
And if this works this shows that yeah everything is correctly set up and we can actually download onto
our board.
So come here and simply say count plus plus and I'm going to observe count in the watch window.
One other thing I'm gonna do is I'm going to take this opportunity to verify.
That's what clock setting is what we expect it to be.
I'm gonna have another global variable here which I shall call fake for frequency and I'll come over
here after of course the system proc config.
I'm going to check the clock by saying freak a cause and I'm going to use the function how our C C gets
hcf.
Okay.
Yeah.
That is the function S H see OK you freak.
OK.
And this would give us the frequency or system frequency.
Yeah.
So I'll click over here to build
it's built successfully.
No arrow no warning.
Next I'm going to connect to my board to download.
I'm gonna come to run and then I'll click debug and then I select a steam party to call text em application
and then.
Okay.
And um it s gonna see at its launch configuration or keep everything here the same.
And then I'll click Okay.
S because that's the first time we had download and that is why we've got to create the launch configuration.
Okay.
This pops up I'm gonna see allow.
Oh okay.
It s asking what I want to switch the perspective to debunk for you.
I'll say switch
okay.
It s s download in progress.
So we've got a wait
very fine
download verified successfully.
Okay.
So it's downloaded onto the board and um these we use these um these buttons to step through the code
one by one.
If I click here it's just going to run the code.
But if I want to step.
Line by line I step over what I'm going to do is I'm going to add these to the watch window so I'll
double click on this global variable code count.
All right click and do some 0 select add expression to watch.
I'll start again.
Double Click to watch expression and then expression to watch count.
Okay I'll keep this and then I'll do the same for frequency.
I can likewise just typed the name of the global variable here since that window is open now.
I can simply type the name.
It's called Frick.
Okay so I'm gonna click here to run click to run it says target's not available.
Error target not available.
Let's see.
It seems my microcontroller.
Disabled.
Let's see.
Let's start again.
I'm gonna come over here.
Um I'm gonna collect debug
switch
okay.
Still loading service download in progress
it's done.
This time I'm going to execute the instructions line by line.
I'm gonna click step over.
So when I click this the line highlighted is the one that would execute.
So click over here.
Step over.
So it s executed the first line.
Now when I click this the next instruction to be executed is going to be system clock config.
It's executed.
Now when I click this the next instruction is going to get the frequency and store in the global variable.
F are you.
Q You can see it says over here our frequency is sixty eight million meaning sixty eight mega heads.
Okay.
Continue to step over right onto initialization is complete.
Now we're in de while 1 Loop.
If I click this what's going to happen is 0 account variable is going to increment by 1.
You can see count as 1.
Okay so this is fine.