ARM Firmware Suite Version 1.1 Reference Guide Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C Copyright©1999,2000ARMLimited.Allrightsreserved. ReleaseInformation ChangeHistory Date Issue Change 8September1999 A Newdocument(internalrelease) 10September1999 B Firstrelease 15February2000 C Secondrelease ProprietaryNotice ARM,theARMPoweredlogo,Thumb,andStrongARMareregisteredtrademarksofARMLimited. TheARMlogo,AMBA,Angel,ARMulator,EmbeddedICE,ModelGen,Multi-ICE,PrimeCell, ARM7TDMI,ARM7TDMI-S,ARM9TDMI,ARM9E-S,ETM7,ETM9,TDMI,STRONG,aretrademarks ofARMLimited. Allotherproductsorservicesmentionedhereinmaybetrademarksoftheirrespectiveowners. Neitherthewholenoranypartoftheinformationcontainedin,ortheproductdescribedin,thisdocument maybeadaptedorreproducedinanymaterialformexceptwiththepriorwrittenpermissionofthecopyright holder. Theproductdescribedinthisdocumentissubjecttocontinuousdevelopmentsandimprovements.All particularsoftheproductanditsusecontainedinthisdocumentaregivenbyARMingoodfaith.However, allwarrantiesimpliedorexpressed,includingbutnotlimitedtoimpliedwarrantiesofmerchantability,or fitnessforpurpose,areexcluded. Thisdocumentisintendedonlytoassistthereaderintheuseoftheproduct.ARMLimitedshallnotbeliable foranylossordamagearisingfromtheuseofanyinformationinthisdocument,oranyerrororomissionin suchinformation,oranyincorrectuseoftheproduct. ii Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C Contents ARM Firmware Suite Preface Aboutthisdocument .................................................................................... viii Furtherreading .............................................................................................. x Feedback ...................................................................................................... xii Chapter 1 Introduction to the ARM Firmware Suite 1.1 Whatisfirmware? ....................................................................................... 1-2 1.2 AbouttheARMFirmwareSuite................................................................... 1-3 Chapter 2 An Introduction to µHAL 2.1 AboutµHAL................................................................................................. 2-2 2.2 BuildinganewµHAL-basedapplication...................................................... 2-7 2.3 BuildingtheµHALlibrary ............................................................................ 2-8 Chapter 3 µHAL Application Programming Interfaces 3.1 AbouttheµHALAPIs .................................................................................. 3-2 3.2 SimpleAPImemoryfunctions ..................................................................... 3-4 3.3 SimpleAPIinterruptfunctions..................................................................... 3-8 3.4 SimpleAPIMMUandcachefunctions...................................................... 3-11 3.5 SimpleAPItimerfunctions ........................................................................ 3-13 3.6 SimpleAPIsupportfunctions .................................................................... 3-20 3.7 SimpleAPILEDcontrolfunctions ............................................................. 3-22 ARMDUI0102C Copyright©1999,2000ARMLimited.Allrightsreserved. iii Contents 3.8 Serialinput/outputfunctions,definitions,andmacros .............................. 3-26 3.9 ExtendedAPIinitializationfunctions......................................................... 3-32 3.10 ExtendedAPIinterrupthandlingfunctions ............................................... 3-34 3.11 ExtendedAPIsoftwareinterrupt(SWI)function ....................................... 3-39 3.12 ExtendedAPIMMUandcachefunctions ................................................. 3-40 3.13 ExtendedAPIprocessorexecutionmodefunctions ................................. 3-44 3.14 ExtendedAPItimerfunctions ................................................................... 3-47 3.15 ExtendedAPIcoprocessoraccessfunctions ........................................... 3-51 3.16 Librarysupportfunctions .......................................................................... 3-53 Chapter 4 ARM Boot Monitor 4.1 Aboutthebootmonitor ............................................................................... 4-2 4.2 Commoncommandsforthebootmonitor .................................................. 4-4 4.3 Integrator-specificcommandsforbootmonitor ........................................ 4-12 4.4 Prospector-specificcommandsforbootmonitor ...................................... 4-22 4.5 UsingthebootmonitoronIntegrator ........................................................ 4-25 4.6 UsingbootmonitoronProspector ............................................................ 4-30 4.7 Rebuildingthebootmonitor...................................................................... 4-34 Chapter 5 Operating Systems and µHAL 5.1 Aboutportingoperatingsystems ................................................................5–2 5.2 Simpleoperatingsystems .......................................................................... 5–3 5.3 Complexoperatingsystem .......................................................................5–12 Chapter 6 Angel 6.1 AboutAngel ................................................................................................ 6-2 6.2 AngelonIntegrator ..................................................................................... 6-4 6.3 AngelonProspector ................................................................................... 6-7 6.4 µHAL-basedAngel ..................................................................................... 6-8 6.5 BuildingaµHAL-basedAngel................................................................... 6-10 6.6 Sourcefiledescriptions ............................................................................ 6-13 6.7 Devicedrivers ........................................................................................... 6-21 Chapter 7 Flash Library Specification 7.1 Abouttheflashlibrary ................................................................................. 7-2 7.2 Aboutflashmanagement............................................................................ 7-4 7.3 ARMflashlibraryspecifications.................................................................. 7-5 7.4 Functionslistedbytype ............................................................................ 7-11 7.5 Flashlibraryfunctions............................................................................... 7-16 7.6 Fileprocessingfunctions .......................................................................... 7-29 7.7 SIBfunctions ............................................................................................ 7-34 7.8 Usingthelibrary........................................................................................ 7-41 7.9 Rebuildingtheflashlibrary ....................................................................... 7-44 iv Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C Contents Chapter 8 Using the ARM Flash Utilities 8.1 AbouttheAFU ............................................................................................ 8-2 8.2 StartingtheAFU ......................................................................................... 8-3 8.3 AFUcommands .......................................................................................... 8-4 8.4 TheBootFlashUtility ................................................................................ 8-21 8.5 BootFUcommands ................................................................................... 8-23 Chapter 9 PCI Management Library 9.1 AboutPCI.................................................................................................... 9-2 9.2 PCIconfiguration ........................................................................................ 9-4 9.3 ThePCIlibrary ............................................................................................ 9-7 9.4 PCIlibraryfunctionsanddefinitions.......................................................... 9-13 9.5 AboutµHALPCIextensions ..................................................................... 9-15 9.6 µHALPCIfunctiondescriptions ................................................................ 9-16 9.7 ExamplePCIdevicedriver........................................................................ 9-23 9.8 PCIinitializationonIntegrator ................................................................... 9-26 9.9 RebuildingthePCIlibrary ......................................................................... 9-37 Chapter 10 Troubleshooting and Frequently Asked Questions 10.1 Frequentlyaskedquestions ...................................................................... 10-2 10.2 Troubleshooting ........................................................................................ 10-5 Chapter 11 Building AFS Components 11.1 AFScomponentvariants........................................................................... 11-2 11.2 AFSsourcestructure ................................................................................ 11-4 11.3 UsingARMprojectfiles............................................................................. 11-6 11.4 UsingGNUmake ..................................................................................... 11-12 11.5 Buildoutputfiles...................................................................................... 11-20 11.6 UsingtheADSClibraries ....................................................................... 11-21 Glossary ARMDUI0102C Copyright©1999,2000ARMLimited.Allrightsreserved. v Contents vi Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C Preface ThisprefaceintroducestheARMFirmwareSuiteanditsreferencedocumentation.It containsthefollowingsections: • Aboutthisdocumentonpageviii • Furtherreadingonpagex • Feedbackonpagexii. ARMDUI0102C Copyright©1999,2000ARMLimited.Allrightsreserved. vii Preface About this document ThisbookprovidesaguideonhowtosetupandusetheARMFirmwareSuite.It describesitsmajorcomponentsandfeatures,andhowtousethemtodevelop applicationsforARM-basedhardwareplatforms. Intendedaudience Thisbookiswrittenforhardwareandsoftwaredeveloperstoaidthedevelopmentof ARM-basedproductsandapplications.ItassumesthatyouarefamiliarwithARM architecturesandhaveanunderstandingofcomputerhardware. Usingthisbook Thisdocumentisorganizedintothefollowingchapters: Chapter1IntroductiontotheARMFirmwareSuite ReadthischapterforanintroductiontotheARMFirmwareSuite(AFS). ItdescribestheindividualcomponentsofAFS. Chapter2AnIntroductiontoµHAL ReadthischapterforadescriptionofµHAL(pronouncedMicro-HAL),a HardwareAbstractionLayerthatisdesignedtoconcealhardware differencesbetweendifferentARM-basedsystems. Chapter3µHALApplicationProgrammingInterfaces ReadthischapterforinformationabouttheµHALapplications programminginterface.ThischapterdescribestheµHALparameter typesandfunctions. Chapter4ARMBootMonitor Readthischapterforadescriptionofthebootmonitor.Thischapter describeshowthebootmonitorfunctionsanddescribesitscommand-line interface. Chapter5OperatingSystemsandHAL Readthischapterforadescriptionhowoperatingsystemsareportedtoa platformwhichhasµHALportedtoit. Chapter6Angel ReadthischapterforadescriptionofhowtheAngeldebugmonitorand µHALarerelated. viii Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C Preface Chapter7FlashLibrarySpecification Readthischapterforreferenceinformationabouttheflashlibrary.This chapterdiscussestheapproachtoflashmanagementusedanddescribes thefirmwareflashlibraryfunctions. Chapter8UsingtheARMFlashUtilites ReadthischapterforinformationaboutusingtheARMFlashUtility (AFU)andBootFlashUtility(BootFU). Chapter9PCIManagementLibrary ReadthischapterforinformationaboutPCImanagement.Thischapter describeshowPCIresourcesareinitializedandmanaged,anddescribes thePCImanagementfunctions. Chapter10TroubleshootingandFrequentlyAskedQuestions Readthisappendixforanswerstocommonquestionsorproblems. Chapter11BuildingAFSComponents ReadthisappendixforadescriptionofhowtorebuildARMfirmware suitecomponents. Typographicalconventions Thefollowingtypographicalconventionsareusedinthisbook: typewriterDenotestextthatmaybeenteredatthekeyboard,suchascommands,file andprogramnames,andsourcecode. typewriterDenotesapermittedabbreviationforacommandoroption.The underlinedtextcanbeenteredinsteadofthewholecommandoroption name. typewriter italic Denotesargumentstocommandsandfunctionswheretheargumentisto bereplacedbyaspecificvalue italic Highlightsimportantnotes,introducesspecialterminology,denotes cross-references,andcitations. bold Highlightsinterfaceelements,suchasmenunames.Alsousedfor emphasisindescriptivelistsandforARMprocessorsignalnames. typewriter bold Denoteslanguagekeywordswhenusedoutsideexamplecode. ARMDUI0102C Copyright©1999,2000ARMLimited.Allrightsreserved. ix Preface Further reading ThissectionlistspublicationsfromARMandthirdpartiesthatprovideadditional informationaboutdevelopingonARMprocessors. ARMpublications ThefollowingpublicationsprovideinformationaboutARMIntegratorproducts: • ARMIntegrator/CM920TUserGuide(ARMDDI0097) • ARMIntegrator/CM940TUserGuide(ARMDDI0125) • ARMIntegrator/CM720TUserGuide(ARMDDI0126) • ARMIntegrator/CM740TUserGuide(ARMDDI0124) • ARMIntegrator/CM7TDMIUserGuide(ARMDDI0126) • ARMIntegrator/SPUserGuide(ARMDUI0099) • ARMIntegrator/APUserGuide(ARMDUI0098). ThefollowingpublicationprovidesinformationaboutARMProspectorproducts: • ARMProspector/P1100UserGuide(ARMDUI122A) ThefollowingpublicationsprovidereferenceinformationaboutARMarchitecture: • AMBASpecification(ARMIHI0011) • ARMArchitecturalReferenceManual(ARMDDI0100). ThefollowingpublicationsprovideinformationabouttheARMSoftwareDevelopment Toolkit2.5: • ARMSoftwareDevelopmentToolkitUserGuide(ARMDUI0040) • ARMSoftwareDevelopmentToolkitReferenceGuide(ARMDUI0041). ThefollowingpublicationsprovideinformationabouttheARMDeveloperSuite1.0: • ADSGettingStarted(ARMDUI0064) • ADSToolsGuide(ARMDUI0067) • ADSDebuggersGuide(ARMDUI0066) • ADSDebugTargetGuide(ARMDUI0058) • ADSDeveloperGuide(ARMDUI0056) • ADSCodeWarriorIDEGuide(ARMDUI0065). FurtherinformationcanbeobtainedfromtheARMwebsiteat: http://www.arm.com x Copyright©1999,2000ARMLimited.Allrightsreserved. ARMDUI0102C
Description: