]> begriffs open source - cmsis/blob - CMSIS/CoreValidation/README.md
Address unsupported nested external declaration #617
[cmsis] / CMSIS / CoreValidation / README.md
1 # CMSIS-Core Validation
2
3 This folder contains a test suite that validates CMSIS-Core implementations. It uses [**Fixed Virtual Platforms**](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms) to run tests to verify correct operation of the CMSIS-Core functionality on various Arm Cortex based processors.
4
5 ## Folder structure
6
7 ```txt
8     ðŸ“‚ CoreValidation
9     â”£ ðŸ“‚ Include        Include files for test cases etc.
10     â”£ ðŸ“‚ Layer          Layers for creating the projects.
11     â”£ ðŸ“‚ Project        Solution and project files to build tests for various configurations.
12     â”— ðŸ“‚ Source         Test case source code.
13 ```
14
15 ## Test matrix
16
17 Currently, the following build configurations are provided:
18
19 1. Compiler
20    - Arm Compiler 6 (AC6)
21    - GNU Compiler (GCC)
22    - IAR Compiler (IAR)
23 2. Devices
24    - Cortex-M0
25    - Cortex-M0+
26    - Cortex-M3
27    - Cortex-M4
28      - w/o FPU
29      - with FPU
30    - Cortex-M7
31      - w/o FPU
32      - with SP FPU
33      - with DP FPU
34    - Cortex-M23
35      - w/o security extensions (TrustZone)
36      - in secure mode
37      - in non-secure mode
38    - Cortex-M33 (with FPU and DSP extensions)
39      - w/o security extensions (TrustZone)
40      - in secure mode
41      - in non-secure mode
42    - Cortex-M35P (with FPU and DSP extensions)
43      - w/o security extensions (TrustZone)
44      - in secure mode
45      - in non-secure mode
46    - Cortex-M55 (with FPU and DSP extensions)
47      - in secure mode
48      - in non-secure mode
49    - Cortex-M85 (with FPU and DSP extensions)
50      - in secure mode
51      - in non-secure mode
52    - Cortex-A5
53      - w/o NEON extensions
54    - Cortex-A7
55      - w/o NEON extensions
56    - Cortex-A9
57      - w/o NEON extensions
58 3. Optimization Levels
59    - Low
60      - AC6: `-O1`
61      - GCC: `-O1`
62      - IAR: `-Ol`
63    - Mid
64      - AC6: `-O2`
65      - GCC: `-O2`
66      - IAR: `-Om`
67    - High
68      - AC6: `-O3`
69      - GCC: `-O3`
70      - IAR: `-Oh`
71    - Size
72      - AC6: `-Os`
73      - GCC: `-Os`
74      - IAR: `-Ohz`
75    - Tiny
76      - AC6: `-Oz`
77      - GCC: `-Ofast`
78      - IAR: `-Ohs`
79
80 ## Prerequisites
81
82 The following tools are required to build and run the CoreValidation tests:
83
84 - [CMSIS-Toolbox](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) 1.3.0 or higher
85 - CMake
86 - Ninja build
87 - Arm Compiler 6
88 - GNU Compiler
89 - IAR Compiler
90 - Python 3.8 or higher
91 - Arm Virtual Hardware Models
92
93 The executables need to be present on the `PATH`.
94
95 Install the Python packages required by `build.py`:
96
97 ```bash
98 CMSIS_5/CMSIS/CoreValidation/Project $ pip install -r requirements.txt
99 ```
100
101 ## Build and run
102
103 To build and run the CoreValidation tests for one or more configurations use the following command line.
104 Select the `<compiler>`, `<device>`, and `optimize` level to `build` and `run` for.
105
106 ```bash
107 CMSIS_5/CMSIS/CoreValidation/Project $ ./build.py -c <compiler> -d <device> -o <optimize> [build] [run]
108 ```
109
110 For example, build and run the tests using GCC for Cortex-M3 with low optimization, execute:
111
112 ```bash
113 CMSIS_5/CMSIS/CoreValidation/Project $ ./build.py -c GCC -d CM3 -o low build run
114 [GCC][Cortex-M3][low](build:csolution) csolution convert -s Validation.csolution.yml -c Validation.GCC_low+CM3
115 [GCC][Cortex-M3][low](build:csolution) csolution succeeded with exit code 0
116 [GCC][Cortex-M3][low](build:cbuild) cbuild Validation.GCC_low+CM3/Validation.GCC_low+CM3.cprj
117 [GCC][Cortex-M3][low](build:cbuild) cbuild succeeded with exit code 0
118 [GCC][Cortex-M3][low](run:model_exec) VHT_MPS2_Cortex-M3 -q --simlimit 100 -f ../Layer/Target/CM3/model_config.txt -a Validation.GCC_low+CM3/Validation.GCC_low+CM3_outdir/Validation.GCC_low+CM3.elf
119 [GCC][Cortex-M3][low](run:model_exec) VHT_MPS2_Cortex-M3 succeeded with exit code 0
120
121 Matrix Summary
122 ==============
123
124 compiler    device     optimize    build    clean    extract    run
125 ----------  ---------  ----------  -------  -------  ---------  -----
126 GCC         Cortex-M3  low         success  (skip)   (skip)     35/35
127 ```
128
129 The full test report is written to `Core_Validation-GCC-low-CM3-<timestamp>.junit` file.
130
131 ## License
132
133 [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)