-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1882 lines (1263 loc) · 162 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<link rel="dns-prefetch" href="http://example.com">
<title>zhuzhuzhu's blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="zhuzhuzhu's blog">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="zhuzhuzhu's blog">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="ZHUJIALE">
<meta name="twitter:card" content="summary">
<link rel="alternative" href="/atom.xml" title="zhuzhuzhu's blog" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link rel="stylesheet" type="text/css" href="/./main.0cf68a.css">
<style type="text/css">
#container.show {
background: linear-gradient(200deg,#a0cfe4,#e8c37e);
}
</style>
<meta name="generator" content="Hexo 7.0.0"></head>
<body>
<div id="container" q-class="show:isCtnShow">
<canvas id="anm-canvas" class="anm-canvas"></canvas>
<div class="left-col" q-class="show:isShow">
<div class="overlay" style="background: #71cfc5">
</div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img src="\img\head.jpg" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author">zhuzhuzhu<a href="/"></a></h1>
</hgroup>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/">随笔</a></li>
<li><a href="/categories/index.html">分类</a></li>
<li><a href="/archives/index.html">归档</a></li>
</ul>
</nav>
<nav class="header-smart-menu">
<a q-on="click: openSlider(e, 'innerArchive')" href="javascript:void(0)">所有文章</a>
<a q-on="click: openSlider(e, 'friends')" href="javascript:void(0)">友链</a>
<a q-on="click: openSlider(e, 'aboutme')" href="javascript:void(0)">关于我</a>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/zhuzhuzhus" title="github"><i class="icon-github"></i></a>
<a class="qq" target="_blank" href="#" title="qq"><i class="icon-qq"></i></a>
<a class="weixin" target="_blank" href="/%5Cimg%5Cwechat.jpg" title="weixin"><i class="icon-weixin"></i></a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail"><i class="icon-mail"></i></a>
</div>
</nav>
</header>
</div>
</div>
<div class="mid-col" q-class="show:isShow,hide:isShow|isFalse">
<nav id="mobile-nav">
<div class="overlay js-overlay" style="background: #71cfc5"></div>
<div class="btnctn js-mobile-btnctn">
<div class="slider-trigger list" q-on="click: openSlider(e)"><i class="icon icon-sort"></i></div>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img src="\img\head.jpg" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author js-header-author"></h1>
</hgroup>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/zhuzhuzhus" title="github"><i class="icon-github"></i></a>
<a class="qq" target="_blank" href="#" title="qq"><i class="icon-qq"></i></a>
<a class="weixin" target="_blank" href="/%5Cimg%5Cwechat.jpg" title="weixin"><i class="icon-weixin"></i></a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail"><i class="icon-mail"></i></a>
</div>
</nav>
<nav class="header-menu js-header-menu">
<ul style="width: 70%">
<li style="width: 25%"><a href="/">主页</a></li>
<li style="width: 25%"><a href="/">随笔</a></li>
<li style="width: 25%"><a href="/categories/index.html">分类</a></li>
<li style="width: 25%"><a href="/archives/index.html">归档</a></li>
</ul>
</nav>
</header>
</div>
<div class="mobile-mask" style="display:none" q-show="isShow"></div>
</nav>
<div id="wrapper" class="body-wrap">
<div class="menu-l">
<div class="canvas-wrap">
<canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
</div>
<div id="js-content" class="content-ll">
<article id="post-1" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/01/05/1/">嵌入式学习规划</a>
</h1>
<a href="/2024/01/05/1/" class="archive-article-date">
<time datetime="2024-01-04T16:30:01.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-01-05</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">117字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">1分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p>在这里记录自己的嵌入式学习方向和成果,只做大方向的规划,目前学习规划如下:</p>
<ul>
<li><p><em><strong>√</strong></em> linux基础学习 </p>
</li>
<li><p><em><strong>√</strong></em> arm裸机开发(使用正点原子IMX6ULL的板子)</p>
</li>
<li><p>√ linux的系统移植</p>
</li>
<li><p>√ Linux核心驱动开发</p>
</li>
<li><p>√ qt</p>
</li>
<li><p>√ linuxc应用编程</p>
</li>
<li><p>【doing】linux内核源码分析(主要通过以下两本书并结合linux源码进行学习):</p>
<ul>
<li>linux内核设计与实现(在看)</li>
<li>深入理解linux内核</li>
</ul>
</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color3">学习路线的规划</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/01/05/1/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-lwip" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/09/21/lwip/">LWIP网络协议栈学习</a>
</h1>
<a href="/2024/09/21/lwip/" class="archive-article-date">
<time datetime="2024-09-21T13:51:46.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-09-21</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">1.6k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">8分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="lwip"><a href="#lwip" class="headerlink" title="lwip"></a>lwip</h1><h2 id="lwip协议栈内存管理"><a href="#lwip协议栈内存管理" class="headerlink" title="lwip协议栈内存管理"></a>lwip协议栈内存管理</h2><p>pbuf 结构体:</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">pbuf</span> {</span></span><br><span class="line"> <span class="comment">/** next pbuf in singly linked pbuf chain */</span></span><br><span class="line"> <span class="class"><span class="keyword">struct</span> <span class="title">pbuf</span> *<span class="title">next</span>;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">/** pointer to the actual data in the buffer */</span></span><br><span class="line"> <span class="type">void</span> *payload;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * total length of this buffer and all next buffers in chain</span></span><br><span class="line"><span class="comment"> * belonging to the same packet.</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * For non-queue packet chains this is the invariant:</span></span><br><span class="line"><span class="comment"> * p->tot_len == p->len + (p->next? p->next->tot_len: 0)</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="type">u16_t</span> tot_len;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/** length of this buffer */</span></span><br><span class="line"> <span class="type">u16_t</span> len;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/** pbuf_type as u8_t instead of enum to save space */</span></span><br><span class="line"> <span class="type">u8_t</span> <span class="comment">/*pbuf_type*/</span> type;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/** misc flags */</span></span><br><span class="line"> <span class="type">u8_t</span> flags;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * the reference count always equals the number of pointers</span></span><br><span class="line"><span class="comment"> * that refer to this pbuf. This can be pointers from an application,</span></span><br><span class="line"><span class="comment"> * the stack itself, or pbuf->next pointers from a chain.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="type">u16_t</span> ref;</span><br><span class="line">};</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<ul>
<li>next:链表</li>
<li>payload: 存放网络数据包的 </li>
<li>len:可变空间大小</li>
<li>tot_len:整个链表下一个节点之后的总长度大小</li>
<li>type:4种pbuf类型</li>
<li>ref:引用标志</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">网络协议栈</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/网络//" class="article-tag-list-link color3">网络</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/09/21/lwip/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-aarch64" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/09/01/aarch64/">AARCH64架构学习</a>
</h1>
<a href="/2024/09/01/aarch64/" class="archive-article-date">
<time datetime="2024-09-01T13:51:46.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-09-01</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">2.8k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">10分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="AARCH64学习"><a href="#AARCH64学习" class="headerlink" title="AARCH64学习"></a>AARCH64学习</h1><p><a target="_blank" rel="noopener" href="https://armv8-doc.readthedocs.io/en/latest/03.html">参考</a></p>
<h2 id="armv8基础知识"><a href="#armv8基础知识" class="headerlink" title="armv8基础知识"></a>armv8基础知识</h2><p>armv8中,执行发生在4个异常级别之一,在aarch64中,异常级别决定了特权级别,类似于armv7中定义的特权级别,异常级别决定特权级别,因此在Eln执行对于特权Pln。类似地,具有比另一个更大的n值的异常级别处于更高的异常级别,一个数字比另一个小的异常级别被描述为处于较低的异常级别。</p>
<ul>
<li>EL0 :normal user app</li>
<li>EL1:Operation system kernel typically described as privileged</li>
<li>EL2:Hypervisor</li>
<li>EL3:Low-level firmware,including the Secure Monitor<img src="https://zhujialetypora.oss-cn-beijing.aliyuncs.com/typora/202409032044334.png" alt="image-20220314223244988"></li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">架构学习</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/arm64,架构学习//" class="article-tag-list-link color1">arm64,架构学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/09/01/aarch64/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-arm" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/08/26/arm/">arm32架构</a>
</h1>
<a href="/2024/08/26/arm/" class="archive-article-date">
<time datetime="2024-08-26T13:51:46.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-08-26</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">2.2k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">8分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="arm架构学习"><a href="#arm架构学习" class="headerlink" title="arm架构学习"></a>arm架构学习</h1><p><strong>工作模式</strong></p>
<ul>
<li><p>User :用户模式,一般在执行上层应用程序的时候处于该模式(和linux用户态和内核态无关)</p>
</li>
<li><p>Fiq 快速中断模式</p>
</li>
<li><p>IRQ:中断模式</p>
</li>
<li><p>SVC:当复位或执行软中断指令后arm进入这种模式(例如刚上电或者软中断执行的时候处于该模式)</p>
</li>
<li><p>Abort: 当产生存取异常时进入这种模式</p>
</li>
<li><p>Undef: 当执行未定义的指令时ARM将进入这种模式</p>
</li>
<li><p>System: 使用和User模式相同的寄存器集的特权模式</p>
</li>
<li><p>Monitor:为了安全而拓展出的用于执行安全监控代码的模式</p>
</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">架构学习</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/arm,架构学习//" class="article-tag-list-link color4">arm,架构学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/08/26/arm/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-Linux驱动开发" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/02/27/Linux%E9%A9%B1%E5%8A%A8%E5%BC%80%E5%8F%91/">Linux驱动开发</a>
</h1>
<a href="/2024/02/27/Linux%E9%A9%B1%E5%8A%A8%E5%BC%80%E5%8F%91/" class="archive-article-date">
<time datetime="2024-02-27T12:33:25.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-02-27</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">17.5k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">72分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Linux驱动开发和裸机开发的区别**</p>
<ol>
<li>裸机开发:<ol>
<li>底层,和寄存器打交道,有些MCU提供库</li>
</ol>
</li>
<li>驱动开发思维:<ol>
<li>直接操纵寄存器不太现实</li>
<li>根据Linux下的各种驱动框架进行开发,一定要满足框架,也就是Linux各种驱动框架的掌握</li>
<li>驱动最终表现就是/dev/xxx文件。打开,关闭,读写。。。</li>
<li>现在新的内核支持设备树,这是一个.dts文件,此文件描述了板子的设备信息</li>
</ol>
</li>
<li>Linux驱动开发分类:<ol>
<li>字符设备驱动:最多的</li>
<li>块设备驱动:存储</li>
<li>网络设备驱动<br>==一个设备不一定只属于摸某一个类型==</li>
</ol>
</li>
</ol>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">linux</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/linux//" class="article-tag-list-link color1">linux</a>
</li>
<li class="article-tag-list-item">
<a href="/categories/linux/驱动开发//" class="article-tag-list-link color5">驱动开发</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/02/27/Linux%E9%A9%B1%E5%8A%A8%E5%BC%80%E5%8F%91/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-系统移植篇" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/01/18/%E7%B3%BB%E7%BB%9F%E7%A7%BB%E6%A4%8D%E7%AF%87/">系统移植篇</a>
</h1>
<a href="/2024/01/18/%E7%B3%BB%E7%BB%9F%E7%A7%BB%E6%A4%8D%E7%AF%87/" class="archive-article-date">
<time datetime="2024-01-18T13:51:46.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-01-18</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">8.7k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">41分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="系统移植"><a href="#系统移植" class="headerlink" title="系统移植"></a>系统移植</h1><ul>
<li>Windows下使用OTG烧写系统<ol>
<li>在Windows使用NXP提供的mfgtool来向开发板烧写系统,需要用先将开发板的USB_OTG链接到电脑上</li>
<li>mfgtool工具是向板子先下载一个linux系统,然后通过系统完成烧写工作</li>
</ol>
</li>
<li>Ubuntu下通过脚本烧写系统<ol>
<li>首先向SD卡烧写一个系统,然后使用SD卡启动,启动以后在Linux中执行烧写到EMMC或NAND中</li>
</ol>
</li>
</ul>
<h2 id="Uboot"><a href="#Uboot" class="headerlink" title="Uboot"></a>Uboot</h2><p>Uboot是一个裸机程序,比较复杂,就是一个bootloader。作用就是用于启动Linux或其他系统,Uboot最主要的工作就是初始化DDR(Linux的运行是运行在DDR里面的),一般linux镜像zimage(uimage)+设备树(.dtb)存放在SD,EMMC,NAND,SPI FLASH等等外置存储区域。</p>
</div>
<div class="article-info article-info-index">
<div class="article-pop-out tagcloud">
<i class="icon-tuding"></i>
<a class="article-tag-list-link color3">置顶</a>
</div>
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">linux</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/linux,uboot//" class="article-tag-list-link color2">linux,uboot</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/01/18/%E7%B3%BB%E7%BB%9F%E7%A7%BB%E6%A4%8D%E7%AF%87/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-ARM裸机开发" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2023/09/11/ARM%E8%A3%B8%E6%9C%BA%E5%BC%80%E5%8F%91/">ARM裸机开发</a>
</h1>
<a href="/2023/09/11/ARM%E8%A3%B8%E6%9C%BA%E5%BC%80%E5%8F%91/" class="archive-article-date">
<time datetime="2023-09-11T03:13:41.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2023-09-11</time>
</a>
<div style="margin-top:10px;">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-keyboard-o"></i>
<span class="post-meta-item-text"> 字数统计: </span>
<span class="post-count">9.6k字</span>
</span>
</span>
<span class="post-time">
|
<span class="post-meta-item-icon">
<i class="fa fa-hourglass-half"></i>
<span class="post-meta-item-text"> 阅读时长: </span>
<span class="post-count">38分</span>
</span>
</span>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="ARM裸机"><a href="#ARM裸机" class="headerlink" title="ARM裸机"></a>ARM裸机</h1><h2 id="汇编LED驱动实验"><a href="#汇编LED驱动实验" class="headerlink" title="汇编LED驱动实验"></a>汇编LED驱动实验</h2><h3 id="汇编LED原理分析"><a href="#汇编LED原理分析" class="headerlink" title="汇编LED原理分析"></a>汇编LED原理分析</h3><ol>
<li>ALPHA开发板LED灯硬件原理分析<br>stm32初始化流程:<ol>
<li>使能GPIO时钟</li>
<li>设置IO复用,将其复用为GPIO</li>