iLLD_TC27xC  1.0
lld_filesAndConfig.c
Go to the documentation of this file.
1 /*
2 * $Author: $tklose
3 * $Date: 2014-03-07 12:08:40 GMT$
4 * $Revision: $0.4
5 */
6 /** \page lld_filesAndConfig Files and Configuration
7 
8 \section folders Folder structure
9 
10 Starting from <B>src/ifx/\$(VERIF_DUT)</B>:
11  \li <B>_Reg</B> contains the header files
12  \li <B>_Impl</B> contains derivative specific configuration which could also be adapted by the user
13  \li <B>_PinMap</B> contains I/O configurations in pin tables
14  \li <B>_Lib</B> contains derivative dependent library functions
15  \li <B><module></B> contains the actual peripheral driver
16 
17 In addition derivative independent service software sources are located under:
18  \li <B>src/ifx/SrvSw</B>
19 
20 
21 \section includePaths Include Paths
22 
23 Following include paths should be specified in the compile script (resp. Makefile) to compile the drivers:
24 
25 \code
26  -I$(VERIF_LLD)/src/ifx/$(VERIF_DUT)
27  -I$(VERIF_LLD)/src/ifx/$(VERIF_DUT)/_Reg
28  -I$(VERIF_LLD)/src/ifx/SrvSw
29 \endcode
30 
31  \li <B>VERIF_LLD</B> stands for the directory to the iLLD version
32  \li <B>VERIF_DUT</B> stands for the derivative which should be selected
33 
34 
35 \section ifxCfgH IfxCfg.h
36 
37 Please create a configuration file with the name "IfxCfg.h" in your application to
38 configure the iLLD library components.
39 
40 Currently it only requires to select the external oscillator frequency (XTAL)
41 and the desired system frequency.
42 
43 In addition, this file allows you to specify how assertions should be print out.
44 
45 Minimal IfxCfg.h file:
46 \code
47 #ifndef IFX_CFG_H
48 #define IFX_CFG_H
49 
50 // XTAL/PLL frequency
51 #define IFX_CFG_SCU_XTAL_FREQUENCY (20000000)
52 #define IFX_CFG_SCU_PLL_FREQUENCY (200000000)
53 
54 // Assertions
55 #define IFX_ASSERT(level, expr)
56 
57 #endif /* IFX_CFG_H */
58 \endcode
59 
60 
61 Example for Assertion output via printf:
62 \code
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 // defined in $VERIF_SRC/lib/main.c
67 extern const char* verboseLevelStr[6];
68 
69 #define IFX_ASSERT(level, expr) (((expr) || (level > IFX_VERBOSE_LEVEL_ERROR)) ? ((void)0) : (void)printf("[ASSERT:%s] '%s' in %s:%d (function '%s')\n", verboseLevelStr[level], #expr, __FILE__, __LINE__, __func__))
70 
71 #endif
72 \endcode
73 
74 
75 And in your main.c file (or somewhere else):
76 
77 \code
78 //! this global array is used by IFX_ASSERT of iLLDs
79 const char* verboseLevelStr[6] = {
80  "OFF",
81  "FAILURE",
82  "ERROR",
83  "WARNING",
84  "INFO",
85  "DEBUG"
86 };
87 \endcode
88 
89 
90 \section minimalSetup Minimal Set of Driver sources
91 
92 If you prefer to use (resp. compile) only a minimal set of drivers for your application, please add at least following "infrastructural resources":
93 
94  \li <B>src/ifx/\$(VERIF_DUT)/_Reg</B> directory
95  \li <B>src/ifx/\$(VERIF_DUT)/_Lib</B> directory
96  \li <B>src/ifx/SrvSw</B> directory
97  \li CPU driver: <B>src/ifx/\$(VERIF_DUT)/Cpu</B> and <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxCpu_cfg.*</B>
98  \li DMA driver: <B>src/ifx/\$(VERIF_DUT)/Dma</B> and <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxDma_cfg.*</B>
99  \li Port driver: <B>src/ifx/\$(VERIF_DUT)/Port</B>, <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxPort_cfg.*</B> and <B>src/ifx/\$(VERIF_DUT)/_PinMap/IfxPort_PinMap.*</B>
100  \li SCU driver: <B>src/ifx/\$(VERIF_DUT)/Scu</B> and <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxScu_cfg.*</B>
101  \li Src driver: <B>src/ifx/\$(VERIF_DUT)/Src</B> and <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxSrc_cfg.*</B>
102  \li Stm driver: <B>src/ifx/\$(VERIF_DUT)/Stm</B> and <B>src/ifx/\$(VERIF_DUT)/_Impl/IfxStm_cfg.*</B>
103 
104 Whenever additional drivers should be added, you typically have to copy following files/directories:
105 
106  \li <B>src/ifx/\$(VERIF_DUT)/<driver></B>
107  \li <B>src/ifx/\$(VERIF_DUT)/_Impl/<driver>_cfg.*</B>
108  \li <B>src/ifx/\$(VERIF_DUT)/_PinMap/<driver>_cfg.*</B>
109 
110 
111 \section agentixSetup Special Notes to the AGENtiX Setup
112 
113  \li include paths are already defined in $VERIF_SRC/include/$VERIF_DUT/build/build_defaults.inc and don't need to be defined again in testcase specific project.cfg file
114  \li the default IfxCfg.h file is located under $VERIF_SRC/lld/include and doesn't need to be added to the testcase
115  \li whenever a driver package should be included into a testcase, add 'MK_LLD \$(VERIF_LLD)/src/ifx/\$(VERIF_DUT)/_Build/<driver>.xml' to the BUILD section of the project.cfg file. There is no need (and it isn't recommended) to specify individual source files of a driver, since names or required files might change over time.
116  \li for Aurix HE and LE derivatives, please add 'DEFINE USE_ILLD_LIBRARY 1' to the header of your project.cfg file to select the iLLD library. This isn't required for the Aurix Plus anymore, since iLLDs are an integral part of the development platform.
117  \li example testcases and templates are located under $VERIF_SRC/lld/testcases/<module>
118 
119 [\ref lld_doxygenRules "Previous page"] [\ref lld_versioning "Next page"]
120 
121 
122 */