®AMX™ 68000 Target GuideFirst Printing: April 15, 1994Last Printing: March 1, 2005Copyright © 1994 - 2005KADAK Products Ltd.206 - 1847 West Broadway
4KADAKAMX 68000 Target Guide1.3 AMX NomenclatureThe following nomenclature standards have been adopted throughout the AMX TargetGuide.Numbers used in
AMX 68000 Target GuideKADAK51.4 AMX 68000 Target SpecificationsAMX 68000 was initially developed and tested using the Motorola MC68020, MC68040and MC
6KADAKAMX 68000 Target Guide1.5 Launch RequirementsThe M68000 must be properly configured for use before AMX is launched. The mannerin which this is
AMX 68000 Target GuideKADAKrev6 7Trace ControlsAMX alters the state of the status register (SR) whenever it enables or disables interrupts.When AMX
8KADAKAMX 68000 Target GuideMemory Management Unit (MMU)The MC68030, MC68040, MC68LC040 and MC68060 include a Memory ManagementUnit (MMU) to support a
AMX 68000 Target GuideKADAK92. Program Coding Specifications2.1 Task Trap HandlerAMX 68000 supports task traps for the M68000 zero divide, bounds ch
10KADAKAMX 68000 Target Guide2.2 Task Scheduling HooksThere are four critical points within the AMX Task Scheduler. These critical pointsoccur when:
AMX 68000 Target GuideKADAK113. The Processor Interrupt System3.1 OperationThe M68000 classifies all internal and external sources of interruption a
12KADAKAMX 68000 Target GuideDefault Exception Service ProceduresAMX provides default service procedures for most exceptions. The zero divide, bounds
AMX 68000 Target GuideKADAK133.2 AMX Vector TableThe M68000 processor provides an Exception Vector Table, often referred to as theAMX Vector Table, t
14KADAKAMX 68000 Target GuideVector Vector EnableName Number Mask ExceptionCJ_PRVNRES 0, 1 ResetCJ_PRVNBE 2 $00000004 Bus error (access fault)CJ_PRVNA
AMX 68000 Target GuideKADAK153.3 AMX Interrupt Priority and NMIThe M68000 family of processors offers inherent interrupt priority ordering. The AMXI
16 rev7KADAKAMX 68000 Target Guide3.4 Conforming ISPsA conforming ISP consists of an ISP root and a device Interrupt Handler. The ISP root iscrea
AMX 68000 Target GuideKADAK17The following examples illustrate how simple an Interrupt Handler can be./* The ISP root definition in the Target Paramet
18KADAKAMX 68000 Target Guide3.5 Nonconforming ISPsThe M68000 family of processors provides an interrupt priority ordering mechanismwhich permits the
AMX 68000 Target GuideKADAKrev7 193.6 Processor Vector InitializationWhenever an internal or external device interrupt occurs, the M68000 processo
20KADAKAMX 68000 Target GuideThis page left blank intentionally.
AMX 68000 Target GuideKADAK214. Target Configuration Module4.1 The Target Configuration ProcessEvery AMX application must include a Target Configura
22KADAKAMX 68000 Target GuideScreen LayoutFigure 4.1-1 illustrates the Configuration Manager's screen layout once you have begunto create or edit
AMX 68000 Target GuideKADAK23MenusAll commands to the Configuration Manager are available as items on the menus presenton the menu bar. The File menu
AMX 68000 Target GuideKADAKiTECHNICAL SUPPORTKADAK Products Ltd. is committed to technical support for its software products. Ourprograms are designe
24 rev8KADAKAMX 68000 Target GuideIf you have modified some of the fields on a property page and then decide that thesemodified values are not corr
AMX 68000 Target GuideKADAK254.2 Target Configuration ParametersGeneral ParametersThe General Parameter window allows you to define the general opera
26KADAKAMX 68000 Target GuideVectors in RAMIn most cases, the processor Exception Vector Table will be located in alterable RAM ataddress 0 or at some
AMX 68000 Target GuideKADAK27Software I/O DelayAMX provides a device I/O delay procedure cjcfhwdelay which is used by AMX boardsupport modules and sam
28KADAKAMX 68000 Target GuideFatal ExceptionsThe Target Configuration Module defines the processor exceptions which are to beserviced by AMX and treat
AMX 68000 Target GuideKADAK294.3 Interrupt Service Procedure (ISP) DefinitionsYour Target Configuration Module must include a device ISP root for eac
30KADAKAMX 68000 Target GuideISP TypeAt least one of your ISPs must service a clock interrupt which provides AMX with itsfundamental clock tick at the
AMX 68000 Target GuideKADAK31Interrupt Handler ParameterYour Interrupt Handler can be coded to receive a 32-bit parameter every time it is called.The
32KADAKAMX 68000 Target Guide4.4 Defining a Fast Clock ISPAt least one of your ISPs must service a clock interrupt which provides AMX with itsfundame
AMX 68000 Target GuideKADAK33ISP TypeYour fast clock ISP is identified as such by selecting Fast Clock Handler from the pulldown list.ISP RootEdit the
iiKADAKAMX 68000 Target GuideCopyright © 1994-2005 by KADAK Products Ltd.All rights reserved.No part of this publication may be reproduced, transmitte
34KADAKAMX 68000 Target Guide4.5 Null FunctionsOccasionally, while developing an AMX application, it can be very convenient to be ableto create softw
AMX 68000 Target GuideKADAK354.6 ROM Option ParametersThe AMX ROM Option allows the subset of AMX and its managers required by yourapplication to be
36KADAKAMX 68000 Target GuideEnable ROM OptionBy default, the ROM Option feature is disabled. Check this box to enable the feature.You can disable th
AMX 68000 Target GuideKADAK375. Clock Drivers5.1 Clock Driver OperationYou must provide a clock driver as part of your AMX application so that AMX c
38KADAKAMX 68000 Target GuideClock InterruptsA real-time clock used with the M68000 processor will interrupt either on one of theinterrupt autovectors
AMX 68000 Target GuideKADAK395.2 Custom Clock DriverThe easiest way to create a custom clock driver is by example. Assume that thecounter/timer whic
40KADAKAMX 68000 Target GuideThe clock initialization procedure for this custom clock driver could be coded in C asfollows. Insert procedure clockini
AMX 68000 Target GuideKADAK415.3 AMX Clock DriversAMX clock drivers are provided with AMX for the timer chips used on the boards withwhich AMX has be
42KADAKAMX 68000 Target Guide5.3.2 MC68360 PIT Clock DriverThe AMX clock driver for the Motorola MC68360 Periodic Interval Timer (PIT) is readyfor us
AMX 68000 Target GuideKADAK435.3.3 MC68230 Clock DriverThe AMX clock driver for the Motorola MC68230 Parallel Interface/Timer is ready foruse on the
AMX 68000 Target GuideKADAKiiiAMX 68000 TARGET GUIDETable of ContentsPage1. Getting Started with AMX 68000 11.1 Introduction ...
44KADAKAMX 68000 Target Guide5.3.4 MC68901 Clock DriverThe AMX clock driver for the Motorola MC68901 Multi-Function Peripheral is ready foruse on the
AMX 68000 Target GuideKADAKA-1Appendix A. Target Parameter File SpecificationA.1 Target Parameter File StructureThe Target Parameter File is a text
A-2KADAKAMX 68000 Target GuideThe Target Parameter File consists of a sequence of directives consisting of a keyword ofthe form ...XXX beginning in co
AMX 68000 Target GuideKADAKrev6 A-3A.2 Target Parameter File DirectivesThe AMX Launch Parameters are defined as follows...LAUNCH PERM,VNAPERM0 if
A-4KADAKAMX 68000 Target GuideVector Base RegisterThe VBR parameter is used to specify the memory address at which the Exception VectorTable is locate
AMX 68000 Target GuideKADAKA-5Device I/O DelayThe Target Parameter File includes a device I/O delay definition...DELAY CPUFREQCPUFREQM68000 processor
A-6KADAKAMX 68000 Target GuideConforming ISP DeclarationsThe Target Parameter File must include a definition of an ISP root for each conformingInterru
AMX 68000 Target GuideKADAKA-7AMX Clock Handler DeclarationThe Target Parameter File must include a definition of an ISP root for your AMX clockhandle
A-8KADAKAMX 68000 Target GuideIf your clock can be serviced by writing one or two n-bit values to a device I/O port, youcan use the ...CLKFAST directi
AMX 68000 Target GuideKADAKA-9AMX ROM OptionTo use the AMX ROM option, the Target Parameter File must include the followingdirectives...ROMOPT ROMADR
iv rev9KADAKAMX 68000 Target GuideAMX 68000 TARGET GUIDETable of Contents (Cont'd)AppendicesPageAppendix A. Target Parameter File Specificati
A-10KADAKAMX 68000 Target GuideThis page left blank intentionally.
AMX 68000 Target GuideKADAKA-11A.3 Porting the Target Parameter FileIt is expected that you will use the AMX Configuration Manager to create and edit
A-12KADAKAMX 68000 Target GuideThis page left blank intentionally.
AMX 68000 Target GuideKADAKrev7 B-1Appendix B. AMX 68000 Service ProceduresB.1 Summary of ServicesAMX 68000 provides a collection of target depen
B-2KADAKAMX 68000 Target GuideThe AMX Library also includes several C procedures which are used privately byKADAK. These procedures, although availab
AMX 68000 Target GuideKADAKrev7 B-3B.2 Service ProceduresA description of all processor dependent AMX 68000 service procedures is provided inthis
B-4 rev7KADAKAMX 68000 Target GuideInterrupts AMX procedures frequently must deal with the processor interrupt mask.The effect of each AMX procedur
AMX 68000 Target GuideKADAKB-5cjcfccsetup cjcfccsetupPurpose Setup C EnvironmentUsed byn Task n ISP n Timer Procedure n Restart Procedure n Exit Proce
B-6KADAKAMX 68000 Target Guidecjcfdi cjcfdicjcfei cjcfeiPurpose Disable or Enable InterruptsUsed byn Task n ISP n Timer Procedure n Restart Procedure
AMX 68000 Target GuideKADAKB-7cjcfflagrd cjcfflagrdcjcfflagwr cjcfflagwrPurpose Read or Write Processor Status RegisterUsed byn Task n ISP n Timer Pro
AMX 68000 Target GuideKADAK11. Getting Started with AMX 680001.1 IntroductionThe AMX™ Multitasking Executive is described in the AMX User's Gui
B-8KADAKAMX 68000 Target Guidecjcfhwdelay cjcfhwdelayPurpose Delay n MicrosecondsUsed byn Task n ISP n Timer Procedure n Restart Procedure n Exit Proc
AMX 68000 Target GuideKADAKB-9cjcfhwbcache cjcfhwbcachecjcfhwdcache cjcfhwdcachecjcfhwicache cjcfhwicachePurpose Flush and Enable/Disable CachesUsed b
B-10KADAKAMX 68000 Target Guidecjcfin8 cjcfin8cjcfin16 cjcfin16cjcfin32 cjcfin32Purpose Read an 8, 16 or 32-Bit Input PortUsed byn Task n ISP n Timer
AMX 68000 Target GuideKADAKB-11cjcfjlong cjcfjlongcjcfjset cjcfjsetPurpose cjcfjset Sets a Mark for a Long Jumpcjcfjlong Long Jumps to that MarkThese
B-12KADAKAMX 68000 Target GuideExample #include "CJZZZ.H"void CJ_CCPP dowork(struct cjxjbuf *jbp);static struct cjxjbuf jumpbuffer;#define S
AMX 68000 Target GuideKADAKB-13cjcfmcopy cjcfmcopycjcfmset cjcfmsetPurpose Copy a Block of MemorySet (Fill) a Block of MemoryThese procedures are prov
B-14KADAKAMX 68000 Target Guidecjcfout8 cjcfout8cjcfout16 cjcfout16cjcfout32 cjcfout32Purpose Write to an 8, 16 or 32-Bit Output PortUsed byn Task n I
AMX 68000 Target GuideKADAKB-15cjcfstkjmp cjcfstkjmpPurpose Switch Stacks and Jump to a New ProcedureThis procedure is provided for AMX portability.Us
B-16KADAKAMX 68000 Target Guidecjcftag cjcftagPurpose Convert a String to an Object Name TagUsed byn Task n ISP n Timer Procedure n Restart Procedure
AMX 68000 Target GuideKADAKB-17cjcfvol8 cjcfvol8cjcfvol16 cjcfvol16cjcfvol32 cjcfvol32cjcfvolpntr cjcfvolpntrPurpose Fetch a Volatile 8-Bit, 16-Bit, 3
2KADAKAMX 68000 Target Guide1.2 AMX FilesAMX is provided in C source format to ensure that regardless of your developmentenvironment, your ability t
B-18KADAKAMX 68000 Target GuideThis page left blank intentionally.
AMX 68000 Target GuideKADAKB-19cjksitrap cjksitrapPurpose Install a Task Trap HandlerUsed byn Task o ISP o Timer Procedure o Restart Procedure n Exit
B-20KADAKAMX 68000 Target Guidecjksivtp cjksivtpPurpose Fetch Pointer to the AMX Vector TableUsed byn Task n ISP n Timer Procedure n Restart Procedure
AMX 68000 Target GuideKADAKB-21cjksivtrd cjksivtrdPurpose Read from the AMX Vector TableUsed byn Task n ISP n Timer Procedure n Restart Procedure n Ex
B-22KADAKAMX 68000 Target Guidecjksivtwr cjksivtwrPurpose Write to the AMX Vector TableUsed byn Task n ISP n Timer Procedure n Restart Procedure n Exi
AMX 68000 Target GuideKADAKB-23cjksivtx cjksivtxPurpose Exchange an Entry in the AMX Vector TableUsed byn Task n ISP n Timer Procedure n Restart Proce
B-24KADAKAMX 68000 Target GuideThis page left blank intentionally.
AMX 68000 Target GuideKADAKC-1Appendix C. AMX 68000 ROM OptionAn AMX system can be configured in two ways. The particular configuration is chosento
C-2KADAKAMX 68000 Target GuideCreating an AMX ROMThe AMX ROM is created by using the AMX Configuration Generator to produce aROM Option Module which i
AMX 68000 Target GuideKADAKC-3Linking for AMX ROM AccessThe AMX Configuration Generator is used to produce a ROM Access Module which,when linked with
AMX 68000 Target GuideKADAK3File Name ModuleCJ532KA .C Kernel task servicesCJ532KB .C General task servicesCJ532KBR.CCJ532KC .CTimer ManagerCJ532KCR.C
C-4KADAKAMX 68000 Target GuideOnce linked, your AMX application can be downloaded into RAM memory in your targethardware configuration. Alternatively
Comentários a estes Manuais