AMX 68000 Bedienungsanleitung

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

Zur Seite of

Richtige Gebrauchsanleitung

Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung AMX 68000 an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von AMX 68000, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.

Was ist eine Gebrauchsanleitung?

Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung AMX 68000 die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.

Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung AMX 68000. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.

Was sollte also eine ideale Gebrauchsanleitung beinhalten?

Die Gebrauchsanleitung AMX 68000 sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts AMX 68000
- Den Namen des Produzenten und das Produktionsjahr des Geräts AMX 68000
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts AMX 68000
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen

Warum lesen wir keine Gebrauchsanleitungen?

Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von AMX 68000 zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von AMX 68000 und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service AMX finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von AMX 68000 zu überspringen, wie es bei der Papierform passiert.

Warum sollte man Gebrauchsanleitungen lesen?

In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts AMX 68000, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.

Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von AMX 68000 widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.

Inhaltsverzeichnis der Gebrauchsanleitungen

  • Seite 1

    ® AM X ™ 68000 Target Guide First Printing: April 15, 1994 Last Printing: March 1, 2005 Copyright © 1994 - 2005 KADAK Products Ltd. 206 - 1847 W est Bro adway Avenu e Vancouver, BC, C anada, V6J 1Y 5 Phone: (604) 734-2 796 Fax: (604) 734-8 114[...]

  • Seite 2

    [...]

  • Seite 3

    AMX 68000 Target G uide K A DAK i TECHNICAL SUPPORT KADAK Products Ltd. is committed to technical support for its software products. Our programs are desi gned to be easil y incorporated in your s ystems and every effo rt has been made to eliminate errors. Engineering Change Notices (ECNs) are provided periodicall y to repair faults or to improve p[...]

  • Seite 4

    ii K A DAK AMX 68000 Target G uide Copyright © 1994-2005 by KADAK Products Ltd. All rights reserv ed. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or co mputer language, in any form or by any means, electronic, m echanical, magnetic, optical, ch emical, manua[...]

  • Seite 5

    AMX 68000 Target G uide K A DAK iii AMX 68000 TARGET GUIDE Table of Cont ents Page 1. Getting S tarted with A MX 68000 1 1.1 Introduction ........................................................................................ 1 1.2 AMX Files .......................................................................................... 2 1.3 AMX Nomen [...]

  • Seite 6

    iv rev9 K A DAK AMX 68000 Target G uide AMX 68000 TARGET GUIDE Table of Contents (Cont'd) Appendices Page Appendix A. Target Parameter File Specification A-1 A.1 Target Parame ter File Structure ......................................................... A-1 A.2 Target Parame ter File Directives ..................................................[...]

  • Seite 7

    AMX 68000 Target G uide K A DAK 1 1. Getting S tarted wit h AMX 68 0 00 1.1 Intr oduction The AMX ™ Multitasking Executive is de scribed in the AMX User's Guide . This target guide describes AMX 68000 which operates on the Motorola MC680xx, MC683xx and all architectur ally compatib le processors. Throughout this manual, the term M68000 refer[...]

  • Seite 8

    2 K A DAK AMX 68000 Target G uide 1.2 AMX F iles AMX is provided in C source format to ensure th at regardless of y our development environment, your ability to use and support AMX is uninhibited. AMX also includes a small portion programmed in M68000 assembly language. Figures 1.2-1, 2 and 3 summarize the AMX modules provided with AMX 68000. The A[...]

  • Seite 9

    AMX 68000 Target G uide K A DAK 3 File Name Module CJ532KA .C Kernel task services CJ532KB .C General ta sk services CJ532KBR.C CJ532KC .C Timer Manag e r CJ532KCR.C CJ532KD .C Task management services CJ532KDR.C CJ532KE .C Task termination se rvices CJ532KF .C Suspend/resume task CJ532KG .C Time slice ser vices CJ532KH .C Task status CJ532KI .C En[...]

  • Seite 10

    4 K A DAK AMX 68000 Target G uide 1.3 AMX Nomencla ture The following nomenclature standards h ave been adopted th roughout the AMX Target Guide. Numbers use d in this manual are dec imal unless otherwise indicated. Hexadecimal numbers are indicated in the format 0xABCD or $ABCD . The terminology A(Table XYZ) is used to define add resses. It is r e[...]

  • Seite 11

    AMX 68000 Target G uide K A DAK 5 1.4 AMX 68000 T arget Specificatio ns AMX 68000 was initially developed and tested using the Motorola MC68020, MC68040 and MC68332 processors on a variet y of Motorola evaluation boards. However, th e AMX 68000 desig n criteria full y encompass the Motorola M68000 processor f amily requirements. AMX uses a set of d[...]

  • Seite 12

    6 K A DAK AMX 68000 Target G uide 1.5 Launch Requir ements The M68000 must be properl y confi gured for use before AMX is launch ed. The manner in which this is accomplished will depend on your target hardware implementation and on the startup code provided with your C compiler. AMX does not include bootstrap code to initialize the M68000 processor[...]

  • Seite 13

    AMX 68000 Target G uide K A DAK rev6 7 Trace Controls AMX alters the state o f the st atus re gister ( SR ) whenev er it enables or disables i nterrupts. When AMX disables interrupts, it also clears t he trace control bits ( T or T0 an d T1 ) to 0. When AMX enable s interrupts, the tra ce control bits rema in unaltered. Consequently , you may not b[...]

  • Seite 14

    8 K A DAK AMX 68000 Target G uide Memory Manage ment Unit (MMU) The MC68030, MC68040, MC68L C040 and MC68060 include a Memor y Management Unit (MMU) to support a demand-paged virtual memory environment. AMX does not support the M68000 memory management unit. If you are using AMX on the Motorola MC68000, MC68008, MC68010 or MC683xx processors, this [...]

  • Seite 15

    AMX 68000 Target G uide K A DAK 9 2. Program Coding Specifications 2.1 T ask T rap Handler AMX 68000 supports task traps for the M68000 zero divide, bounds check and overflow faults. A zero divide fault occurs if an y M68000 instruction attempts an integer division by zero. A bounds check fault occu rs if the M68000 CHK instru ction detects an a rr[...]

  • Seite 16

    10 K A DAK AMX 68000 Target G uide 2.2 T a sk Scheduling H ooks There are four critical points within the AMX Task Scheduler. These critical points occur when: a task is starte d a task ends a task is suspended a task is allowed to r esume. AMX allows a unique application procedure to be provided for each of these critical points. Pointe rs to y ou[...]

  • Seite 17

    AMX 68000 Target G uide K A DAK 11 3. The Pr ocessor Int errupt System 3.1 Oper at ion The M68000 classifies all internal and ex ternal sources of interruption as exceptions. The processor automaticall y det ermines the cause of th e exception and then br anches indirectl y through entries in the processor Excepti on Vector Table to an appropriate [...]

  • Seite 18

    12 K A DAK AMX 68000 Target G uide Defaul t Exception S ervice Procedures AMX provides default service procedures for most ex ceptions. The zero divide, bounds check and overflow exceptions are serviced b y AMX using its Task Trap Handler mechanism. All other ex ceptions handled b y AMX are treated as fatal. AMX call s a Fatal Exception Procedure c[...]

  • Seite 19

    AMX 68000 Target G uide K A DAK 13 3.2 AMX V ector T able The M68000 processor provides an Exception Vector Tabl e, often referred to as the AMX Vector Table, through whi ch device interrupts are vectored and processor faults are trapped. The position of entries in the table and the v ector numbers used to refe rence them are dictat ed b y Mot orol[...]

  • Seite 20

    14 K A DAK AMX 68000 Target G uide Vector Vector En able Name Number Mask Exception CJ_PRVNRES 0, 1 Reset CJ_PRVNBE 2 $00000004 Bus error (acc ess fault) CJ_PRVNAE 3 $00000008 Address error CJ_PRVNII 4 $00000010 Illegal instr uction CJ_PRVNZD 5 $00000020 Zero divide CJ_PRVNCH 6 $00000040 CHK instruction trap CJ_PRVNTV 7 $00000080 TRAPV instruction [...]

  • Seite 21

    AMX 68000 Target G uide K A DAK 15 3.3 AMX Interrupt Priority and NMI The M68000 family of processors offers inhe rent interrupt priority ordering. The AMX Interrupt Supervisor supports this feature and allows the nestin g of interrupts for fast response to high priority events. The M68000 interrupt priorit y mask in the status ( SR ) re gister est[...]

  • Seite 22

    16 rev7 K A DAK AMX 68000 Target G uide 3.4 Conf orm ing ISPs A conforming ISP consists of an ISP root and a device Interrupt Handler. Th e ISP root is created in your Target Confi guration Module b y the AMX Configuration Generator usin g the information provided in your Target Parameter File (se e Chapter 4). The address of the ISP root must be i[...]

  • Seite 23

    AMX 68000 Target G uide K A DAK 17 The following examples illustra te how simple an Inte rrupt Handler can be. /* The ISP root definition in the Target Parameter File is as follows:*/ /* ...ISPC deviceisp,deviceih,26,0,0 */ /* The ISP root is given the public name deviceisp */ /* The Interrupt Handler is named deviceih */ /* The device interrupts o[...]

  • Seite 24

    18 K A DAK AMX 68000 Target G uide 3.5 Non conform ing ISPs The M68000 family of processors provides an interrupt prio rity ordering mech anism which permits the use of nonconforming ISPs within an AMX s y st em. Since nonconforming ISPs bypass the AMX Interrupt Supervisor, the y cannot make us e of an y AMX services. Nonconforming ISPs run at the [...]

  • Seite 25

    AMX 68000 Target G uide K A DAK rev7 19 3.6 Pr ocessor V ector Initial izati on Whenever an internal or external devi ce interrupt occurs, the M68000 processor unconditionally vectors to a unique memory address determined b y an entry in the processor Exception Ve ctor Table. The code lo cated at t hat addr ess i s call ed an Interrupt Service Proc[...]

  • Seite 26

    20 K A DAK AMX 68000 Target G uide This page left blank intentionall y .[...]

  • Seite 27

    AMX 68000 Target G uide K A DAK 21 4. T arget Configur ation M odule 4.1 The T arget Confi gurat ion P roce s s Every AMX applicat ion must include a Targ et Configurat ion Module which defines the manner in which AMX is to be used in your target hardwar e environment. The information in this file is derived from parameters w hich you must provide [...]

  • Seite 28

    22 K A DAK AMX 68000 Target G uide Screen Layout Figure 4.1-1 illustrates the Configuration Manager's screen la y out on ce you have begun to crea te or edit a Target Pa rameter File. The title bar identifies the Target Para meter File being c reated or edited. Below the title bar is the menu bar fr om which the operations you wish the Manager[...]

  • Seite 29

    AMX 68000 Target G uide K A DAK 23 Menus All commands to the Conf iguration Manag e r are a vailable as items on the menus present on the menu bar. The File menu provides the conventional New , Open , Save and Save As. .. commands for crea ting and editing your Targe t Paramete r File. It also provides the Exit command. When the Target Configuratio[...]

  • Seite 30

    24 rev8 K A DAK AMX 68000 Target G uide If you have modified some of the fields on a propert y page and then decide that these modified values are not correct, use th e Undo P ag e command on the Edit menu or Toolba r to force the Configuration Manager to restor e the content of all fields on the page to the values which were in effect when you mov[...]

  • Seite 31

    AMX 68000 Target G uide K A DAK 25 4.2 T arget Configuration Par ameters General Parameters The Ge neral Parame ter window allows you to def ine the general ope rating chara cteristics of your AMX system within y ou r target hardware environment. The la y o ut of the window is shown in Figure 4.1-1 in Chapter 4.1. CPU Type Identif y y our pro cesso[...]

  • Seite 32

    26 K A DAK AMX 68000 Target G uide Vectors in RAM In most case s, the processor Exception Vector Ta ble will be located in a lterable RAM at address 0 or at some alternate addr ess provided by you. Therefore check this box. If your processor Exception Vector Table is in ROM, leav e this box unchecked. In this case, you must initialize the ROM vecto[...]

  • Seite 33

    AMX 68000 Target G uide K A DAK 27 Software I/O Delay AMX provides a device I/O dela y procedure cjcfhwdelay which is used b y AMX board support modules and sample device drivers to provide the necessar y delay between sequential references to a device I/O port. Such delay is often required to accommodate long device ac cess times whe n operating a[...]

  • Seite 34

    28 K A DAK AMX 68000 Target G uide Fatal Exceptions The Target Configuration Module defines the proce ssor exceptions which are to be serviced b y AMX and trea ted as fatal. Thes e exceptions are specified b y you b y checking the appropriat e boxes in the Fatal Exception window. The la y out of the window is shown below. This example allows AMX to[...]

  • Seite 35

    AMX 68000 Target G uide K A DAK 29 4.3 Interrupt Ser vice Proc edure (ISP) Definiti ons Your Target Configuration Module must include a device ISP root for each co nforming ISP which you intend to use in your application. The ISP roots are constructed for you by the AMX Config uration Builder fr om ISP descriptions which y ou enter in the ISP Defin[...]

  • Seite 36

    30 K A DAK AMX 68000 Target G uide ISP Type At least one of your ISPs must service a clock interrupt which provides AMX with its fundamental clock tick at the frequen cy and resolution defined in y our AMX S ystem Configuration Module. To define your custom clock ISP , choose Clock Handler from the pull down list. An alternate fast clock ISP can be[...]

  • Seite 37

    AMX 68000 Target G uide K A DAK 31 Interrupt H andler Parame ter Your Inte rrupt Ha ndler ca n be code d to receive a 32-bit par ameter every time it is called. The Parameter Type field is a pull down list use d to identify what kind of parame ter, if any, your Interrupt Handler expects. If y our Interrupt Handler has no need for a parameter , set [...]

  • Seite 38

    32 K A DAK AMX 68000 Target G uide 4.4 Def ining a Fast C lock ISP At least one of your ISPs must service a clock interrupt which provides AMX with its fundamental clock tick at the frequen cy and resolution defined in y our AMX S ystem Configuration Module. For many applications, your clock ISP will just be a standard AMX conforming ISP defined in[...]

  • Seite 39

    AMX 68000 Target G uide K A DAK 33 ISP Type Your fast clock I SP is identified as such by selec ting Fast Clock Handler from the pull down list. ISP Root Edit the default na me ---New--- to provide the name you wish to give to your fast clock ISP root. The ISP root name is used to identify y ou r fast clock I SP in the ISP list. The I SP root is a [...]

  • Seite 40

    34 K A DAK AMX 68000 Target G uide 4.5 Nul l Funct ion s Occasionall y, while developing an AMX application, it can be ver y convenient to be able to create software functions to satisf y your program link requirements without having to create the fi nal version of these functions. For ex ample, if your AMX S ystem Configuration Module references a[...]

  • Seite 41

    AMX 68000 Target G uide K A DAK 35 4.6 ROM Opt ion Parameter s The AMX ROM Option allows the subset of AMX and its managers requir ed by your application to be linked together without any application code to form a sep arate AMX ROM imag e. Th e resulting AMX ROM ca n be located any where in your memory configuration. Your AMX application is then l[...]

  • Seite 42

    36 K A DAK AMX 68000 Target G uide Enable ROM Option By default, the ROM Option feature is disabled. Check this box to enable the fe ature. You can disable the feature b y removing the check from the box. ROM Address You must define the ab solute physical ROM address at which the AMX ROM imag e is to be located. This add ress is dictated b y y ou a[...]

  • Seite 43

    AMX 68000 Target G uide K A DAK 37 5. Clock Drivers 5.1 Cl ock Driver Operation You must provide a clock driver as p art of your AMX application so that AMX can provide timing se rvices. AMX clock drivers are provided with AMX for the timer chips used on the boards with which AMX has be en tested. Th ese drive rs are re ady for us e and can be inst[...]

  • Seite 44

    38 K A DAK AMX 68000 Target G uide Clock Inte rrupts A real-time clock used with the M68000 processor will interrupt either on one o f the interrupt autovectors or on a user defined vector. In either case, the processor will automatically dispatch through its Vector Table to your clo ck ISP. The clock ISP consists of an ISP root and an Interrupt Ha[...]

  • Seite 45

    AMX 68000 Target G uide K A DAK 39 5.2 Cust om Clock Driver The easiest wa y to create a custom cl ock driver is by ex ample. Assume that the counter/timer which you intend to use for y our AMX clock is ch aracterized as follows: The I/O base address of the clock is at 0xFFA00100 . The clock interrupt is generated using vector number 25. The clock [...]

  • Seite 46

    40 K A DAK AMX 68000 Target G uide The clock initializa tion procedure for this custom clock driver could be coded in C as follows. Insert procedure clockinit into your list of Restart Procedures provided in your System Configuration Module at the point at which you wish the clock to be enabled during the launch. void CJ_CCPP clockroot(void); /* Ex[...]

  • Seite 47

    AMX 68000 Target G uide K A DAK 41 5.3 AMX Clock Driv ers AMX clock drivers are provided with AMX for the timer chips used on the boards with which AMX has been tested. Th ese driv ers ar e re ad y for use as des cribed i n th is chapt er. The clock drivers ar e delive red in chip support source files having names of the fo rm CHnnnnT.C where nnnn [...]

  • Seite 48

    42 K A DAK AMX 68000 Target G uide 5.3.2 MC68360 PIT Clock Driver The AMX clock d river for the Motorola MC68360 Periodic Interval Timer (P IT) is read y for use on the Motorola M68360QUADS Application Development S y stem board. It is configured to operate at approx imately 1 KHz (1 ms period). S ource code for this AMX clock driver is provided in[...]

  • Seite 49

    AMX 68000 Target G uide K A DAK 43 5.3.3 MC68230 Clock Driver The AMX clock driver for the Motorola MC68230 Parallel Interface/Timer is read y for use on the Motorola M68EC040 Integrated Development Platform (IDP). It is configured to operate at approx imately 1 KHz (1 ms period). S ource code for this AMX clock driver is provided in file CH68230T.[...]

  • Seite 50

    44 K A DAK AMX 68000 Target G uide 5.3.4 MC68901 Clock Driver The AMX clock driver for the Motorola MC68901 Multi-Function Periph eral is read y for use on the Motorola MVME133 VMEmodule board. It is configured to use timer A operating at 1 KHz (1 ms period). S ource code for this AMX clock d river is provided in file CH68901T.C . You must compile [...]

  • Seite 51

    AMX 68000 Target G uide K A DAK A-1 Appendix A. T arget Parameter File Specif i cation A.1 T arget Parameter File S tructur e The Targe t Par ameter File is a t ext file str uctured a s illustrated in F igure A.1-1. This file can be created and edited by the AMX Configuration Manager, a W indows ® utility provided with AMX. ; AMX Target Parameter [...]

  • Seite 52

    A-2 K A DAK AMX 68000 Target G uide The Target Parameter File consists of a sequence of directives consisting of a ke yword of the form ...XXX beginning in column one which is usually followed by a parame ter list. Some directive s require only a keyword with no parameters. An y line in the file which does not begin with a valid keyword is consider[...]

  • Seite 53

    AMX 68000 Target G uide K A DAK rev6 A-3 A.2 T arget Parameter File Directives The AMX Launc h Param eters are defined as follows. ...LAUNCH PERM,VNA PERM 0 if the AMX launch is temporar y 1 if the AMX launch is permanent VNA 0 if the AMX Vector Table entries a re to be alterable 1 if the AMX Vector Table entries a re NOT to be alterable You must s[...]

  • Seite 54

    A-4 K A DAK AMX 68000 Target G uide Vector Base Regist er The VBR parameter is used to specify the memory address at which the Exception Vector Table is locat ed. For most applicat ions, the Except ion Vector Table is locat ed at address 0. You can use the VBR parameter to r edefine the location of the Exception Vector Table or to define its locati[...]

  • Seite 55

    AMX 68000 Target G uide K A DAK A-5 Device I/O Delay The Target Parameter File includes a devi ce I/O dela y de finition. ...DELAY CPUFREQ CPUFREQ M68000 processor instruction execution frequenc y (MHz) The ...DELAY directive allows you to condition the delay loop of the AMX device I/O delay procedure cjcfhwdelay to match y our hardware r equiremen[...]

  • Seite 56

    A-6 K A DAK AMX 68000 Target G uide Conforming ISP Declarations The Target Parameter File must include a definition of an ISP root for each conforming Interrupt Service Procedure ( I SP) which you intend to use in your application. The ISP root definition is provided using one of the following directives. The ISP root is declared using ...ISPC if i[...]

  • Seite 57

    AMX 68000 Target G uide K A DAK A-7 AMX Clock Handler Decla ration The Target Parameter File must include a definition of an ISP root for your AMX clock handler. The clock I SP root definition must be provided using one of the following directives. The clock ISP root is decl ared usin g ...CLKC if its Inter rupt Handler is coded in C or ...CLKA if [...]

  • Seite 58

    A-8 K A DAK AMX 68000 Target G uide If your clock can be ser viced by writing one or two n -bit values to a device I/O port, you can use the ...CLKFAST directive to create a ver y fast clock ISP root with no application code required. The general form of the ...CLKFAST directive is as f ollows. ...CLKFAST CLKROOT,CLKADR,CLKCMD,CLKADR2,CLKCMD2,IODEL[...]

  • Seite 59

    AMX 68000 Target G uide K A DAK A-9 AMX ROM Option To use the AMX ROM option, the Target Parameter File must include the following directives. ...ROMOPT ROMADR,RAMADR ...ROMSM ;Semaphore Manager ...ROMEM ;Event Manager ...ROMMB ;Mailbox Manager ...ROMMX ;Message Exchange Manager ...ROMBM ;Buffer Manager ...ROMMM ;Memory Manager ...ROMCL ;Circular L[...]

  • Seite 60

    A-10 K A DAK AMX 68000 Target G uide This page left blank intentionall y .[...]

  • Seite 61

    AMX 68000 Target G uide K A DAK A-11 A.3 Porting the T arget Param eter File It is expected tha t you will use the AMX Configuration Manage r to create and edit your Targe t Parame ter File . I f y ou are unable to use the AMX Configuration Ma nager utility, y ou will have to create and edit y our Target Para meter File using a text editor. You sho[...]

  • Seite 62

    A-12 K A DAK AMX 68000 Target G uide This page left blank intentionall y .[...]

  • Seite 63

    AMX 68000 Target G uide K A DAK rev7 B-1 Appendix B. AMX 68000 Ser vice Pr ocedur es B.1 Summary of S ervice s AMX 68000 provides a collection of target dependent AMX servi ce procedures for us e with the M68000 processor and compatibles and the C compilers which support them. These procedures ar e summarized below. Interr upt Cont rol (class ksi )[...]

  • Seite 64

    B-2 K A DAK AMX 68000 Target G uide The AMX Librar y also includes several C procedures which a re used privatel y b y KADAK. These pro cedures, although available for y our us e, are not documented in this manual a nd are subject to change at any time. The procedures are brie fly described in source file CJZZZUB.ASM . Protot y pes will be found in[...]

  • Seite 65

    AMX 68000 Target G uide K A DAK rev7 B-3 B.2 Service Pr ocedure s A description of all processor dep endent AMX 68000 service proc edures is provid ed in this appendix. The descriptions are ord ered alphabetically for eas y reference. Italics are used to distinguish programming examples. Procedure names and variable names which ap pear in narrative[...]

  • Seite 66

    B-4 rev7 K A DAK AMX 68000 Target G uide Interrupts AMX procedures frequentl y must deal with the processor inte rrupt mask. The effect of each AMX procedur e on the interrupt stat e is defined according to the following legend. n Disabled n Enabled n Resto red (Not in I SP) D E R Effect on In terrupts ooo Untouched no o Disabled and left disabled [...]

  • Seite 67

    AMX 68000 Target G uide K A DAK B-5 cjcfccsetup cjcfccsetup Purpose Setu p C Environment Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" void CJ_CCPP cjcfccsetup(void); Description Use cjcfccsetup to setup a ll low level pr ocessor register s to m[...]

  • Seite 68

    B-6 K A DAK AMX 68000 Target G uide cjcfdi cjcfdi cjcfei cjcfei Purpose Disable or Enable Interrupts Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure (cjcf di onl y ) Setup Prototy pe in file CJZZZTF.H or macro in file CJZZZCC.H . #include "CJZZZ.H" void CJ_CCPP cjcfdi(void); void CJ_CCPP cjcfei(void); Des[...]

  • Seite 69

    AMX 68000 Target G uide K A DAK B-7 cjcfflagrd cjcfflagrd cjcfflagwr cjcfflagwr Purpose Read or Write Processor Status Register Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe in file CJZZZTF.H or macro in file CJZZZCC.H . #include "CJZZZ.H" CJ_TYFLAGS CJ_CCPP cjcfflagrd(void); void CJ_CC[...]

  • Seite 70

    B-8 K A DAK AMX 68000 Target G uide cjcfhwdelay cjcfhwdelay Purpose Delay n Mi croseconds Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" void CJ_CCPP cjcfhwdelay(int n); Description n is the dela y inte rval measured in microseconds. Use cjcfhwde[...]

  • Seite 71

    AMX 68000 Target G uide K A DAK B-9 cjcfhwbcache cjcfh w bcache cjcfhwdcache cjcfh w dcache cjcfhwic ache cjcfh wicach e Purpose F lush and Enable/Disable Cac hes Used by n Task o ISP o Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe in file CJZZZIF.H . #include "CJZZZ.H" void CJ_CCPP cjcfhwbcache(int operation[...]

  • Seite 72

    B-10 K A DAK AMX 68000 Target G uide cjcfin8 cjcfin 8 cjcfin16 cjcfin 16 cjcfin32 cjcfin 32 Purpose Read an 8, 16 or 32-Bit Input P ort Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe in file CJZZZTF.H or macro in file CJZZZCC.H . #include "CJZZZ.H" CJ_T8 CJ_CCPP cjcfin8(void *port); CJ_T[...]

  • Seite 73

    AMX 68000 Target G uide K A DAK B-11 cjcfjlong cjcfjlon g cjcfjset cjcfjset Purpose cjcfjset Sets a Mark for a Long Jump cjcfjlong Long Jumps to that Mark These pr ocedures are provided for AMX portability . They are not replacement s for C library p rocedures longjmp or setjmp although they function in a similar manner. Used by n Task o ISP o Time[...]

  • Seite 74

    B-12 K A DAK AMX 68000 Target G uide Example #include "CJZZZ.H" void CJ_CCPP dowork(struct cjxjbuf *jbp); static struct cjxjbuf jumpbuffer; #define STACKSIZE 512 /* Stack size (longs) */ #define STACKDIR 1 /* 0=grows up; 1=grows down */ static long newstack[STACKSIZE]; #if (STACKDIR == 1) #define STACKP (&newstack[STACKSIZE - 1]) #els[...]

  • Seite 75

    AMX 68000 Target G uide K A DAK B-13 cjcfmcopy cjcfm copy cjcfmset cjcfm set Purpose Copy a Block of Memory Set (F ill) a Block of Me mory These pr ocedures are provided for AMX portability . They are not replacement s for C library proc edures memcpy or memset . Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setu[...]

  • Seite 76

    B-14 K A DAK AMX 68000 Target G uide cjcfout8 cjcfou t8 cjcfout16 cjcfou t16 cjcfout32 cjcfou t32 Purpose Write to an 8, 16 or 32-Bit Output Port Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe in file CJZZZTF.H or macro in file CJZZZCC.H . #include "CJZZZ.H" void CJ_CCPP cjcfout8(void *p[...]

  • Seite 77

    AMX 68000 Target G uide K A DAK B-15 cjcfstk jmp cjcfstk jmp Purpose Switc h Stacks a nd Jump to a New P ro ce dure This procedure is provide d for AMX portability. Used by n Task o ISP o Time r Proce dure o Rest art Pr oced ure n Exit Proce dure Setup Prototy pe is in file CJZZZTF.H . #include "CJZZZ.H" void CJ_CCPP cjcfstkjmp(void *vp, [...]

  • Seite 78

    B-16 K A DAK AMX 68000 Target G uide cjcftag cjcftag Purpose Convert a String to an Object Name Tag Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZTF.H . #include "CJZZZ.H" CJ_TYTAG CJ_CCPP cjcftag(char *tag); Description tag is a pointer to a string which is a one to fou[...]

  • Seite 79

    AMX 68000 Target G uide K A DAK B-17 cjcfvol8 cjcfvol8 cjcfvol16 cjcfvol16 cjcfvol32 cjcfvol32 cjcfvolpntr cjcfvolpntr Purpose Fetch a Volatile 8-Bit, 16-Bit, 32-Bit or Pointer Value Use these procedure s to fetch the conte nt of a volatile varia ble if the C compiler does not support the C keyword volatile . These procedu res (or macros) also guar[...]

  • Seite 80

    B-18 K A DAK AMX 68000 Target G uide This page left blank intentionall y .[...]

  • Seite 81

    AMX 68000 Target G uide K A DAK B-19 cjksitr ap cjksitr ap Purpose Install a Task Trap Handler Used by n Task o ISP o Time r Proce dure o Rest art Pr oced ure n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" CJ_ERRST CJ_CCPP cjksitrap(int trapid, CJ_TRAPPROC handler); Description trapid is the processor vector [...]

  • Seite 82

    B-20 K A DAK AMX 68000 Target G uide cjksivt p cjksivt p Purpose Fetch Pointer to the AM X Vector Tab le Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" void * CJ_CCPP cjksivtp(void); Interrupts o Di sabled o Enab led o Restor ed Returns A pointer[...]

  • Seite 83

    AMX 68000 Target G uide K A DAK B-21 cjksivt rd cj k sivtrd Purpose Read from the AMX Vector Table Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" CJ_ERRST CJ_CCPP cjksivtrd(int vector, CJ_ISPPROC *oldproc); Description vector is the processor ve [...]

  • Seite 84

    B-22 K A DAK AMX 68000 Target G uide cjk sivtw r cjk sivtwr Purpose Write to the AMX Vector Table Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" CJ_ERRST CJ_CCPP cjksivtwr(int vector, CJ_ISPPROC newproc); Description vector is the processor ve ct[...]

  • Seite 85

    AMX 68000 Target G uide K A DAK B-23 cjksivt x cjksivt x Purpose Exchange an Entry in the AMX Vector Table Used by n Task n ISP n Time r Proce dure n Restar t Proc edur e n Exit Proce dure Setup Prototy pe is in file CJZZZIF.H . #include "CJZZZ.H" CJ_ERRST CJ_CCPP cjksivtx(int vector, CJ_ISPPROC newproc, CJ_ISPPROC *oldproc); Description [...]

  • Seite 86

    B-24 K A DAK AMX 68000 Target G uide This page left blank intentionall y .[...]

  • Seite 87

    AMX 68000 Target G uide K A DAK C-1 Appendix C. AMX 68000 ROM Optio n An AMX s y stem can b e configured in two wa y s. Th e particular configuration is chosen to best meet your application needs. Most AMX sy stems are linked. Your AMX application is linked with your S y stem Configuration Module, your Target Configuration Module and the AMX L i br[...]

  • Seite 88

    C-2 K A DAK AMX 68000 Target G uide Creating an AMX ROM The AMX ROM is created b y usin g the AMX Configuration Generator to produce a ROM Option Module which is then linked with the AMX Library to form an AMX ROM image . The Config uration Generator combines the information in your Target Parame ter File with the ROM Option Template f ile CJ532ROP[...]

  • Seite 89

    AMX 68000 Target G uide K A DAK C-3 Link ing for AMX ROM Access The AMX Configuration Generator is used to produce a ROM Ac cess Module which, when linked with your application, provides access to AMX in the AMX ROM. The Config uration Generator combines the information in your Target Parame ter File with the ROM Access Templa te file CJ532RAC.CT t[...]

  • Seite 90

    C-4 K A DAK AMX 68000 Target G uide Once linked, your AMX application can be downlo aded into RAM memory in y our tar get hardware configuration. Alternativel y, your application can be transferred to ROM usin g the same techniques that were used to produc e the AMX ROM. Regardless of the manner in which your AMX s y stem is loaded into y o ur targ[...]