I'm very new to the topic of DSP development. I have asked this question in the Qualcomm forum 2 months ago, but haven't received any answer.
Currently I'm involved in the porting of parts of our code to the Hexagon DSP, made by Qualcomm.
Our code base compiles to a shared library and a unit-test suite based on GoogleTest.
I have successfully compiled the library with hexagon-clang, that is a part of Hexagon SDK 3.5.2. However, hexagon-clang doesn't compile gtest, because of limited standard library support.
What options do I have to run unit-tests?
Update.
Hexagon_toolchain.cmake
, coming with SDK. Related CMake command line switches are: -DV=hexagon_Debug_toolv83_v66 -DCMAKE_TOOLCHAIN_FILE=%HEXAGON_SDK_ROOT%\build\cmake\Hexagon_Toolchain.cmake -DQURT_OS=1 -DHEXAGON_CMAKE_ROOT=%HEXAGON_SDK_ROOT%\build\cmake
regex.h
. Indeed, this file can be found only in Android NDK, that is installed by Hexagon SDK. I've tried setting include paths for hexagon-clang, but have got other errors with other header files. I've stopped this exercise because I doubt that "cherry-picking" fragments of Android NDK is a correct way to build an application that should run on DSP.Solved.
GTEST_HAS_POSIX_RE
and GTEST_HAS_STREAM_REDIRECTION
): ...
if(HEXAGON)
add_compile_definitions(GTEST_HAS_POSIX_RE=0 GTEST_HAS_STREAM_REDIRECTION=0)
endif()
add_subdirectory(gtest)
....
getcwd
function in QURT POSIX support library always returned empty string.write
function in QURT, so I've simulated it using fwrite
(funny that read
was present).argv
in main
was always NULL
, and I've had to call overloaded InitGoogleTest()
.