📄 hal-porting-structure.html
字号:
><TDALIGN="LEFT"VALIGN="TOP">Cache definitions and cache control macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/hal_intr.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Exception and interrupt definitions. Macros for configuring and controlling interrupts. eCos real-time clock control macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/hal_io.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Macros for accessing IO devices.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/<arch>_regs.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Architecture register definitions.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/<arch>_stub.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Architecture stub definitions. In particular the register frame layout used by GDB. This may differ from the one used by eCos.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/<arch>.inc</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Architecture convenience assembly macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/<arch>.ld</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Linker macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/context.S</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Functions handling context switching and setjmp/longjmp.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/hal_misc.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Exception and interrupt handlers in C. Various other utility functions.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/hal_mk_defs.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Used to export definitions from C header files to assembler header files.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/hal_intr.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Any necessary interrupt handling functions.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/<arch>stub.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Architecture stub code. Contains functions for translating eCos exceptions to UNIX signals and functions for single-stepping.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/vectors.S</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Exception, interrupt and early initialization code.</TD></TR></TBODY></TABLE><P></P></DIV></DIV><DIVCLASS="SECTION"><H3CLASS="SECTION"><ANAME="AEN8851">Variant HAL</H3><P>Some variant HALs may add extra files for variant specific serialdrivers, or for handling interrupts/exceptions if it makes sense.</P><P>Note that these files may be mostly empty if the CPU variant can becontrolled by the generic architecture macros. The definitions presentare only conditionally defined - if the equivalent platform headersprovide the definitions, those override the variant definitions.</P><DIVCLASS="INFORMALTABLE"><ANAME="AEN8855"><P></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THALIGN="LEFT"VALIGN="TOP">File</TH><THALIGN="LEFT"VALIGN="TOP">Description</TH></TR></THEAD><TBODY><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/var_arch.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Saved register frame format, various thread, register and stack related macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/var_cache.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Cache related macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/var_intr.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Interrupt related macros.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/var_regs.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Extra register definitions for the CPU variant.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/variant.inc</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Various assembly macros used during system initialization.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/var_intr.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Interrupt functions if necessary.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/var_misc.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">hal_variant_init function and any necessary extra functions.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/variant.S</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Interrupt handler table definition.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/<arch>_<variant>.ld</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Linker macros.</TD></TR></TBODY></TABLE><P></P></DIV></DIV><DIVCLASS="SECTION"><H3CLASS="SECTION"><ANAME="AEN8898">Platform HAL</H3><P>Extras files may be added for platform specific serialdrivers. Extra files for handling interrupts and exceptions will bepresent if it makes sense.</P><DIVCLASS="INFORMALTABLE"><ANAME="AEN8901"><P></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THALIGN="LEFT"VALIGN="TOP">File</TH><THALIGN="LEFT"VALIGN="TOP">Description</TH></TR></THEAD><TBODY><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/hal_diag.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Defines functions used for HAL diagnostics output. This would normally be the ROM calling interface wrappers, but may also be the low-level IO functions themselves, saving a little overhead.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/platform.inc</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Platform initialization code. This includes memory controller, vectors, and monitor initialization. Depending on the architecture, other things may need defining here as well: interrupt decoding, status register initialization value, etc.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/plf_cache.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Platform specific cache handling.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/plf_intr.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Platform specific interrupt handling.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/plf_io.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">PCI IO definitions and macros. May also be used to override generic HAL IO macros if the platform endianness differs from that of the CPU.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">include/plf_stub.h</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Defines stub initializer and board reset details.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/hal_diag.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">May contain the low-level device drivers. But these may also reside in plf_stub.c</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/platform.S</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Memory controller setup macro, and if necessary interrupt springboard code.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/plf_misc.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Platform initialization code.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/plf_mk_defs.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Used to export definitions from C header files to assembler header files.</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"><TTCLASS="FILENAME">src/plf_stub.c</TT></TD><TDALIGN="LEFT"VALIGN="TOP">Platform specific stub initialization and possibly the low-level device driver.</TD></TR></TBODY></TABLE><P></P></DIV><P>The platform HAL also contains files specifying the platform'smemory layout. These files are located in<TTCLASS="FILENAME">include/pkgconf</TT>.</P></DIV><DIVCLASS="SECTION"><H3CLASS="SECTION"><ANAME="AEN8954">Auxiliary HAL</H3><P>Auxiliary HALs contain whatever files are necessary to provide therequired functionality. There are no predefined set of files requiredin an auxiliary HAL.</P></DIV></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="hal-porting-guide.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="hal-calling-if.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Porting Guide</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="hal-porting-guide.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Virtual Vectors (eCos/ROM Monitor Calling Interface)</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -