psa arch test v1.2 release commits
diff --git a/secure-debug/CMakeLists.txt b/secure-debug/CMakeLists.txt
new file mode 100644
index 0000000..8266ccb
--- /dev/null
+++ b/secure-debug/CMakeLists.txt
@@ -0,0 +1,221 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+
+# Set the minimum required version of CMake for the project
+cmake_minimum_required(VERSION 3.10)
+# cmake_policy
+cmake_policy(SET CMP0057 NEW)
+PROJECT (psa_adac_tests)
+
+# Find python interpreter version 3 or greater
+find_package(PythonInterp 3 REQUIRED)
+
+get_filename_component(PSA_ROOT_DIR . ABSOLUTE)
+include(${PSA_ROOT_DIR}/tools/cmake/common/Utils.cmake)
+
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_EXTENSIONS Off)
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_EXTENSIONS Off)
+
+if(NOT DEFINED RDDI_LIB)
+    set(DEPENDS_INC_PATH ${CMAKE_SOURCE_DIR}/platform/native/include)
+else()
+    set(DEPENDS_INC_PATH ${CMAKE_SOURCE_DIR}/platform/rddi/include)
+
+    if(WIN32)
+        set(DEPENDS_LIB_PATH ${CMAKE_SOURCE_DIR}/depends/rddi/win_32-x86_64)
+    else()
+        set(DEPENDS_LIB_PATH ${CMAKE_SOURCE_DIR}/depends/rddi/linux-x86_64)
+    endif()
+endif()
+
+if(NOT DEFINED PSA_ADAC_ROOT)
+    get_filename_component(PSA_ADAC_ROOT ${CMAKE_SOURCE_DIR}/psa-adac ABSOLUTE)
+endif()
+include(${PSA_ADAC_ROOT}/cmake/psa_adac.cmake OPTIONAL)
+
+configure_file(${PSA_ADAC_ROOT}/psa-adac/core/include/psa_adac_config.h.in psa_adac_config.h)
+include_directories (
+    ${DEPENDS_INC_PATH}
+    ${CMAKE_BINARY_DIR}
+    ${PSA_ADAC_ROOT}/psa-adac/core/include
+    ${PSA_ADAC_ROOT}/ports/include
+    )
+
+set(MBEDTLS_CONFIG_FILE "${PSA_ADAC_ROOT}/ports/crypto/manager-crypto-config.h")
+add_compile_options(-DMBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
+if (UNIX)
+    add_compile_options(-fPIC -fpic)
+else ()
+    # Silence warning about standard C APIs not being secure.
+    add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
+endif ()
+
+# Generate ADAC LIB
+add_subdirectory(${PSA_ADAC_ROOT}/psa-adac/core adac_core)
+add_subdirectory(${PSA_ADAC_ROOT}/psa-adac/sdm adac_sdm)
+add_subdirectory(${PSA_ADAC_ROOT}/ports/crypto/psa-crypto psa_adac_psa_crypto)
+
+set(ADAC_LIBS psa_adac_sdm psa_adac_core psa_adac_psa_crypto mbedcrypto)
+
+if(NOT DEFINED TFM_PROFILE)
+	message(STATUS "[PSA] : Building Default profile")
+list(APPEND PSA_SUITES  #PSA_SUITES
+	"ADAC"
+)
+endif()
+
+# list of VERBOSE options
+list(APPEND PSA_VERBOSE_OPTIONS 1 2 3 4 5)
+
+message(STATUS "[PSA] : ----------Process input arguments- start-------------")
+
+# Check for TARGET command line argument
+_check_arguments("TARGET")
+# Check for SUITE command line argument
+_check_arguments("SUITE")
+
+string(TOLOWER ${SUITE} SUITE_LOWER)
+
+# Check for valid targets
+_get_sub_dir_list(PSA_TARGET_LIST ${PSA_ROOT_DIR}/platform)
+if(NOT ${TARGET} IN_LIST PSA_TARGET_LIST)
+	message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DTARGET=${TARGET}, supported targets are : ${PSA_TARGET_LIST}")
+else()
+    message(STATUS "[PSA] : TARGET is set to ${TARGET}")
+endif()
+
+# Check for the presence of required test suite directories
+if(NOT IS_DIRECTORY ${PSA_ROOT_DIR}/tests)
+	message(STATUS "[PSA] : Error: Could not find architecture test suite directories in psa root path ${PSA_ROOT_DIR}")
+endif()
+
+# Check for valid suite cmake argument passed
+if(NOT ${SUITE} IN_LIST PSA_SUITES)
+	message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DSUITE=${SUITE}, select one from supported suites which are : ${PSA_SUITES}")
+else()
+    message(STATUS "[PSA] : SUITE is set to ${SUITE}")
+endif()
+
+# Project variables
+set(ADAC_HOST_VAL_LIB        psa_adac_val)
+set(ADAC_HOST_PAL_LIB        psa_adac_pal)
+set(TEST_COMBINE_LIB		 test_combine)
+set(ADAC_HOST_EXE		     psa_adac_test)
+
+set(PSA_SUITE_DIR		            ${PSA_ROOT_DIR}/tests/${SUITE_LOWER})
+set(PSA_TESTLIST_GENERATOR		    ${PSA_ROOT_DIR}/tools/scripts/gen_tests_list.py)
+set(TESTSUITE_DB			        ${PSA_SUITE_DIR}/testsuite.db)
+set(PSA_TESTLIST_FILE			    ${CMAKE_CURRENT_BINARY_DIR}/${SUITE_LOWER}_testlist.txt)
+set(PSA_TEST_ENTRY_LIST_INC		    ${CMAKE_CURRENT_BINARY_DIR}/test_entry_list.inc)
+set(PSA_TEST_ENTRY_FUN_DECLARE_INC	${CMAKE_CURRENT_BINARY_DIR}/test_entry_fn_declare_list.inc)
+
+# Check for VERBOSE
+if(NOT DEFINED VERBOSE)
+	set(VERBOSE 3 CACHE INTERNAL "Default VERBOSE value" FORCE)
+        message(STATUS "[PSA] : Defaulting VERBOSE to ${VERBOSE}")
+else()
+	if(NOT ${VERBOSE} IN_LIST PSA_VERBOSE_OPTIONS)
+		message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DVERBOSE=${VERBOSE}, supported values are : ${PSA_VERBOSE_OPTIONS}")
+	endif()
+    message(STATUS "[PSA] : VERBOSE is set to ${VERBOSE}")
+endif()
+
+if(NOT DEFINED SUITE_TEST_RANGE)
+	set(SUITE_TEST_RANGE_MIN None)
+	set(SUITE_TEST_RANGE_MAX None)
+else()
+	list(LENGTH SUITE_TEST_RANGE SUITE_TEST_RANGE_LENGTH)
+	if(${SUITE_TEST_RANGE_LENGTH} GREATER "2")
+		message(FATAL_ERROR "[PSA] : -DSUITE_TEST_RANGE=<...> value error! accepts two "
+                                             " numbers in quotes separated with ';'")
+	endif()
+	if(${SUITE_TEST_RANGE_LENGTH} EQUAL "2")
+		list(GET SUITE_TEST_RANGE 0 SUITE_TEST_RANGE_MIN)
+		list(GET SUITE_TEST_RANGE 1 SUITE_TEST_RANGE_MAX)
+		message(STATUS "[PSA] : Testing (${SUITE_TEST_RANGE_MIN}, ${SUITE_TEST_RANGE_MAX}) of ${SUITE} suite")
+	endif()
+	if(${SUITE_TEST_RANGE_LENGTH} EQUAL "1")
+		set(SUITE_TEST_RANGE_MIN ${SUITE_TEST_RANGE})
+		set(SUITE_TEST_RANGE_MAX ${SUITE_TEST_RANGE})
+		message(STATUS "[PSA] : Testing ${SUITE_TEST_RANGE_MIN} of ${SUITE} suite")
+	endif()
+endif()
+
+message(STATUS "[PSA] : ----------Process input arguments- complete-------------")
+
+# Create PSA clean list
+list(APPEND PSA_CLEAN_LIST
+	${PSA_TESTLIST_FILE}
+	${PSA_TEST_ENTRY_LIST_INC}
+	${PSA_TEST_ENTRY_FUN_DECLARE_INC}
+)
+
+# Process testsuite.db
+message(STATUS "[PSA] : Creating testlist.txt 'available at ${PSA_TESTLIST_FILE}'")
+execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PSA_TESTLIST_GENERATOR}
+					${SUITE_LOWER}
+					${TESTSUITE_DB}
+					${PSA_TESTLIST_FILE}
+					${PSA_TEST_ENTRY_LIST_INC}
+					${PSA_TEST_ENTRY_FUN_DECLARE_INC}
+					${SUITE_TEST_RANGE_MIN}
+					${SUITE_TEST_RANGE_MAX})
+
+# Creating CMake list variable from file
+file(READ ${PSA_TESTLIST_FILE} PSA_TEST_LIST)
+if(NOT PSA_TEST_LIST)
+	message(FATAL_ERROR "[PSA] : Invalid test number!")
+endif()
+string(REGEX REPLACE "\n" ";" PSA_TEST_LIST "${PSA_TEST_LIST}")
+
+# Global macro to identify the PSA test suite cmake build
+add_definitions(-D${SUITE})
+add_definitions(-DVERBOSE=${VERBOSE})
+add_definitions(-D${TARGET})
+
+# Build PAL LIB
+if(NOT DEFINED RDDI_LIB)
+    add_subdirectory(${CMAKE_SOURCE_DIR}/platform/native)
+    set(ADAC_HOST_PAL_LIB    platform_native)
+else()
+    add_subdirectory(${CMAKE_SOURCE_DIR}/platform/csapbcom)
+    set(ADAC_HOST_PAL_LIB    csapbcom)
+endif()
+
+# Generate VAL LIB
+include(${CMAKE_SOURCE_DIR}/val/val.cmake)
+
+# Build test
+include(${PSA_SUITE_DIR}/suite.cmake)
+
+#add_dependencies(${TEST_COMBINE_LIB}		${ADAC_HOST_VAL_LIB} ${ADAC_HOST_PAL_LIB} ${ADAC_LIBS})
+add_executable(${ADAC_HOST_EXE} ${SUITE_CC_SOURCE})
+target_include_directories(${ADAC_HOST_EXE} PRIVATE
+    ${CMAKE_SOURCE_DIR}/val/include
+    )
+target_link_libraries (${ADAC_HOST_EXE} ${TEST_COMBINE_LIB}
+                                        ${ADAC_HOST_VAL_LIB}
+                                        ${ADAC_HOST_PAL_LIB}
+                                        ${ADAC_LIBS}
+                                        )
+
+# Include the files for make clean
+foreach(clean_item ${PSA_CLEAN_LIST})
+        set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clean_item})
+endforeach()
+
diff --git a/secure-debug/README.md b/secure-debug/README.md
new file mode 100644
index 0000000..8947afa
--- /dev/null
+++ b/secure-debug/README.md
@@ -0,0 +1,157 @@
+
+# PSA Secure Debug : Arm ADAC Test Suite
+
+## Introduction
+
+### ADAC Specification
+
+The ADAC specification defines the protocol that allows a target to securely authenticate a debug host. The specification targets software-only layers that sit above the physical debug link.
+
+The ADAC specification can be obtained at [ADAC specification](https://developer.arm.com/documentation/den0101/0000).
+
+### ADAC test suite
+
+The ADAC test suite checks if a device-side implementation conforms to the behavior described in the ADAC specification. The tests are self-checking, portable C-based tests with directed stimulus. The tests are expected to run on the host platform only. The tests drive the commands from the host platform via the debug link and verify the response obtained from the target platform.
+
+The tests are available as open source. The tests and the corresponding abstraction layers are available with an Apache v2.0 license allowing for external contribution.
+
+## Release details
+ - Release Version - 0.5
+ - Code Quality: Alpha <br />
+   The suite is in development. This indicates that the suite contains tests that has not been validated on any hardware platform. Please use this opportunity to suggest enhancements and point out errors.
+
+ - The ADAC tests are written for version Beta of the [ADAC specification](https://developer.arm.com/documentation/den0101/0000).
+ - This test suite is not a substitute for design verification.
+
+## Layers
+
+ADAC tests use a layered software-stack approach to enable porting across different test platforms. The constituents of the layered stack are:
+        - Test suite
+        - Validation Abstraction Layer (VAL)
+        - Platform Abstraction Layer (PAL)
+
+These tests are written on top of Validation Abstraction Layer (VAL) and Platform Abstraction Layer (PAL).
+
+The abstraction layers provide platform information and runtime environment to enable execution of the tests.
+
+In this release, PAL implementation uses unix sockets as the link layer for sending commands and receiving responses.
+
+Partners can also write their own abstraction layer implementations to allow ADAC tests to be run in other host platforms and support the debug link layer.
+
+## Scenarios
+
+The mapping of the rules in the specification to the test cases and the steps followed in the tests are mentioned in the [Scenario document](docs/psa_adac_scenarios.md) present in the docs/ folder.
+
+## Getting started
+
+
+Follow the instructions in the subsequent sections to get a copy of the source code on your local machine and build the tests. <br />
+See User guide document to get details on the steps involved in porting the test suite to your platform.
+This test suite is provided as a separate directory within the psa-arch-tests repository.
+
+### Prerequisites
+
+Before starting the test suite build, ensure that the following requirements are met:
+
+- Host Operating System     : Ubuntu 16.04.4, RHEL 7, Windows 10
+- Scripting tools           : Python 3.7.1
+- Other open-source tools   : GNUARM 6.3.1, GCC 5.4.0 32-Bit (Linux Host), mingw 6.3.0 32-Bit (Windows Host)
+                              CMake 3.1 or later
+
+
+## Download source
+To download the master branch of the repository, type the following command:
+
+	git clone https://github.com/ARM-software/psa-arch-tests.git
+
+To download the master branch of the psa-adac repository, type the following command:
+
+	git clone git@github.com:ARMmbed/psa-adac.git
+
+Note:
+    To obtain the access to the psa-adac repository and some of its dependent submodules, Arm Licensees may contact Arm through their partner managers.
+
+
+## Porting steps
+
+Refer to the [Porting Guide](docs/porting_guide_adac_host.md) document for porting steps for your host platform.
+Refer to the [User Guide](docs/Arm_Authenticated_Debug_Access_Control_Test_Suite_User_Guide.pdf) document in the docs folder for additional details.
+
+## Build steps
+
+To build ADAC test suite for a given host platform, execute the following commands: <br/>
+~~~
+    cd psa-arch-tests/secure-debug
+    git clone git@github.com:ARMmbed/psa-adac.git --recurse-submodules
+    mkdir <host_build_dir>
+    cd <host_build_dir>
+	cmake ../ -G<generator-name> -DTARGET=<target-name> -DCOMPILER=<compiler-selection> -DSUITE=<suite-selection>
+	    where:
+        - <generator-name>          "Unix Makefiles"  - to generate Makefiles for Linux and Cygwin
+                                    "MinGW Makefiles" - to generate Makefiles for cmd.exe on Windows
+        - <target-name>             target to build, as created in the platform/board directory
+        - <compiler-selection>      GNU
+                                    Defaults to GNU if not specified
+        - <suite-selection>         ADAC              - specify the ADAC suite
+
+	To build project
+	   cmake --build .
+	To clean
+	   cmake --build . -- clean
+
+    For example:
+    cmake ../ -G"Unix Makefiles" -DTARGET=native -DSUITE=ADAC
+    cmake --build .
+~~~
+
+Note:
+    It is recommended to build each different build configurations in separate directories.
+
+### Build output
+The following ADAC test suite build outputs are available under host build directory, as created.
+
+	- psa_adac_test executable
+	- val and platform layer libraries
+
+## Test Suite Execution
+
+The current release provides a reference implementation of ADAC target which communicates with the host platform using unix sockets. In order to execute the test suite, please follow the steps below:
+
+    cd psa-arch-tests/secure-debug/psa-adac
+    make native
+
+To launch the target to run as a server instance, run the target executable in another terminal as shown:
+
+    cd psa-arch-tests/secure-debug/psa-adac
+    ./build/native/Debug/psa_adac_server coms.socket tools/test/resources/chains/chain.EcdsaP256-0
+
+To run the test suite, execute the following command from your host build directory <host_build_dir>:
+
+    ./psa_adac_test ../psa-adac/tools/test/resources/keys/EcdsaP256Key-0.pem \../psa-adac/tools/test/resources/chains/chain.EcdsaP256-0 ../psa-adac/coms.socket
+
+Note:
+ - Please look at the psa-adac directory for details about other target platforms.
+ - The keys and the certificate credentials for a supported cryptosystem can be generated using the tools provided in the psa-adac repository.
+ - The test suite is designed to run once per supported cryptosystem. Partners must ensure that the device must be provisioned with the correct certificates installed in the device's RoT.
+
+
+## Security implication
+
+ADAC test suite may run at higher privilege level. An attacker can utilize these tests to elevate privilege which can potentially reveal the platform secure attests. To prevent such security vulnerabilities into the production system, it is strongly recommended that ADAC test suite is run on development platforms. If it is run on production system, make sure system is scrubbed after running the test suite.
+
+## License
+
+Arm ADAC Architecture test suite is distributed under Apache v2.0 License.
+The psa-adac code repository is distributed under BSD-3-Clause License.
+
+
+## Feedback, contributions, and support
+
+ - For feedback, use the GitHub Issue Tracker that is associated with this repository.
+ - For support, send an email to support-psa-arch-tests@arm.com with details.
+ - Arm licensees can contact Arm directly through their partner managers.
+ - Arm welcomes code contributions through GitHub pull requests.
+
+--------------
+
+*Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.*
diff --git a/secure-debug/depends/rddi/linux-x86_64/README.txt b/secure-debug/depends/rddi/linux-x86_64/README.txt
new file mode 100644
index 0000000..80b9a82
--- /dev/null
+++ b/secure-debug/depends/rddi/linux-x86_64/README.txt
@@ -0,0 +1,6 @@
+This directory should include Linux x86_64 RDDI redistributables.
+
+These can be found in:
+- <Arm DS Install Directory>/sw/debugger/RDDI/redistributables/linux-x86_64/<compiler choice>/rel/
+
+<compiler choice>: Choose a compiler which matches your host system
diff --git a/secure-debug/depends/rddi/win_32-x86_64/README.txt b/secure-debug/depends/rddi/win_32-x86_64/README.txt
new file mode 100644
index 0000000..f78ccd8
--- /dev/null
+++ b/secure-debug/depends/rddi/win_32-x86_64/README.txt
@@ -0,0 +1,12 @@
+This directory should include Windows x86_64 RDDI redistributable and development libraries.
+
+Redistributables can be found in:
+- <Arm DS Install Directory>/sw/debugger/RDDI/redistributables/win_32-x86_64/<compiler choice>/rel/
+
+Development libraries can be found in:
+- <Arm DS Install Directory>/sw/debugger/RDDI/lib/win_32-x86_64/<compiler choice>/rel/
+
+<compiler choice>: Choose a compiler which matches your host system
+    Example compilers:
+        cl-16.00.40219.01 = Microsoft Visual Studio 2010
+        cl-19.00.24215.1  = Microsoft Visual Studio 2015 Update 3
diff --git a/secure-debug/docs/Arm_Authenticated_Debug_Access_Control_Test_Suite_User_Guide.pdf b/secure-debug/docs/Arm_Authenticated_Debug_Access_Control_Test_Suite_User_Guide.pdf
new file mode 100644
index 0000000..532a4ac
--- /dev/null
+++ b/secure-debug/docs/Arm_Authenticated_Debug_Access_Control_Test_Suite_User_Guide.pdf
Binary files differ
diff --git a/secure-debug/docs/porting_guide_adac_host.md b/secure-debug/docs/porting_guide_adac_host.md
new file mode 100644
index 0000000..07f1c03
--- /dev/null
+++ b/secure-debug/docs/porting_guide_adac_host.md
@@ -0,0 +1,36 @@
+
+# Porting Guide: ADAC Test Suite
+-----------------------------------------------------
+
+## Introduction
+The ADAC test suite contains the *Platform Abstraction Layer* (PAL) which abstracts platform-specific information from the tests. You must implement and port the PAL interface functions to your host platform.
+
+This document provides the porting steps and the list of PAL APIs.
+
+## Porting steps
+
+### Adding a new target
+
+  1. Create a new directory in **platform/<platform_name>**. For reference, see the existing platform **native** directory.
+  2. Execute `cp -rf platform/native/ platform/<platform_name>/`.
+  3. Update **platform/<platform_name>/CMakeLists.txt** appropriately to select the correct instances of PAL files for compilation.
+  4. Refer to the **List of PAL APIs** section to view the list of PAL APIs that must be ported for your target platform. These API definitions are available in **val/include/pal_interfaces.h**. These APIs are written for native target platform. You can reuse the code if it works for your platform. Otherwise, you must port them for your platform-specific peripherals.
+  5. The main.c requires path to the key and certificate chain that point to the host credentials. This must be provided as command-line arguments. You can provide debug link layer specific parameters as additional command-line arguments.
+  6. If you want to use a pre-built debug communication interface, create a new directory under the depends directory and list your shared libraries within it. A placeholder for RDDI libraries is provided. You can then link these libraries to your platform.
+
+## List of PAL APIs
+Since the test suite is agnostic to various system platforms, you must port the following PAL APIs before building the tests. Implement these functions for your host platform. <br/>
+
+| No | Prototype                                             | Description                                                                 | Parameters                                                              |
+|----|-------------------------------------------------------|-----------------------------------------------------------------------------|-------------------------------------------------------------------------|
+| 01 | int pal_print(char *str, int32_t data);               | Parses the input string and writes bytes into the message interface         | str      : Input String<br/>data     : Value for format specifier<br/>  |
+| 02 | int request_packet_send(request_packet_t *packet);    | Writes the ADAC command frame into the communication buffer for transmit    | request packet<br/>                                                     |
+| 03 | response_packet_t *response_packet_receive();         | Reads the ADAC command response from the communication buffer               | None<br/>                                                               |
+| 04 | int pal_system_reset(void)                            | Resets the system and disconnects from device                               | None                                                                    |
+
+## License
+Arm PSA test suite is distributed under Apache v2.0 License.
+
+--------------
+
+*Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.*
diff --git a/secure-debug/docs/psa_adac_scenarios.md b/secure-debug/docs/psa_adac_scenarios.md
new file mode 100644
index 0000000..8d8fcae
--- /dev/null
+++ b/secure-debug/docs/psa_adac_scenarios.md
@@ -0,0 +1,28 @@
+# PSA ADAC Scenarios
+
+| Scenario ID | Section    | Description                                                                                                                                                                                                                            | Test Cases |
+|-------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
+| S_ADAC_001  | Commands   | Verify that the following commands are recognized by the target and do not return SDP_INVALID_COMMAND status.<br />1. Discovery<br/>2. Authentication Start<br\>3. Authentication Response<br/>4. Close Session<br/>5. Lock Debug<br/> | TBD <br/>  |
+| S_ADAC_002  | Commands   | Send two authentication start commands back-to-back and verify that the challenge vector obtained in the response is different. | test_a001 <br/>  |
+| S_ADAC_003  | Commands   | Use discovery command to query the target for supported response fragment formats. Check that the following response fragments are supported: <br\>1. 0x200 token_adac<br\>2. 0x201 cert_adac<br\>| TBD <br/>  |
+| S_ADAC_004  | Commands   | Issue invalid response fragment as part of Authentication response and check that the target responds with SDP_FAILURE status.| TBD <br/>  |
+| S_ADAC_005  | Commands   | Issue a different command after starting the Authentication response command and check that the target responds with SDP_FAILURE status. | TBD <br/>  |
+| S_ADAC_006  | Commands   | Verify that for a multiple fragment Authentication response request, the device responds with a SDP_MORE_DATA_NEEDED status code after each response fragment.| TBD <br/>  |
+| S_ADAC_007  | Commands   | Check that the Close Session command always returns a SDP_SUCCESS status.| TBD <br/>  |
+| S_ADAC_008  | Constraints| Provide a leaf certificate before a root certificate and verify that an error response is generated by the target.| TBD <br/>  |
+| S_ADAC_009  | Constraints| Check that a certificate is rejected due to each of the following scope-limiting feature:1. Role<br/>2. Lifecycle<br/>| TBD <br/>  |
+| S_ADAC_010  | Constraints| Check that if two or more distinct non-neutral values are present in the certificate chain, a failure response is obtained.| TBD <br/>  |
+| S_ADAC_011  | Constraints| Request a permission value (perm_req) via authentication token which is denied due to a restrictive perm_mask field. Check that the authentication response is successful.| TBD <br/>  |
+| S_ADAC_012  | Constraints| Request access to software partition with no software partition ID listed in the certificate chain. Check that success status is reported.| TBD <br/>  |
+
+## Note
+
+1. The list of identified scenarios are not exhaustive and is subject to change.<br/>
+2. Some of the listed scenarios could be descoped or classified as testing limitation.<br />
+
+# License
+Arm PSA test suite is distributed under Apache v2.0 License.
+
+--------------
+
+*Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.*
diff --git a/secure-debug/platform/native/CMakeLists.txt b/secure-debug/platform/native/CMakeLists.txt
new file mode 100644
index 0000000..a517d01
--- /dev/null
+++ b/secure-debug/platform/native/CMakeLists.txt
@@ -0,0 +1,31 @@
+#/** @file
+# * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+
+# Set the minimum required version of CMake for the project
+cmake_minimum_required(VERSION 3.10)
+PROJECT (platform_native)
+
+include_directories(
+    ${CMAKE_SOURCE_DIR}/platform/native/include
+    )
+
+add_library(platform_native STATIC)
+target_sources(platform_native PUBLIC
+    ${CMAKE_SOURCE_DIR}/platform/native/src/pal_interfaces.c
+    ${CMAKE_SOURCE_DIR}/platform/native/src/unix_msg.c
+    ${CMAKE_SOURCE_DIR}/platform/native/src/main.c
+    )
+target_link_libraries(platform_native mbedcrypto)
diff --git a/secure-debug/platform/native/include/pal_common.h b/secure-debug/platform/native/include/pal_common.h
new file mode 100644
index 0000000..c88dcf5
--- /dev/null
+++ b/secure-debug/platform/native/include/pal_common.h
@@ -0,0 +1,37 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _PAL_COMMON_H_
+#define _PAL_COMMON_H_
+#include <platform.h>
+#include <stddef.h>
+/**
+ *   @brief    - Initialise the host-side channel for communication with device.
+ *   @param    - ctx            Hook for platform-specific descriptor
+ *               buffer         Pointer to memory used for TX/RX
+ *               buffer_size    Size of allocated memory for TX/RX
+ *   @return   - SUCCESS/FAILURE
+**/
+int msg_interface_init(void *ctx, uint8_t buffer[], size_t size);
+
+/**
+ *   @brief    - Release the host-side channel for communication with device.
+ *   @param    - ctx            Hook for platform-specific descriptor
+ *   @return   - SUCCESS/FAILURE
+**/
+int msg_interface_free(void *ctx);
+
+#endif
diff --git a/secure-debug/platform/native/include/platform.h b/secure-debug/platform/native/include/platform.h
new file mode 100644
index 0000000..2df84d9
--- /dev/null
+++ b/secure-debug/platform/native/include/platform.h
@@ -0,0 +1,37 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef PSA_ADAC_PLATFORM_H
+#define PSA_ADAC_PLATFORM_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+#ifdef PSA_ADAC_PLATFORM_CONFIG_FILE
+#include PSA_ADAC_PLATFORM_CONFIG_FILE
+#else
+#include <psa_adac_platform.h>
+#endif
+
+#ifndef PSA_ADAC_PLATFORM_BANNER
+#define PSA_ADAC_PLATFORM_BANNER "PSA ADAC "
+#endif
+
+void platform_init(void);
+void psa_adac_platform_init(void);
+
+#endif //PSA_ADAC_PLATFORM_H
diff --git a/secure-debug/platform/native/include/psa_adac_platform.h b/secure-debug/platform/native/include/psa_adac_platform.h
new file mode 100644
index 0000000..5e4e272
--- /dev/null
+++ b/secure-debug/platform/native/include/psa_adac_platform.h
@@ -0,0 +1,23 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef PSA_ADAC_NATIVE_PSA_ADAC_PLATFORM_H
+#define PSA_ADAC_NATIVE_PSA_ADAC_PLATFORM_H
+
+#define PSA_ADAC_MANAGER_IMPLICIT_TRANSPORT
+
+#endif //PSA_ADAC_NATIVE_PSA_ADAC_PLATFORM_H
diff --git a/secure-debug/platform/native/include/unix_msg.h b/secure-debug/platform/native/include/unix_msg.h
new file mode 100644
index 0000000..a21a165
--- /dev/null
+++ b/secure-debug/platform/native/include/unix_msg.h
@@ -0,0 +1,41 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef PSA_ADAC_UNIX_MSG_H
+#define PSA_ADAC_UNIX_MSG_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#if !defined(_MSC_VER)
+#include <sys/types.h>
+#else // !defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif // !defined(_MSC_VER)
+
+bool unix_socket_init(void);
+
+int unix_socket_server(const char *path);
+int unix_socket_client(const char *path);
+
+void unix_socket_close(int fd);
+
+ssize_t nwrite(int fd, const uint8_t *buf, size_t count);
+ssize_t nread(int fd, uint8_t *buf, size_t count);
+
+#endif //PSA_ADAC_UNIX_MSG_H
diff --git a/secure-debug/platform/native/src/main.c b/secure-debug/platform/native/src/main.c
new file mode 100644
index 0000000..86c563f
--- /dev/null
+++ b/secure-debug/platform/native/src/main.c
@@ -0,0 +1,57 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "pal_common.h"
+#include "unix_msg.h"
+
+int32_t val_entry(void);
+
+/**
+    @brief    - PSA C main function, used for generating host-side test binaries.
+    @param    - argc    : the number of command line arguments.
+                argv    : array containing command line arguments.
+    @return   - error status
+**/
+extern uint8_t buffer[4096];
+uint8_t buffer[4096];
+char *key_file, *chain_file;
+
+int main(int argc, char *argv[])
+{
+    if (argc < 4) {
+        printf("Usage:\n\tpsa_adac_test <keyfile> <chainfile> <socket>\n\n");
+        exit(-1);
+    }
+
+    key_file = argv[1];
+    chain_file = argv[2];
+    char *socket_path = argv[3];
+    int fd;
+
+    fd = unix_socket_client(socket_path);
+    if (-1 == fd)
+        exit(-1);
+
+    msg_interface_init((void *) &fd, buffer, sizeof(buffer));
+
+    return val_entry();
+
+    msg_interface_free(NULL);
+    return 0;
+}
diff --git a/secure-debug/platform/native/src/pal_interfaces.c b/secure-debug/platform/native/src/pal_interfaces.c
new file mode 100644
index 0000000..9c33a5a
--- /dev/null
+++ b/secure-debug/platform/native/src/pal_interfaces.c
@@ -0,0 +1,245 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include <psa_adac.h>
+#include <psa_adac_debug.h>
+#include "unix_msg.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !defined(_MSC_VER)
+    #include <unistd.h>
+#else // !defined(_MSC_VER)
+    #include <io.h>
+
+    // Disable warning about POSIX function names.
+    #pragma warning(disable : 4996)
+#endif // !defined(_MSC_VER)
+
+int static_buffer_msg_init(uint8_t *buffer, size_t size);
+int static_buffer_msg_release(void);
+
+#define PAL_STATUS_UNSUPPORTED_FUNC      0xFF
+
+typedef enum {
+    PAL_STATUS_SUCCESS = 0x0,
+    PAL_STATUS_ERROR   = 0x80
+} pal_status_t;
+
+enum {
+    BUFFER_UNINITIALIZED = 0,
+    BUFFER_EMPTY,
+    BUFFER_REQUEST,
+    BUFFER_RESPONSE
+};
+static size_t static_buffer_size;
+static uint8_t *static_buffer_pointer;
+static uint8_t static_buffer_status = BUFFER_UNINITIALIZED;
+static int _fd;
+
+
+int pal_print(const char *str, int32_t data)
+{
+    if (printf(str, data) < 0)
+    {
+        return PAL_STATUS_ERROR;
+    }
+    return PAL_STATUS_SUCCESS;
+}
+
+void pal_terminate_simulation(void)
+{
+    ;
+}
+
+int pal_system_reset(void)
+{
+    return PAL_STATUS_UNSUPPORTED_FUNC;
+}
+
+int static_buffer_msg_init(uint8_t *buffer, size_t size)
+{
+    int ret = -1;
+
+    if (static_buffer_status == BUFFER_UNINITIALIZED) {
+        static_buffer_size = size;
+        static_buffer_pointer = buffer;
+        static_buffer_status = BUFFER_EMPTY;
+        ret = 0;
+    }
+    return ret;
+}
+
+int static_buffer_msg_release(void)
+{
+    int ret = -1;
+
+    if (static_buffer_status == BUFFER_EMPTY) {
+        static_buffer_size = 0;
+        static_buffer_pointer = NULL;
+        static_buffer_status = BUFFER_UNINITIALIZED;
+        ret = 0;
+    }
+    return ret;
+}
+
+request_packet_t *request_packet_build(uint16_t command, uint8_t *data, size_t data_size)
+{
+    request_packet_t *request = NULL;
+
+    if ((static_buffer_status == BUFFER_EMPTY) &&
+        (data_size <= (static_buffer_size - sizeof(request_packet_t)))) {
+        request = (request_packet_t *) static_buffer_pointer;
+        request->command = command;
+        request->data_count = data_size / 4UL;
+        (void) memcpy((void *) request->data, (void *) data, data_size);
+        static_buffer_status = BUFFER_REQUEST;
+    }
+    return request;
+}
+
+request_packet_t *request_packet_lock(size_t *max_data_size)
+{
+    request_packet_t *request = NULL;
+
+    if (static_buffer_status == BUFFER_EMPTY) {
+        if (max_data_size != NULL)
+            *max_data_size = static_buffer_size - sizeof(response_packet_t);
+
+        request = (request_packet_t *) static_buffer_pointer;
+        static_buffer_status = BUFFER_REQUEST;
+    }
+    return request;
+}
+
+int request_packet_release(request_packet_t *packet)
+{
+    int ret = -1;
+
+    if (static_buffer_status == BUFFER_REQUEST) {
+        static_buffer_status = BUFFER_EMPTY;
+        ret = 0;
+    }
+    return ret;
+}
+
+response_packet_t *response_packet_lock(size_t *max_data_size)
+{
+    response_packet_t *response = NULL;
+
+    if (static_buffer_status == BUFFER_EMPTY) {
+        if (max_data_size != NULL)
+            *max_data_size = static_buffer_size - sizeof(response_packet_t);
+
+        response = (response_packet_t *) static_buffer_pointer;
+        static_buffer_status = BUFFER_RESPONSE;
+    }
+    return response;
+}
+
+int response_packet_release(response_packet_t *packet)
+{
+    int ret = -1;
+
+    if (static_buffer_status == BUFFER_RESPONSE) {
+        static_buffer_status = BUFFER_EMPTY;
+        ret = 0;
+    }
+    return ret;
+}
+
+int msg_interface_init(void *ctx, uint8_t buffer[], size_t buffer_size)
+{
+    unix_socket_init();
+
+    if (ctx == NULL)
+        return -1;
+
+    _fd = *((int *) ctx);
+    return static_buffer_msg_init(buffer, buffer_size);
+}
+
+int msg_interface_free(void *ctx)
+{
+    unix_socket_close(_fd);
+    _fd = -1;
+    return static_buffer_msg_release();
+}
+
+static int message_receive(int fd, uint8_t buffer[], size_t max, size_t *size)
+{
+    if (nread(fd, buffer, sizeof(request_packet_t)) != sizeof(request_packet_t)) {
+        PSA_ADAC_LOG_ERR("transport_unix", "Error receiving message header\n");
+        return -1;
+    }
+    request_packet_t *p = (request_packet_t *) buffer;
+
+    if (4 + p->data_count * 4 > max) {
+        PSA_ADAC_LOG_ERR("transport_unix", "Message would overflow buffer (%d > %d)\n",
+                                            4 + p->data_count * 4, (int) max);
+        return -1;
+    }
+    if (p->data_count) {
+        if (nread(fd, (uint8_t *) p->data, p->data_count * 4) != p->data_count * 4) {
+            PSA_ADAC_LOG_ERR("transport_unix", "Error receiving message body\n");
+            return -1;
+        }
+    }
+    //PSA_ADAC_LOG_DUMP("msg", "receive", buffer, 4 + p->data_count * 4);
+    return 0;
+}
+
+static int message_send(int fd, uint8_t buffer[], size_t size)
+{
+    //PSA_ADAC_LOG_DUMP("msg", "send", buffer, size);
+    return nwrite(fd, (uint8_t *) buffer, size) == size ? 0 : -1;
+}
+
+int request_packet_send(request_packet_t *packet)
+{
+    if (packet == NULL)
+        return -1;
+
+    size_t size = sizeof(request_packet_t) + 4 * packet->data_count;
+
+    return message_send(_fd, (uint8_t *) packet, size);
+}
+
+response_packet_t *response_packet_receive()
+{
+    size_t max = 0;
+    response_packet_t *r = response_packet_lock(&max);
+
+    if (r != NULL) {
+        if (message_receive(_fd, (uint8_t *) r, max, NULL) == 0)
+            return r;
+
+        PSA_ADAC_LOG_ERR("transport_unix", "Error Receiving Response");
+        response_packet_release(r);
+    } else {
+        PSA_ADAC_LOG_ERR("transport_unix", "Error Locking Response");
+    }
+    return NULL;
+}
+
+void psa_adac_platform_init(void)
+{
+    ;
+}
+
diff --git a/secure-debug/platform/native/src/unix_msg.c b/secure-debug/platform/native/src/unix_msg.c
new file mode 100644
index 0000000..9a6e301
--- /dev/null
+++ b/secure-debug/platform/native/src/unix_msg.c
@@ -0,0 +1,156 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "unix_msg.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#if !defined(_MSC_VER)
+    #include <unistd.h>
+    #include <sys/socket.h>
+    #include <sys/un.h>
+#else // !defined(_MSC_VER)
+    #include <WinSock2.h>
+    #include <afunix.h>
+    #include <io.h>
+
+    // Disable warning about POSIX function names.
+    #pragma warning(disable : 4996)
+#endif // !defined(_MSC_VER)
+
+void unix_socket_close(int fd)
+{
+    if (fd != -1) {
+#if defined(_MSC_VER)
+        closesocket(fd);
+#else
+        close(fd);
+#endif
+    }
+}
+
+bool unix_socket_init(void)
+{
+#if defined(_MSC_VER)
+    static bool did_init_winsock;
+
+    did_init_winsock = false;
+    if (!did_init_winsock) {
+        WSADATA wsa_data = { 0 };
+
+        int result = WSAStartup(MAKEWORD(2, 2), &wsa_data);
+
+        if (result != 0) {
+            printf("WSAStartup failed with error: %d\n", result);
+            return false;
+        }
+    }
+#endif
+    return true;
+}
+
+int unix_socket_server(const char *path)
+{
+    struct sockaddr_un addr;
+    int fd;
+
+    fd = socket(AF_UNIX, SOCK_STREAM, 0);
+    if (fd == -1) {
+        perror("Error while calling socket()");
+        goto error;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sun_family = AF_UNIX;
+    strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
+
+    if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) != 0) {
+        perror("Error while calling bind()");
+        goto error;
+    }
+
+    if (listen(fd, 1) == -1) {
+        perror("Error while calling listen()");
+        goto error;
+    }
+    return fd;
+
+error:
+    unix_socket_close(fd);
+    return -1;
+}
+
+int unix_socket_client(const char *path)
+{
+    struct sockaddr_un addr;
+    int fd;
+
+    fd = socket(AF_UNIX, SOCK_STREAM, 0);
+    if (fd == -1) {
+        perror("Error while calling socket()");
+        goto error;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sun_family = AF_UNIX;
+    strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
+
+    if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
+        perror("Error while calling connect()");
+        goto error;
+    }
+    return fd;
+
+error:
+    unix_socket_close(fd);
+    return -1;
+}
+
+ssize_t nwrite(int fd, const uint8_t *buf, size_t count)
+{
+    const char *ptr = (const char *) buf;
+    ssize_t t;
+    size_t left = count;
+
+    while (left) {
+        t = send(fd, ptr, left, 0);
+        if (t  < 0)
+            return -1;
+        left -= t;
+        ptr += t;
+    }
+    return count;
+}
+
+ssize_t nread(int fd, uint8_t *buf, size_t count)
+{
+    char *ptr = (char *) buf; /* Removes warning on pointer operation */
+    ssize_t t = 0;
+    size_t left = count;
+
+    while (left) {
+        t = recv(fd, ptr, left, 0);
+        if (t < 0)
+            return -1;
+        left -= t;
+        ptr += t;
+    }
+    return count;
+}
diff --git a/secure-debug/tests/adac/suite.cmake b/secure-debug/tests/adac/suite.cmake
new file mode 100644
index 0000000..167d305
--- /dev/null
+++ b/secure-debug/tests/adac/suite.cmake
@@ -0,0 +1,41 @@
+#/** @file
+# * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+foreach(test ${PSA_TEST_LIST})
+	include(${PSA_SUITE_DIR}/${test}/test.cmake)
+	foreach(source_file ${CC_SOURCE})
+		list(APPEND SUITE_CC_SOURCE
+			${PSA_SUITE_DIR}/${test}/${source_file}
+		)
+	endforeach()
+	unset(CC_SOURCE)
+endforeach()
+
+add_definitions(${CC_OPTIONS})
+add_library(${TEST_COMBINE_LIB} STATIC ${SUITE_CC_SOURCE})
+
+# Test related Include directories
+foreach(test ${PSA_TEST_LIST})
+	target_include_directories(${TEST_COMBINE_LIB} PRIVATE ${PSA_SUITE_DIR}/${test})
+endforeach()
+
+target_include_directories(${TEST_COMBINE_LIB} PRIVATE
+	${CMAKE_BINARY_DIR}
+	${PSA_ROOT_DIR}/val/include
+	${PSA_ROOT_DIR}/platform/${TARGET}/include
+)
+target_link_libraries(${TEST_COMBINE_LIB} mbedcrypto)
diff --git a/secure-debug/tests/adac/test_a001/test.cmake b/secure-debug/tests/adac/test_a001/test.cmake
new file mode 100644
index 0000000..c38649e
--- /dev/null
+++ b/secure-debug/tests/adac/test_a001/test.cmake
@@ -0,0 +1,21 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+	test_a001.c
+)
+list(APPEND CC_OPTIONS )
diff --git a/secure-debug/tests/adac/test_a001/test_a001.c b/secure-debug/tests/adac/test_a001/test_a001.c
new file mode 100644
index 0000000..66f878e
--- /dev/null
+++ b/secure-debug/tests/adac/test_a001/test_a001.c
@@ -0,0 +1,86 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include <psa_adac.h>
+#include <val_adac.h>
+#include "val_interfaces.h"
+
+#include "test_a001.h"
+
+#define TEST_NUM  VAL_CREATE_TEST_ID(VAL_SECURE_DEBUG_BASE, 1)
+#define TEST_DESC "Testing ADAC Protocol Host API| UT: psa_challenge\n"
+TEST_PUBLISH(TEST_NUM, test_entry);
+
+void test_entry(val_api_t *val_api)
+{
+    int32_t   status = VAL_STATUS_SUCCESS;
+    val_api_t *val = NULL;
+
+    val = val_api;
+
+    /* test init */
+    val->test_init(TEST_NUM, TEST_DESC);
+    val_adac_host_init();
+
+    uint8_t challenge1[CHALLENGE_SIZE], challenge2[CHALLENGE_SIZE], i;
+
+    request_packet_t *request;
+    response_packet_t *response;
+
+    if (PSA_SUCCESS != val_issue_command(SDP_AUTH_START_CMD, request, NULL, 0))
+        goto test_fail_exit;
+
+    response = val_await_response();
+    if (PSA_SUCCESS != val_parse_response(SDP_AUTH_START_CMD, response))
+        goto test_fail_exit;
+
+    psa_auth_challenge_t *challenge = (psa_auth_challenge_t *) response->data;
+
+    *challenge1 = (uint8_t)(challenge->challenge_vector);
+    response_packet_release(response);
+
+    if (PSA_SUCCESS != val_issue_command(SDP_AUTH_START_CMD, request, NULL, 0))
+        goto test_fail_exit;
+
+    response = val_await_response();
+    if (PSA_SUCCESS != val_parse_response(SDP_AUTH_START_CMD, response))
+        goto test_fail_exit;
+
+    challenge = (psa_auth_challenge_t *) response->data;
+
+    *challenge2 = (uint8_t)(challenge->challenge_vector);
+    response_packet_release(response);
+
+    for (i = 0; i < CHALLENGE_SIZE; i++) {
+        if (challenge1[i] != challenge2[i])
+            break;
+    }
+
+    if (i == CHALLENGE_SIZE) {
+	    val->print(PRINT_ERROR, "Challenge response obtained is not unique\n", 0);
+        goto test_fail_exit;
+    } else {
+	    val->print(PRINT_INFO, "Challenge response obtained is unique\n", 0);
+        goto test_end;
+    }
+
+test_fail_exit:
+	val_set_status(RESULT_FAIL(VAL_STATUS_TEST_FAILED));
+test_end:
+    val->test_exit();
+}
+
diff --git a/secure-debug/tests/adac/test_a001/test_a001.h b/secure-debug/tests/adac/test_a001/test_a001.h
new file mode 100644
index 0000000..5212fed
--- /dev/null
+++ b/secure-debug/tests/adac/test_a001/test_a001.h
@@ -0,0 +1,26 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_A001_TESTS_H_
+#define _TEST_A001_TESTS_H_
+
+#define test_entry CONCAT(test_entry_, a001)
+
+extern val_api_t *val;
+extern char *key_file;
+extern char *chain_file;
+
+#endif /* _TEST_A001_TESTS_H_ */
diff --git a/secure-debug/tests/adac/test_a002/test.cmake b/secure-debug/tests/adac/test_a002/test.cmake
new file mode 100644
index 0000000..c6318e9
--- /dev/null
+++ b/secure-debug/tests/adac/test_a002/test.cmake
@@ -0,0 +1,21 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+	test_a002.c
+)
+list(APPEND CC_OPTIONS )
diff --git a/secure-debug/tests/adac/test_a002/test_a002.c b/secure-debug/tests/adac/test_a002/test_a002.c
new file mode 100644
index 0000000..dabbc34
--- /dev/null
+++ b/secure-debug/tests/adac/test_a002/test_a002.c
@@ -0,0 +1,124 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include <psa_adac.h>
+#include <val_adac.h>
+#include "val_interfaces.h"
+
+#include "test_a002.h"
+
+#define TEST_NUM  VAL_CREATE_TEST_ID(VAL_SECURE_DEBUG_BASE, 2)
+#define TEST_DESC "Testing ADAC Protocol Host API| UT: psa_connect\n"
+TEST_PUBLISH(TEST_NUM, test_entry);
+
+void test_entry(val_api_t *val_api)
+{
+    int32_t   status = VAL_STATUS_SUCCESS;
+    val_api_t *val = NULL;
+
+    val = val_api;
+
+    /* test init */
+    val->test_init(TEST_NUM, TEST_DESC);
+    val_adac_host_init();
+
+    uint8_t *chain = NULL;
+    size_t chain_size = 0;
+
+    if (PSA_SUCCESS != val_load_certificate_chain(chain_file, &chain, &chain_size))
+        goto test_fail_exit;
+
+    psa_tlv_t *exts[MAX_EXTENSIONS];
+    size_t exts_count = 0;
+    uint8_t key_type;
+
+    if (PSA_SUCCESS != val_infer_cryptosystem((uint32_t *) chain, chain_size, exts,
+                                                           &exts_count, &key_type)) {
+        goto test_fail_exit;
+    }
+
+    request_packet_t *request;
+
+    if (PSA_SUCCESS != val_issue_command(SDP_DISCOVERY_CMD, request, NULL, 0))
+        goto test_fail_exit;
+
+    response_packet_t *response;
+
+    response = val_await_response();
+    if (PSA_SUCCESS != val_parse_response(SDP_DISCOVERY_CMD, response))
+        goto test_fail_exit;
+
+    if (!val_check_cryptosystem_support(response, key_type))
+        goto test_fail_exit;
+
+    response_packet_release(response);
+
+    psa_key_handle_t handle;
+    uint8_t *key = NULL;
+    size_t key_size = 0;
+
+    if (PSA_SUCCESS != val_get_private_key(key_file, &key_type, &handle, &key, &key_size))
+        goto test_fail_exit;
+
+    if (PSA_SUCCESS != val_issue_command(SDP_AUTH_START_CMD, request, NULL, 0))
+        goto test_fail_exit;
+
+    response = val_await_response();
+    if (PSA_SUCCESS != val_parse_response(SDP_AUTH_START_CMD, response))
+        goto test_fail_exit;
+
+    psa_auth_challenge_t *challenge = (psa_auth_challenge_t *) response->data;
+
+    uint8_t *token = NULL;
+    size_t token_size = 0;
+
+    if (PSA_SUCCESS != val_sign_token(challenge->challenge_vector,
+                                      sizeof(challenge->challenge_vector),
+                                      key_type, NULL, 0, &token, &token_size,
+                                      handle, key, key_size)) {
+        goto test_fail_exit;
+    }
+    response_packet_release(response);
+
+    if (PSA_SUCCESS != val_send_certificate(exts, exts_count))
+        goto test_fail_exit;
+
+	val->print(PRINT_INFO, "Sending token\n", 0);
+    if (PSA_SUCCESS != val_issue_command(SDP_AUTH_RESPONSE_CMD, request,
+                                        (uint8_t *)token, token_size)) {
+        goto test_fail_exit;
+    }
+
+	val->print(PRINT_INFO, "Receiving token_authentication response\n", 0);
+    response = val_await_response();
+    if (PSA_SUCCESS != val_parse_response(SDP_AUTH_RESPONSE_CMD, response))
+        goto test_fail_exit;
+
+    if (response->status == SDP_SUCCESS)
+	    val->print(PRINT_INFO, "Target unlocked successfully\n", 0);
+    else
+        goto test_fail_exit;
+
+    response_packet_release(response);
+    goto test_end;
+
+test_fail_exit:
+	val_set_status(RESULT_FAIL(VAL_STATUS_TEST_FAILED));
+test_end:
+    val->test_exit();
+}
+
diff --git a/secure-debug/tests/adac/test_a002/test_a002.h b/secure-debug/tests/adac/test_a002/test_a002.h
new file mode 100644
index 0000000..da5f094
--- /dev/null
+++ b/secure-debug/tests/adac/test_a002/test_a002.h
@@ -0,0 +1,26 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_A002_TESTS_H_
+#define _TEST_A002_TESTS_H_
+
+#define test_entry CONCAT(test_entry_, a002)
+
+extern val_api_t *val;
+extern char *key_file;
+extern char *chain_file;
+
+#endif /* _TEST_A002_TESTS_H_ */
diff --git a/secure-debug/tests/adac/testsuite.db b/secure-debug/tests/adac/testsuite.db
new file mode 100644
index 0000000..9695860
--- /dev/null
+++ b/secure-debug/tests/adac/testsuite.db
@@ -0,0 +1,26 @@
+#/** @file
+# * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+
+#List of tests to be compiled and run as part of initial_attestation suite
+
+(START)
+
+test_a001
+test_a002
+
+(END)
diff --git a/secure-debug/tools/cmake/common/CMakeSettings.cmake b/secure-debug/tools/cmake/common/CMakeSettings.cmake
new file mode 100644
index 0000000..e709dc0
--- /dev/null
+++ b/secure-debug/tools/cmake/common/CMakeSettings.cmake
@@ -0,0 +1,25 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+#Stop built in CMakeDetermine<lang>.cmake scripts to run.
+set (CMAKE_C_COMPILER_ID_RUN 1)
+#Stop cmake run compiler tests.
+set (CMAKE_C_COMPILER_FORCED true)
+
+set(CMAKE_STATIC_LIBRARY_PREFIX "")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+set(CMAKE_SHARED_LIBRARY_SUFFIX "")
diff --git a/secure-debug/tools/cmake/common/Utils.cmake b/secure-debug/tools/cmake/common/Utils.cmake
new file mode 100644
index 0000000..6013fef
--- /dev/null
+++ b/secure-debug/tools/cmake/common/Utils.cmake
@@ -0,0 +1,37 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+# Function to CMake arguments
+function(_check_arguments)
+        foreach(_ARG IN LISTS ARGV)
+                if(NOT DEFINED ${_ARG})
+                        message(FATAL_ERROR "[PSA] : ${_ARG} is not passed! Please specify -D${_ARG}=<...> to CMake.")
+                endif()
+        endforeach()
+endfunction(_check_arguments)
+
+# Function to get all the folders inside given parent directory
+function(_get_sub_dir_list result parent_dir)
+        file(GLOB parent_dir_items RELATIVE ${parent_dir} ${parent_dir}/*)
+        set(dir_list "")
+        foreach(item ${parent_dir_items})
+                if(IS_DIRECTORY ${parent_dir}/${item})
+                        list(APPEND dir_list ${item})
+                endif()
+        endforeach()
+        set(${result} ${dir_list} PARENT_SCOPE)
+endfunction(_get_sub_dir_list)
diff --git a/secure-debug/tools/cmake/compiler/ARMCLANG.cmake b/secure-debug/tools/cmake/compiler/ARMCLANG.cmake
new file mode 100644
index 0000000..c6a8b0d
--- /dev/null
+++ b/secure-debug/tools/cmake/compiler/ARMCLANG.cmake
@@ -0,0 +1,63 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMKE_SYSTEM_PROCESSOR ARM)
+
+set(_C_TOOLCHAIN_NAME armclang)
+
+if(WIN32)
+        if (NOT DEFINED ARMCLANG_PATH)
+                set(ARMCLANG_PATH "C:" CACHE PATH "Install directory for ARMCLANG Compiler")
+        endif()
+else(WIN32)
+        if (NOT DEFINED ARMCLANG_PATH)
+                set(ARMCLANG_PATH "/" CACHE PATH "Install directory for ARMCLANG Compiler")
+        endif()
+endif(WIN32)
+
+find_program(
+        _C_TOOLCHAIN_PATH
+        ${_C_TOOLCHAIN_NAME}
+        PATHS env PATH
+        HINTS ${ARMCLANG_PATH}
+        HINTS bin
+)
+
+if(_C_TOOLCHAIN_PATH STREQUAL "_C_TOOLCHAIN_PATH-NOTFOUND")
+        message(FATAL_ERROR "[PSA] : Couldn't find ${_C_TOOLCHAIN_NAME}."
+                            " Either put ${_C_TOOLCHAIN_NAME} on the PATH or set ARMCLANG_PATH set properly.")
+endif()
+
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+foreach(_LNG IN ITEMS "C" "ASM")
+        set(CMAKE_${_LNG}_COMPILER ${_C_TOOLCHAIN_PATH})
+        message(STATUS "[PSA] : ${_LNG}  compiler used '${CMAKE_${_LNG}_COMPILER}'")
+endforeach()
+
+if(${CPU_ARCH} STREQUAL armv7m)
+	set(TARGET_SWITCH "-march=armv7-m")
+elseif(${CPU_ARCH} STREQUAL armv8m_ml)
+	set(TARGET_SWITCH "-march=armv8-m.main -mcmse")
+elseif(${CPU_ARCH} STREQUAL armv8m_bl)
+	set(TARGET_SWITCH "-march=armv8-m.base -mcmse")
+endif()
+
+set(CMAKE_C_FLAGS              "--target=arm-arm-none-eabi ${TARGET_SWITCH} -g -Wall -Werror -Wextra -fshort-enums -fshort-wchar -funsigned-char -fdata-sections -ffunction-sections -mno-unaligned-access -mfpu=none")
+set(CMAKE_ASM_FLAGS            "${TARGET_SWITCH} -mthumb")
+set(CMAKE_EXE_LINKER_FLAGS     "--strict --map --symbols --xref  --info=summarysizes,sizes,totals,unused,veneers --diag_warning=L6204")
diff --git a/secure-debug/tools/cmake/compiler/GNUARM.cmake b/secure-debug/tools/cmake/compiler/GNUARM.cmake
new file mode 100644
index 0000000..3bd8347
--- /dev/null
+++ b/secure-debug/tools/cmake/compiler/GNUARM.cmake
@@ -0,0 +1,63 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMKE_SYSTEM_PROCESSOR ARM)
+
+set(_C_TOOLCHAIN_NAME arm-none-eabi-gcc)
+
+if(WIN32)
+	if (NOT DEFINED GNUARM_PATH)
+		set(GNUARM_PATH "C:" CACHE PATH "Install directory for GNUARM Compiler")
+	endif()
+else(WIN32)
+	if (NOT DEFINED GNUARM_PATH)
+		set(GNUARM_PATH "/" CACHE PATH "Install directory for GNUARM Compiler")
+	endif()
+endif(WIN32)
+
+find_program(
+	_C_TOOLCHAIN_PATH
+	${_C_TOOLCHAIN_NAME}
+	PATHS env PATH
+	HINTS ${GNUARM_PATH}
+	HINTS bin
+)
+
+if(_C_TOOLCHAIN_PATH STREQUAL "_C_TOOLCHAIN_PATH-NOTFOUND")
+        message(FATAL_ERROR "[PSA] : Couldn't find ${_C_TOOLCHAIN_NAME}."
+			    " Either put ${_C_TOOLCHAIN_NAME} on the PATH or set GNUARM_PATH set properly.")
+endif()
+
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+foreach(_LNG IN ITEMS "C" "ASM")
+	set(CMAKE_${_LNG}_COMPILER ${_C_TOOLCHAIN_PATH})
+	message(STATUS "[PSA] : ${_LNG}  compiler used '${CMAKE_${_LNG}_COMPILER}'")
+endforeach()
+
+if(${CPU_ARCH} STREQUAL armv7m)
+	set(TARGET_SWITCH "-march=armv7-m")
+elseif(${CPU_ARCH} STREQUAL armv8m_ml)
+	set(TARGET_SWITCH "-march=armv8-m.main -mcmse")
+elseif(${CPU_ARCH} STREQUAL armv8m_bl)
+	set(TARGET_SWITCH "-march=armv8-m.base -mcmse")
+endif()
+
+set(CMAKE_C_FLAGS          "${TARGET_SWITCH} -g -Wall -Werror -Wextra -fdata-sections -ffunction-sections -mno-unaligned-access")
+set(CMAKE_ASM_FLAGS        "${TARGET_SWITCH} -mthumb")
+set(CMAKE_EXE_LINKER_FLAGS "-Xlinker --fatal-warnings -Xlinker --gc-sections -z max-page-size=0x400 -lgcc -lc -lnosys")
diff --git a/secure-debug/tools/cmake/compiler/HOST_GCC.cmake b/secure-debug/tools/cmake/compiler/HOST_GCC.cmake
new file mode 100644
index 0000000..5b43cb0
--- /dev/null
+++ b/secure-debug/tools/cmake/compiler/HOST_GCC.cmake
@@ -0,0 +1,52 @@
+#/** @file
+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMKE_SYSTEM_PROCESSOR x86_64)
+
+set(_C_TOOLCHAIN_NAME gcc)
+
+if(WIN32)
+	if (NOT DEFINED HOST_GCC_PATH)
+		set(HOST_GCC_PATH "C:" CACHE PATH "Install directory for Host GCC Compiler")
+	endif()
+else(WIN32)
+	if (NOT DEFINED HOST_GCC_PATH)
+		set(HOST_GCC_PATH "/" CACHE PATH "Install directory for Host GCC Compiler")
+	endif()
+endif(WIN32)
+
+find_program(
+	_C_TOOLCHAIN_PATH
+	${_C_TOOLCHAIN_NAME}
+	PATHS env PATH
+	HINTS ${HOST_GCC_PATH}
+	HINTS bin
+)
+
+if(_C_TOOLCHAIN_PATH STREQUAL "_C_TOOLCHAIN_PATH-NOTFOUND")
+        message(FATAL_ERROR "[PSA] : Couldn't find ${_C_TOOLCHAIN_NAME}."
+			    " Either put ${_C_TOOLCHAIN_NAME} on the PATH or set GNUARM_PATH set properly.")
+endif()
+
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+foreach(_LNG IN ITEMS "C" "ASM")
+	set(CMAKE_${_LNG}_COMPILER ${_C_TOOLCHAIN_PATH})
+	set(CMAKE_C_FLAGS	"-g -Wall -Werror -Werror -std=c99")
+	message(STATUS "[PSA] : ${_LNG}  compiler used '${CMAKE_${_LNG}_COMPILER}'")
+endforeach()
diff --git a/secure-debug/tools/scripts/gen_tests_list.py b/secure-debug/tools/scripts/gen_tests_list.py
new file mode 100644
index 0000000..2bd0ab3
--- /dev/null
+++ b/secure-debug/tools/scripts/gen_tests_list.py
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+#/** @file
+# * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+import sys
+
+if (len(sys.argv) != 8):
+        print("\nScript requires following inputs")
+        print("\narg1  : <INPUT  SUITE identifier>")
+        print("\narg2  : <INPUT  testsuite.db file>")
+        print("\narg3  : <OUTPUT testlist file>")
+        print("\narg4  : <OUTPUT test_entry_list>")
+        print("\narg5  : <OUTPUT test_entry_fn_declare_list>")
+        print("\narg6  : <OUTPUT Suite test start number")
+        print("\narg7  : <OUTPUT Suite test end number")
+        sys.exit(1)
+
+suite                      = sys.argv[1]
+testsuite_db_file          = sys.argv[2]
+testlist_file              = sys.argv[3]
+test_entry_list            = sys.argv[4]
+test_entry_fn_declare_list = sys.argv[5]
+if sys.argv[6] != "None":
+	suite_test_start_number    = int(sys.argv[6])
+else:
+	suite_test_start_number    = 0
+if sys.argv[7] != "None":
+	suite_test_end_number      = int(sys.argv[7])
+else:
+	suite_test_end_number      = sys.maxsize
+
+# Dictionary to hold the mapping between suite and the base number
+suite_with_base_dict = {"adac":4}
+
+def gen_test_list():
+	"""
+	Read the input testsuite.db file and generates the output file with list of tests
+	"""
+	with open(testlist_file, mode='w') as o_f:
+		with open(testsuite_db_file, mode='r') as i_f:
+			for line in i_f:
+				if (('test_' == line[0:5]) and
+				    (int(line[6:9]) >= suite_test_start_number) and
+				    (int(line[6:9]) <= suite_test_end_number)):
+						o_f.write(line)
+
+def gen_test_entry_info():
+	"""
+	Generate inc files
+	"""
+	test_num           = 0
+	uniq_test_string   = ''
+	max_test_per_suite = 200
+	suite_base         = 0
+
+	if (suite not in suite_with_base_dict.keys()):
+		print("\nProvide a valid SUITE identifier")
+		sys.exit()
+
+	with open(test_entry_list, mode='w') as o_f1, \
+             open(test_entry_fn_declare_list, mode='w') as o_f2,\
+             open(testlist_file, mode='r') as i_f:
+		for line in i_f:
+			line = line.strip()
+			test_num = int(line[6:9]) + (max_test_per_suite * suite_with_base_dict[suite])
+			uniq_test_string = line[5:9]
+			o_f1.write("\t{%d, &test_entry_%s},\n" %(test_num, uniq_test_string))
+			o_f2.write("void test_entry_%s(val_api_t *val_api);\n" %(uniq_test_string))
+	print("Test entry symbol list:\n\t%s,\n\t%s" %(test_entry_list, test_entry_fn_declare_list))
+
+# Call routines
+gen_test_list()
+gen_test_entry_info()
diff --git a/secure-debug/val/include/pal_interfaces.h b/secure-debug/val/include/pal_interfaces.h
new file mode 100644
index 0000000..9f7390f
--- /dev/null
+++ b/secure-debug/val/include/pal_interfaces.h
@@ -0,0 +1,93 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _PAL_INTERFACES_H_
+#define _PAL_INTERFACES_H_
+
+#include <stdarg.h>
+#include <psa_adac.h>
+
+/**
+ *   @brief    - This function parses the input string and writes bytes into logger TX FIFO
+ *   @param    - str      : Input String
+ *             - data     : Value for format specifier
+ *   @return   - SUCCESS/FAILURE
+**/
+
+int pal_print(const char *str, int32_t data);
+
+/**
+ *   @brief    - Terminates the simulation at the end of all tests completion.
+ *               By default, it put cpus into power down mode.
+ *   @param    - void
+ *   @return   - void
+**/
+void pal_terminate_simulation(void);
+
+/**
+ *   @brief    - Resets the system.
+ *   @param    - void
+ *   @return   - SUCCESS/FAILURE
+**/
+int pal_system_reset(void);
+
+request_packet_t *request_packet_lock(size_t *max_data_size);
+
+/**
+ *   @brief    - Reserve the communication buffer memory for receive packet.
+ *   @param    - max_data_size      Valid size of command frame
+ *   @return   - Pointer to the command frame to be read
+**/
+response_packet_t *response_packet_lock(size_t *max_data_size);
+
+/**
+ *   @brief    - Release the lock held by transmit packet.
+ *   @param    - packet      Most recent command frame sent
+ *   @return   - SUCCESS/FAILURE
+**/
+int request_packet_release(request_packet_t *packet);
+
+/**
+ *   @brief    - Release the lock held by receive packet.
+ *   @param    - packet      Most recent response packet received
+ *   @return   - SUCCESS/FAILURE
+**/
+int response_packet_release(response_packet_t *packet);
+
+/**
+ *   @brief    - Construct the Request packet for the specified ADAC command.
+ *   @param    - command      ADAC command
+ *               data         Pointer to payload
+ *               data_size    Size of the command payload
+ *   @return   - Pointer to the command frame to be written
+**/
+request_packet_t *request_packet_build(uint16_t command, uint8_t *data, size_t data_size);
+
+/**
+ *   @brief    - Write the Request packet into the communication buffer for transmit.
+ *   @param    - packet       Request packet built for dispatch
+ *   @return   - SUCCESS/FAILURE
+**/
+int request_packet_send(request_packet_t *packet);
+
+/**
+ *   @brief    - Read the Response packet from the communication buffer.
+ *   @param    - None
+ *   @return   - Response packet received from target.
+**/
+response_packet_t *response_packet_receive();
+
+#endif
diff --git a/secure-debug/val/include/val.h b/secure-debug/val/include/val.h
new file mode 100644
index 0000000..8ac9a98
--- /dev/null
+++ b/secure-debug/val/include/val.h
@@ -0,0 +1,332 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_COMMON_H_
+#define _VAL_COMMON_H_
+
+#include <string.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <stdarg.h>
+
+typedef uint8_t             bool_t;
+typedef uintptr_t           addr_t;
+typedef uint32_t            test_id_t;
+typedef uint32_t            block_id_t;
+typedef char                char8_t;
+typedef uint32_t            cfg_id_t;
+
+/* Print verbosity = TEST */
+#ifndef VERBOSE
+#define VERBOSE 9
+#endif
+
+#ifndef VAL_NSPE_BUILD
+#define STATIC_DECLARE  static
+#else
+#define STATIC_DECLARE
+#endif
+
+#ifndef __WEAK
+#define __WEAK __attribute__((weak))
+#endif
+
+#ifndef __UNUSED
+#define __UNUSED __attribute__((unused))
+#endif
+
+#ifndef TRUE
+#define TRUE 0
+#endif
+#ifndef FALSE
+#define FALSE 1
+#endif
+
+#define _CONCAT(A, B) A##B
+#define CONCAT(A, B) _CONCAT(A, B)
+
+/* test status defines */
+#define TEST_START                 0x01
+#define TEST_END                   0x02
+#define TEST_PASS                  0x04
+#define TEST_FAIL                  0x08
+#define TEST_SKIP                  0x10
+#define TEST_PENDING               0x20
+
+#define TEST_NUM_BIT                 32
+#define TEST_STATE_BIT                8
+#define TEST_STATUS_BIT               0
+
+#define TEST_NUM_MASK        0xFFFFFFFF
+#define TEST_STATE_MASK            0xFF
+#define TEST_STATUS_MASK           0xFF
+
+#define RESULT_START(status)    (((TEST_START) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+#define RESULT_END(status)      (((TEST_END) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+#define RESULT_PASS(status)     (((TEST_PASS) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+#define RESULT_FAIL(status)     (((TEST_FAIL) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+#define RESULT_SKIP(status)     (((TEST_SKIP) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+#define RESULT_PENDING(status)  (((TEST_PENDING) << TEST_STATE_BIT) | ((status) << TEST_STATUS_BIT))
+
+#define IS_TEST_FAIL(status)    (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_FAIL)
+#define IS_TEST_PASS(status)    (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_PASS)
+#define IS_TEST_SKIP(status)    (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_SKIP)
+#define IS_TEST_PENDING(status) (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_PENDING)
+#define IS_TEST_START(status)   (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_START)
+#define IS_TEST_END(status)     (((status >> TEST_STATE_BIT) & TEST_STATE_MASK) == TEST_END)
+#define VAL_ERROR(status)       ((status & TEST_STATUS_MASK) ? 1 : 0)
+
+
+
+/* Test Defines */
+#define TEST_PUBLISH(test_id, entry) \
+   const val_test_info_t __attribute__((section(".acs_test_info"))) \
+                      CONCAT(acs_test_info, entry) = {test_id, entry}
+
+#define VAL_MAX_TEST_PER_COMP                200
+#define VAL_SECURE_DEBUG_BASE                  4
+
+
+#define VAL_GET_COMP_NUM(test_id)      \
+   ((test_id - (test_id % VAL_MAX_TEST_PER_COMP)) / VAL_MAX_TEST_PER_COMP)
+#define VAL_GET_TEST_NUM(test_id)      (test_id % VAL_MAX_TEST_PER_COMP)
+#define VAL_CREATE_TEST_ID(comp, num)   ((comp*VAL_MAX_TEST_PER_COMP) + num)
+
+#define TEST_FIELD(num1, num2)           (num2 << 8 | num1)
+#define GET_TEST_ISOLATION_LEVEL(num)   (num & 0x3)
+#define GET_WD_TIMOUT_TYPE(num)         ((num >> 8) & 0x7)
+
+#define TEST_CHECKPOINT_NUM(n)          n
+#define TEST(n)                         n
+#define BLOCK(n)                        n
+
+#define BLOCK_NUM_POS                   8
+#define ACTION_POS                      16
+#define GET_TEST_NUM(n)                 (0xff & n)
+#define GET_BLOCK_NUM(n)                ((n >> BLOCK_NUM_POS) & 0xff)
+
+#define GET_ACTION_NUM(n)               ((n >> ACTION_POS) & 0xff)
+#define TEST_EXECUTE_FUNC               1
+#define TEST_RETURN_RESULT              2
+#define INVALID_HANDLE                  0x1234DEAD
+
+#define VAL_NVMEM_BLOCK_SIZE           4
+#define VAL_NVMEM_OFFSET(nvmem_idx)    (nvmem_idx * VAL_NVMEM_BLOCK_SIZE)
+
+#define UART_INIT_SIGN  0xff
+#define UART_PRINT_SIGN 0xfe
+
+#define TEST_PANIC()                          \
+    do {                                         \
+    } while (1)
+
+#define TEST_ASSERT_EQUAL(arg1, arg2, checkpoint)                                   \
+    do {                                                                            \
+        if ((arg1) != arg2)                                                         \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d\n", checkpoint);    \
+            val->print(PRINT_ERROR, "\tActual: %d\n", arg1);                        \
+            val->print(PRINT_ERROR, "\tExpected: %d\n", arg2);                      \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
+#define TEST_ASSERT_DUAL(arg1, status1, status2, checkpoint)                        \
+    do {                                                                            \
+        if ((arg1) != status1 && (arg1) != status2)                                 \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d\n", checkpoint);    \
+            val->print(PRINT_ERROR, "\tActual: %d\n", arg1);                        \
+            val->print(PRINT_ERROR, "\tExpected: %d", status1);                     \
+            val->print(PRINT_ERROR, "or %d\n", status2);                            \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
+#define TEST_ASSERT_NOT_EQUAL(arg1, arg2, checkpoint)                               \
+    do {                                                                            \
+        if ((arg1) == arg2)                                                         \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d\n", checkpoint);    \
+            val->print(PRINT_ERROR, "\tValue: %d\n", arg1);                         \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
+#define TEST_ASSERT_MEMCMP(buf1, buf2, size, checkpoint)                            \
+    do {                                                                            \
+        if (memcmp(buf1, buf2, size))                                               \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d : ", checkpoint);   \
+            val->print(PRINT_ERROR, "Unequal data in compared buffers\n", 0);       \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
+#define TEST_ASSERT_RANGE(arg1, range1, range2, checkpoint)                         \
+    do {                                                                            \
+        if ((arg1) < range1 || (arg1) > range2)                                     \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d\n", checkpoint);    \
+            val->print(PRINT_ERROR, "\tActual: %d\n", arg1);                        \
+            val->print(PRINT_ERROR, "\tExpected range: %d to ", range1);            \
+            val->print(PRINT_ERROR, "%d", range2);                                  \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
+/* enums */
+typedef enum {
+    CALLER_NONSECURE = 0x0,
+    CALLER_SECURE    = 0x1,
+} caller_security_t;
+
+typedef enum {
+    TEST_ISOLATION_L1      = 0x1,
+    TEST_ISOLATION_L2      = 0x2,
+    TEST_ISOLATION_L3      = 0x3,
+} test_isolation_level_t;
+
+typedef enum {
+    LEVEL1 = 0x1,
+    LEVEL2,
+    LEVEL3,
+} isolation_level_t;
+
+typedef enum {
+    /* VAL uses this boot flag to mark first time boot of the system  */
+    BOOT_UNKNOWN                       = 0x1,
+    /* VAL/Test uses this boot flag to catch any unwanted system reboot - SIM ERROR Cases*/
+    BOOT_NOT_EXPECTED                  = 0x2,
+    /* Test performs panic check for non-secure test run and expect reboot */
+    BOOT_EXPECTED_NS                   = 0x3,
+    /* Test performs panic check for secure test run and expect reboot */
+    BOOT_EXPECTED_S                    = 0x4,
+    /* Test expects reboot but it didn't happen */
+    BOOT_EXPECTED_BUT_FAILED           = 0x5,
+    /* Test expects reboot for secure/non-secure test run. If reboot happens,
+     * re-enter the same test and execute the next check function
+     */
+    BOOT_EXPECTED_REENTER_TEST         = 0x6,
+    /* Test expect reboot for the test run. If reboot happens,
+     * re-enter the same test and continue executing the same check function
+     */
+    BOOT_EXPECTED_CONT_TEST_EXEC       = 0x7,
+} boot_state_t;
+
+typedef enum {
+    NV_BOOT             = 0x0,
+    NV_TEST_ID_PREVIOUS = 0x1,
+    NV_TEST_ID_CURRENT  = 0x2,
+    NV_TEST_CNT         = 0x3,
+    NV_TEST_DATA1       = 0x4,
+    NV_TEST_DATA2       = 0x5,
+    NV_TEST_DATA3       = 0x6,
+} nvmem_index_t;
+
+/* enums to report test sub-state */
+typedef enum {
+  VAL_STATUS_SUCCESS                     = 0x0,
+  VAL_STATUS_INVALID                     = 0x10,
+  VAL_STATUS_ERROR                       = 0x11,
+  VAL_STATUS_NOT_FOUND                   = 0x12,
+  VAL_STATUS_LOAD_ERROR                  = 0x13,
+  VAL_STATUS_INSUFFICIENT_SIZE           = 0x14,
+  VAL_STATUS_CONNECTION_FAILED           = 0x15,
+  VAL_STATUS_CALL_FAILED                 = 0x16,
+  VAL_STATUS_READ_FAILED                 = 0x17,
+  VAL_STATUS_WRITE_FAILED                = 0x18,
+  VAL_STATUS_ISOLATION_LEVEL_NOT_SUPP    = 0x19,
+  VAL_STATUS_INIT_FAILED                 = 0x1A,
+  VAL_STATUS_SPM_FAILED                  = 0x1B,
+  VAL_STATUS_SPM_UNEXPECTED_BEH          = 0x1C,
+  VAL_STATUS_FRAMEWORK_VERSION_FAILED    = 0x1D,
+  VAL_STATUS_VERSION_API_FAILED          = 0x1E,
+  VAL_STATUS_INVALID_HANDLE              = 0x1F,
+  VAL_STATUS_INVALID_MSG_TYPE            = 0x20,
+  VAL_STATUS_WRONG_IDENTITY              = 0x21,
+  VAL_STATUS_MSG_INSIZE_FAILED           = 0x22,
+  VAL_STATUS_MSG_OUTSIZE_FAILED          = 0x23,
+  VAL_STATUS_SKIP_FAILED                 = 0x24,
+  VAL_STATUS_CRYPTO_FAILURE              = 0x25,
+  VAL_STATUS_INVALID_SIZE                = 0x26,
+  VAL_STATUS_DATA_MISMATCH               = 0x27,
+  VAL_STATUS_BOOT_EXPECTED_BUT_FAILED    = 0x28,
+  VAL_STATUS_INIT_ALREADY_DONE           = 0x29,
+  VAL_STATUS_HEAP_NOT_AVAILABLE          = 0x2A,
+  VAL_STATUS_UNSUPPORTED                 = 0x2B,
+  VAL_STATUS_DRIVER_FN_FAILED            = 0x2C,
+  VAL_STATUS_NO_TESTS                    = 0X2D,
+  VAL_STATUS_TEST_FAILED                 = 0x2E,
+  VAL_STATUS_ERROR_MAX                   = INT_MAX,
+} val_status_t;
+
+/* verbosity enums */
+typedef enum {
+    PRINT_INFO    = 1,
+    PRINT_DEBUG   = 2,
+    PRINT_TEST    = 3,
+    PRINT_WARN    = 4,
+    PRINT_ERROR   = 5,
+    PRINT_ALWAYS  = 9
+} print_verbosity_t;
+
+/* Driver test function id enums */
+typedef enum {
+    TEST_PSA_EOI_WITH_NON_INTR_SIGNAL    = 1,
+    TEST_PSA_EOI_WITH_MULTIPLE_SIGNALS   = 2,
+    TEST_PSA_EOI_WITH_UNASSERTED_SIGNAL  = 3,
+    TEST_INTR_SERVICE                    = 4,
+    TEST_ISOLATION_PSA_ROT_DATA_RD       = 5,
+    TEST_ISOLATION_PSA_ROT_DATA_WR       = 6,
+    TEST_ISOLATION_PSA_ROT_STACK_RD      = 7,
+    TEST_ISOLATION_PSA_ROT_STACK_WR      = 8,
+    TEST_ISOLATION_PSA_ROT_HEAP_RD       = 9,
+    TEST_ISOLATION_PSA_ROT_HEAP_WR       = 10,
+    TEST_ISOLATION_PSA_ROT_MMIO_RD       = 11,
+    TEST_ISOLATION_PSA_ROT_MMIO_WR       = 12,
+} driver_test_fn_id_t;
+
+/* typedef's */
+typedef struct {
+    boot_state_t state;
+} boot_t;
+
+typedef struct {
+    uint32_t pass_cnt:8;
+    uint32_t skip_cnt:8;
+    uint32_t fail_cnt:8;
+    uint32_t sim_error_cnt:8;
+} test_count_t;
+
+typedef struct {
+    uint16_t test_num;
+    uint8_t block_num;
+} test_info_t;
+
+
+/* struture to capture test state */
+typedef struct {
+    uint16_t reserved;
+    uint8_t  state;
+    uint8_t  status;
+} test_status_buffer_t;
+
+typedef int32_t (*client_test_t)(caller_security_t caller);
+typedef int32_t (*server_test_t)(void);
+#endif /* VAL_COMMON_H */
diff --git a/secure-debug/val/include/val_adac.h b/secure-debug/val/include/val_adac.h
new file mode 100644
index 0000000..6086df9
--- /dev/null
+++ b/secure-debug/val/include/val_adac.h
@@ -0,0 +1,51 @@
+/** @file
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_ADAC_H_
+#define _VAL_ADAC_H_
+#include <psa_adac.h>
+
+/** \brief Token header
+ *
+ */
+typedef struct {
+    uint16_t type;
+    uint8_t *data;
+    size_t size;
+} adac_command_frame_t;
+
+void val_adac_host_init(void);
+psa_status_t val_load_certificate_chain(const char *chain_file, uint8_t **chain,
+                                        size_t *chain_size);
+psa_status_t val_infer_cryptosystem(uint32_t *chain, size_t chain_size, psa_tlv_t **extns_list,
+                                size_t *extns_count, uint8_t *key_system);
+psa_status_t val_get_private_key(const char *key_file, uint8_t *type, psa_key_handle_t *handle,
+                                 uint8_t **key_ptr, size_t *size);
+request_packet_t *val_construct_command(uint16_t command, uint8_t *data, size_t data_size);
+psa_status_t val_issue_command(uint32_t command, request_packet_t *packet,
+                               uint8_t *data, size_t data_size);
+response_packet_t *val_await_response(void);
+psa_status_t val_parse_response(uint32_t command, response_packet_t *packet);
+
+psa_status_t val_sign_token(uint8_t challenge[], size_t challenge_size, uint8_t signature_type,
+                            uint8_t exts[], size_t exts_size, uint8_t *fragment[],
+                            size_t *fragment_size, psa_key_handle_t handle,
+                            uint8_t *key, size_t key_size);
+psa_status_t val_send_certificate(psa_tlv_t **extns_list, size_t extns_count);
+int val_check_cryptosystem_support(response_packet_t *packet, uint8_t key_system);
+
+#endif /* _VAL_ADAC_H_ */
diff --git a/secure-debug/val/include/val_dispatcher.h b/secure-debug/val/include/val_dispatcher.h
new file mode 100644
index 0000000..1419387
--- /dev/null
+++ b/secure-debug/val/include/val_dispatcher.h
@@ -0,0 +1,70 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_DISPATCHER_H_
+#define _VAL_DISPATCHER_H_
+
+#include "val.h"
+
+#define ELF_IDENT                      16
+#define VAL_INVALID_TEST_ID            0xffffffff
+#define VAL_TEST_START_MARKER          0xfaceface
+#define VAL_TEST_END_MARKER            0xc3c3c3c3
+
+/* typedef's */
+typedef uint32_t  elf32_word;
+typedef int32_t   elf32_sword;
+typedef uint16_t  elf32_half;
+typedef uint32_t  elf32_off;
+typedef uint32_t  elf32_addr;
+
+typedef struct {
+    unsigned char e_ident[ELF_IDENT]; /* ident bytes */
+    elf32_half    e_type;            /* file type */
+    elf32_half    e_machine;         /* target machine */
+    elf32_word    e_version;         /* file version */
+    elf32_addr    e_entry;           /* start address */
+    elf32_off     e_phoff;           /* phdr file offset */
+    elf32_off     e_shoff;           /* shdr file offset */
+    elf32_word    e_flags;           /* file flags */
+    elf32_half    e_ehsize;          /* sizeof ehdr */
+    elf32_half    e_phentsize;       /* sizeof phdr */
+    elf32_half    e_phnum;           /* number phdrs */
+    elf32_half    e_shentsize;       /* sizeof shdr */
+    elf32_half    e_shnum;           /* number shdrs */
+    elf32_half    e_shstrndx;        /* shdr string index */
+} elf_header_t;
+
+typedef struct {
+    elf32_word p_type;          /* Segment type */
+    elf32_off  p_offset;        /* Segment file offset */
+    elf32_addr p_vaddr;         /* Segment virtual address */
+    elf32_addr p_paddr;         /* Segment physical address */
+    elf32_word p_filesz;        /* Segment size in file */
+    elf32_word p_memsz;         /* Segment size in memory */
+    elf32_word p_flags;         /* Segment flags */
+    elf32_word p_align;         /* Segment alignment */
+} elf_pheader_t;
+
+typedef struct {
+    uint32_t  start_marker;
+    test_id_t test_id;
+    uint32_t  elf_size;
+} test_header_t;
+
+int32_t val_dispatcher(test_id_t test_id_prev);
+#endif
diff --git a/secure-debug/val/include/val_entry.h b/secure-debug/val/include/val_entry.h
new file mode 100644
index 0000000..f4d173f
--- /dev/null
+++ b/secure-debug/val/include/val_entry.h
@@ -0,0 +1,32 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_ENTRY_H_
+#define _VAL_ENTRY_H_
+
+#include "val_framework.h"
+
+#define PSA_ACS_MAJOR_VER    1
+#define PSA_ACS_MINOR_VER    2
+
+/**
+    @brief    - PSA Test Suite C main function, does VAL init and calls test dispatcher
+    @param    - None
+    @return   - int32_t
+**/
+extern int32_t val_entry(void);
+#endif
diff --git a/secure-debug/val/include/val_framework.h b/secure-debug/val/include/val_framework.h
new file mode 100644
index 0000000..5d53cbb
--- /dev/null
+++ b/secure-debug/val/include/val_framework.h
@@ -0,0 +1,33 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+
+#ifndef _VAL_INFRA_H_
+#define _VAL_INFRA_H_
+
+#include "val.h"
+#include "val_interfaces.h"
+
+/* prototypes */
+uint32_t     val_report_status(void);
+val_status_t val_set_status(uint32_t status);
+uint32_t     val_get_status(void);
+val_status_t val_err_check_set(uint32_t checkpoint, val_status_t status);
+void         val_test_init(uint32_t test_num, char8_t *desc);
+void         val_test_exit(void);
+
+#endif
diff --git a/secure-debug/val/include/val_interfaces.h b/secure-debug/val/include/val_interfaces.h
new file mode 100644
index 0000000..eca9a63
--- /dev/null
+++ b/secure-debug/val/include/val_interfaces.h
@@ -0,0 +1,79 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_INTERFACES_H_
+#define _VAL_INTERFACES_H_
+
+#include "val.h"
+#include "pal_interfaces.h"
+
+/* typedef's */
+typedef struct {
+    val_status_t     (*print)                     (print_verbosity_t verbosity,
+                                                   const char *string, int32_t data);
+    val_status_t     (*set_status)                (uint32_t status);
+    uint32_t         (*get_status)                (void);
+    void             (*test_init)                 (uint32_t test_num,  char8_t *desc);
+    void             (*test_exit)                 (void);
+    val_status_t     (*err_check_set)             (uint32_t checkpoint, val_status_t status);
+} val_api_t;
+
+typedef void (*test_fptr_t)(val_api_t *val);
+
+typedef struct {
+    test_id_t     test_id;
+    test_fptr_t   entry_addr;
+} val_test_info_t;
+
+typedef enum {
+    VAL_TEST_IDX0    = 0x0,
+    VAL_TEST_IDX1    = 0x1,
+    VAL_TEST_IDX2    = 0x2,
+    VAL_TEST_IDX3    = 0x3,
+    VAL_TEST_IDX4    = 0x4,
+    VAL_TEST_IDX5    = 0x5,
+    VAL_TEST_IDX6    = 0x6,
+    VAL_TEST_IDX7    = 0x7,
+    VAL_TEST_IDX8    = 0x8,
+    VAL_TEST_IDX9    = 0x9,
+    VAL_TEST_IDX10   = 0xA,
+    VAL_TEST_IDX11   = 0xB,
+    VAL_TEST_IDX12   = 0xC,
+    VAL_TEST_IDX13   = 0xD,
+    VAL_TEST_IDX14   = 0xE,
+    VAL_TEST_IDX15   = 0xF,
+    VAL_TEST_IDX16   = 0x10,
+    VAL_TEST_IDX17   = 0x11,
+    VAL_TEST_IDX18   = 0x12,
+    VAL_TEST_IDX19   = 0x13,
+    VAL_TEST_IDX20   = 0x14,
+    VAL_TEST_IDX21   = 0x15,
+    VAL_TEST_IDX22   = 0x16,
+    VAL_TEST_IDX23   = 0x17,
+    VAL_TEST_IDX24   = 0x18,
+    VAL_TEST_IDX25   = 0x19,
+    VAL_TEST_IDX26   = 0x1A,
+    VAL_TEST_IDX27   = 0x1B,
+    VAL_TEST_IDX28   = 0x1C,
+    VAL_TEST_IDX29   = 0x1D,
+    VAL_TEST_IDX30   = 0x1E,
+} val_test_index_t;
+
+#include "test_entry_fn_declare_list.inc"
+
+void test_entry(val_api_t *val);
+#endif
diff --git a/secure-debug/val/include/val_peripherals.h b/secure-debug/val/include/val_peripherals.h
new file mode 100644
index 0000000..d5fa4e9
--- /dev/null
+++ b/secure-debug/val/include/val_peripherals.h
@@ -0,0 +1,26 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifndef _VAL_PERIPHERALS_H_
+#define _VAL_PERIPHERALS_H_
+
+#include "val.h"
+
+val_status_t val_logger_init(void);
+val_status_t val_print(print_verbosity_t verbosity, const char *string, int32_t data);
+
+#endif
diff --git a/secure-debug/val/src/val_adac.c b/secure-debug/val/src/val_adac.c
new file mode 100644
index 0000000..53f02d1
--- /dev/null
+++ b/secure-debug/val/src/val_adac.c
@@ -0,0 +1,332 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include <val_adac.h>
+#include <psa_adac_cryptosystems.h>
+#include <psa_adac_sdm.h>
+#include <psa_adac_debug.h>
+#include <pal_interfaces.h>
+
+void val_adac_host_init(void)
+{
+    psa_adac_platform_init();
+    psa_crypto_init();
+}
+
+psa_status_t val_load_certificate_chain(const char *chain_file, uint8_t **chain, size_t *chain_size)
+{
+    int ret_val;
+    psa_status_t r = PSA_SUCCESS;
+
+    if (chain_file == NULL) {
+        printf("Error:Path not found\n");
+        r = PSA_ERROR_INVALID_ARGUMENT;
+        return r;
+    }
+    ret_val = load_trust_chain(chain_file, chain, chain_size);
+    if (ret_val != 0) {
+        printf("Error loading trust chain (%s)\n", chain_file);
+        r = PSA_ERROR_GENERIC_ERROR;
+    }
+    return r;
+}
+
+psa_status_t val_infer_cryptosystem(uint32_t *chain, size_t chain_size, psa_tlv_t **extns_list,
+                              size_t *extns_count, uint8_t *key_system)
+{
+    int ret_val;
+    psa_status_t r = PSA_SUCCESS;
+    uint8_t key_type;
+    size_t count, i;
+    psa_tlv_t *current_extn;
+
+    ret_val = split_tlv_static(chain, chain_size, extns_list, MAX_EXTENSIONS, extns_count);
+    if (ret_val != 0) {
+        PSA_ADAC_LOG_ERR("host", "Error parsing trust chain\n");
+        r = PSA_ERROR_GENERIC_ERROR;
+        return r;
+    }
+    count = *extns_count;
+    if (count > MAX_EXTENSIONS) {
+        printf("Error:Extension count exceeded maximum allowed\n");
+        r = PSA_ERROR_NOT_PERMITTED;
+        return r;
+    }
+
+    PSA_ADAC_LOG_INFO("host", "Found %zu certificates\n", count);
+    for (i = 0; i < count; i++) {
+        current_extn = extns_list[i];
+        if ((current_extn)->type_id == 0x0201)
+            key_type = ((certificate_header_t *) current_extn->value)->key_type;
+    }
+    *key_system = key_type;
+    PSA_ADAC_LOG_INFO("host", "Cryptosystem detected: %d\n", key_type);
+    return r;
+}
+
+psa_status_t val_get_private_key(const char *key_file, uint8_t *type, psa_key_handle_t *handle,
+                                 uint8_t **key_ptr, size_t *size)
+{
+    int ret_val;
+    psa_status_t r = PSA_SUCCESS;
+    uint8_t key_type = *type;
+
+    if (key_file == NULL) {
+        printf("Error:Path not found\n");
+        r = PSA_ERROR_INVALID_ARGUMENT;
+        return r;
+    }
+
+    switch (key_type) {
+    case ECDSA_P256_SHA256:
+    case ECDSA_P521_SHA512:
+    case RSA_3072_SHA256:
+    case RSA_4096_SHA256:
+    case ED_25519_SHA512:
+    case ED_448_SHAKE256:
+    case SM_SM2_SM3:
+        ret_val = import_private_key(key_file, type, handle);
+        if (ret_val != 0) {
+            printf("Error importing private key (%s)\n", key_file);
+            r = PSA_ERROR_GENERIC_ERROR;
+        } else {
+            key_ptr = NULL;
+            size = 0;
+        }
+        break;
+
+    case CMAC_AES:
+    case HMAC_SHA256:
+        ret_val = load_secret_key(key_file, key_type, key_ptr, size);
+        if (ret_val != 0) {
+            printf("Error importing secret key (%s)\n", key_file);
+            r = PSA_ERROR_GENERIC_ERROR;
+        } else {
+            handle = NULL;
+        }
+        break;
+
+    default:
+        printf("Error: unsupported key type (0x%x)\n", key_type);
+        r = PSA_ERROR_NOT_SUPPORTED;
+    }
+    return r;
+}
+
+request_packet_t *val_construct_command(uint16_t cmd_type, uint8_t *data, size_t data_size)
+{
+    request_packet_t *packet = NULL;
+
+    switch (cmd_type) {
+    case SDP_RESUME_BOOT_CMD:
+    case SDP_LOCK_DEBUG_CMD:
+    case SDP_DISCOVERY_CMD:
+    case SDP_AUTH_START_CMD:
+        packet = request_packet_build(cmd_type, NULL, 0);
+        break;
+    case SDP_AUTH_RESPONSE_CMD:
+        if (data == NULL || data_size == 0) {
+            printf("Error: No payload specified\n");
+            break;
+        }
+        packet = request_packet_build((uint16_t)cmd_type, data, data_size);
+        break;
+    default:
+        //TO DO: Callback for vendor specific command construction
+        printf("Error: Unrecognized command. ID=(0x%x)\n", cmd_type);
+    }
+    return packet;
+}
+
+psa_status_t val_issue_command(uint32_t command, request_packet_t *packet,
+                               uint8_t *data, size_t data_size)
+{
+    int ret_val;
+    psa_status_t r = PSA_SUCCESS;
+
+    packet = val_construct_command((uint16_t)command, data, data_size);
+
+    if (packet == NULL) {
+        printf("Command construction failed\n");
+        r = PSA_ERROR_GENERIC_ERROR;
+        return r;
+    }
+
+    switch (command) {
+    case SDP_DISCOVERY_CMD:
+        printf("Sending discovery request\n");
+        break;
+    case SDP_AUTH_START_CMD:
+        printf("Sending challenge request\n");
+        break;
+    case SDP_AUTH_RESPONSE_CMD:
+        printf("Sending authentication response\n");
+        break;
+    case SDP_RESUME_BOOT_CMD:
+        printf("Sending close session command\n");
+        break;
+    case SDP_LOCK_DEBUG_CMD:
+        printf("Sending lock debug request\n");
+    default:
+        //TO DO: Vendor specific message
+        printf("Error: Unrecognized command. ID=(0x%x)\n", command);
+        r = PSA_ERROR_NOT_SUPPORTED;
+    }
+    ret_val = request_packet_send(packet);
+    if (ret_val < 0)
+        r = PSA_ERROR_GENERIC_ERROR;
+
+    request_packet_release(packet);
+    return r;
+}
+
+response_packet_t *val_await_response(void)
+{
+    return response_packet_receive();
+}
+
+psa_status_t val_parse_response(uint32_t command, response_packet_t *packet)
+{
+    int ret_val;
+    psa_status_t r = PSA_SUCCESS;
+    size_t i;
+    psa_tlv_t *tlv;
+    psa_auth_challenge_t *challenge;
+
+    if (packet == NULL) {
+        printf("Error: Target response not obtained\n");
+        r = PSA_ERROR_COMMUNICATION_FAILURE;
+        return r;
+    }
+
+    switch (command) {
+    case SDP_DISCOVERY_CMD:
+        printf("Receiving discovery response...\n");
+        for (i = 0; (i + 4) < (packet->data_count * 4);) {
+            tlv = (psa_tlv_t *) (((uint8_t *)packet->data) + i);
+            i += sizeof(psa_tlv_t) + tlv->length_in_bytes;
+        }
+        break;
+    case SDP_AUTH_START_CMD:
+        printf("Receiving challenge\n");
+        printf("status = 0x%04x, data_count = %d\n", packet->status, packet->data_count);
+        if (packet->data_count * 4 != sizeof(psa_auth_challenge_t)) {
+            r = PSA_ERROR_GENERIC_ERROR;
+            return r;
+        }
+        challenge = (psa_auth_challenge_t *) packet->data;
+        PSA_ADAC_LOG_DUMP("host", "challenge", challenge->challenge_vector,
+                           sizeof(challenge->challenge_vector));
+        break;
+    case SDP_AUTH_RESPONSE_CMD:
+    case SDP_RESUME_BOOT_CMD:
+    case SDP_LOCK_DEBUG_CMD:
+        printf("status = 0x%04x, data_count = %d\n", packet->status, packet->data_count);
+        break;
+    default:
+        r = PSA_ERROR_NOT_SUPPORTED;
+    }
+    return r;
+}
+
+psa_status_t val_sign_token(uint8_t challenge[], size_t challenge_size, uint8_t signature_type,
+                            uint8_t exts[], size_t exts_size, uint8_t *fragment[],
+                            size_t *fragment_size, psa_key_handle_t handle,
+                            uint8_t *key, size_t key_size)
+{
+    psa_status_t r;
+
+    r = psa_adac_sign_token(challenge, challenge_size, signature_type, exts, exts_size,
+                           fragment, fragment_size, handle, key, key_size);
+    if (r == PSA_SUCCESS) {
+        PSA_ADAC_LOG_DUMP("host", "token", *fragment, *fragment_size);
+    } else {
+        PSA_ADAC_LOG_ERR("host", "Error signing token\n");
+        r = PSA_ERROR_GENERIC_ERROR;
+    }
+    return r;
+}
+
+psa_status_t val_send_certificate(psa_tlv_t **extns_list, size_t extns_count)
+{
+    request_packet_t *request;
+    response_packet_t *response;
+    psa_status_t r;
+    uint8_t *payload;
+    size_t i, payload_size;
+    psa_tlv_t *current_extn;
+
+    for (size_t i = 0; i < extns_count; i++) {
+        current_extn = extns_list[i];
+        if (current_extn->type_id == 0x0201) {
+            payload = (uint8_t *)current_extn;
+            payload_size = current_extn->length_in_bytes + sizeof(psa_tlv_t);
+
+            printf("Sending Certificate\n");
+            r = val_issue_command(SDP_AUTH_RESPONSE_CMD, request, payload, payload_size);
+            if (r != PSA_SUCCESS)
+                return r;
+
+            printf("Receiving token_authentication response\n");
+            response = val_await_response();
+            r = val_parse_response(SDP_AUTH_RESPONSE_CMD, response);
+            if (r != PSA_SUCCESS)
+                return r;
+
+            if (response->status == SDP_NEED_MORE_DATA)
+                response_packet_release(response);
+        }
+    }
+    if (response->status != SDP_NEED_MORE_DATA) {
+        PSA_ADAC_LOG_ERR("host", "Unexpected response status %x\n", response->status);
+        r = PSA_ERROR_GENERIC_ERROR;
+        return r;
+    }
+    response_packet_release(response);
+    return r;
+}
+
+int val_check_cryptosystem_support(response_packet_t *packet, uint8_t key_system)
+{
+    int found = 0, j;
+    size_t i = 0;
+    psa_tlv_t *tlv;
+    uint8_t *key_support_types = NULL;
+
+    while ((i + 4) < (packet->data_count * 4)) {
+        tlv = (psa_tlv_t *) (((uint8_t *)packet->data) + i);
+        if (tlv->type_id == 0x0102) {
+           key_support_types = tlv->value;
+           for (j = 0; j < (tlv->length_in_bytes); j++) {
+                if (*(key_support_types+j) == key_system) {
+                    found = 1;
+                    break;
+                }
+           }
+        }
+        i += sizeof(psa_tlv_t) + tlv->length_in_bytes;
+    }
+
+    if (key_support_types == NULL)
+        printf("Cryptosystem Type ID not found in target's response\n");
+    else if (!found)
+        printf("Cryptosystem not supported by target\n");
+    else
+        printf("Cryptosystem supported by target\n");
+
+    return found;
+}
diff --git a/secure-debug/val/src/val_dispatcher.c b/secure-debug/val/src/val_dispatcher.c
new file mode 100644
index 0000000..86426cc
--- /dev/null
+++ b/secure-debug/val/src/val_dispatcher.c
@@ -0,0 +1,222 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_framework.h"
+#include "val_dispatcher.h"
+#include "val_interfaces.h"
+#include "val_peripherals.h"
+
+
+extern val_api_t val_api;
+
+/* gloabls */
+addr_t          g_test_info_addr;
+
+/**
+    @brief        - This function prints PSA_{SUITE}_API_VERSION_MAJOR
+                    PSA_{SUITE}_API_VERSION_MINOR details.
+    @param        - None
+    @return       - None
+**/
+static void val_print_api_version(void)
+{
+#ifdef CRYPTO
+    val_print(PRINT_ALWAYS, " %d.", PSA_CRYPTO_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_CRYPTO_API_VERSION_MINOR);
+#endif
+#ifdef INTERNAL_TRUSTED_STORAGE
+    val_print(PRINT_ALWAYS, " %d.", PSA_ITS_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_ITS_API_VERSION_MINOR);
+#endif
+#ifdef PROTECTED_STORAGE
+    val_print(PRINT_ALWAYS, " %d.", PSA_PS_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_PS_API_VERSION_MINOR);
+#endif
+#ifdef STORAGE
+    val_print(PRINT_ALWAYS, " ITS %d.", PSA_ITS_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_ITS_API_VERSION_MINOR);
+    val_print(PRINT_ALWAYS, " and PS %d.", PSA_PS_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_PS_API_VERSION_MINOR);
+#endif
+#ifdef INITIAL_ATTESTATION
+    val_print(PRINT_ALWAYS, " %d.", PSA_INITIAL_ATTEST_API_VERSION_MAJOR);
+    val_print(PRINT_ALWAYS, "%d", PSA_INITIAL_ATTEST_API_VERSION_MINOR);
+#endif
+}
+
+/**
+    @brief        - This function reads the test ELFs from RAM or secondary storage and loads into
+                    system memory
+    @param        - test_id      : Returns the current test ID
+                  - test_id_prev : Previous test ID.
+    @return       - Error code
+**/
+val_status_t val_test_load(test_id_t *test_id, test_id_t test_id_prev)
+{
+    int             i;
+    val_test_info_t test_list[] = {
+#include "test_entry_list.inc"
+                                  {VAL_INVALID_TEST_ID, NULL}
+                                  };
+
+    for (i = 0; i < (int)(sizeof(test_list)/sizeof(test_list[0])); i++)
+    {
+        if (test_id_prev == VAL_INVALID_TEST_ID)
+        {
+            *test_id = test_list[i].test_id;
+            g_test_info_addr = (addr_t) test_list[i].entry_addr;
+            return VAL_STATUS_SUCCESS;
+        }
+        else if (test_id_prev == test_list[i].test_id)
+        {
+            *test_id = test_list[i+1].test_id;
+            g_test_info_addr = (addr_t) test_list[i+1].entry_addr;
+            return VAL_STATUS_SUCCESS;
+        }
+        else if (test_list[i].test_id == VAL_INVALID_TEST_ID)
+        {
+            val_print(PRINT_DEBUG, "\n\nNo more valid tests found. Exiting.", 0);
+            *test_id = VAL_INVALID_TEST_ID;
+            return VAL_STATUS_SUCCESS;
+        }
+    }
+
+    *test_id = VAL_INVALID_TEST_ID;
+    val_print(PRINT_ERROR, "\n\nError: No more valid tests found. Exiting.", 0);
+    return VAL_STATUS_LOAD_ERROR;
+}
+
+/**
+    @brief    - This function reads the function pointer addresses for
+                test_entry
+    @param    - paddr    : Returns the Test function address
+    @return   - Returns val_status_t
+**/
+val_status_t val_get_test_entry_addr(addr_t *paddr)
+{
+    *paddr = g_test_info_addr;
+    return VAL_STATUS_SUCCESS;
+}
+
+/**
+    @brief    - Execute the function pointer which was given to us by the test
+    @param    - void
+**/
+void val_execute_test_fn(void)
+{
+    test_fptr_t   fn_ptr;
+    addr_t        addr;
+
+    val_get_test_entry_addr(&addr);
+    fn_ptr = (test_fptr_t)addr;
+    fn_ptr(&val_api);
+    return;
+}
+
+/*
+    @brief    - Reads the pre-defined component name against given test_id
+    @param    - test_id  : Current Test ID
+    @return   - Component name
+*/
+char *val_get_comp_name(test_id_t test_id)
+{
+    switch (VAL_GET_COMP_NUM(test_id))
+    {
+        case VAL_SECURE_DEBUG_BASE:
+            return "Secure Debug Suite";
+        default:
+            return "Unknown Suite";
+    }
+}
+
+/**
+    @brief    - This function is responsible for setting up VAL infrastructure.
+                Loads test one by one from combine binary and calls test_entry
+                function of each test image.
+    @return   - 0 if success Or error code for the failure.
+**/
+int32_t val_dispatcher(test_id_t test_id_prev)
+{
+
+    test_id_t            test_id;
+    val_status_t         status;
+    boot_t               boot;
+    test_count_t         test_count = {0,};
+    uint32_t             test_result;
+
+    do
+    {
+		status = val_test_load(&test_id, test_id_prev);
+
+		if (VAL_ERROR(status))
+		{
+			return status;
+		}
+		else if (test_id == VAL_INVALID_TEST_ID)
+		{
+			break;
+		}
+		if (VAL_GET_COMP_NUM(test_id_prev) != VAL_GET_COMP_NUM(test_id))
+		{
+			val_print(PRINT_ALWAYS, "\nRunning.. ", 0);
+			val_print(PRINT_ALWAYS, val_get_comp_name(test_id), 0);
+			val_print(PRINT_ALWAYS, "\n******************************\n", 0);
+		}
+
+		val_execute_test_fn();
+
+        test_result = val_report_status();
+
+        switch (test_result)
+        {
+            case TEST_PASS:
+                test_count.pass_cnt += 1;
+                break;
+            case TEST_FAIL:
+                test_count.fail_cnt += 1;
+                break;
+            case TEST_SKIP:
+                test_count.skip_cnt += 1;
+                break;
+            case TEST_PENDING:
+                test_count.sim_error_cnt += 1;
+                break;
+        }
+
+        test_id_prev = test_id;
+   } while (1);
+
+   val_print(PRINT_ALWAYS, "\n************ ", 0);
+   val_print(PRINT_ALWAYS, val_get_comp_name(test_id_prev), 0);
+   val_print(PRINT_ALWAYS, " Report **********\n", 0);
+   val_print(PRINT_ALWAYS, "TOTAL TESTS     : %d\n", test_count.pass_cnt + test_count.fail_cnt
+            + test_count.skip_cnt + test_count.sim_error_cnt);
+   val_print(PRINT_ALWAYS, "TOTAL PASSED    : %d\n", test_count.pass_cnt);
+   val_print(PRINT_ALWAYS, "TOTAL SIM ERROR : %d\n", test_count.sim_error_cnt);
+   val_print(PRINT_ALWAYS, "TOTAL FAILED    : %d\n", test_count.fail_cnt);
+   val_print(PRINT_ALWAYS, "TOTAL SKIPPED   : %d\n", test_count.skip_cnt);
+   val_print(PRINT_ALWAYS, "******************************************\n", 0);
+
+   return (test_count.fail_cnt > 0) ? VAL_STATUS_TEST_FAILED : VAL_STATUS_SUCCESS;
+}
+
+
+
+
+
+
+
diff --git a/secure-debug/val/src/val_entry.c b/secure-debug/val/src/val_entry.c
new file mode 100644
index 0000000..1d13bcb
--- /dev/null
+++ b/secure-debug/val/src/val_entry.c
@@ -0,0 +1,64 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_entry.h"
+#include "val_framework.h"
+#include "val_peripherals.h"
+#include "val_dispatcher.h"
+
+int32_t val_entry(void);
+
+/**
+    @brief    - PSA C main function, does VAL init and calls test dispatcher
+    @param    - None
+    @return   - status - error code
+**/
+int32_t val_entry(void)
+{
+    test_id_t       test_id = VAL_INVALID_TEST_ID;
+    int32_t         status;
+
+    status = val_logger_init();
+    if (VAL_ERROR(status))
+    {
+        goto exit;
+    }
+
+    /* Compliance header print */
+    if (test_id == VAL_INVALID_TEST_ID)
+    {
+        val_print(PRINT_ALWAYS, "\n***** PSA Architecture Test Suite - Version %d.",
+                                                                         PSA_ACS_MAJOR_VER);
+        val_print(PRINT_ALWAYS, "%d *****\n", PSA_ACS_MINOR_VER);
+    }
+
+    /* Call dispatcher routine*/
+    status = val_dispatcher(test_id);
+
+exit:
+    val_print(PRINT_ALWAYS, "\nEntering standby.. \n", 0);
+
+    pal_terminate_simulation();
+
+    return status;
+}
+
+//int main()
+//{
+//	val_entry();
+//	return 0;
+//}
diff --git a/secure-debug/val/src/val_framework.c b/secure-debug/val/src/val_framework.c
new file mode 100644
index 0000000..2a700b4
--- /dev/null
+++ b/secure-debug/val/src/val_framework.c
@@ -0,0 +1,172 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_framework.h"
+#include "val_interfaces.h"
+#include "val_dispatcher.h"
+#include "val_peripherals.h"
+#include "pal_interfaces.h"
+
+
+extern val_api_t val_api;
+
+
+/* globals */
+test_status_buffer_t    g_status_buffer;
+
+/**
+    @brief    - Parses input status for a given test and
+                outputs appropriate information on the console
+    @return   - Test state
+**/
+uint32_t val_report_status(void)
+{
+    uint32_t status, state;
+
+    status = val_get_status();
+
+    state = (status >> TEST_STATE_BIT) & TEST_STATE_MASK;
+    status = status & TEST_STATUS_MASK;
+
+    switch (state)
+    {
+        case TEST_START:
+            state = TEST_FAIL;
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: FAILED (Error Code=0x%x)\n",
+                                                    VAL_STATUS_INIT_FAILED);
+            break;
+
+        case TEST_END:
+            state = TEST_PASS;
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: PASSED\n", 0);
+            break;
+
+        case TEST_FAIL:
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: FAILED (Error Code=0x%x)\n", status);
+            break;
+
+        case TEST_SKIP:
+            state = TEST_SKIP;
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: SKIPPED (Skip Code=0x%x)\n", status);
+            break;
+
+        case TEST_PENDING:
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: SIM ERROR (Error Code=0x%x)\n", status);
+            break;
+
+        default:
+            state = TEST_FAIL;
+            val_print(PRINT_ALWAYS, "\nTEST RESULT: FAILED(Error Code=0x%x)\n", VAL_STATUS_INVALID);
+            break;
+
+    }
+
+    val_print(PRINT_ALWAYS, "\n******************************************\n", 0);
+    return state;
+}
+
+/**
+    @brief    - Records the state and status of test
+    @return   - val_status_t
+**/
+val_status_t val_set_status(uint32_t status)
+{
+    g_status_buffer.state   = ((status >> TEST_STATE_BIT) & TEST_STATE_MASK);
+    g_status_buffer.status  = (status & TEST_STATUS_MASK);
+
+    return VAL_STATUS_SUCCESS;
+}
+
+/**
+    @brief    - Updates the state and status for a given test
+    @return   - test status
+**/
+uint32_t val_get_status(void)
+{
+    return ((g_status_buffer.state) << TEST_STATE_BIT) | (g_status_buffer.status);
+}
+
+/*
+    @brief           - This function checks if the input status argument is an error.
+                       On error, we print the checkpoint value and set the status.
+    @param           - checkpoint     : Test debug checkpoint
+                     - val_status_t   : Test status
+    @return          - returns the input status back to the program.
+*/
+
+val_status_t val_err_check_set(uint32_t checkpoint, val_status_t status)
+{
+    if (VAL_ERROR(status)) {
+        val_print(PRINT_ERROR, "\tCheckpoint %d : ", checkpoint);
+        val_print(PRINT_ERROR, "Error Code=0x%x \n", status);
+        val_set_status(RESULT_FAIL(status));
+    } else {
+        status = (val_get_status() & TEST_STATUS_MASK);
+        if (VAL_ERROR(status)) {
+            val_print(PRINT_ERROR, "\tCheckpoint %d : ", checkpoint);
+            val_print(PRINT_ERROR, "Error Code=0x%x \n", status);
+        } else {
+            val_print(PRINT_DEBUG, "\tCheckpoint %d \n", checkpoint);
+        }
+    }
+    return status;
+}
+
+/**
+  @brief  This API prints the test number, description and
+          sets the test state to TEST_START on successful execution.
+  @param  test_num       :unique number identifying this test
+  @param  desc           :brief description of the test
+  @param  test_bitfield  :Addition test info such as
+                           - test isolation level requirement
+                           - Watchdog timeout type
+  @return void
+**/
+
+void val_test_init(uint32_t test_num, char8_t *desc)
+{
+   val_status_t         status = VAL_STATUS_SUCCESS;
+
+   /*global init*/
+   g_status_buffer.state   = TEST_FAIL;
+   g_status_buffer.status  = VAL_STATUS_INVALID;
+
+   val_print(PRINT_ALWAYS, "\nTEST: %d | DESCRIPTION: ", test_num);
+   val_print(PRINT_ALWAYS, desc, 0);
+
+   val_set_status(RESULT_START(status));
+   return;
+}
+
+/**
+  @brief  This API sets the test state to TEST_END if test is successfully passed.
+  @param none
+  @return none
+**/
+
+void val_test_exit(void)
+{
+    val_status_t status = VAL_STATUS_SUCCESS;
+
+    status = val_get_status();
+
+    /* return if test skipped or failed */
+    if (IS_TEST_FAIL(status) || IS_TEST_SKIP(status))
+        return;
+    else
+        val_set_status(RESULT_END(VAL_STATUS_SUCCESS));
+}
diff --git a/secure-debug/val/src/val_interfaces.c b/secure-debug/val/src/val_interfaces.c
new file mode 100644
index 0000000..63c041d
--- /dev/null
+++ b/secure-debug/val/src/val_interfaces.c
@@ -0,0 +1,32 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+
+#include "val_framework.h"
+#include "val_interfaces.h"
+#include "val_peripherals.h"
+
+/*VAL APIs to be used by test */
+const val_api_t val_api = {
+    .print                     = val_print,
+    .set_status                = val_set_status,
+    .get_status                = val_get_status,
+    .test_init                 = val_test_init,
+    .test_exit                 = val_test_exit,
+    .err_check_set             = val_err_check_set,
+};
+
diff --git a/secure-debug/val/src/val_peripherals.c b/secure-debug/val/src/val_peripherals.c
new file mode 100644
index 0000000..e804485
--- /dev/null
+++ b/secure-debug/val/src/val_peripherals.c
@@ -0,0 +1,55 @@
+/** @file
+ * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_peripherals.h"
+#include "pal_interfaces.h"
+#include "val_framework.h"
+
+/* Global */
+uint32_t   is_logger_init_done = 0;
+
+/*
+    @brief    - Initialize UART.
+                This is client interface API of secure partition UART INIT API.
+    @param    - None
+    @return   - val_status_t
+*/
+val_status_t val_logger_init(void)
+{
+	is_logger_init_done = 1;
+	return VAL_STATUS_SUCCESS;
+}
+
+/**
+    @brief    - Print module. This is client interface API of secure partition
+                val_print_sf API for nspe world
+    @param    - verbosity: Print verbosity level
+              - string   : Input string
+              - data     : Value for format specifier
+    @return   - val_status_t
+**/
+val_status_t val_print(print_verbosity_t verbosity, const char *string, int32_t data)
+{
+    if ((is_logger_init_done == 0) && (verbosity < VERBOSE))
+    {
+       return VAL_STATUS_SUCCESS;
+    }
+    return pal_print(string, data);
+}
+
+
+
diff --git a/secure-debug/val/val.cmake b/secure-debug/val/val.cmake
new file mode 100644
index 0000000..665db48
--- /dev/null
+++ b/secure-debug/val/val.cmake
@@ -0,0 +1,42 @@
+#/** @file
+# * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+if(NOT DEFINED PSA_ADAC_ROOT)
+    get_filename_component(PSA_ADAC_ROOT ${CMAKE_SOURCE_DIR}/psa-adac ABSOLUTE)
+endif()
+
+# Listing all the sources from val
+list(APPEND VAL_SRC_C
+	${CMAKE_SOURCE_DIR}/val/src/val_entry.c
+	${CMAKE_SOURCE_DIR}/val/src/val_adac.c
+	${CMAKE_SOURCE_DIR}/val/src/val_dispatcher.c
+	${CMAKE_SOURCE_DIR}/val/src/val_framework.c
+	${CMAKE_SOURCE_DIR}/val/src/val_interfaces.c
+	${CMAKE_SOURCE_DIR}/val/src/val_peripherals.c
+)
+
+# Create VAL library
+add_library(${ADAC_HOST_VAL_LIB} STATIC ${VAL_SRC_C})
+
+target_include_directories(${ADAC_HOST_VAL_LIB} PRIVATE
+    ${CMAKE_SOURCE_DIR}/val/include
+    ${CMAKE_BINARY_DIR}
+    ${PSA_ADAC_ROOT}/psa-adac/core/include
+    ${PSA_ADAC_ROOT}/psa-adac/sdm/include
+    )
+
+target_link_libraries(${ADAC_HOST_VAL_LIB} mbedcrypto)