]> git.sur5r.net Git - openocd/blob - ecosflash/notes.txt
eCos flash driver.
[openocd] / ecosflash / notes.txt
1 1. GDB startup script for debugging purposes.\r
2 \r
3 # startup script for debugging flash erase\r
4 target remote 10.0.0.56:2001\r
5 monitor halt\r
6 monitor reset\r
7 load\r
8 # stack\r
9 monitor rm 13 0x7000\r
10 # pc \r
11 monitor rm 15 0x8000\r
12 # arg1 to erase()\r
13 monitor rm 0 0x1030000\r
14 # arg2 to erase()\r
15 monitor rm 1 0x10000\r
16 stepi\r
17 \r
18 \r
19 \r
20 2. Uploading flash driver via tftp\r
21 \r
22 \r
23 $ tftp 10.0.0.108\r
24 tftp> binary\r
25 tftp> put at91fr40162.bin 10.0.0.108:/config/flashdriver.bin\r
26 Sent 4048 bytes in 0.1 seconds\r
27 tftp>\r
28 \r
29 \r
30 4. Programming flash\r
31 \r
32 eCosBoard_prog 0x1000000 /config/testdata.bin\r
33  \r
34  \r
35 tftp> put /cygdrive/c/workspace/ecosboard/ecosboard/phi/bootloader/images/bootloader.bin 10.0.0.108:/config/test.bin\r
36 Sent 165724 bytes in 3.9 seconds\r
37 \r
38 \r
39 halt\r
40 reg cpsr 0x000000D3\r
41 mww 0xFFE00020 0x1\r
42 mww 0xFFE00024 0x00000000\r
43 mww 0xFFE00000 0x01002539\r
44 eCosBoard_profile\r
45 eCosBoard_prog /config/test.bin 0x1000000\r
46 eCosBoard_profile_done\r
47 \r
48 \r
49 \r
50 \r
51 set remote memory-write-packet-size fixed\r
52 \r
53 \r
54 set remote memory-write-packet-size 8192\r
55 set remote memory-map-packet on\r
56 target remote 10.0.0.108:3333\r
57 monitor halt\r
58 monitor reg cpsr 0x000000D3\r
59 monitor mww 0xFFE00020 0x1\r
60 monitor mww 0xFFE00024 0x00000000\r
61 monitor mww 0xFFE00000 0x01002539\r
62 \r
63 \r
64 monitor eCosBoard_profile\r
65 load\r
66 monitor eCosBoard_profile_done\r
67 \r
68 \r
69 source /tmp/ecosboard/packages/services/profile/gprof/current/host/gprof.gdb\r
70 gprof_dump\r
71 shell cp gmon.out /tmp/ecosboard/build/src\r
72 echo To view: cd /tmp/ecosboard/build/src && gprof openocd\r
73 \r
74 \r
75 Performance problems:\r
76 \r
77 It seems the problem is that the actual flash programming takes time. \r
78 hal_delay_us() is invoked between each time the \r
79 CPU is polled for whether flash programming has completed.\r
80 \r
81 \r
82 Flat profile:\r
83 \r
84 Each sample counts as 0.01 seconds.\r
85   %   cumulative   self              self     total\r
86  time   seconds   seconds    calls  Ts/call  Ts/call  name\r
87  35.82     37.66    37.66                             hal_delay_us\r
88  11.90     50.17    12.51                             arm7tdmi_clock_out\r
89   9.86     60.54    10.37                             gdb_get_packet\r
90   5.36     66.17     5.63                             memcpy\r
91   4.34     70.73     4.56                             target_buffer_get_u32\r
92   3.34     74.25     3.51                             embeddedice_read_reg_w_che\r
93 ck\r
94   1.39     75.71     1.46                             arm7_9_write_memory\r
95   1.34     77.11     1.40                             cyg_tcp_output\r
96   1.33     78.51     1.40                             __udivsi3\r
97   1.11     79.68     1.17                             cyg_tcp_input\r
98   1.07     80.80     1.13                             arm7tdmi_store_word_regs\r
99   0.95     81.81     1.00                             __udivdi3\r
100   0.95     82.80     1.00                             __umodsi3\r
101   0.93     83.78     0.98                             arm7tdmi_write_core_regs\r
102   0.86     84.68     0.91                             arm7_9_poll\r
103   0.85     85.57     0.89                             memset\r
104   0.77     86.38     0.81                             cyg_splx\r
105   0.64     87.05     0.67                             cyg_in_cksumdata\r
106   0.63     87.71     0.66                             openeth_deliver\r
107   0.57     88.31     0.60                             strstr\r
108   0.51     88.85     0.53                             eth_drv_recv\r
109   0.49     89.36     0.52                             cyg_splinternal\r
110   0.49     89.88     0.52                             cyg_splimp\r
111   0.46     90.36     0.48                             cyg_ip_input