Date:2010-10-16 18:34:36 (7 years 9 months ago)
Author:Carlos Camargo
Commit:ee10724112267b00e4fe8adbaa32f80a42709766
Message:fixing xmode initial delay

Files: lm32/logic/sakc/firmware/cain_loader/image.ram (12 diffs)
lm32/logic/sakc/firmware/cain_loader/main.c (3 diffs)
lm32/logic/sakc/firmware/cain_loader/xmodem.c (1 diff)

Change Details

lm32/logic/sakc/firmware/cain_loader/image.ram
99781c0000
10103b9c0ffc
1111781a0000
123b5a0710
123b5a06c0
131378010000
1438210708
14382106c0
151578030000
163863070c
16386306c4
171744230004
181858200000
191934210004
...... 
57575b9d0004
5858b820d800
595978010000
6038210498
603821046c
6161f800006a
626237820014
6363b8406000
...... 
102102780d0000
103103e0000004
104104b9a00800
105382104d0
105382104a4
106106f800003d
107107b9800800
1083821049c
10838210470
109109f800003a
110110f8000027
1111115c2bfff9
11234012000
11234010800
113113f8000058
114114b8207000
115115ba000800
116382104b8
1163821048c
117117f8000032
118118b9c00800
119119fbffffbe
120120b9e00800
121382104c4
12138210498
122122f800002d
123123e3fffff0
12412478020000
12538420700
125384206b8
1261263803c350
12712728420000
12812888230800
...... 
1361364420fffe
137137c3a00000
13813878010000
13938210700
139382106b8
14014028210000
1411413802c350
14214258220004
...... 
147147c3a00000
148148c3a00000
14914978010000
150382106fc
150382106b4
15115128220000
15215228410000
15315320210001
...... 
156156202100ff
157157c3a00000
15815878020000
159384206fc
159384206b4
16016028430000
161161202100ff
16216228620000
...... 
16716740240000
1681684480000b
16916978020000
170384206fc
170384206b4
17117128430000
17217228620000
17317320420010
...... 
183183c3a00000
18418434010000
18518578070000
18638e704fc
18638e704b4
187187b8201800
188188b5032000
18918940840000
...... 
1981982081ffff
1991995c62fff5
200200c3a00000
201379cffdc
2025b8b0024
2035b8c0020
2045b8d001c
2055b8e0018
2065b8f0014
2075b900010
2085b91000c
2095b920008
201379cffe0
2025b8b0020
2035b8c001c
2045b8d0018
2055b8e0014
2065b8f0010
2075b90000c
2085b910008
2102095b9d0004
211780b0002
212b9601800
213210b8206000
21438630000
21534010000
21634000000
21734210001
2185c23fffe
21978010000
220382104e0
221fbffffca
222fbffffb7
223b9601000
211fbffffc2
21278020400
22421338420000
22521434010000
22621534000000
22721634210001
2282175c22fffe
22921834010043
23034110001
219340f0001
231220780d0000
232fbffffb6
233ba209000
23439ad04fc
221fbffffc1
222b9e08800
22339ad04b4
23522434100000
236225340e0082
237fbffffa8
2385c320027
239fbffffa6
240b8207800
241fbffffa4
242a42f0800
243202b00ff
2445d600023
2455df10022
246fbffff9f
226fbffffb3
2275c310028
228fbffffb1
229b8205800
230fbffffaf
231a4200800
232202100ff
2335d610024
2345deb0023
235340b0000
236fbffffa9
247237b58b1000
24823830410000
249239356b0001
...... 
2692595c23000a
27026035ef0001
27126134010006
27221f100ff
26221ef00ff
27326336100080
264fbffff96
274265fbffff8c
275fbffff82
2764432ffdb
2664431ffda
27726734020004
2784422000e
2684422000d
27926934100000
280270ba000800
2812712b9d0004
2822b8b0024
2832b8c0020
2842b8d001c
2852b8e0018
2862b8f0014
2872b900010
2882b91000c
2892b920008
290379c0024
2722b8b0020
2732b8c001c
2742b8d0018
2752b8e0014
2762b8f0010
2772b90000c
2782b910008
279379c0020
291280c3a00000
29228134010006
293fbffff79
294e3fffff2
282fbffff84
283e3fffff3
29528430780000
2962850a313a20
29728655706c6f
...... 
3102996c696420
311300696e7075
312301740d0a00
31352656365
3146976696e
3156720586d
3166f64656d
31720747261
3186e736665
319720a0000
32030200001021
32130320423063
322304408450a5
...... 
1022100400000000
1023100500000000
1024100600000000
100700000000
100800000000
100900000000
101000000000
101100000000
101200000000
101300000000
101400000000
101500000000
101600000000
101700000000
101800000000
101900000000
102000000000
102100000000
102200000000
102300000000
102400000000
lm32/logic/sakc/firmware/cain_loader/main.c
4747    // Initialize UART
4848    uart_init();
4949
50
51
52
5350  while(1){ /* loop forever until u-boot gets booted or the board is reset */
5451    if(dispmenu){
5552     uart_putstr("\n1: Upload program to RAM\r\n");
...... 
6057// uart_putstr("6: Memory test\r\n");
6158      dispmenu = 0;
6259    }
63
6460      key = uart_getchar();
6561      autoboot = 0;
66
6762    if(key == '1'){
68      len = rxmodem((unsigned char *)0x2000);
63      len = rxmodem((unsigned char *)0x800);
6964      uart_putstr("Received ");
7065      hexprint(len);
7166      uart_putstr(" bytes\r\n");
...... 
8176
8277  }
8378
84
85
86    c = '*'; // print msg on first iteration
87    for(;;) {
88        uint32_t start, size;
89
90        switch (c) {
91            case 'u': // upload
92                start = read_uint32();
93                size = read_uint32();
94                for (p = (int8_t *) start; p < (int8_t *) (start+size); p++)
95                    *p = uart_getchar();
96                break;
97        case 'd': // download
98                start = read_uint32();
99                size = read_uint32();
100                for (p = (int8_t *) start; p < (int8_t *) (start+size); p++)
101                uart_putchar( *p );
102                break;
103            case 'g': // goto
104                start = read_uint32();
105                jump(start);
106                break;
107        default:
108            uart_putstr("**SAKC/bootloader** > \r\n");
109            break;
110        };
111        c = uart_getchar();
112    }
11379}
11480
lm32/logic/sakc/firmware/cain_loader/xmodem.c
7777    unsigned short crc, tcrc;
7878    int i, pid = 1, len = 0;
7979
80        for(i = 0; i < 0x20000; i++) { asm("nop;"); }
81    uart_putstr("Receiving Xmodem transfer\n");
8280    uart_getchar ();
83        for(i = 0; i < 0x20000; i++) { asm("nop;"); }
81        for(i = 0; i < 0x4000000; i++) { asm("nop;"); }
8482    uart_putchar ('C');
8583
8684    while(1)
8785    {
88        int c, pid1, pid2;
86        char c, pid1, pid2;
87
88        c = uart_getchar();
8989
90        c = uart_getchar ();
9190        if (c != SOH)
9291        {
9392            if (c == EOT)

Archive Download the corresponding diff file

Branches:
master



interactive