summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/uC5282/README
blob: 25f6fbe22f5c093d5c0652d4da6188d1a8dc2604 (plain) (blame)
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
#
#  $Id$
#

Description: Arcturus Networks uC DIMM ColdFire 5282 
============
 CPU: MCF5282, 64MHz
 RAM: 16M
SRAM: 64k (BSP places FEC buffer descriptors here)
 ROM: 4M

This is a credit-card sized board in a DIMM format. It is part of a family
which includes Dragonball and Coldfire CPUs, with a standardized DIMM-based bus. 

ACKNOWLEDGEMENTS:
=================
This BSP is based on the work of:
    D. Peter Siddons
    Till Straumann
    Brett Swimley
    Jay Monkman

TODO:
=====
Make a clean exit routine to return to Arcturus monitor

The bsp relies on the Arcturus monitor to set up DRAM and all chip selects. 
This seems OK to me, but others may find it lame.....

I/O pin restrictions make simultaneous operation
of I2C, CAN and UART2 impossible.
 
BSP NAME:           uC5282
BOARD:              Arcturus Netrworks uCdimm 5282
BUS:                Arcturus DIMM bus, A24/D16, plus peripherals.
CPU FAMILY:         ColdFire 5282
CPU:                MCF5282
COPROCESSORS:       N/A

DEBUG MONITOR:      Arcturus bootloader

PERIPHERALS
===========
TIMERS:             Four PIT (RTEMS clock is PIT3), Four Timers
  RESOLUTION:       1 microsecond 
SERIAL PORTS:       Internal UART 0, 1 and 2
REAL-TIME CLOCK:    none
DMA:                none
VIDEO:              none
SCSI:               none
NETWORKING:         Internal 10/100Mbs FEC, locked at 100 Mbs, full-duplex

DRIVER INFORMATION
==================
CLOCK DRIVER:       PIT3
IOSUPP DRIVER:      none
SHMSUPP:            none
TIMER DRIVER:       TIMER3
TTY DRIVER:         UART0, 1 and 2

STDIO
=====
PORT:               UART0 Terminal
ELECTRICAL:         RS-232
BAUD:               9600
BITS PER CHARACTER: 8
PARITY:             None
STOP BITS:          1

Downloading the image to the board.
===================================
The bootable image is generated by the make-exe target in the bsp makefile. It
generates a simple stripped binary file which is downloaded over the ethernet
port into RAM then executed or programmed into flash memory.

1) Power up the uC5282 board. A dump of some memory maps is produced
   followed by a prompt.

2) (first time only)
   Set the uC5282 board Internet configuration:
        setenv IPADDR0 www.xxx.yyy.zzz  (Your board's address)
        setenv NETMASK ppp.qqq.rrr.sss  (Your local network address mask)
        setenv HOSTNAME somename        (Your board's name)

3) Type 'tftp<CR>'

4) Run 'tftp' on your host machine:
        tftp> binary
        tftp> connect www.xxx.yyy.zzz   (Your ucDIMM's address)
        tftp> put someFile.exe          (someFile.boot for the EPICS build system)

5) When the file has downloaded press the <ESC> key to terminate
   the uCDIMM tftp command.

6) Type 'goram<CR>' to start the downloaded program, or type 'program<CR>'
to burn the code onto the uCDIMM flash.

EPICS Bootstrap Information
===========================
The EPICS startup code uses the following environment variables.  If an
optional environment variable is missing the value in parentheses will be used.
All Internet addresses must be given in 'dotted-decimal' format.
HWADDR0    - Ethernet hardware address.
IPADDR0    - Internet address (192.168.0.2).
NETMASK    - Local network address mask (255.255.252.0).
HOSTNAME   - Internet host name (iocNobody).
GATEWAY    - Internet address of gateway machine (NULL).
SERVER     - Internet address of NFS server (192.168.0.1).
NAMESERVER - Internet address of DNS server (SERVER).
DOMAIN     - DNS domain name (precompiled value from CONFIG_SITE).
NTPSERVER  - Internet address of NTP server (SERVER).
BOOTFILE   - Path to executable (epics/iocNobody/bin/RTEMS-uC5282/myApp.boot).
CMDLINE    - Path to startup script (epics/iocBoot/iocNobody/st.cmd).
NFSMOUNT   - NFS information: www.xxx.yyy.zzz:/remote/path /localpath
             A : can also be used to separate the remote and local paths.
             If NFSMOUNT is not set, SERVER will be used as the NFS server,
             and the remote and local paths will be taken from the first
             component of CMDLINE.  If CMDLINE does not begin with a /
             then '/tftpboot' is prepended to the remote path.  This allows
             a remote TFTP and NFS server to be handled transaparently.


============================================================================

      Memory map as set up by dBUG bootstrap and BSP initialization

          +--------------------------------------------------+
0000 0000 |       16 MByte SDRAM                             | 00FF FFFF
0100 0000 |  ---------------------------------------------   |
          |    Address space for future SDRAM expansion      |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 0FFF FFFF
          +--------------------------------------------------+
1000 0000 | External 4 MByte flash memory                    |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 1FFF FFFF
          +--------------------------------------------------+
2000 0000 | 64 kByte on-chip SRAM (RAMBAR)                   |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 2FFF FFFF
          +--------------------------------------------------+
3000 0000 |  CS1* (devLib 'VME' A24 space)                   | 30FF FFFF
3100 0000 |  CS2* (devLib 'VME' A32 and A16 space)          x| 31FF FFFF
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 3FFF FFFF
          +--------------------------------------------------+
4000 0000 | Internal peripheral system (IPSBAR)              |
          .                                                  .
4400 0000 | Backdoor access to on-chip flash                 |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 4FFF FFFF
          +--------------------------------------------------+
          .                                                  .
          .                                                  .
          .                                                  .
          +--------------------------------------------------+
f000 0000 | 512 kByte on-chip flash (FLASHBAR)               |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | fFFF FFFF
          +--------------------------------------------------+

x - Final 16-bit location of CS2* space is reserved for FPGA interrupt status.

============================================================================

      Interrupt map

+-----+-----------------------------------------------------------------------+
|     |                                PRIORITY                               |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|LEVEL|    7   |    6   |    5   |    4   |    3   |    2   |    1   |    0   |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  7  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  6  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  5  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  4  | FEC RX | FEC TX |        |        |        |        |        |   PIT  |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  3  | UART 0 | UART 1 | UART 2 |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  2  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  1  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+

============================================================================

TIMING TESTS  2005-01-28
========================

*** TIME TEST 1 ***
rtems_semaphore_create 19
rtems_semaphore_delete 21
rtems_semaphore_obtain: available 4
rtems_semaphore_obtain: not available -- NO_WAIT 5
rtems_semaphore_release: no waiting tasks 12
*** END OF TEST 1 ***

*** TIME TEST 2 ***
rtems_semaphore_obtain: not available -- caller blocks 34
*** END OF TEST 2 ***

*** TIME TEST 3 ***
rtems_semaphore_release: task readied -- preempts caller 27
*** END OF TEST 3 ***

*** TIME TEST 4 ***
rtems_task_restart: blocked task -- preempts caller 54
rtems_task_restart: ready task -- preempts caller 52
rtems_semaphore_release: task readied -- returns to caller 18
rtems_task_create 87
rtems_task_start 24
rtems_task_restart: suspended task -- returns to caller 27
rtems_task_delete: suspended task 66
rtems_task_restart: ready task -- returns to caller 28
rtems_task_restart: blocked task -- returns to caller 38
rtems_task_delete: blocked task 69
*** END OF TEST 4 ***

*** TIME TEST 5 ***
rtems_task_suspend: calling task 23
rtems_task_resume: task readied -- preempts caller 22
*** END OF TEST 5 ***

*** TIME TEST 6 ***
rtems_task_restart: calling task 30
rtems_task_suspend: returns to caller 9
rtems_task_resume: task readied -- returns to caller 12
rtems_task_delete: ready task 69
*** END OF TEST 6 ***

*** TIME TEST 7 ***
rtems_task_restart: suspended task -- preempts caller 44
*** END OF TEST 7 ***

*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 6
rtems_task_set_priority: returns to caller 17
rtems_task_mode: obtain current mode 3
rtems_task_mode: no reschedule 3
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 22
rtems_task_set_note 6
rtems_task_get_note 6
rtems_clock_set 22
rtems_clock_get 1
*** END OF TEST 8 ***

*** TIME TEST 9 ***
rtems_message_queue_create 55
rtems_message_queue_send: no waiting tasks 20
rtems_message_queue_urgent: no waiting tasks 21
rtems_message_queue_receive: available 20
rtems_message_queue_flush: no messages flushed 8
rtems_message_queue_flush: messages flushed 12
rtems_message_queue_delete 29
*** END OF TEST 9 ***

*** TIME TEST 10 ***
rtems_message_queue_receive: not available -- NO_WAIT 10
rtems_message_queue_receive: not available -- caller blocks 38
*** END OF TEST 10 ***

*** TIME TEST 11 ***
rtems_message_queue_send: task readied -- preempts caller 37
*** END OF TEST 11 ***

*** TIME TEST 12 ***
rtems_message_queue_send: task readied -- returns to caller 23
*** END OF TEST 12 ***

*** TIME TEST 13 ***
rtems_message_queue_urgent: task readied -- preempts caller 35
*** END OF TEST 13 ***

*** TIME TEST 14 ***
rtems_message_queue_urgent: task readied -- returns to caller 24
*** END OF TEST 14 ***

*** TIME TEST 15 ***
rtems_event_receive: obtain current events 0
rtems_event_receive: not available -- NO_WAIT 5
rtems_event_receive: not available -- caller blocks 28
rtems_event_send: no task readied 5
rtems_event_receive: available 9
rtems_event_send: task readied -- returns to caller 16
*** END OF TEST 15 ***

*** TIME TEST 16 ***
rtems_event_send: task readied -- preempts caller 27
*** END OF TEST 16 ***

*** TIME TEST 17 ***
rtems_task_set_priority: preempts caller 39
*** END OF TEST 17 ***

*** TIME TEST 18 ***
rtems_task_delete: calling task 83
*** END OF TEST 18 ***

*** TIME TEST 19 ***
rtems_signal_catch 5
rtems_signal_send: returns to caller 12
rtems_signal_send: signal to self 20
exit ASR overhead: returns to calling task 15
exit ASR overhead: returns to preempting task 18
*** END OF TEST 19 ***

*** TIME TEST 20 ***
rtems_partition_create 20
rtems_region_create 40
rtems_partition_get_buffer: available 11
rtems_partition_get_buffer: not available 7
rtems_partition_return_buffer 12
rtems_partition_delete 11
rtems_region_get_segment: available 28
rtems_region_get_segment: not available -- NO_WAIT 29
rtems_region_return_segment: no waiting tasks 29
rtems_region_get_segment: not available -- caller blocks 55
rtems_region_return_segment: task readied -- preempts caller 72
rtems_region_return_segment: task readied -- returns to caller 58
rtems_region_delete 25
rtems_io_initialize 1
rtems_io_open 1
rtems_io_close 1
rtems_io_read 1
rtems_io_write 1
rtems_io_control 1
*** END OF TEST 20 ***

*** TIME TEST 21 ***
rtems_task_ident 60
rtems_message_queue_ident 60
rtems_semaphore_ident 69
rtems_partition_ident 59
rtems_region_ident 60
rtems_port_ident 59
rtems_timer_ident 61
rtems_rate_monotonic_ident 60
*** END OF TEST 21 ***

*** TIME TEST 22 ***
rtems_message_queue_broadcast: task readied -- returns to caller 32
rtems_message_queue_broadcast: no waiting tasks 14
rtems_message_queue_broadcast: task readied -- preempts caller 39
*** END OF TEST 22 ***

*** TIME TEST 23 ***
rtems_timer_create 8
rtems_timer_fire_after: inactive 12
rtems_timer_fire_after: active 12
rtems_timer_cancel: active 9
rtems_timer_cancel: inactive 8
rtems_timer_reset: inactive 14
rtems_timer_reset: active 15
rtems_timer_fire_when: inactive 21
rtems_timer_fire_when: active 21
rtems_timer_delete: active 12
rtems_timer_delete: inactive 11
rtems_task_wake_when 35
*** END OF TEST 23 ***

*** TIME TEST 24 ***
rtems_task_wake_after: yield -- returns to caller 3
rtems_task_wake_after: yields -- preempts caller 18
*** END OF TEST 24 ***

*** TIME TEST 25 ***
rtems_clock_tick 7
*** END OF TEST 25 ***

*** TIME TEST 26 ***
_ISR_Disable 1
_ISR_Flash 0
_ISR_Enable 0
_Thread_Disable_dispatch 1
_Thread_Enable_dispatch 3
_Thread_Set_state 7
_Thread_Disptach (NO FP) 16
context switch: no floating point contexts 12
context switch: self 2
context switch: to another task 1
fp context switch: restore 1st FP task 14
fp context switch: save idle, restore initialized 3
fp context switch: save idle, restore idle 13
fp context switch: save initialized, restore initialized 2
_Thread_Resume 7
_Thread_Unblock 6
_Thread_Ready 5
_Thread_Get 1
_Semaphore_Get 1
_Thread_Get: invalid id 0
*** END OF TEST 26 ***

*** TIME TEST 27 ***
interrupt entry overhead: returns to interrupted task 3
interrupt exit overhead: returns to interrupted task 3
interrupt entry overhead: returns to nested interrupt 2
interrupt exit overhead: returns to nested interrupt 2
interrupt entry overhead: returns to preempting task 4
interrupt exit overhead: returns to preempting task 20
*** END OF TEST 27 ***

*** TIME TEST 28 ***
rtems_port_create 12
rtems_port_external_to_internal 5
rtems_port_internal_to_external 6
rtems_port_delete 12
*** END OF TEST 28 ***

*** TIME TEST 29 ***
rtems_rate_monotonic_create 13
rtems_rate_monotonic_period: initiate period -- returns to caller 20
rtems_rate_monotonic_period: obtain status 10
rtems_rate_monotonic_cancel 13
rtems_rate_monotonic_delete: inactive 17
rtems_rate_monotonic_delete: active 16
rtems_rate_monotonic_period: conclude periods -- caller blocks 24
*** END OF TEST 29 ***

*** TIME CHECKER ***
Units may not be in microseconds for this test!!!
0 100000
Total time = 0
Average time = 0
NULL timer stopped at 0
LOOP (1000) timer stopped at 188
LOOP (10000) timer stopped at 1875
LOOP (50000) timer stopped at 9375
LOOP (100000) timer stopped at 18750
*** END OF TIME CHECKER ***

*** TIME TEST OVERHEAD ***
rtems_initialize_executive 0
rtems_shutdown_executive 0
rtems_task_create 0
rtems_task_ident 0
rtems_task_start 0
rtems_task_restart 0
rtems_task_delete 0
rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 1
rtems_task_wake_after 0
rtems_interrupt_catch 0
rtems_clock_get 1
rtems_clock_set 1
rtems_clock_tick 0
rtems_timer_create 0
rtems_timer_delete 0
rtems_timer_ident 0
rtems_timer_fire_after 1
rtems_timer_fire_when 1
rtems_timer_reset 0
rtems_timer_cancel 0
rtems_semaphore_create 0
rtems_semaphore_delete 0
rtems_semaphore_ident 0
rtems_semaphore_obtain 0
rtems_semaphore_release 0
rtems_message_queue_create 0
rtems_message_queue_ident 0
rtems_message_queue_delete 0
rtems_message_queue_send 0
rtems_message_queue_urgent 0
rtems_message_queue_broadcast 0
rtems_message_queue_receive 0
rtems_message_queue_flush 0
rtems_event_send 0
rtems_event_receive 0
rtems_signal_catch 0
rtems_signal_send 0
rtems_partition_create 0
rtems_partition_ident 0
rtems_partition_delete 0
rtems_partition_get_buffer 0
rtems_partition_return_buffer 0
rtems_region_create 0
rtems_region_ident 0
rtems_region_delete 0
rtems_region_get_segment 0
rtems_region_return_segment 0
rtems_port_create 0
rtems_port_ident 0
rtems_port_delete 0
rtems_port_external_to_internal 0
rtems_port_internal_to_external 0
rtems_io_initialize 0
rtems_io_open 0
rtems_io_close 0
rtems_io_read 0
rtems_io_write 0
rtems_io_control 0
rtems_fatal_error_occurred 0
rtems_rate_monotonic_create 0
rtems_rate_monotonic_ident 0
rtems_rate_monotonic_delete 0
rtems_rate_monotonic_cancel 0
rtems_rate_monotonic_period 0
rtems_multiprocessing_announce 0
*** END OF TIME OVERHEAD ***