Next, the Example HAL Function Call Trace
2.1.2 HAL Macro Definitions
The HAL defines architecture macros that make a common API for encapsulating the processor- specific implementation functionality. The HAL macros are used to control the interrupt, cache, memory management, IO, diagnostics, debugging, and architectural features for the processor, given that the processor provides the functionality. This section gives a general overview of these HAL macros and their location within the HAL architectures. Additional detailed descrip- tions of the HAL macros containing specific functionality e.g., exception, interrupt, and clock macros are described in their associated chapters. Generally, HAL architecture macros are enclosed within ifndef statements to allow the macro to be overridden in the platform or variant submodules. Code Listing 2.3 shows an example of this. 1 ifndef CYGHWR_HAL_INTERRUPT_VECTORS_DEFINED 2 3 define CYGNUM_HAL_INTERRUPT_0 0 4 define CYGNUM_HAL_INTERRUPT_1 1 5 define CYGNUM_HAL_INTERRUPT_2 2 6 define CYGNUM_HAL_INTERRUPT_3 3 7 define CYGNUM_HAL_INTERRUPT_4 4 8 . 9 . 10 . 11 endif Code Listing 2.3 Example HAL interrupt vector macro definitions. In Code Listing 2.3 we see part of the interrupt vector definitions; in this case, for the MIPS processor architecture. Line 1 checks for the definition of the macro CYGHWR_HAL_ INTERRUPT_VECTORS_DEFINED. The variant or platform-specific code within the HAL can override the interrupt vector definitions provided by the architecture submodule, shown on lines 3 through 7, by simply defining CYGHWR_HAL_INTERRUPT_VECTORS_DEFINED. The variant or platform submodule can then define the interrupt vectors appropriately. The location of the HAL architecture code is under the arch subdirectory, as we see in Figure 2.1. Typically, the macros are located in .h files under the include subdirectory; however, the specific location of this functionality might differ for different HAL architec- tures. Table 2.1 lists some of the general HAL architecture macro filenames and describes the functionality included in the file.Parts
» Prentice.Hall – Embedded.Software.Development.with.eCos
» Where It All Started—Cygnus Solutions
» The eCos Configuration Method
» eCos Core Components The Origins of eCos
» Processor and Evaluation Platform Support
» eCos Support The Origins of eCos
» Component Framework eCos Terminology
» Component Repository eCos Terminology
» Configuration Options eCos Terminology
» Components and Packages Targets
» Summary Prentice.Hall – Embedded.Software.Development.with.eCos
» The Example HAL Function Call Trace
» Next, the Example HAL Function Call Trace
» Finally, the platform reset routine uses the architecture macros defined in
» HAL Macro Definitions Overview
» Common Configuration Components HAL Configuration
» Architecture-Specific Configuration Components HAL Configuration
» HAL and Kernel Exception Handling
» Application Exception Handling Exceptions
» Interrupt and Scheduler Synchronization
» Interrupt Service Routine Management
» Interrupt State Management Interrupt Control
» Interrupt Controller Management Interrupt Control
» Summary Summary Prentice.Hall – Embedded.Software.Development.with.eCos
» Virtual Vector Configuration Virtual Vectors
» Communication Channels Virtual Vector Table Initialization
» Kernel Directory Structure The Kernel
» Multilevel Queue Scheduler The Scheduler
» Bitmap Scheduler Priority Levels
» Scheduler Configuration The Scheduler
» Thread Stacks and Stack Sizes
» Condition Variables Synchronization Mechanisms
» Message Boxes Synchronization Mechanisms
» Counters Counters, Clocks, Alarms, and Timers
» Clocks Alarms Counters, Clocks, Alarms, and Timers
» Timers Counters, Clocks, Alarms, and Timers
» Asserts and Tracing Prentice.Hall – Embedded.Software.Development.with.eCos
» IO Sub-System IO Control System
» Device Drivers IO Control System
» ROM File System File Systems
» RAM File System File Systems
» USB Support Prentice.Hall – Embedded.Software.Development.with.eCos
» OpenBSD FreeBSD Networking Support
» Networking Threads Networking Support
» Networking Configuration Networking Support
» Networking Tests Networking Support
» DNS Support Networking Support
» SNMP Support Prentice.Hall – Embedded.Software.Development.with.eCos
» The GoAhead Embedded WebServer
» Symmetric Multi-Processing Support Prentice.Hall – Embedded.Software.Development.with.eCos
» Additional Features Prentice.Hall – Embedded.Software.Development.with.eCos
» Overview Prentice.Hall – Embedded.Software.Development.with.eCos
» RedBoot Directory Structure Prentice.Hall – Embedded.Software.Development.with.eCos
» RedBoot Configuration Installation and Configuration
» Boot Scripting RedBoot Commands
» Cygwin Tools Directory Structure
» Installing the Platform-Specific Cross-Development Tools
» Installing WinCVS Accessing the Online eCos Source Code Repository
» Setting WinCVS Preferences Accessing the Online eCos Source Code Repository
» WinCVS Update Commands Accessing the Online eCos Source Code Repository
» Package Directory Structure Packages
» CDL Script Files The Component Definition Language Overview
» Saving Configurations Screen Layout
» Importing and Exporting Configurations
» Configuration Window Screen Layout
» Conflicts Window Screen Layout
» Properties Window Screen Layout
» Short Description Window Screen Layout
» Memory Layout Window Screen Layout
» Memory Layout Manipulation Screen Layout
» eCos Repository Database The Configuration Tool
» Graphical Representation of CDL Script Files
» Conflicts and Resolutions Using Templates
» The Package Administration Tool
» The Command-Line Configuration Tool
» Source-Navigator Additional Open-Source Tools
» Splint Additional Open-Source Tools
» A Closer Look The eCos Build Process
» Development Hardware Setup Examples Overview
» Building the Application Application
» Loading the Application Application
» Using the GDB Command-Line Interface
» The eCos Tests Prentice.Hall – Embedded.Software.Development.with.eCos
» Simulators Prentice.Hall – Embedded.Software.Development.with.eCos
» Overview of Porting Prentice.Hall – Embedded.Software.Development.with.eCos
Show more