-
Notifications
You must be signed in to change notification settings - Fork 2
/
log201002vimicro.txt
3564 lines (3084 loc) · 192 KB
/
log201002vimicro.txt
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
10:20 2010-2-1
VC0882, 最小环境, arm cortex-a8, SOC: omap3530, 移植aasp到OMAP3530, 续, 完善aasp, 去掉semihost, 续"12:40 2010-1-30"
0, 代码完成, 上传CVS. 总结: aasp除了热键功能外基本完成, 此次改进见"1".
代码映像: "D:\work\VC0882\code\milestonemini_aasp_aasp除了用户热键其余基本ok"
1, 加入aasp子命令模式:
1), fgetssubT居然也是单独实现的. 而且依赖与修改后的fgetc行为. 这个问题我认为很严重: 我们要么使用库(库下面只有桩脚函数), 要么不使用库(像我们的f_open虽然不方便, 但没有可移植性问题).
2), 命令行模式下退格有问题.
2, 修正命令补齐问题:
1), 把原有fgetc和Uart_Read4Aasp在aasp.c中实现, 并改名为getc4aasp和Read4Aasp. 可以正确补齐help命令. 补齐dhry会死.
2), 现在又可以了. clean后再实验. 输入help, vimicro, dhry, dhry_global都可以. 发现输入"dhry_global 0 1就死了"
3), 后来去掉-Otime就没事了. 肯定还是代码有问题. 暂时不差.
2, 注: dhry测试中由于没有实现timer, 所以最后不会给出测试结果.
3, 去掉semihost:
1), 打开init.s的"IMPORT __use_no_semihosting", 提示:
armlink : error L6915: Library reports error: __use_no_semihosting was requested, but _sys_open was referenced
2), 与_sys_open有关的记录.
Loading member sys_io.o from c_5.l. definition: __stderr_name
definition: __stdin_name
definition: __stdout_name
definition: _sys_open
definition: _sys_close
definition: _sys_write
definition: _sys_read
definition: _sys_istty
definition: _sys_seek
definition: _sys_ensure
definition: _sys_flen
reference : __I$use$semihosting
reference : strlen
Loading member fopen.o from c_5.l. definition: freopen
definition: fopen
reference : __aeabi_memclr4
reference : __stdin
reference : _fclose_internal
reference : _fseek
reference : _sys_open
reference : malloc
Loading member fopen_locked.o from c_5.l. definition: _freopen$locked
definition: _fopen$locked
reference : __aeabi_memclr4
reference : __stdin
reference : _fclose_internal
reference : _fseek
reference : _mutex_initialize
reference : _stream_list_lock
reference : _sys_open
reference : freopen
reference : malloc
weak ref : _mutex_acquire
weak ref : _mutex_release
没什么线索. 只好单步跟踪.
3), 单步跟踪发现是"_main"->__rt_entry_presh_1->__rt_lib_init->_initio->freopen->_sys_open
4), 看_sys_open相关库的移植.
(1), fputc要考虑大小端问题.
Be aware of endianness with fputc(). fputc() takes an int parameter, but contains only a character. Whether the character is in the top or the bottom byte of the integer variable depends on the endianness. The following code sample avoids problems with endianness:
extern void sendchar(char *ch);
int fputc(int ch, FILE *f)
{
/* example: write a character to an LCD */
char tempch = ch; // temp char avoids endianness issue
sendchar(&tempch);
return ch;
}
(2), 2.11.2 Target-dependent input and output functions use semihosting. If any function is redefined, all stream-support functions must be redefined.
(3), 没看出太多端倪,
最后是参考"VC0882/adslib/In_custom.c"修改retarget.c, 注释了
//FILE __stdout;
//FILE __stdin;
//FILE __stderr;
并加入了In_custom.c的_sys_xxx定义. 这个地方其实不是很明白. \todo 还需要理清思路.
原来retarget.c的注释说
** These must be defined to avoid linking in stdio.o from the
** C Library
struct __FILE { int handle; /* Add whatever you need here */};
//FILE __stdout;
//FILE __stdin;
4, 目前未解的地方:
1), cortex-a8 cache mmu最基本代码还不理解: 开cache, 映射并开启mmu.
2),
13:00 2010-2-1
时间管理
0, 9:37-23:03
1, 计划
1), VC0882最小环境, 移植aasp到OMAP3530.
2), 发VC0882最小环境上周总结邮件. 见"13:01 2010-2-1"
3), 新增计划(19:38 2010-2-1)
(1), 加VC0882 nucleus下面的中断.
(2), 发邮件: kernel选型, kgdb, ftrace. <DONE>
(3), 简单看下vavante Linux driver版本.
"19:38 2010-2-1"end
2, 执行
1), VC0882最小环境, 移植aasp到OMAP3530. 见"10:20 2010-2-1"
(其中1h支持arm debug).
3, 次日计划:
1), 填加班记录.
13:01 2010-2-1
VC0882, 最小环境, 上周工作总结, 移植aasp到OMAP3530, arm debug
1, aasp: 目前实现功能和问题. 架构调整.
2, armdebug: 仿真没有通过. 给IC同事发了CSAT和RVI文档. 会加上RTCK和ROM.
开始需要一个比较大的sram(256kbyte).
22:33 2010-2-1
VC1600, VC0882, arm debug, JTAG; RVI, rvds4.0安装
关于VC0882机器
Hi, all
598实验室进门右手中间那台机器(test6)已经为882项目安装了RVDS4.0, 此机器的RVDS3.0暂时不能用. 请大家用其他机器.
hi, dongliang
test11那台机器的license怎么设置都不行(rvds4.0和rvds3.0都不行). 没办法只能用test6这个机器了(安装很顺利..).
不知道是因为test6机器比较干净.
22:43 2010-2-1
VC0882, gpu, 2d/3d, vivante, 编译
vivante: rvds3.0 codewarrior. 编译2d时提示no linker command. 后来clean一下就可以了. 编译3d时还是同样问题, vavante工程师发现是utilities.h的'#include "Regs\AQ.h"'字母大小写 错了.
注: 3D资料: "\\10.0.2.36\sqmshare\Document\Gpu"
10:19 2010-2-2
时间管理
0, 9:43
1, 计划
0), 整理本周工作计划. <DONE>
1), VC0882<转移>:
(1), VC0882最小环境, 移植aasp到OMAP3530. 初步完成, 总结.
(2), 发前段时间arm最小环境总结提纲, 本周如果有时间向大家汇报. 见Aiguo邮件"答复: VC0882 kernel选型和debug方式调查"20100202_0939
(3), 加VC0882 nucleus下面的中断. 周四之前需要给大家使用.
(4), 在VC0882/panda_os下面加入irq, uart, sdio寄存器. 本周完成. 见AiGuo邮件"882 reglist"20100201_1950
2), GPU driver: 简单看下vavante Linux driver版本. <转移>
3), 编译并实验beagleboard eclair. <转移>
4), 杂: <转移>
(1), 填加班记录.
4, 总结: 下午去调vivante东西花了大量时间. 当初拿来arm11板子时如果用过烧FPGA这个就会快一些. 当初本来想做的, 为什么没做就不清楚了.
10:28 2010-2-2
VC0882, 最小环境, FPGA, arm debug, cortex-a8, RVI连接VC0882, 续, HuangWei询问Arm cortex-a8 coresight debug问题
Support-cores [Support-cores@arm.com]邮件"Re: two issues on coresight (446204)"20100202_0739
> I have two questions on cortex-a8.
>
> 1. cortex-a8 and DAP can both access debug apb bus. But from ARM
> document,
> cortex-a8 access debug
> apb with address bit 31 low but dap access it with address bit 31
> high. Does this mean that two address regions, one resides in lower 2G
> and one in higher 2G, should be allocated for debug apb bus ?
No. You simply allocate enough memory map for the address space of the debug APB in your system memory map. You have a APB interface connected to your bus matrix (like PL301/NIC-301). You decode your APB at the appropriate system address. Let's say you need 128K bytes for your Debug APB. You connect the APB from your system bus to the APB-Mux in the DAP. Now either your system address space or your debugger can get to this 128K (17 address bits) space. So all of the peripheral on the debug APB look at the 17 bits of address. They also look at bit
31 on the debug APB to determine if the master is the system CPU or the debugger.
>
> 2. We implemented cortex-a8 and coresight in FPGA.Using CSAT as the
> debug console, we found that alternative APB-AP and AHB-AP access to
> debug apb will result in AHB-AP access failure. Is anything wrong with
> this ? And realview debugger can't correctly connect to a8. Will
> realview debugger use both APB-AP and AHB-AP to access debug apb?
You are allowed to use either system accesses or debug accesses to the debug APB. There are no limitations on mixing these accesses. There are no known errata related to this function.
10:36 2010-2-2
杂志, 嵌入式, 电子工程专辑, 用户名zhangjian@vimicro.com, 密码: 最简工号密码(7位)
11:12 2010-2-2
VC0882, 最小环境, FPGA, arm debug, aasp, 整理本周工作计划.
1, VC0882最小环境, 移植aasp到OMAP3530. 初步完成, 总结.
2, 发前段时间arm最小环境总结提纲, 本周如果有时间向大家汇报. 见Aiguo邮件"答复: VC0882 kernel选型和debug方式调查"20100202_0939
3, 加VC0882 nucleus下面的中断. 周四之前需要给大家使用.
4, 在VC0882/panda_os下面加入irq, uart, sdio寄存器. 本周完成. 见AiGuo邮件"882 reglist"20100201_1950
5, 试验openocd, codehammer在VC0882上能不能使用. 这个估计得周五了.
11:39 2010-2-2
VC0882, rtos, nucleus, nucleus中timer移植
参考nucleus internal(中文: Nucleus PLUS源码分析)定时组件(Timer Component)
1, 根据文档 tmt.xxx是timer移植文件. 查看工程可以找到Nu_Tmt.s(VC0882/panda_os/nucleus/port), 这个里面有各种timer底层函数. 可能只是我们没有实现. 另外"Panda_Init.s (appsentry\init_src\asm)"里面的调用timer中断的部分(TMT_Timer_Interrupt)可能被注释了.
2, 根据文档和代码"Timer"应该是timer counter基址, 但是没找到谁给它赋值.
13:48 2010-2-2
1, 注意cortex-a8和cpu-axi是同步的.
HuangWei邮件"Vc0882 FPGA platform is ready now"20100202_1248
Vc0882 FPGA platform is ready to run test now. FPGA image version is rev0_01020122_02020121.
Configuration of this version is as following:
1. CPU_ACLK: 32MHz
2. PCLKIN; 25Mhz
3. ACLKIN: 22.58Mhz
4. XCLKIN: 24Mhz
5. X32KIN: 12Mhz
Note that A8 core clk is synchoronus to CPU_ACLK. Thus A8 core is running at 32Mhz.
Hi ZhangJian,
you can start debug session on this version now. In addition, please setup another FPGA hardware platform for concurrent use by ICD and ICP.
Hi MeiPing,
Using CSAT as the debug console, alternative APB-AP and AHB-AP access to debug apb will result in AHB-AP access failure. And this failure is repeatable. So Could you continue emulating it and try to regenerate it in simulation? I will work with you on this.
2, YangZuoXing邮件"答复: Vc0882 FPGA platform is ready now"20100202_1304
目前我们采用简版的ARM A8 (NO NEON, NO L2 CACHE), 在简化的条件下(32MHZ FOR ARM AND 32MHZ FOR ARM’S BUS),终于可以通过A8 的JTAG访问到882 的SRAM 和模块寄存器了!
感谢HUANGWEI, HAIFENG,JIHUA, ZHANGJIAN,MEIPING这一两个礼拜的努力!
虽然比原来的计划晚了一些,但我们还是要努力将失去的时间再赶回来。
HI, YANGLEI,
请仿一下FPGA版本的DDRC+PHY.
HI, DASHAN, YUNFEI AND WENJIE,
请准备在FPGA上调试MOBILE DDR.
HI, JIHUA and zhangjian,
请准备好三个平台,一个FOR ARM DEBUG, 一个FOR ZHANGJIAN, 一个FOR DDR DEBUG.
3, 实验和回信:
1), 简单测试了1MHz, 10Mhz, 20Mhz clock下arm寄存器和sram读写pass, 下面会实验最简单的程序能否运行.
2), 实验中RVdebugger memory窗口中访问0x7ffc地址时会提示0x8000 precise data abort,
记得830 sram超过边界会自动绕回. 一般这种超过memory边界的访问硬件如何处理呢?
3), 用adaptive clock auto configure会出错.
Hi, dr. yang
0), 能不能总结一下之前遇到的问题便于将来分析.
1), memory只有32k, 没法跑我们已经准备好的测试程序. 因为axf文件默认从0x8000地址(32k)开始链接, 我们希望在sram和ddr跑的程序是一样的.
2), 说明FPGA现有模块: 是否是全功能, 对软件的影响, 例如arm没有L2 cache. 我们软件最小环境至少需要uart, timer, irq等模块.
3), 希望说明一下现有coresight结构. 另外现有版本仿真是否仿过path: jtag-dp -- apb-ap -- cortex-a8, jtag-dp -- ahb-ap -- sram. 这两条通路RVdebugger软件需要使用.
4, 思考: 去掉arm的L2 cache和NEON会不会有问题呢? 没有NEON会出现未定义指令. 查没有L2会怎么样. rvds4.0里面可以选择无NEON无L2.
16:20 2010-2-2
VC0882, GPU, 2d/3d, vivante, vivante 2d test运行成功
1, 参考"16:16 2009-11-5"arm debug training.
2, "C:\Program Files\ARM\Versatile\PB11MPCore_HBI0159\3.7\1\boardfiles"
1), filelist.txt有文件说明: 包括progcards_multiice, progcards_usb, progcards_rvi相关文件的说明.
3, multiICE:
1), multi-ice\multi-ice_config_file_creator.xls, 里面Board选择PB11MPCore, 单击"Create multiICE configuration file"生成配置文件(*.cfg).
2), 根据irlength_arm.txt文档把irlength加入"<\Program Files\ARM>\Multi-ICE\irlength.arm".
3), 打开multiice server, load刚才保存的configuration.
4), progcards_multi.exe
4, USB方式.
在"C:\Program Files\ARM\Versatile\PB11MPCore_HBI0159\3.7\1\boardfiles\usb_debug_driver"安装驱动.
4, 最后发现是板子型号错了.
板子型号: EB_HBI0140, 资料光盘(arm felix liu提供)"\\10.0.2.36\sqmshare\Document\ARM\VersatileFamilyCD_v3.7".
板子支持usb烧写FPGA, 驱动位于boardfiles\usb_debug_driver.
使用progcards_usb.exe下载, 完整压缩包在"\\10.0.2.36\sqmshare\Document\Gpu\GC430\demo完整包"(包括编译结果和log).
10:05 2010-2-3
时间管理
0, 9:38
1, 计划<DONEor转移>
1), 上午完成VC0882装机. 发信. <DONE>
2), arm评估板FPGA烧写方法总结: 这个很重要. 下午training前要完成. <DONEby0204)
3), 下午training. <DONE>
4), 看昨天, 前天VC0882最小环境相关邮件.
5), 晚上看irq并找dongliang讨论. VC0882最小环境其他计划见11:12 2010-2-2".
6), 杂: 编译并实验beagleboard eclair; 填加班记录(2月1日, 2月3日).
7), 新:
(1), irq写测试代码. reglist: irq, dmac.
(2), 请dongliang讲了讲uart改动(nucleus下), 无OS下的代码以后看来使用会很少了.
(3), clock提供接口函数. beizhan已经发了padc的. 这个我要抓紧.
(4), 更新VC0882 FPGA注意事项: config, reset等<DONEby0205)
8), beizhan会做一个sd卡boot, 可能需要我帮忙.
9), zhaoyuan会去移植Linux. 我的想法是做irq, uart,timer最小环境时就考虑好Linux需要的函数, 最小环境OK同时Linux kernelOK. 版本选择2.6.29标准内核.
10), sdio 寄存器读写.
2, 执行
1), 上午+中午部分时间完成计划-1), 见"10:27 2010-2-3".
2), 下午training.
3), 19:41- . VC0882最小环境, 在FPGA上跑简单程序验证arm基本可用. 见"19:44 2010-2-3"
10:14 2010-2-3
VC0882, 最小环境, arm cortex-a8, coresight, debug, aasp, 列出VC0882最小环境相关内容的提纲("11:12 2010-2-2"2)
1, cortex-a8 overview, 原来总结过. 分core到board四个层次说明
2, debug: 结合arm文档和huangwei VC0882资料, 调试中问题说明. 三个cortex-a8调试器.
3, TI OMAP3530研究. bootloader,kernel, android.
4, Linux kernel: kgdb, ftrace.
5, VC0882最小c环境: rvds4.0初始化流程变化. cache,mmu变化(HW, SW).
10:27 2010-2-3
(11:28 2010-3-5)
(20:39 2010-6-1)添加realviewICE, TRACE2驱动地址
VC0882, 最小环境, rvds4.0安装使用, RealViewICE使用说明, 已上传CVS, 与CVS同步
CVS位置: "D:\VC0882\document\arm\debug\RealViewICE使用说明.txt"
0, 注意事项
1), 使用两相电源线, 原配三相电源线是125V, 10A的.
2), arm推荐用LVDS那根高速jtag线(40pin):
a long 40-way ribbon cable and a Low Voltage Differential Signaling (LVDS) 40-way to 20-way probe.
1, rvds4.0机器做了ghost
在"\\10.0.2.36\sqmshare\share\ghost"传了四个映像, "gx620_rvds4.0_ghost"是实验室test6机器的映像, 这个映像是新恢复的系统, 很干净. "gx755_full_sw_ghost"是zhangjian pc的映像(需要改ip). "gx520_rvds40_ghost", "4600_rvds40_ghost"分别是830sv实验室两个机器的映像.
"gx755_full_sw_ghost"用于yuyang 760机器时, 开始鼠标键盘无法使用, 后来系统自动更新后可以使用(不清楚是否与系统自动有关).
2, rvds4.0安装:
1), 软件和crack位于"\\10.0.2.36\sqmshare\Utilities\IDE\rvds4.0". crack详见crack\readme.txt.
注意rvds4.0和以前版本无法共存, 安装rvds4.0后codeworrier和eclipse仍然可以使用, 但是armcc会使用4.0的armcc.
如果希望使用旧版, 需要修改环境变量.
例如使用rvdebugger3.0, 需要修改"RVDEBUG_INSTALL"为:
C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium. 否则rvdebugger会在连接时报错.
注: 使用eclipse ads编译时要去掉"--apcs /adsabi", 这个参数rvds4.0已经不支持了.
2), 如果是机器ghost恢复的直接修改网卡物理地址即可:
C:\Program Files\ARM\Licenses\rvds.dat中"0013729F936F"(hostID)替换为自己的网卡物理地址. 网卡物理地址可以用"ipconfig /all"查看.
0013729F936是rvds.dat中hostID=后面的数字. 一共19处需要替换. 复制自己网卡物理时别忘了去掉中间的连接符”-“
3, RVI使用
1), RVI第一次连接时会安装驱动. 成功后在任务栏右下角有USB设备" RealView ICE Hardware on USB". 如果没有自动安装驱动, 可以去设备管理器中更新驱动, 系统自动找到驱动.
2), 使用比原来的jlink和multiice多了auto configure步骤, 详细过程见"36: Document\Jtag_Debugger\RVI\rvi使用方法.doc"
(1), clock speed设为10MHz. auto configure时一定不要选”Use adaptive clock”, VC0882硬件设计有问题. RTCK接到了其它地方, 会造成rvi找不到a8.
(2), 建议右键单击新加入的RVI configuration, 选择rename, 改名为”VC0882”, 已经在init_sciprt 脚本中加入连接cortex-a8的命令.
3), 命令行使用
\todo: 测试cortex-a8基本寄存器和memory能不能写成脚本.
1), 设置寄存器
setreg @R9=0x1
2), memory填充, 从0x0到0x8000以32byte为单位填充0xaa55aa55:
fill /32 S:0x0..+0x8000=0xaa55aa55
4, realviewICE和TRACE2插入PC后, 提示安装驱动. 一般选择自动搜索即可. 如果找不到, 可以手动指定目录"C:\Program Files\ARM\RVI\Drivers\usb_driver\1.3\39\win_32-pentium".
17:22 2010-2-3
VC0882, GPU, 2d/3d, vivante, arm evaluation board: EB_HBI0140, FPGA烧写方法, 运行vivante 2d demo; 支持shanghai VC0718 team PB-A8使用.
1, 准备工作
1), 确定板子型号(EB_HBI0140): 从板子coretile, logictile下面可以看到HBI0140.
2), 解压"\\10.0.2.36\sqmshare\Document\Gpu\GC430\demo完整包\boardfiles.rar", 烧写FPGA需要的文件都在这里.
注: 板子原始资料可以安装"\\10.0.2.36\sqmshare\Document\ARM\VersatileFamilyCD_v3.7". "C:\Program Files\ARM\Versatile\EB_HBI0140\3.7\1\boardfiles"是板子FPGA烧写工具和配置脚本. 里面的Filelist.txt描述了各文件作用.
2, FPGA烧写
FPGA烧写支持USB, multiICE, RVI等方式, 我们使用USB方式.
1), 把"Config switch"(电源按键旁边)拨到ON, 给板子上电, 准备烧写FPGA. 这时板子的字符lcd不会显示字符.
2), 安装USB驱动: "boardfiles\usb_debug_driver".
3), 烧写程序是progcards_usb.exe, 使用"tapid.arm"作为扫描链配置文件.
4), 执行progcards_usb.exe
第一次输入1: " 1: Emulation Baseboard (HBI-0140) skip". 我们不烧写主FPGA, 直接跳过.
第二次输入1: " 1: gc300_4_5_0_armv5 (DEFAULT) - LT-XC5VLX330 (HPI-0172A) try1 to flash"表示烧写logic tile FPGA为gc300_4_5_0_armv5.
输入后会烧写flash(相当于我们写CF卡). 为了提高速度去掉了verify部分.
这里使用了vivante给出的三个文件: gc300_4_5_0_armv5.brd, gc300_4_5_0_armv5.bit, via\ltxc5vlx330_172a_xc5vlx330_via_build0.bit.
brd是烧写配置文件, 我们也可以根据FPGA型号, 扫描链, 烧写文件名编写(参考progcards.pdf). gc300_4_5_0_armv5.bit是logic tile FPGA配置文件. 最后一个不知道是啥东西.
3, 运行vivante 2D demoe:
1), FPGA config switch 拨到OFF. 字符LCD先显示test..., 最后显示软件硬件版本. 这表示FPGA配置完成, 板子可以用了.
2), rvds4.0和RVI使用参见"D:\VC0882\document\arm\debug\rvi使用方法.txt". 只是RVI会找到4个arm11MP, 连接MP0即可.
3), "Target->load image"加载映像, 运行. 2d demo使用semihost输出到rvds STDIO, 可以输入数字键选择test case.
4, (13:44 2010-6-2)复制自log文件
progcard, 烧写log:
ARM Development Card Logic Programmer
Version 2.70
Attempting to connect to OCD driver.
Found 8 TAP controllers
TAP0 XC2V6000
TAP1 XC2C128
TAP2 XC2C128
TAP3 ispClock5620
TAP4 ispClock5620
TAP5 XC2C384
TAP6 ARM11MPCore_BS5
TAP7 XC5VLX330
Several possible boards detected at TAP position 0:-
0: Quit progcards
1: Emulation Baseboard (HBI-0140) skip
2: Emulation Baseboard Rev B or C or D or E Mux PLD build 2
3: Emulation Baseboard Rev B or C or D or E Mux PLD build 3
4: Emulation Baseboard Rev C Config PLD build 2
5: Emulation Baseboard Rev D or E Config PLD build 3
Make a choice: 1
CT11MPCore (HBI-0146) skip detected at TAP position 3
Several possible boards detected at TAP position 7:-
0: Quit progcards
1: gc300_4_5_0_armv5 (DEFAULT) - LT-XC5VLX330 (HPI-0172A) try1 to flash
2: Virtex 5 Logic Tile (HBI-0172B) skip
Make a choice: 1
Step 1: FPGA download of via\ltxc5vlx330_172a_xc5vlx330_via_build0.bit
Progress: 100.00%, Throughput: 158.53k/s, Frame: 1245194
Step 2: Intel flash download of gc300_4_5_0_armv5.bit
Progress: 4.63%, Throughput: 9.80k/s
...
5, log文件解释(zhangjian2YangGuolong邮件"答复: pb A8下载问题"20100602_1530 shanghai VC0718(?)). 邮件中删除了与vivante gccxxx有关的文字.
Hi, yang guolong
Pb-a8通过usb config下载的详细文档见progcard的帮助. "progcards_xxx.pdf", logic tile范例有AN128(flash led), AN151(AXI device). 目录"C:\Program Files\ARM\Application_Notes\".
另外pb-A8使用有问题也可以直接给arm support发邮件.
1), 我结合原来在arm EB_HBI0140(arm11)板子的log说明使用progcard烧写过程.
EB_HBI0140板子的jtag扫描链有八个芯片. 我希望在第8个芯片(TAP7)烧写. 过程如下
1, 启动progcard后, progcard会扫描FPGA jtag扫描链, 找到扫描链上所有芯片, 会列出芯片名称, 例如下面这个log里面有八个芯片.
ARM Development Card Logic Programmer
Version 2.70
Attempting to connect to OCD driver.
Found 8 TAP controllers
TAP0 XC2V6000
TAP1 XC2C128
TAP2 XC2C128
TAP3 ispClock5620
TAP4 ispClock5620
TAP5 XC2C384
TAP6 ARM11MPCore_BS5
TAP7 XC5VLX330
扫描后, progcard会从tap0开始查找配置文件, 如果找到配置文件, 会列出全部配置文件, 供用户选择, 如果未找到会直接跳过, 这些配置文件一般包括skip和实际操作两种, 例如
Several possible boards detected at TAP position 0:-
0: Quit progcards
1: Emulation Baseboard (HBI-0140) skip
2: Emulation Baseboard Rev B or C or D or E Mux PLD build 2
3: Emulation Baseboard Rev B or C or D or E Mux PLD build 3
4: Emulation Baseboard Rev C Config PLD build 2
5: Emulation Baseboard Rev D or E Config PLD build 3
这次我写烧写tap7, 所以选择1 skip, 表示不操作这个tap, skip对应配置文件见("2)"):
可以看到文件中TAP0后面的” XC5VLX330”是与上面progcard找到的扫描链中TAP0的名称对应的. 选择1之后
Make a choice: 1
CT11MPCore (HBI-0146) skip detected at TAP position 3
最后会到达tap7, 找到配置文件如下, 1是我用于烧写的配置文件(见"3)"), 选择1会按配置文件进行烧写.
Several possible boards detected at TAP position 7:-
0: Quit progcards
1: LT-XC5VLX330 (HPI-0172A) try1 to flash
2: Virtex 5 Logic Tile (HBI-0172B) skip
Make a choice: 1
Step 1: FPGA download of via\ltxc5vlx330_172a_xc5vlx330_via_build0.bit
Progress: 100.00%, Throughput: 158.53k/s, Frame: 1245194
Step 2: Intel flash download of xxx.bit
Progress: 4.63%, Throughput: 9.80k/s
...
如此烧写完成.
2), skip文件(for TAP0 XC5VLX330):
[General]
Name = Virtex 5 Logic Tile (HBI-0172B) skip
Priority = 1
Board = v5lt_skip
[ScanChain]
TAPs = 1
TAP0 = XC5VLX330
[Program]
SequenceLength = 0
3), 用于烧写的配置文件(for TAP7 XC5VLX330):
[General]
Name = LT-XC5VLX330 (HPI-0172A) try1 to flash
Priority = 1
Board = gc600
# IncludeBoard = ltxc4vlx100_158a_bytestreamer
[ScanChain]
TAPs = 1
TAP0 = XC5VLX330
[Program]
;Verify can be removed for speed - change SequenceLength to 2 to exclude verify
SequenceLength = 2
Step1Method = Virtex5
Step1TAP = 0
Step1File = via\ltxc5vlx330_172a_xc5vlx330_via_build0.bit
Step2Method = IntelFlash
Step2TAP = 0
Step2Address = 0
Step2ByteFix = 1
Step2File = xxx.bit
6, yangguolong:
谢谢!我们这儿已经好了是JTAG的电源没有拔掉的原因。
17:23 2010-2-3
VC0882, c语言编程规范, VC0882附加要求
1, 编程规范见"VC0882/document/882软件编程基本规范.doc"
2, FengBeiZhan邮件"答复: 882项目要求"20100203_1719
1)goto语句:
在驱动层,不能使用goto语句;
在test层,每个api最多只能使用2个goto语句;
(已经更新到编程规范里了)
2)padc and clock 将在padc and clock 模块提供,使用者请直接调用这些模块的api使用,便于以后的更新维护;
3)在提交程序时,请保证vc and eclipse都能编译通过;然后再提交;
19:44 2010-2-3
VC0882, 最小环境, FPGA, no c library, 在FPGA上跑简单程序验证arm基本可用.
1, 分析
1), 这个事情其实分三步, 一个是没有c库的程序进入c环境. 二是做简单计算看是否正确. 三是操作gpio. 确定sram和寄存器访问可用. 三其实可以省略.
2), 完成后发信: 1), 256kbyte sram什么时候可用, 很着急, 没法跑最小环境. 2), timer, uart, irq具体仿真情况.
2, 看看rvds4.0实现无c库如何伤心啊
Reimplement __rt_raise(), because this error-handling function can be called from numerous places within the compiled code.
Not define main() to avoid linking in the library initialization code.
Write an assembly language veneer that establishes the register state required to run C. This veneer must branch to the entry function in your application.
Provide your own RW/ZI initialization code.
Ensure that your initialization veneer is executed by, for example, placing it in your reset handler.
Build your application using --fpu=none and link it normally. The linker uses the appropriate C library variant to find any required compiler helper functions.
Many library facilities require __user_libspace for static data. Even without the initialization code activated by having a main() function, __user_libspace is created automatically and uses 96 bytes in the ZI segment. See The __user_libspace static data area on page 2-6 for a description of the __user_libspace area.
感觉比较麻烦, 直接用VC0830_sv_memscan
3, 删除VC0830_sv_memscan中无用代码. 开始进入c后只是死循环. 后来发现是开了"-Os". 删除后实验. 进入c语言正常, i--计算正常.
4, 上传CVS:
加入没有c lib的c环境, 从VC0830_sv_memscan复制. 用armbin编译, RVdebugger调试正常.
代码和映像: "D:\work\VC0882\code\milestone\mini_c_env_nolib_无c_lib_c环境OK.rar"
5, FPGA不稳定, 见6.
6, 发信:
1), VC0882
今日进展
在32k sram上最简单的c环境建立完成, arm运行程序正常. 现在需要更大的sram(至少256kbyte)以便使用rvds c lib, 否则没法做进一步测试.
另外最小环境的timer, uart, irq三个模块进展如何, 仿真是否通过, 仿真了哪些内容?
今天使用中发现debug仍然不稳定:
FPGA3号板在jtag clk是10MHz和5MHz时都出现过不正常, 只有断电(soft reset不行)后才能重新连接:
是FPGA加电后第一次正常, 运行完程序断开再连接提示:
Error: 0x02410100: The run control operation could not be completed : .
此时a8没有停住, 也就没法访问a8寄存器和sram.
这个问题后来在FPGA1号板和3号板都没法再复现.
10:57 2010-2-4
VC0882, 最小环境, FPGA, 模块状态
1, KongYingQi"Re: 答复: Vc0882 FPGA platform is ready now"
intc、timer、uart情况如meiping所说,其中intc与timer验证比较充分,uart只跑了下基本case。timer在使用时有些限制,用的时候注意看mas。
2, zhangjian: uart保证8n1是测过的. DMA没有测.
timer: dual timer: 按减一表示target, 0表示全f: 查mas, mas描述如此, timer3-6与其它timer不同.
11:17 2010-2-4
VC0882, 最小环境, rvds4.0, 与VC0598 rvds3.0(rvdebugger)和ESDE eclipse共存, 软件技巧, Windows批处理文件
软件技巧, windows, dos, bat(批处理)
0, 参
http://blog.csdn.net/qshzf/archive/2007/10/29/1853741.aspx
1, 注释: "rem"或"::"
与rem 不同的是, ::后的字符行在执行时不会回显, 无论是否用echo on打开命令行回显状态, 因为命令解释器不认为他是一个有效的命令行, 就此点来看, rem 在某些场合下将比 :: 更为适用; 另外, rem 可以用于 config.sys 文件中.
2, 如何选择不同程序?
1), 开始想用choice, 发现winXP下面居然没有choice. 这样就需要给大家发工具, 不太方便.
2), 用参数. 最终批处理文件见3.
3), rvdebugger3.0和eclipse位置
"C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium\bin\rvdebug.exe"
运行rvdebugger时如果提示brd文件(rvdebugger配置文件)需要merge, 点确认即可.
C:\ESDE\eclipse\eclipse.exe
3, 邮件, VC0882与VC0598环境共存
CVS位置: "D:\VC0882\document\arm\debug\与VC0598环境共存"
VC0882的rvds4.0与VC0598的rvds3.0共存方法. 用如下方法可以保证rvdebugger3.0, rvdebugger4.0, ESDE eclipse和ARM Workbench IDE v4.0四个应用程序同时使用.
1), 把附件中的"VC0598_env.bat删除中文"复制到在"C:\ESDE\runtime\bin"目录, 并改名为"VC0598_env.bat"(outlook不允许发可执行程序).
2), 修改快捷方式(参见图片说明.doc)
(1), RealView Debugger v3.0快捷方式->右键菜单"属性"->"快捷方式"选项卡->"目标"从
"C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium\bin\rvdebug.exe"
改为
VC0598_env.bat "C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium\bin\rvdebug.exe"
为了支持图标不变, 选择"更改图标"->"浏览", 目录填入"C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium\bin\rvdebug.exe", 选择原有图标即可.
(2), eclipse方法相同. 只是把"C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium\bin\rvdebug.exe"替换为"C:\ESDE\eclipse\eclipse.exe"
3), 修改后rvds3.0/eclipse和原来用法相同. 如果希望在命令行下执行rvds3.0命令, 可以在桌面单独建立一个快捷方式, 在"请键入项目的位置"中填入"vc0598_env cmd", 确定即可. 以后双击这个就可以得到rvds3.0和ESDE eclipse的命令行环境.
4), 注:
(1), 如此运行rvdebugger3.0和ESDE eclipse会有个cmd窗口, rvdebugger3.0和ESDE eclipse关闭后它会自动关闭.
(2), "VC0598_env.bat"放在任何一个Path路径下都可以.
(3), 批处理文件代码和注释:
::set our VC0830/VC0816/VC0598 eclipse compile and rvds3.0 environment
@PATH=C:\ESDE\runtime\bin;C:\ESDE\gcc\bin;C:\Program Files\ARM\RVCT\Programs\3.0\586\win_32-pentium;%PATH%
::set rvds3.0 environment
@SET RVDEBUG_INSTALL=C:\Program Files\ARM\RVD\Core\3.0.1\309\win_32-pentium
::del minGW path, replace "d:\software\MinGW\bin" with your own minGW path
SET PATH=%PATH:d:\software\MinGW\bin;=%
::run the program you passed
%1
(4), rvds2.2同理, 只是把rvds3.0的环境变量改为2.2的. 我机器上面没有2.2就不实验了.
推荐大家用rvds3.0和4.0.
14:46 2010-2-4
VC0882, memory分配和寄存器总表, d:\VC1600WCVS\doc\arch\vc0882\VC0882 memory and register mapping.xls
15:29 2010-2-4
时间管理
0, 9:34-21:34?
1, 计划<转移>
1), 如果256kbyte sram OK, 跑基本semihost测试程序. 看看uart是否跑通. 如果不通就加入semihost的aasp.
2), 今天要整理昨天计划. 昨天晚上和aiguo聊过后, 我的VC0882工作有些调整.
3), 今天要把timer api和寄存器列表加入(因为sram估计出不来了, 先把小活做完, 以后还得集中精力看rvds4.0初始化流程).
2, 执行
1), VC0882最小环境, 见"10:57 2010-2-4". 被2)打断.
\todo 看怎么在编译器中开关NEON, L2? : NEON可以选择, L2只能软件自动控制, 可以读cp15知道有没有L2. 见"15:39 2010-2-4"7-3)-(4)
2), VC0882 irq修改. 被3)打断.
3), VC0882和VC0598环境共存问题. 见"11:17 2010-2-4", 这个搞了1h40'. 时间有点长了.
3, 次日计划<转移>
明天先实验uart收发. 测试通过后整理VC0882工作. 然后看看把1-3)做完. 然后整理rvds4.0初始化流程. 整理后发出来, panda_os我一个人肯定不行.
15:39 2010-2-4
VC0882, 最小环境, FPGA, irq, nucleus, armv7 architecture学习, 总结: VC0882介绍资料; Cache, memory system: PoC, PoU
1, VIM_INT_Driver.c里面的g_priorityHigh, g_priorityMid, g_priorityLow是nuclues的中断优先级. High和Low只是各自填了IRQ_CPU0_VECTOR, IRQ_CPU1_VECTOR. 将来要根据系统需要调整. \todo
2, dongliang把基本东西都加入了. 完善
3, 根据"VC1600_MAS_Interrupt_Controller_V0.93"5.4更新寄存器.
4, INT_IRQ_Priority在882中无用, 注释, 将来没有就删除.
5, 修改cache,mmu代码为cortex-a8. copy from TI uboot
6, 修改上传CVS:
1), 根据"VC1600_MAS_Interrupt_Controller_V0.93"5.4更新寄存器.
2), 修改cache,mmu代码为cortex-a8. copy from TI uboot
3), 根据VC0882数量更新: panda_init.s的INT_IRQ_Vectors.
7, 为修改"main"做准备:
1), aasp shell:
task_aasp_func()->cyg_user_start()->aasp_shell(). 其中task_aasp_func是nucleus task. \todo 到底怎么启动的. 需要看.
2), 原有"main"函数中硬件初始化部分:
INC_Initialize()->Application_Initialize()->InitVC0598()
3), 需要理解nucleus如何管理memory. rvds4.0文档提到如果OS管理memory分配, 有些注意事项.
8, 分析Cortex-a8 cache, mmu(tlb)代码--disable:
1), old panda os
;old code for arm926ej-s. reserve for
; Disalbe MMU
MRC p15, 0, a1, c1, c0, 0
BIC a1, a1, #0
MCR p15, 0, a1, c1, c0, 0
; Invalidate TLB
; 这里面后面两句从arm926ej-s文档看也第一句作用一样, 为什么要重复呢?
MOV a1, #0
MCR p15, 0, a1, c8, c7, 0
MCR p15, 0, a1, c8, c5, 0
MCR p15, 0, a1, c8, c6, 0
2), cortex-a8, ;copy from TI uboot-02.01.03.11/cpu/arm_cortexa8/start.S. copy start
;/*
; * Invalidate L1 I/D
; */
mov r0, #0 ;@ set up for MCR
;Invalidate TLB和原来一样.
mcr p15, 0, r0, c8, c7, 0 ;@ invalidate TLBs
;Invalidate all instruction caches to PoU. Also flushes branch target cache.
mcr p15, 0, r0, c7, c5, 0 ;@ invalidate icache
;/*
; * disable MMU stuff and caches
; */
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #0x00002000 ;@ clear bits 13 (--V-)
bic r0, r0, #0x00000007 ;@ clear bits 2:0 (-CAM)
orr r0, r0, #0x00000002 ;@ set bit 1 (--A-) Align
orr r0, r0, #0x00000800 ;@ set bit 12 (Z---) BTB
mcr p15, 0, r0, c1, c0, 0
3), memory and cache
(1), PoC and PoU: \todo p1246前后也要看
The points to which a cache maintenance operation can be defined differ depending on whether the operation is by MVA or by set/way:
For set/way operations, and for All (entire cache) operations, the point is defined to be to the next level of caching.
For MVA operations, two conceptual points are defined:
Point of coherency (POC)
For a particular MVA, the POC is the point at which all agents that can access memory are guaranteed to see the same copy of a memory location. In many cases, this is effectively the main system memory, although the architecture does not prohibit the implementation of caches beyond the POC that have no effect on the coherence between memory system agents.
Point of unification (POU)
The PoU for a processor is the point by which the instruction and data caches and the translation table walks of that processor are guaranteed to see the same copy of a memory location. In many cases, the point of unification is the point in a uniprocessor memory system by which the instruction and data caches and the translation table walks have merged.
The PoU for an Inner Shareable shareability domain is the point by which the instruction and data caches and the translation table walks of all the processors in that Inner Shareable shareability domain are guaranteed to see the same copy of a memory location. Defining this point permits self-modifying code to ensure future instruction fetches are associated with the modified version of the code by using the standard correctness policy of:
1. clean data cache entry by address
2. invalidate instruction cache entry by address.
The PoU also enables a uniprocessor system which does not implement the
Multiprocessing Extensions to use the clean data cache entry operation to ensure that all writes to the translation tables are visible to the translation table walk hardware.
\todo clean和invalidate又搞混了. 下次接着看.
(2), ARMv7-A, the A profile, requires the inclusion of a Virtual Memory System Architecture (VMSA),
(3), 原来要想保证一致性, 要么是不开cache, 要么是开了cache, 但是用命令保证cache coherency. ARMv7A中加入了Shareable domain:
The Outer Shareable attribute is introduced in ARMv7, and can be applied only to a Normal memory region in a VMSA implementation that has the Shareable attribute assigned. It creates three levels of shareability for a Normal memory region:
Non-shareable
A Normal memory region that does not have the Shareable attribute assigned.
Inner Shareable
A Normal memory region that has the Shareable attribute assigned, but not the Outer Shareable attribute.
Outer Shareable
A Normal memory region that has both the Shareable and the Outer Shareable attributes assigned.
这个没看懂, 以后继续看. ARM_ARM_7AR: p144-p145
(4), ARMv7最多支持7级cache, 每级cache的属性可以通过Cache Type Register和Cache Level ID Register得到.
From ARMv7 the architecture defines support for multiple levels of cache, up to a maximum of seven levels. In ARMv6, only the Level 1 caches are architecturally defined,
A, c0, Cache Type Register (CTR)
CWG, bits [27:24]: Cache Writeback Granule(微粒). WriteBack时写到memory的最大容量=以2为底y的对数. y的单位是word. 最大值是b1001=9, 所以最大写回大小是2^9=512words=512*4=2kbytes
ERG, bits [27:24]: Exclusives Reservation Granule. 这个得看"Load-Exclusive and Store-Exclusive instructions"和"see Tagging and the size of the tagged memory block on page A3-20"
B, Cache Level ID Register: 可以读出7级cache每级cache的情况. 有无cache, 指令cache和数据cache分开还是合一.
17:02 2010-2-4
VC0882, arm cortex-a8, Linux porting, android, readme4ZhaoYuan
1, Aiguo转发邮件"答复: CotexA8 资料"20100204_1648
你那里有CotexA8的开发版吗??能不资料给我们共享一下吗??
所有的Datesheet,软件。我们分析一下他的Kernel。以便我们最快的把Kernel
Porting到FGPA 上。
2, 回信
Hi, zhaoyuan
我们的cortex-a8开发板是北京瑞泰的TI OMAP3530: ICETEK_OMAP3530_LCDE.
所有资料都放在"\\10.0.2.208\share\zhangjian\TI OMAP3530"目录.
1, Datasheet:
"芯片datasheet": TI OMAP3530, tps65920(PMIC+audio codec+otg PHY), tfp410(convert to DVI)
2, TI官方Linux资料: "TI资料\Linux", 包括两级boot, kernel, dvsdk(gpu, video codec)代码和文档.
3, beagleboard资料: "BeagleBoard".
beagleboard是开源的OMAP3530开发板. 社区很活跃(http://beagleboard.org/).
它的android移植有三个(rawboat, embinux, 0xlab). 我们自己编译rawboat donut运行成功(rawboat\git). embinux已经推出了eclair版本, "embinux_eclair.tar.gz"是我从git下载的最新eclair android.
4, 北京瑞泰资料板子的原理图与beagleboard几乎相同, 可以直接beagleboard代码. 瑞泰资料我就不上传了.
5, qemu: OMAP3530 qemu已经可以boot Linux kernel, 具体可以参见"http://code.google.com/p/qemu-omap3/"和"https://garage.maemo.org/scm/?group_id=877"
资料比较大网速很慢, 我只上传了1和2的bootloader和kernel. dvsdk没有上传. 其他资料需要直接硬盘拷吧.
19:59 2010-2-4
VC0882, FPGA, 双FPGA, IC同事信息
GuoHaiFeng负责Cortex-a8 FPGA. FanZhiJun(7284)负责另一个FPGA.
这个问一下yangzuoxing: FPGA code放什么地方, 更新放在什么地方(excel?). 谁负责release.
9:33 2010-2-5
时间管理
0, 9:18-
1, 计划
1), 今天重点是AASP在VC0882 FPGA上运行: 先测试sram和uart收发, 无问题后移植aasp. 最后实验timer0和timer0 irq.
2), 修改fputc避免大小端问题.
3), 实验codehammer.
4), 看昨天, 前天VC0882最小环境相关邮件.
5), 打算写一个VC0882最小环境调试log. 把有必要计入的内容都加入"VC0882最小环境调试log"关键字, 最后用脚本生成.
6), FPGA问题提到ISSUE track.
2, 执行
1), -9:42 杂, 邮件, 整理VC0882相关工作, 很多, 今天要整理. 见"9:41 2010-2-5"
2), 9:44- VC0882最小环境, AASP在FPGA 256kbyte sram运行.
(11:32-12:50 午饭, 休息). 16:00 uartPollRxTxOK.
(19:24- 晚饭)
9:41 2010-2-5
VC0882, 最小环境, arm cortex-a8, debug coresight, 相关工作, \todo 整理, 安排.
今天要整理昨天计划. 昨天晚上和aiguo聊过后, 我的VC0882工作有些调整. VC0882最小环境其他计划见11:12 2010-2-2".
考虑一下mini_c_env是否支持830. 要保证里面的每个build都是可用的.
今天要把timer api和寄存器列表加入(因为sram估计出不来了, 先把小活做完, 以后还得集中精力看rvds4.0初始化流程).
然后整理rvds4.0初始化流程. 整理后发出来, panda_os我一个人肯定不行.
clock提供接口函数. beizhan已经发了padc的. 这个我要抓紧.
irq写测试代码. reglist: irq, dmac.
zhaoyuan会去移植Linux. 我的想法是做irq, uart,timer最小环境时就考虑好Linux需要的函数, 最小环境OK同时Linux kernelOK. 版本选择2.6.29标准内核. Linux运行需要memory OK, 希望ddr OK前可以完成Linux2.6.29移植.
beizhan会做一个sd卡boot, 可能需要我帮忙.
最小环境完成后, 希望有一周时间整理, 沉淀. 然后sdio 寄存器读写.
杂: 编译并实验beagleboard eclair; 填加班记录(2月1日, 2月3日,2月4日).
9:44 2010-2-5
VC0882, 最小环境, FPGA, sram, uart, 在256kbyte sram上运行aasp
1, 计划: 先测试sram和uart收发, 无问题后移植aasp. 最后实验timer0和timer0 irq.
今天要把代码并入panda目录.
2, sram不行, 仍然只是32kbyte的. fanzhijun实验发现访问sram失败后, 访问bus也不行.
后来发现原来0x是rom(可写), sram在0x20000000, 也是32kbyte. 所以软件用sram时还需要可以修改链接地址. 代码要考虑到是否映射到0x0地址, 如果不是, 需要复制异常向量到0x0.
1), (15:55 2010-2-5)已解决: 是marb限制.
(1), FanZhiJun邮件"答复: Vc0882 FPGA platform is ready now"20100205_1307
256KB的问题,刚问了zhangxuejian,sarb里根据maping表对地址做了上下限判决。
marb里面对于地址的限制,是依照vc0882 memory and register map.xls里面的定义进行设置的。
(2), ZhangXueJian邮件"答复: Vc0882 FPGA platform is ready now"20100205_1327
为了FPGA debug需要,目前把S5的地址范围修改为32’h20000000~2fffffff
`ifdef FPGA
`define AXI_R1_NEA_S5 32'h2fffffff
`else
`define AXI_R1_NEA_S5 32'h20007fff
`endif
(3), xuejian这样修改后, 软件看就和原来VC0830一样了: 超过0x20040000地址后, sram会绕回访问0x20000000地址.
"15:55 2010-2-5"end
3, 实验uart
1), padc
uart mas guideline
Configure the UART line TXD as output port.
Configure the UART line RXD as input port.
Configure the UART line RTS to unused.
Configure the UART line CTS to "0" always.
Configure the UART line DSR to "0" always.
Configure the UART line DCD to "0" always.
Configure the UART line RI to "1" always.
Configure the UART line DTR to unused.
pad pin pinlist, uart0只有下面四个信号,
UART0_SDO 1 UART0 Serial Data Output
GPIO_C2
UART0_SDI 1 UART0 Serial Data Input
GPIO_C3
2), uart, timer都是24Mhz, \todo 加入clock函数.
3), 发现没有接uart.. 真晕..
(1), FanZhiJun拿来了Uart转接板, 但我不知道插在什么地方. 查FPGA知道UART子板插在J7
.
(2), 发现rvdebugger和arm读到的寄存器有时不同.
读UART0_LSR(0x60043020)输入字符后arm读到0x00001202, rvdebugger读到0x00001200.
但是UART0_RDR(0x60043000)在rvdebugger和arm中时一致的.
GuoHaiFeng: LSR的UART_RXRDY时读0x60043000数据后清UART_RXRD bit.
后来发现是因为rvdebugger先读了UART_RXRDY, 所以UART会清UART_RXRD bit. 所以这不是bug. \todo 加入到VC0882 FPGA 最小环境调试log.
(3),memory错误
A, 不论访问0x0或0x20000000都提示:
Error: Unable to write Program memory at S:0x00000000(sram时提示0x20000000)
Error V2801C (Vehicle): Failed to read the requested number of bytes to memory
Error V2801C (Vehicle): Failed to read the requested number of bytes to memory while Setting Program Counter.
Warning: entry point is 0 - may be undefined.
Warning: Error V2801C (Vehicle): Failed to read the requested number of bytes to memory while Error Setting Entry Point.
B, 发信
发送: GeMeiPing; HuangWei; ZhangXueJian; FanZhiJun; JiaJiHua; VC0882_ICD; Zhangjian
抄送: YangZuoXing; WangXin; Aiguo; FengBeiZhan
标题: VC0882 FPGA新问题: memory有时无法写入. 现在FPGA不稳定很影响效率希望尽快解决
memory访问, FPGA三号板有50%可能会出现sram或rom无法写入的问题. 出问题后, rvdebugger找不到arm(在rvdebugger command line中显示"UNKNOWN").
如果关闭FPGA电源(有时需要断电一段时间), 再重新上电可能会恢复正常.
感觉有点像是FPGA本身不稳定. 这个问题没有在一号板复现过.
整理一下目前FPGA上问题:
1, 访问bus上非法地址后, 再访问合法地址也不能访问.
2, memory写入不稳定(见上).
3, FPGA有时连不上Cortex-a8, 见Zhangjian2010年2月3日邮件"答复: Vc0882 FPGA platform is ready now".
4, csat访问ap会fail, 见HuangWei2010年2月2日邮件"Vc0882 FPGA platform is ready now".
现在FPGA不稳定很影响效率, 今天为了和GuoHaiFeng讨论UART, 就花时间试验哪个FPGA好用. 希望FPGA能尽快稳定.
(4), 在没有建立FPGA CF code服务器之前临时用GuoHaiFeng"\\10.0.13.27\share\ace"目录.
(5), GuoHaiFeng说IRQ映射不正确. timer中断暂时不能用.
4, 整理上传代码.
1), 感觉今天的工作有些效率, 或者今天比较集中精力没被打断?
2), 先上传当前版本再整理:
uart basic poll OK, 先上传代码, 下一版本按格式整理
(1), boot\bootload.c中直接加入uart读写函数, 简单测试通过.
(2), 为了与panda_os一致, 加入"VIM_DRIVER_Regdef.h", 删除v830regdef.h.
3), 整理代码: 用cortex-a8编译, 链接地址改为0x20000000, uart代码移到uart目录.
(1), \todo
A, 发信:
i, ICP: 发邮件时写明如何安装新工具链.
ii, ICD: FPGA一号板也不稳定. FPGA这些问题感觉还是放issue上面比较好.
B, 更新CVS: 修改mcpu等编译参数为cortex-a8, vc0830bootloader.lds改名为vc0882bootloader.lds.
(2), "Sourcery G++ Lite"工具链使用见"20:11 2010-1-8". \todo 实验有无thumb2模式代码大小差异. 使用arm926ej-s和cortex-a8代码大小差异.
(3), 编译通过后试验, 一号板连着几次(大于5
次)连接后停不下来. 换成三号板没有问题. \todo 用原来的CF code实验比较稳定性, 发信.
(4), 运行后dataabort, 单步跟踪发现UART0_BASE设置不正确. UART0_BASE--UART3_BASE差值也不正确, 说明是随机值. 而且检查寄存器地址定义时正确的. 修改UART0_BASE后程序运行正常. 另外uart_base数组基址时0xe00. 联想原来VC0816量产切频遇到的问题, 猜测时超过了链接脚步区域. 查看果然如此, 原来的VC0830链接脚本中memory最大rom是0xe00.
\todo 只要uart_base链接到ro_data, 上面分析才成立.
(5), 修改链接脚本后仍然不行. 从现在结果看uart_base时链接到data区域.
看反汇编文件, 没发现问题:
Disassembly of section .data:
20007000 <uart_base>:
20007000: 60043000 andvs r3, r4, r0
20007004: 60044000 andvs r4, r4, r0
20007008: 60045000 andvs r5, r4, r0
2000700c: 60046000 andvs r6, r4, r0
(6), 看汇编, 发现代码问题:
/*! Relocate [copy] data from ROM to RAM*/
ldr r3,=__rom_data_end
ldr r4,=__ram_data_end
ldr r5,=__ram_data_start
cmp r3,r4
beq 2f
cmp r4,r5
beq 2f
1: ldr r0,[r3,#-4]!
str r0,[r4,#-4]!
cmp r4,r5
bne 1b
(21:56 2010-2-5)不知为什么怎么也删不了这部分和clear bss代码. 手工跳过后运行正常.
后来为了绕过这个问题把uart_base改为const. 这样就放在了ro_data.
5, 先上传代码. 下次解决这个问题.
1), CVS log("22:11 2010-2-5")
VC0882: mini_env_no_c_lib. 在无c li测试通过代码基础上, 参考pands_os要求调整代码结构. 便于将来32k sram上实现一些功能.
工具链是"\\10.0.2.36\sqmshare\share\Linux\toolchain&lib\arm-2009q3-68-arm-none-eabi.exe", 默认安装, 选择把工具加入到环境变量, 这个工具链与原来工具链名称不同, 不会有冲突. Makefile.arm已经按此修改.
MakefileRvdebug.arm和vc0882bootloader.rvd.lds稍候修改.
2), \todo 要解决的bug:
(1), 解决"[copy] data from ROM to RAM"和"clear bss"删除有用数据的问题.
(2), 修改MakefileRvdebug.arm和vc0882bootloader.rvd.lds.
6, 发信:
收件人: aiguo, fengbeizhan
题目: VC0882 FPGA最小环境今日进展: uart查询模式rx,tx正常, sram256kbyte已经可以使用
VC0882 FPGA最小环境今日进展
在"D:\VC0882\mini_env\mini_c_env_nolib"工程(用VC0598 eclipse+新工具链编译)下加入uart, 并参考pands_os要求调整代码结构. 便于将来使用.
工具链是"\\10.0.2.36\sqmshare\share\Linux\toolchain&lib\arm-2009q3-68-arm-none-eabi.exe", 默认安装, 选择把工具加入到环境变量, 这个工具链与原来工具链名称不同, 不会有冲突. Makefile.arm已经按此修改.
今天FPGA 256kbyte sram已经可以使用, 简单测试通过.
周日我会把aasp移植到VC0882. 并修正"mini_c_env_nolib"上的两个小问题.
12:50 2010-2-5
VC0882, 最小环境, FPGA, 今天总结, 邮件
发信:
现在FPGA还缺的东西: CF code放到服务器, 版本变化excel.
还存在的问题: 见"9:44 2010-2-5"
13:35 2010-2-5
(11:02 2010-3-5)
(21:34 2010-3-5)
(19:55 2010-3-10)
(18:04 2010-3-13)
(20:27 2010-6-1)
(21:41 2010-7-1)
VC0882, 最小环境, FPGA注意事项, 与CVS保持同步
CVS: "D:\VC0882\document\fpga\VC0882_FPGA注意事项.txt"
FPGA注意事项
initial zhangjian
添加rvds文档位置 2010-6-1 zhangjian
add memory and register mapping 2010-7-1 zhangjian
0), 关于ddr电压:
(1), LvHaiFang邮件"答复: Vc0882 FPGA platform is ready now"20100202_1413
调试ddr的同事请注意,lpddr和ddr3的电压不一样,在上电之前请找我们确认一下转接板电压。
1.8v,1.5v
(2), Mike WX Chen"答复: fpga底板的电压问题"20100506_1035
板子右上角的跳线J22可以选择I/O电压是否是1.8V还是1.2V.
目前,我们只是将beihua使用的那个FPGA板由1.2V――改为1.5V,I/O电压还是可以选择成1.8V。建议插子板前,先测量对应插座的电压。如果不会,通知SV组吧。
其他FPGA板也需要将1.2V――改为1.5V,才能测试DDR3。
1), 电源, 复位, 晶振:
(0), 上电前确认晶振插好, 没有接触不良, 2FPGA时只有左下OSC5可以不插. 否则RVI可能找不到arm, 或出现其他问题.
右下角Xclk需要插48MHz晶振, 否则FPGA配置后D9常亮表示DDR phy clock有问题.
(1), 电源是外正内负: 和原来FPGA一样, 与SV板不同, 千万别接错了.
(2), FPGA电源在左上角, 上电后FPGA开始配置, F1_DONE和F2_DONE都亮表示FPGA配置完成, CF卡旁边按键是FPGA reconfig. 系统复位是s1(soft reset). LED灯: 右上三个是红灯
, 输入LED红绿皆可. 从5.2,5.3开始调, 一般最5.5, 输入电压太高也会fail, 有问题找fanzhijun.
目前FPGA正常工作电流2A以上, 如果供电不足, 可能导致RVI扫描不到硬件, 或者扫描过程中fail, 或其他奇怪问题.
(3), 现在都要求用新电源(30v20A0), 旧电源最大3A, 对FPGA稳定性有影响(如果用旧电源, 旧电源一路输出不能满足需要, 需要采用并联模式, 调整电源输出电压5.5v保证到FPGA
的电压是5v(保险丝到地的电)).
(4), FPGA config时电流会有明显变化, 例如在新电源上FPGA上电, config FPGA1 done, config FPGA2 done的电流分别是1.7A, 2.0A, 2.2A. 如果config时电压没有类似明显增
大, FPGA config可能有问题.
F1_done, F2_done在板子中上.
(5), FPGA config后, D9, D11会灭, 如果没有灭说明FPGA不在正常运行状态. 按Soft Reset(S1)时D9,D11亮, 松手D9,D11灭.
D9在FPGA左下. D11在FPGA右上.
(6), 复位: 4FPGA只能按上面板子复位. 不论2FPGA, 4FPGA按softreset复位时sram数据都不会丢失(static ram只要不断电不会变), 如果程序memory处理有问题(例如新分配的
memory没有memset 0)可能出错.
2), FPGA文档和原理图"D:\VC1600WCVS\doc\FPGA":
(1), 双FPGA硬件手册: VC1600WCVS\doc\FPGA\882_fpga\fpga_scheme: DUAL_XC5VLX330_EVALUATION_BOARD_V2.00.pdf, Vimicro Dual-V5 Hardware Reference Manual_v1
00.doc. VC882_FPGA_V1.5.doc.
(2), 时钟方案: vc0882_fpga_clkrst_scheme.vsd. 2010年3月20日 2FPGA更新时钟方案加入module divider(3月22日4FPGA更新)
(3), FPGA端口定义"D:\VC1600WCVS\doc\FPGA\882_fpga\fpga_scheme\vc0882_dual_fpga.xls"
(4), VC0882子板原理图"D:\VC1600WCVS\doc\FPGA\882-SUB-Boards\Schematic"
(5), memory和register地址映射, 见"VC0882 memory and register mapping.xls"(D:\VC1600WCVS\doc\arch\vc0882)
3), 其他
(1), 现有子板: jtag转接板J2. CF卡转接板J15. UART子板J7. sd接J8.
(2), CF卡里面一定只有一份ace文件. 如果有两个ace文件, 会有问题.
(3), VC0882 CF code: \\10.0.2.36\sqmshare\Projects\Mobile BU\VC0882\fpga\cf
(4), 如果不插RVI, 需要JTAG转接板JP7[0]-JP8[0]跳线. 参LiDongLiang邮件"答复: EMI Norflash boot"20100315_2037
(5), Strap pin, Emi norflash boot: LCD_D[1]=1, LCD_D[0]=0
4), 模块注意事项:
(1), ddr: JP1[2,3]跳线(如果不跳线, ddr读出内容基本是重复一个pattern). 检查背面电阻焊接是否正确: 57,59,61.
(2), sd:
自DuanLiHua邮件"答复: mmc card调试需要改ucf及疑惑"20100316_1008
Q: ucf里,mmc card拉了一个reset,接到111 port上了,但是卡座上是没有这个reset pin的.
A: 这个reset的考虑确实是给mmc card用的,但是只有符合最新的mmc 4.4协议的card才支持这个功能,视情况使用吧~
5), 附录:
(1), FPGA新时钟方案说明
Hi, all
根据FPGA新时钟方案我修改了代码, 以后FPGA都会使用这个时钟方案. 右下角Xclk需要插48MHz晶振. 请大家使用新时钟方案版本调试, 如果时钟方案修改后FPGA不稳定或有其他问
题请及时发信报Issue.
修改见VIM_CLKRST_Init()(clkrst\VIM_CLKRST_Driver.c), 各个模块clock都已初始化为24MHz. 大家可以根据自己需要在clkrst模块加入clock配置函数.
同时我在Arm workbench 4.0的每个编译规则中加入"-define=XCLK_48MHZ=1"表示这一修改. 如果大家使用都没有问题, 会去掉这个宏.
注:
1, 新时钟方案见
D:\VC1600WCVS\doc\FPGA\882_fpga\fpga_scheme\VC0882_REG_CLKRST_FPGA.V0.1.xls, vc0882_fpga_clkrst_scheme.vsd
2, 从3月20日下午三点开始的2FPGA cf code都是新时钟方案.
Hi, caijin, zhuliying, zhangpu, yangmin
4FPGA新时钟方案版本见GuoHaiFeng邮件"New ACE For 4 FPGA"20100322_1745. 下次出4FPGA时会使用新时钟方案版本.
2), umonitor:
从"D:\VC1600WCVS\doc\mas\VC0882\PAD\VC0882_REG_PADC_Vxxx.doc"查到um_ctrl是0x600510f0.
D:\VC1600WCVS\doc\arch\vc0882\VC0882 umonitor definition.xls说明如何通过配置umonitor寄存器选择不同module.
umonitor的引脚在uart转接板.
3), RealviewICE, rvds等工具使用说明见"D:\VC0882\document\arm\debug". rvds中英文文档见"D:\VC0882\document\arm\rvds".
17:08 2010-2-5
同事信息, 同学, 北京工业大学, 张淼
加盟中星微运营管理部任GA Manager的张淼,直接向财务总监刘平汇报工作。张淼女士毕业于北京工业大学国际贸易专业,加盟中星微之前曾在KPMG、PWC、京都会计师事务所、中国银行任职;她的办公电话是:010-68948888-7337,email:zhangmiao@vimicro.com
20:40 2010-2-5
VC0882, 最小环境, FPGA, sram, uart, Issue Track,
自"9:44 2010-2-5"
1, 把下面四个问题提到Issue Track上面
1), 访问bus上非法地址后, 再访问合法地址也不能访问.
2), memory写入不稳定(见上).
3), FPGA有时连不上Cortex-a8, 见Zhangjian2010年2月3日邮件"答复: Vc0882 FPGA platform is ready now".
4), csat访问ap会fail, 见HuangWei2010年2月2日邮件"Vc0882 FPGA platform is ready now".
2, [882]0008112 rvdebugger访问bus上非法地址出错后, 无法再访问合法地址
出现频率: 有时
严重性: 系统崩溃
优先权: 高
摘要: rvdebugger访问bus上非法地址出错后, 无法再访问合法地址
说明: 例如rvdebugger访问0x4000地址(VC0882只有32k rom), 会造成再访问0x0 rom, 0x2000000sram, 0x60000000寄存器都无法访问. rvdebugger显示红色叹号.
注: 从coresight文档看, rvdebugger应该是通过ahp-ap经过HMX访问AXI bus.
指派给: HuangWei.
zhangjian: 想了半天, 本来想直接指给JiangBo或这负责memory的人, 后来想我只是看到rvdebugger不能访问, 没有实验arm能不能访问(测试环境还没有搭起来). 是哪里的问题还不好说, 只好先指给huangwei.
3, [882]0008113 rvdebugger写入memory失败
出现频率: 有时
严重性: 系统崩溃
优先权: 紧急
摘要: rvdebugger写入memory失败
说明: rvdebugger连接FPGA后, 写入memory(rom/sram)会出错:
Error: Unable to write Program memory at S:0x00000000(sram时提示0x20000000)
Error V2801C (Vehicle): Failed to read the requested number of bytes to memory
Error V2801C (Vehicle): Failed to read the requested number of bytes to memory while Setting Program Counter.
Warning: entry point is 0 - may be undefined.
Warning: Error V2801C (Vehicle): Failed to read the requested number of bytes to memory while Error Setting Entry Point.
出错后, rvdebugger找不到arm(在rvdebugger command line中显示"UNKNOWN").
如果关闭FPGA电源(有时需要断电一段时间), 再重新上电可能会恢复正常.
这个问题在1号和3号FPGA板子都出现过, 感觉是用一段FPGA后, 才会出现这个问题.
指派给: huangwei
4, [882]0008114 rvdebugger有时连不上Cortex-a8
出现频率: 有时
严重性: 易用性不佳
优先权: 高