source: trunk/fw_g473rct/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/HowTo.txt

Last change on this file was 20, checked in by f.jahn, 5 days ago

adc dma funktioniert und modbus funktioniert

File size: 7.1 KB
Line 
1HowTo DSP_Lib_TestSuite     18.02.2019
2=======================================
3
4This file describes the folder structure, content, prerequisites and instructions to validate the
5build of the CMSIS-DSP library. This is done by processing input data sets using the DSP Library
6functions executing on a target simulator or hardware. The output data sets are then compared
7with the reference data set produced by unoptimized DSP functions and a Signal to Noise Ratio (SNR)
8is computed. If the SNR is below a defined threshold the test is considered "passed".
9
10
11Folder structure
12----------------
13        .\DSP_Lib_TestSuite                                       Batch files for building the reference libraries and running the tests.
14        .\DSP_Lib_TestSuite\Common
15        .\DSP_Lib_TestSuite\Common\inc                            DSP_Lib test include files
16        .\DSP_Lib_TestSuite\Common\JTest                          JTEST Test Framework + INI files for uVision
17        .\DSP_Lib_TestSuite\Common\platform                       ARM/GCC device startup/system files
18        .\DSP_Lib_TestSuite\Common\src                            DSP_Lib test source files
19        .\DSP_Lib_TestSuite\DspLibTest_FVP                        ARM/GCC DSP_Lib test projects for Fixed Virtual Platforms
20        .\DSP_Lib_TestSuite\DspLibTest_MPS2                       ARM/GCC DSP_Lib test projects for MPS2
21        .\DSP_Lib_TestSuite\DspLibTest_Simulator                  ARM/GCC DSP_Lib test projects for uVision simulator
22        .\DSP_Lib_TestSuite\RefLibs                               ARM/GCC DSP_Lib reference libraries (and projects)
23
24
25
26Prerequisites
27--------------
28 - Python (running on Windows). Tested with ActivePython 2.7.8.10.
29 - Keil MDK-ARM (tested with MDK-ARM 5.22: http://www2.keil.com/mdk5)
30 - ULINKpro debug adapter (http://www2.keil.com/mdk5/ulink)
31 - MPS2 (Cortex-M Prototyping System:https://www.arm.com/products/tools/development-boards/versatile-express/cortex-m-prototyping-system.php)
32 - CMSIS 5.0.0 (https://github.com/ARM-software/CMSIS_5/releases/tag/5.0.0)
33
34
35Setup
36------
37 - remove 'read-only' tag from folder .\CMSIS\DSP\Lib
38   (required for rebuild of the DSP_Lib libraries)
39
40 - open a Windows command window in folder .\CMSIS\DSP\DSP_Lib_TestSuite.
41
42
43
44How to run the tests
45---------------------
46
47a) build the DSP_Lib libraries:
48 - batch file: buildDspLibs.bat
49   Note: only require if the DSP_Lib source code got updated or the desired configuration is missing
50   buildDspLibs.bat overwrites the prebuild libraries in .\CMSIS\DSP\Lib.
51   Log files of the build process are generated in folder .\CMSIS\DSP\DSP_Lib/[ARM|GCC]
52 - run:  buildDspLibs.bat in a Windows command window in folder .\CMSIS\DSP\DSP_Lib_TestSuite
53         buildDspLibs ARM        -> builds the ARMCC libraries
54         buildDspLibs GCC        -> builds the GCC libraries
55
56b) build the reference libraries:
57 - batch file: buildRefLibs.bat
58   
59   Log files of the build process are generated in folder .\CMSIS\DSP\DSP_Lib_TestSuite\RefLibs/[ARM|GCC]
60 - run: buildRefLibs.bat in a Windows command window in folder .\CMSIS\DSP\DSP_Lib_TestSuite
61        buildRefLibs ARM        -> builds the ARMCC reference libraries
62        buildRefLibs GCC        -> builds the GCC reference libraries
63
64c) running an individual test using uVision (MDK-ARM):
65 - batch file: runTest.bat
66 - run:  runTest.bat in a Windows command window in folder .\CMSIS\DSP\DSP_Lib_TestSuite
67         runTest                                -> prints usage information
68    e.g. runTest ARM cortexM4lf Simulator       -> runs the test for toolchain ARM, Cortex-M4 littel endian with FPU, uVision Simulator.
69
70   Tests running on MPS2 requires additional steps to setup. See section 'MPS2'.
71
72d) parsing the test output log file
73 - script: parseLog.py
74 - run:  parseLog.py python script in a Windows command window in folder .\CMSIS\DSP\DSP_Lib_TestSuite
75   command line options should match the invocation of the runTest executed before.
76   e.g: runTest ARM cortexM4lf Simulator  ->  python parseLog.py ARM cortexM4lf Simulator
77   
78 - check the test log
79   depending on your test parameters change into the required folder
80      .\DSP_Lib_TestSuite\DspLibTest_[FVP|MPS2|Simulator]\[ARM|GCC]\Logs
81   the folder will contain the following files (e.g. for a 'runTest') :
82       DspLibTest_Simulator.log                    raw result of the last test run.
83       DspLibTest_Simulator_cortexM4lf.log         raw result of a cortexM4lf test run
84       DspLibTest_Simulator_cortexM4lf_build.log   build result of cortexM4lf test
85       DspLibTest_Simulator_cortexM4lf_parsed.log  parsed log of raw result of a cortexM4lf test run
86       DspLibTest_Simulator_cortexM4lf_time.log    log how long the test took (some tests e.g. M0 take really a long time!).
87   'runTest' produces files of the format:     DspLibTest_<test>_<core>...
88
89
90Differences between the tests for FVP, MPS2, Simulator
91------------------------------------------------------
92 - all tests are identical except for:
93    'Simulator' uses uVision with uVision simulator and generates also code coverage information
94         can be used for little/big endian tests
95         ! do not use 'Simulator' for M7 with FPU      -> no uVision simulation available.
96         ! do not use 'Simulator' for ARMv8-M devices  -> no uVision simulation available.
97    'MPS2' uses uVision with ULINKpro debugger and MPS2. No code coverage information is generated.
98         can be used for little endian only (because of the lack of MPS2 FPGA images).
99    'FVP' uses uVision with Models debugger. No code coverage information is generated.
100         can be used for little/big endian tests.
101         ! config files must be prepared.
102         ! uVision target for big endianess are not yet prepared.
103
104
105Setup 'MPS2'
106-------------
107 - load the appropriate FPGA image to the MPS2 board matching the CPU of the test builds prior to running the test
108 - check if ULINKpro can connect with the configured debug connection (JTAG or SWD) as this must
109   match the protocol implemented in the FPGA image.
110 
111
112How to select tests for "run all tests"
113----------------------------------------
114 - edit .\CMSIS\DSP\DSP_Lib_TestSuite\Common\src\all_tests.c
115   comment out all unwanted test groups.
116   e.g.  //    JTEST_GROUP_CALL(complex_math_tests);
117
118 - edit .\CMSIS\DSP\DSP_Lib_TestSuite\Common\src\<test group>/<test group>_group.c
119   comment out all unwanted sub test groups.
120   e.g. file .\DSP_Lib_TestSuite\Common\src\basic_math_tests\basic_math_test_group.c ->  //    JTEST_GROUP_CALL(abs_tests);
121
122 - edit .\CMSIS\DSP\DSP_Lib_TestSuite\Common\src\<test group>/<test>_tests.c
123   comment out all unwanted tests.
124   e.g. file .\DSP_Lib_TestSuite\Common\src\basic_math_tests\abs_tests.c  ->  //    JTEST_TEST_CALL(arm_abs_f32_test);
125
126
127Notes
128-----
129 - How to use ARM Clang (ARM Compiler 6):
130   in uVision 'Options for Target' tab you can select which compiler to use
131   by default uVision uses ARMCC V5 for Cortex-M devices and ARMCLANG V6 only for ARMv8M.
132   Only ARMv8M cores have been tested using ARMCLANG
133
134 - test data used for the tests is used as provided by DSP Concepts.
135
136 - some tests run for a very long time before they finish. This is expected
137 
Note: See TracBrowser for help on using the repository browser.