Greentea tests run on microcontrollers, so any required drivers need
to be available and built.
Note: Even though unit tests do not require drivers, for ease of
maintenance there's no need to exclude those drivers when building unit
tests because a driver only gets enabled when the Mbed target matches.
Previously ble headers are part of mbed-headers-connectivity, this PR
moves ble headers into new mbed-headers-ble to make ble stubs to be
more self-contained and improves the composition of the library.
Move the connectivity nanostack-libservice stubs into the connectivity/libraries
directory where the nanostack libservice component present as nanostack
libservice source copied from the external repo. So we can avoid duplicating
the mbed-os source tree in a central UNITTESTS folder.
Move the connectivity mbedtls stubs into the connectivity/mbedtls
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
The CMake target mbed-mbedtls-cryptocell310 was not linked by
default, resulting in a compilation error on targets that use
Mbed TLS:
fatal error: mbedtls_device.h: No such file or directory
Other Mbed TLS drivers simply add themselve to mbed-mbedtls, so this
commits does the alignment to fix the build error.
Note: the driver and the core Mbed TLS have mutual dependency, so
they need to be one CMake target.
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>