1
00:00:00,560 --> 00:00:01,010
Hello.

2
00:00:01,040 --> 00:00:01,980
Welcome back.

3
00:00:02,000 --> 00:00:08,600
In this lesson we are going to clean up our esteemed 32 cube IDC project and one thing I'm gonna do

4
00:00:08,600 --> 00:00:13,920
is I'm going to include a deep port supports package of what SDM 32 discovery board.

5
00:00:14,060 --> 00:00:20,260
This board supports package provides us with two functions to easily interact with the touch screen

6
00:00:20,270 --> 00:00:24,880
and the other you know nice peripherals that the board provides.

7
00:00:24,920 --> 00:00:29,350
So I mean my project folder over here I remember my project to score what I missed.

8
00:00:29,480 --> 00:00:35,860
I'm gonna come here Dreyfus and then I'm going to paste this over here.

9
00:00:36,110 --> 00:00:38,540
I'm going to paste BSP over here.

10
00:00:38,900 --> 00:00:44,020
And if you take a look at BSB it's core SDM 32 F for nine I discovery.

11
00:00:44,210 --> 00:00:50,870
This basically talks about the LCD the prom the D T S for touchscreen etc..

12
00:00:50,930 --> 00:00:55,270
This is the broad support package for its core components and other things yeah.

13
00:00:55,430 --> 00:01:00,650
So I'm going to be uploading my project to the to the video so you'd need not worry you would have access

14
00:01:00,650 --> 00:01:02,720
to all of these right.

15
00:01:03,590 --> 00:01:10,640
So once off thunder I'll just simply come back here and then open our projects so that we can clean

16
00:01:10,640 --> 00:01:13,250
it up like we said we are going to do today.

17
00:01:13,340 --> 00:01:17,960
I'll come over to Cuba mix and then open our project double click.

18
00:01:19,810 --> 00:01:23,980
Click allow over here and then launch

19
00:01:36,690 --> 00:01:39,360
right or click allow again.

20
00:01:45,730 --> 00:01:54,020
It's taken a while I can see there was something going on in the background over here.

21
00:01:54,330 --> 00:01:59,390
It's down now just minimize this.

22
00:01:59,520 --> 00:02:09,180
Right click over here come to properties and then General parts and symbols and then I'm going to fix

23
00:02:09,180 --> 00:02:10,340
them one by one.

24
00:02:10,500 --> 00:02:18,000
The first one here is drive as seems this include so we're going to get the proper parts for that to

25
00:02:18,010 --> 00:02:19,800
direct one not the reference

26
00:02:23,380 --> 00:02:24,900
um.

27
00:02:25,000 --> 00:02:25,610
Yeah we are.

28
00:02:27,380 --> 00:02:32,680
So if I hear it says drive it seems this include.

29
00:02:32,870 --> 00:02:34,200
So I'm gonna go open.

30
00:02:34,250 --> 00:02:40,430
I'm gonna I mean my project folder I'll come to drive us I'll come to see them sis and then include.

31
00:02:40,730 --> 00:02:42,290
Then I'll copy this

32
00:02:45,600 --> 00:02:49,680
and then I'll come back to my project and then I'll edit

33
00:02:53,010 --> 00:02:54,390
control fee and then.

34
00:02:54,390 --> 00:02:55,200
Okay.

35
00:03:00,390 --> 00:03:05,970
I can see this is the new one I just pasted and that one hasn't got a yellow mark underneath.

36
00:03:05,970 --> 00:03:07,130
I mean and this is fine.

37
00:03:07,260 --> 00:03:13,670
The next one is CMC is it s Dreyfus CMC this device the blah blah blah.

38
00:03:13,680 --> 00:03:17,490
Include okay CMC s over here.

39
00:03:17,670 --> 00:03:31,920
Device and then S T 3 to EF 4 x x and then include controversy to copy and then come over here.

40
00:03:33,210 --> 00:03:45,910
Edit control V to paste and then okay the next one here is driver's a 32 a hall driver.

41
00:03:45,930 --> 00:03:46,900
Include legacy.

42
00:03:46,920 --> 00:03:50,490
So I'll come back to driver's SDM thirty two how.

43
00:03:50,490 --> 00:04:04,420
Driver include legacy and then I'll copy this control controversy to copy and then I'll edit this.

44
00:04:05,220 --> 00:04:05,910
Sorry bother.

45
00:04:08,040 --> 00:04:08,640
Yeah.

46
00:04:08,730 --> 00:04:10,500
Windows likes messin with me

47
00:04:15,630 --> 00:04:19,410
it's horrible.

48
00:04:19,700 --> 00:04:24,470
So we are back a pace this controversy then okay.

49
00:04:24,860 --> 00:04:25,670
Right.

50
00:04:25,730 --> 00:04:28,500
So the next one is simply include meaning from our roots.

51
00:04:28,510 --> 00:04:31,400
Rhoda does a according Klute.

52
00:04:31,860 --> 00:04:35,330
I'm going to come back over here to a project for that this project forward.

53
00:04:35,330 --> 00:04:43,490
This is include I n c o opened this controversy to copy and I'll come over here.

54
00:04:43,490 --> 00:04:47,630
Edit clean and paste

55
00:04:50,350 --> 00:04:55,910
the one off to the S S to drive us a estimate that A to F for hard drive I include.

56
00:04:58,850 --> 00:04:59,600
So here we go.

57
00:04:59,700 --> 00:05:04,520
Driver's stem 32 F or ho driver.

58
00:05:04,520 --> 00:05:05,180
Include

59
00:05:12,990 --> 00:05:14,440
a quick hit edit

60
00:05:17,340 --> 00:05:26,040
control fee and then okay the next one is middle were S T A I include and this actually is the neural

61
00:05:26,040 --> 00:05:29,040
network when you're in network so come over here.

62
00:05:29,080 --> 00:05:38,660
Is my project for the go to MIT it was SD 8 I then there's include over here.

63
00:05:39,710 --> 00:05:40,650
Um yeah.

64
00:05:40,680 --> 00:05:44,120
This include a copy this copied it.

65
00:05:45,090 --> 00:05:50,500
Then I'll edit this post this over here like this.

66
00:05:50,730 --> 00:05:51,640
Okay.

67
00:05:51,930 --> 00:05:52,230
Right.

68
00:05:52,230 --> 00:05:54,140
So we fix all of these.

69
00:05:54,140 --> 00:05:59,450
Next let's go to the library stop the library spots over here.

70
00:05:59,460 --> 00:06:02,160
It's got the same issue too we've got to fix this.

71
00:06:02,160 --> 00:06:02,960
It says middle way.

72
00:06:02,960 --> 00:06:08,670
STV SDI lip to it I should be if it should be a folder in middle way.

73
00:06:08,700 --> 00:06:14,200
SDI and then there is over here so it is the library.

74
00:06:14,220 --> 00:06:16,390
This is what it looks like okay.

75
00:06:16,590 --> 00:06:20,790
We call this this the path and then I come over here.

76
00:06:21,060 --> 00:06:28,850
Edit paste this over here and an okay right.

77
00:06:29,460 --> 00:06:36,150
So the next thing we've got we going to do is we going to include the path to the um the port support

78
00:06:36,150 --> 00:06:38,210
package we just included.

79
00:06:38,250 --> 00:06:42,780
Remember I copied and pasted a PSP we've got to make that accessible.

80
00:06:43,620 --> 00:06:53,080
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

81
00:06:53,090 --> 00:06:54,570
to it for discovery

82
00:06:58,430 --> 00:06:59,170
see.

83
00:06:59,250 --> 00:06:59,570
Okay.

84
00:06:59,680 --> 00:06:59,920
Yeah.

85
00:06:59,920 --> 00:07:02,890
We've got us here.

86
00:07:03,070 --> 00:07:10,690
Controversy to copy and I'll come back to include this time I'll click out cause I'm adding new control

87
00:07:10,710 --> 00:07:11,620
fee and then.

88
00:07:11,620 --> 00:07:13,190
Okay.

89
00:07:13,560 --> 00:07:14,590
Right.

90
00:07:19,570 --> 00:07:27,310
So we can just keep these parts when we receive an arrow about a resource that cannot be identified

91
00:07:27,340 --> 00:07:29,920
or has no reference.

92
00:07:29,920 --> 00:07:34,550
We'll come back here and add more you know parts if that is what's required.

93
00:07:34,570 --> 00:07:38,060
But for now these standard ones should be fine.

94
00:07:38,060 --> 00:07:48,720
Or click apply over here apply in close and then I'll rebuild a project simply click over here to rebuild

95
00:07:48,720 --> 00:07:48,940
in

96
00:07:52,710 --> 00:07:53,270
right.

97
00:07:53,290 --> 00:07:54,370
It's done built in.

98
00:07:54,490 --> 00:07:56,830
We've got no arrow no warning.

99
00:07:57,030 --> 00:08:01,440
Okay so let's let's conclude this lesson here.

100
00:08:01,850 --> 00:08:07,870
Well before we do this actually let me show you the neural network we have when we simply expand our

101
00:08:07,870 --> 00:08:14,040
project tree come to application and then use.

102
00:08:14,920 --> 00:08:22,810
We have network to see remember in the cube emacs I give the neural network and name simply network.

103
00:08:22,810 --> 00:08:25,600
That is why it is called network or see over here.

104
00:08:25,630 --> 00:08:31,720
If we had called it m network it would have been called M this network and this is that data for the

105
00:08:31,720 --> 00:08:35,100
neural network hence the name network underscore.

106
00:08:35,130 --> 00:08:35,620
Let's see.

107
00:08:35,920 --> 00:08:46,690
So let's take a look on network C and this is network go see it s converted a while topology the topology

108
00:08:46,690 --> 00:08:52,260
of our model into these C functions for us and then we've got network data.

109
00:08:52,320 --> 00:08:53,910
See this is a large file.

110
00:08:53,950 --> 00:09:02,750
So you receive this warning you can simply say no and we've got to wait over here right.

111
00:09:04,810 --> 00:09:06,000
Okay.

112
00:09:06,370 --> 00:09:13,330
So there's a network dot h as well that allows us to be able to access the functions in network to see

113
00:09:13,420 --> 00:09:15,590
in and out of house.

114
00:09:15,610 --> 00:09:20,890
So the reason we have this is let's say we have an updated version of our model.

115
00:09:20,950 --> 00:09:28,350
All we have to do is replace this network does see a network underscore data I see and then the network

116
00:09:28,360 --> 00:09:30,400
dots each file with the new model.

117
00:09:30,400 --> 00:09:37,970
We simply need to replace these three files and then we have a Y system updated with our latest a model.

118
00:09:38,350 --> 00:09:40,750
And we're going to see how to do that.

119
00:09:41,020 --> 00:09:47,140
This face model with convert it might not have a good performance and we're going to replace it with

120
00:09:47,140 --> 00:09:51,590
a newer model just to show you this process.

121
00:09:52,120 --> 00:09:53,480
We've got you say here.

122
00:09:53,560 --> 00:09:54,140
Let's see.

123
00:09:55,930 --> 00:09:57,780
Okay.

124
00:09:58,540 --> 00:09:58,890
Okay.

125
00:09:59,050 --> 00:10:07,470
Yeah we can conclude here in the next lesson we show starts dealing with our actual project stop building

126
00:10:07,480 --> 00:10:15,490
D we should stop building the LCD interface that you are you should see the touch screen and D and D

127
00:10:15,880 --> 00:10:21,000
D graphical user interface to make this work or to bring this to life.

128
00:10:22,060 --> 00:10:26,870
So this then s what s h i wanted to show you this before we leave.

129
00:10:28,100 --> 00:10:29,220
Where was it.

130
00:10:29,500 --> 00:10:31,930
There should be a network H somewhere.

131
00:10:35,190 --> 00:10:40,720
Okay so one way to find a network to see that age is to simply come over here.

132
00:10:40,730 --> 00:10:47,700
Network dot H is included in network those see we can simply right click an open declaration and if

133
00:10:47,700 --> 00:10:51,970
I do this we know its location it's an amnesty include forward.

134
00:10:52,740 --> 00:11:00,900
So in order to update our embedded system would at latest a model we simply need to replace the network

135
00:11:00,930 --> 00:11:09,480
dot si network dot H and network underscored data dot see false these three files will be the new three

136
00:11:09,480 --> 00:11:13,190
files generated from the latest model and we shall see how to do this.

137
00:11:13,410 --> 00:11:17,880
I'm not gonna talk much about this I might confuse you but that's all there is for this lesson and I'll

138
00:11:17,880 --> 00:11:18,830
see you later.

139
00:11:19,550 --> 00:11:20,050
Hello.

140
00:11:20,190 --> 00:11:20,780
Welcome back.

141
00:11:21,720 --> 00:11:28,960
Okay in this lesson we're going to focus on um dealing with the touch interface and the LCD screen for

142
00:11:28,960 --> 00:11:32,220
a y amnesty use case.

143
00:11:32,220 --> 00:11:37,400
So I'll come back to I mean that see fall and stop populating it.

144
00:11:37,950 --> 00:11:40,860
But before I do that I'm going to run a simple test.

145
00:11:40,860 --> 00:11:49,470
I'm going to I'm going to check out of a clock to make sure the clock is correct.

146
00:11:49,470 --> 00:11:54,030
I'll just clean this a bit often I don't like these comments here.

147
00:11:54,270 --> 00:12:05,120
If you're find with them you can keep them but I'd rather have it rather have that far shorter.

148
00:12:05,660 --> 00:12:14,430
Okay so what I'm going to do is oh make sure I can download onto my board by creating a global verbosity

149
00:12:14,620 --> 00:12:22,410
count and then I'll simply increment the count in the end infinite loop.

150
00:12:22,780 --> 00:12:30,620
And if this works this shows that yeah everything is correctly set up and we can actually download onto

151
00:12:30,620 --> 00:12:31,150
our board.

152
00:12:31,420 --> 00:12:36,630
So come here and simply say count plus plus and I'm going to observe count in the watch window.

153
00:12:36,730 --> 00:12:41,120
One other thing I'm gonna do is I'm going to take this opportunity to verify.

154
00:12:41,170 --> 00:12:44,390
That's what clock setting is what we expect it to be.

155
00:12:44,380 --> 00:12:50,170
I'm gonna have another global variable here which I shall call fake for frequency and I'll come over

156
00:12:50,170 --> 00:12:53,650
here after of course the system proc config.

157
00:12:53,650 --> 00:13:06,680
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

158
00:13:06,890 --> 00:13:07,470
hcf.

159
00:13:07,490 --> 00:13:08,140
Okay.

160
00:13:10,060 --> 00:13:10,460
Yeah.

161
00:13:10,510 --> 00:13:13,490
That is the function S H see OK you freak.

162
00:13:14,270 --> 00:13:14,650
OK.

163
00:13:14,680 --> 00:13:18,250
And this would give us the frequency or system frequency.

164
00:13:18,700 --> 00:13:18,990
Yeah.

165
00:13:19,150 --> 00:13:21,280
So I'll click over here to build

166
00:13:26,530 --> 00:13:28,190
it's built successfully.

167
00:13:28,610 --> 00:13:30,920
No arrow no warning.

168
00:13:31,100 --> 00:13:35,900
Next I'm going to connect to my board to download.

169
00:13:35,930 --> 00:13:43,490
I'm gonna come to run and then I'll click debug and then I select a steam party to call text em application

170
00:13:43,580 --> 00:13:43,900
and then.

171
00:13:43,940 --> 00:13:45,740
Okay.

172
00:13:49,910 --> 00:13:54,300
And um it s gonna see at its launch configuration or keep everything here the same.

173
00:13:54,300 --> 00:13:56,410
And then I'll click Okay.

174
00:13:56,550 --> 00:14:02,010
S because that's the first time we had download and that is why we've got to create the launch configuration.

175
00:14:02,430 --> 00:14:02,840
Okay.

176
00:14:02,850 --> 00:14:05,960
This pops up I'm gonna see allow.

177
00:14:07,060 --> 00:14:08,000
Oh okay.

178
00:14:08,010 --> 00:14:11,560
It s asking what I want to switch the perspective to debunk for you.

179
00:14:11,580 --> 00:14:12,500
I'll say switch

180
00:14:18,110 --> 00:14:18,580
okay.

181
00:14:18,590 --> 00:14:21,340
It s s download in progress.

182
00:14:21,860 --> 00:14:22,890
So we've got a wait

183
00:14:25,930 --> 00:14:26,880
very fine

184
00:14:35,870 --> 00:14:38,420
download verified successfully.

185
00:14:38,420 --> 00:14:39,170
Okay.

186
00:14:39,350 --> 00:14:46,850
So it's downloaded onto the board and um these we use these um these buttons to step through the code

187
00:14:46,880 --> 00:14:47,630
one by one.

188
00:14:47,630 --> 00:14:50,030
If I click here it's just going to run the code.

189
00:14:50,300 --> 00:14:51,280
But if I want to step.

190
00:14:51,290 --> 00:14:58,580
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

191
00:14:58,580 --> 00:15:01,080
double click on this global variable code count.

192
00:15:01,100 --> 00:15:12,940
All right click and do some 0 select add expression to watch.

193
00:15:13,500 --> 00:15:14,430
I'll start again.

194
00:15:14,440 --> 00:15:19,940
Double Click to watch expression and then expression to watch count.

195
00:15:20,060 --> 00:15:24,710
Okay I'll keep this and then I'll do the same for frequency.

196
00:15:25,030 --> 00:15:29,580
I can likewise just typed the name of the global variable here since that window is open now.

197
00:15:29,590 --> 00:15:31,060
I can simply type the name.

198
00:15:31,090 --> 00:15:32,970
It's called Frick.

199
00:15:33,040 --> 00:15:43,300
Okay so I'm gonna click here to run click to run it says target's not available.

200
00:15:46,940 --> 00:15:49,090
Error target not available.

201
00:15:49,090 --> 00:15:49,600
Let's see.

202
00:15:49,610 --> 00:15:51,600
It seems my microcontroller.

203
00:15:51,590 --> 00:15:52,400
Disabled.

204
00:15:52,460 --> 00:15:57,350
Let's see.

205
00:15:57,590 --> 00:15:58,700
Let's start again.

206
00:15:58,700 --> 00:16:00,860
I'm gonna come over here.

207
00:16:01,560 --> 00:16:02,900
Um I'm gonna collect debug

208
00:16:08,400 --> 00:16:09,000
switch

209
00:16:17,880 --> 00:16:18,520
okay.

210
00:16:18,570 --> 00:16:23,690
Still loading service download in progress

211
00:16:38,010 --> 00:16:39,040
it's done.

212
00:16:39,230 --> 00:16:44,030
This time I'm going to execute the instructions line by line.

213
00:16:44,030 --> 00:16:45,560
I'm gonna click step over.

214
00:16:46,310 --> 00:16:51,910
So when I click this the line highlighted is the one that would execute.

215
00:16:51,920 --> 00:16:54,140
So click over here.

216
00:16:54,420 --> 00:16:55,190
Step over.

217
00:16:56,180 --> 00:16:57,890
So it s executed the first line.

218
00:16:57,890 --> 00:17:03,370
Now when I click this the next instruction to be executed is going to be system clock config.

219
00:17:03,400 --> 00:17:04,530
It's executed.

220
00:17:04,730 --> 00:17:10,700
Now when I click this the next instruction is going to get the frequency and store in the global variable.

221
00:17:10,760 --> 00:17:11,400
F are you.

222
00:17:11,400 --> 00:17:20,690
Q You can see it says over here our frequency is sixty eight million meaning sixty eight mega heads.

223
00:17:20,820 --> 00:17:21,390
Okay.

224
00:17:21,470 --> 00:17:28,400
Continue to step over right onto initialization is complete.

225
00:17:28,430 --> 00:17:30,380
Now we're in de while 1 Loop.

226
00:17:30,380 --> 00:17:36,060
If I click this what's going to happen is 0 account variable is going to increment by 1.

227
00:17:36,130 --> 00:17:37,880
You can see count as 1.

228
00:17:37,990 --> 00:17:39,290
Okay so this is fine.
