mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Adding SMP coverity example (#1039)
* Adding SMP coverity example * Add coverity scan flow * Fix format * Update README.md * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
2a014ce0b3
commit
fdf4695c1e
8 changed files with 109 additions and 1 deletions
|
@ -23,6 +23,12 @@ target_include_directories(freertos_config
|
|||
INTERFACE
|
||||
./)
|
||||
|
||||
if (DEFINED FREERTOS_SMP_EXAMPLE AND FREERTOS_SMP_EXAMPLE STREQUAL "1")
|
||||
message(STATUS "Build FreeRTOS SMP example")
|
||||
# Adding the following configurations to build SMP template port
|
||||
add_compile_options( -DconfigNUMBER_OF_CORES=2 -DconfigUSE_PASSIVE_IDLE_HOOK=0 )
|
||||
endif()
|
||||
|
||||
# Select the heap. Values between 1-5 will pick a heap.
|
||||
set(FREERTOS_HEAP "3" CACHE STRING "" FORCE)
|
||||
|
||||
|
|
|
@ -34,9 +34,16 @@ commands in a terminal:
|
|||
cov-configure --force --compiler cc --comptype gcc
|
||||
~~~
|
||||
2. Create the build files using CMake in a `build` directory:
|
||||
|
||||
Singe core FreeRTOS:
|
||||
~~~
|
||||
cmake -B build -S examples/coverity
|
||||
~~~
|
||||
|
||||
SMP FreeRTOS:
|
||||
~~~
|
||||
cmake -B build -S examples/coverity -DFREERTOS_SMP_EXAMPLE=1
|
||||
~~~
|
||||
3. Build the (pseudo) application:
|
||||
~~~
|
||||
cd build/
|
||||
|
@ -47,7 +54,7 @@ commands in a terminal:
|
|||
~~~
|
||||
cov-analyze --dir ./cov-out \
|
||||
--coding-standard-config ../examples/coverity/coverity_misra.config \
|
||||
--tu-pattern "file('[A-Za-z_]+\.c')"
|
||||
--tu-pattern "file('[A-Za-z_]+\.c') && ( ! file('main.c') ) && ( ! file('port.c') )"
|
||||
~~~
|
||||
5. Generate the HTML report:
|
||||
~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue