]> begriffs open source - cmsis/blob - CMSIS/CoreValidation/README.md
Update test documentation
[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    - LLVM/Clang (Clang)
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    - none
60    - balanced
61    - size
62    - speed
63
64 ## Prerequisites
65
66 The following tools are required to build and run the CoreValidation tests:
67
68 - [CMSIS-Toolbox 2.1.0](https://artifacts.keil.arm.com/cmsis-toolbox/2.1.0/)*
69 - [CMake 3.25.2](https://cmake.org/download/)*
70 - [Ninja 1.10.2](https://github.com/ninja-build/ninja/releases)*
71 - [Arm Compiler 6.20](https://artifacts.keil.arm.com/arm-compiler/6.20/21/)*
72 - [GCC Compiler 13.2.1](https://artifacts.keil.arm.com/arm-none-eabi-gcc/13.2.1/)*
73 - [Clang Compiler 17.0.1](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-17.0.1)*
74 - [Arm Virtual Hardware for Cortex-M based on FastModels 11.22.39](https://artifacts.keil.arm.com/avh/11.22.39/)*
75 - [Python 3.9](https://www.python.org/downloads/)
76
77 The executables need to be present on the `PATH`.
78 For tools distributed via vcpkg (*) this can be achieved automatically:
79
80 ```bash
81  ./CMSIS/CoreValidation/Project $ vcpkg activate
82 ```
83
84 Install the Python packages required by `build.py`:
85
86 ```bash
87  ./CMSIS/CoreValidation/Project $ pip install -r requirements.txt
88 ```
89
90 ## Build and run
91
92 To build and run the CoreValidation tests for one or more configurations use the following command line.
93 Select the `<compiler>`, `<device>`, and `<optimize>` level to `build` and `run` for.
94
95 ```bash
96  ./CMSIS/CoreValidation/Project $ ./build.py -c <compiler> -d <device> -o <optimize> [build] [run]
97 ```
98
99 For example, build and run the tests using GCC for Cortex-M3 with low optimization, execute:
100
101 ```bash
102  ./CMSIS/CoreValidation/Project $ ./build.py -c GCC -d CM3 -o none build run
103 [GCC][Cortex-M3][none](build:csolution) csolution convert -s Validation.csolution.yml -c Validation.GCC_low+CM3
104 [GCC][Cortex-M3][none](build:csolution) csolution succeeded with exit code 0
105 [GCC][Cortex-M3][none](build:cbuild) cbuild Validation.GCC_low+CM3/Validation.GCC_low+CM3.cprj
106 [GCC][Cortex-M3][none](build:cbuild) cbuild succeeded with exit code 0
107 [GCC][Cortex-M3][none](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
108 [GCC][Cortex-M3][none](run:model_exec) VHT_MPS2_Cortex-M3 succeeded with exit code 0
109
110 Matrix Summary
111 ==============
112
113 compiler    device     optimize    build    clean    extract    run
114 ----------  ---------  ----------  -------  -------  ---------  -----
115 GCC         Cortex-M3  none        success  (skip)   (skip)     35/35
116 ```
117
118 The full test report is written to `Core_Validation-GCC-none-CM3-<timestamp>.junit` file.
119
120 ## License
121
122 [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)