mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Merge branch 'toolchains' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
f0e1f59097
@ -407,7 +407,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
|||||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.12")
|
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.12")
|
||||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")
|
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")
|
||||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
||||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.10.0")
|
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.10.1")
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7
|
if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7
|
||||||
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")
|
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")
|
||||||
@ -515,9 +515,11 @@ if(NOT OS_IS_MACOSX)
|
|||||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
if(NOT IS_ARM)
|
||||||
include(TestForARM)
|
include(TestForARM)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -631,7 +633,6 @@ set(FILESYSTEM_FOUND FALSE)
|
|||||||
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||||
# Check if we have std::filesystem
|
# Check if we have std::filesystem
|
||||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
|
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
|
||||||
if((NOT ENABLE_UNIT_TESTING_EXTRA) AND (NOT ENABLE_SYSTEM_TESTING_EXTRA) AND (NOT ENABLE_FPGA)) # Workaround for GPSTk
|
|
||||||
find_package(FILESYSTEM COMPONENTS Final Experimental)
|
find_package(FILESYSTEM COMPONENTS Final Experimental)
|
||||||
set_package_properties(FILESYSTEM PROPERTIES
|
set_package_properties(FILESYSTEM PROPERTIES
|
||||||
URL "https://en.cppreference.com/w/cpp/filesystem"
|
URL "https://en.cppreference.com/w/cpp/filesystem"
|
||||||
@ -649,7 +650,6 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -970,7 +970,6 @@ if(NOT VOLKGNSSSDR_FOUND)
|
|||||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
||||||
-DENABLE_STATIC_LIBS=ON
|
-DENABLE_STATIC_LIBS=ON
|
||||||
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
||||||
-DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR}
|
|
||||||
-DENABLE_ORC=OFF
|
-DENABLE_ORC=OFF
|
||||||
${STRIP_VOLK_GNSSSDR_PROFILE}
|
${STRIP_VOLK_GNSSSDR_PROFILE}
|
||||||
${USE_THIS_PYTHON}
|
${USE_THIS_PYTHON}
|
||||||
@ -980,6 +979,12 @@ if(NOT VOLKGNSSSDR_FOUND)
|
|||||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake
|
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake
|
||||||
-DCROSSCOMPILE_MULTILIB=TRUE
|
-DCROSSCOMPILE_MULTILIB=TRUE
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
if(CMAKE_TOOLCHAIN_FILE)
|
||||||
|
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||||
ExternalProject_Add(volk_gnsssdr_module
|
ExternalProject_Add(volk_gnsssdr_module
|
||||||
@ -1772,6 +1777,10 @@ if(NOT PUGIXML_FOUND)
|
|||||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||||
set(PUGIXML_COMPILER "")
|
set(PUGIXML_COMPILER "")
|
||||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake")
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake")
|
||||||
|
else()
|
||||||
|
if(CMAKE_TOOLCHAIN_FILE)
|
||||||
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||||
ExternalProject_Add(pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
ExternalProject_Add(pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||||
@ -2488,9 +2497,21 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
|||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
|
||||||
add_compile_options(-Wno-missing-field-initializers)
|
add_compile_options(-Wno-missing-field-initializers)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING OR NOT ENABLE_PACKAGING)
|
||||||
add_compile_options(-Wno-psabi)
|
add_compile_options(-Wno-psabi)
|
||||||
endif()
|
endif()
|
||||||
|
if(IS_ARM)
|
||||||
|
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.1.0") AND (CMAKE_VERSION VERSION_GREATER "3.1"))
|
||||||
|
if(CMAKE_CXX_STANDARD VERSION_LESS 17)
|
||||||
|
set(CXX_ALIGN_FLAG -faligned-new)
|
||||||
|
if(NOT (CMAKE_VERSION VERSION_LESS "3.3"))
|
||||||
|
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${CXX_ALIGN_FLAG}>")
|
||||||
|
else()
|
||||||
|
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${CXX_ALIGN_FLAG}>")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.3"))
|
if(NOT (CMAKE_VERSION VERSION_LESS "3.3"))
|
||||||
@ -2503,23 +2524,30 @@ endif()
|
|||||||
# Processor-architecture related flags
|
# Processor-architecture related flags
|
||||||
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
if(OS_IS_MACOSX)
|
|
||||||
add_compile_options(-march=corei7 -mfpmath=sse)
|
|
||||||
else()
|
|
||||||
if(NOT ENABLE_GENERIC_ARCH)
|
if(NOT ENABLE_GENERIC_ARCH)
|
||||||
if(IS_ARM)
|
if(IS_ARM)
|
||||||
# ARM-specific options
|
# ARM-specific options
|
||||||
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
||||||
if(ARM_VERSION STREQUAL "arm")
|
add_compile_options(-mtune=native)
|
||||||
# Unknown arm version - try our best to detect
|
endif()
|
||||||
|
else()
|
||||||
|
add_compile_options(-march=native)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
if(NOT ENABLE_GENERIC_ARCH)
|
||||||
|
if(OS_IS_MACOSX)
|
||||||
|
add_compile_options(-march=native)
|
||||||
|
else()
|
||||||
|
if(IS_ARM)
|
||||||
|
# ARM-specific options
|
||||||
|
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
||||||
add_compile_options(-mcpu=native)
|
add_compile_options(-mcpu=native)
|
||||||
else()
|
|
||||||
add_compile_options(-march=${ARM_VERSION})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_compile_options(-march=native -mfpmath=sse)
|
add_compile_options(-march=native)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
12
README.md
12
README.md
@ -571,7 +571,7 @@ More details can be found in our tutorial about [GNSS-SDR configuration options
|
|||||||
<a name="macosx">macOS and Mac OS X</a>
|
<a name="macosx">macOS and Mac OS X</a>
|
||||||
---------
|
---------
|
||||||
|
|
||||||
GNSS-SDR can be built on MacOS or Mac OS X, starting from 10.9 (Mavericks) and including 10.14 (Mojave). If you still have not installed [Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
|
GNSS-SDR can be built on MacOS or Mac OS X, starting from 10.9 (Mavericks) and including 10.15 (Catalina). If you still have not installed [Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ xcode-select --install
|
$ xcode-select --install
|
||||||
@ -594,6 +594,7 @@ In a terminal, type:
|
|||||||
~~~~~~
|
~~~~~~
|
||||||
$ sudo port selfupdate
|
$ sudo port selfupdate
|
||||||
$ sudo port upgrade outdated
|
$ sudo port upgrade outdated
|
||||||
|
$ sudo port install pkgconfig
|
||||||
$ sudo port install gnuradio
|
$ sudo port install gnuradio
|
||||||
$ sudo port install lapack
|
$ sudo port install lapack
|
||||||
$ sudo port install armadillo
|
$ sudo port install armadillo
|
||||||
@ -602,8 +603,10 @@ $ sudo port install google-glog +gflags
|
|||||||
$ sudo port install matio
|
$ sudo port install matio
|
||||||
$ sudo port install pugixml
|
$ sudo port install pugixml
|
||||||
$ sudo port install protobuf3-cpp
|
$ sudo port install protobuf3-cpp
|
||||||
$ sudo port install py27-mako
|
$ sudo port install libiio
|
||||||
$ sudo port install py27-six
|
$ sudo port install libad9361-iio
|
||||||
|
$ sudo port install py37-mako
|
||||||
|
$ sudo port install py37-six
|
||||||
$ sudo port install doxygen +docs
|
$ sudo port install doxygen +docs
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
@ -616,7 +619,7 @@ $ port select --list python
|
|||||||
and you can activate a certain version by typing:
|
and you can activate a certain version by typing:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ sudo port select --set python python27
|
$ sudo port select --set python python37
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
#### <a name="homebrew">Homebrew</a>
|
#### <a name="homebrew">Homebrew</a>
|
||||||
@ -639,6 +642,7 @@ Install the required dependencies:
|
|||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ brew install cmake
|
$ brew install cmake
|
||||||
|
$ brew install pkg-config
|
||||||
$ brew install hdf5
|
$ brew install hdf5
|
||||||
$ brew install lapack
|
$ brew install lapack
|
||||||
$ brew install armadillo
|
$ brew install armadillo
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Original Source: https://github.com/vector-of-bool/CMakeCM
|
# Original code from https://github.com/vector-of-bool/CMakeCM and modified
|
||||||
# Modified by C. Fernandez-Prades.
|
# by C. Fernandez. The original code is distributed under the OSI-approved
|
||||||
|
# BSD 3-Clause License. See https://cmake.org/licensing for details.
|
||||||
|
|
||||||
#[=======================================================================[.rst:
|
#[=======================================================================[.rst:
|
||||||
|
|
||||||
@ -136,6 +137,9 @@ endif()
|
|||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99"))
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99"))
|
||||||
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||||
endif()
|
endif()
|
||||||
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Normalize and check the component list we were given
|
# Normalize and check the component list we were given
|
||||||
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
||||||
|
@ -48,7 +48,7 @@ if(APPLE)
|
|||||||
else()
|
else()
|
||||||
find_path(GFlags_ROOT_DIR
|
find_path(GFlags_ROOT_DIR
|
||||||
libgflags.so
|
libgflags.so
|
||||||
HINTS
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/usr/lib/x86_64-linux-gnu
|
/usr/lib/x86_64-linux-gnu
|
||||||
@ -89,7 +89,7 @@ if(GFlags_ROOT_DIR)
|
|||||||
# We are testing only a couple of files in the include directories
|
# We are testing only a couple of files in the include directories
|
||||||
find_path(GFlags_INCLUDE_DIRS
|
find_path(GFlags_INCLUDE_DIRS
|
||||||
gflags/gflags.h
|
gflags/gflags.h
|
||||||
HINTS
|
PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
|
@ -46,7 +46,7 @@ endif()
|
|||||||
|
|
||||||
find_library(GPERFTOOLS_TCMALLOC
|
find_library(GPERFTOOLS_TCMALLOC
|
||||||
NAMES tcmalloc
|
NAMES tcmalloc
|
||||||
HINTS /usr/lib
|
PATHS /usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/lib64
|
/usr/local/lib64
|
||||||
@ -61,7 +61,7 @@ find_library(GPERFTOOLS_TCMALLOC
|
|||||||
|
|
||||||
find_library(GPERFTOOLS_PROFILER
|
find_library(GPERFTOOLS_PROFILER
|
||||||
NAMES profiler
|
NAMES profiler
|
||||||
HINTS /usr/lib
|
PATHS /usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/lib64
|
/usr/local/lib64
|
||||||
@ -75,7 +75,7 @@ find_library(GPERFTOOLS_PROFILER
|
|||||||
|
|
||||||
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||||
NAMES tcmalloc_and_profiler
|
NAMES tcmalloc_and_profiler
|
||||||
HINTS /usr/lib
|
PATHS /usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
${Gperftools_ROOT_DIR}/lib
|
${Gperftools_ROOT_DIR}/lib
|
||||||
${GPERFTOOLS_ROOT}/lib
|
${GPERFTOOLS_ROOT}/lib
|
||||||
@ -89,7 +89,7 @@ find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
|||||||
|
|
||||||
find_path(GPERFTOOLS_INCLUDE_DIR
|
find_path(GPERFTOOLS_INCLUDE_DIR
|
||||||
NAMES gperftools/heap-profiler.h
|
NAMES gperftools/heap-profiler.h
|
||||||
HINTS /usr/include
|
PATHS /usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
${Gperftools_ROOT_DIR}/include
|
${Gperftools_ROOT_DIR}/include
|
||||||
|
@ -27,7 +27,7 @@ if(NOT COMMAND feature_summary)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
|
find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
|
||||||
HINTS /usr/include
|
PATHS /usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
${GPSTK_ROOT}/include
|
${GPSTK_ROOT}/include
|
||||||
@ -39,7 +39,7 @@ set(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
|
|||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
|
find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
|
||||||
HINTS /usr/lib
|
PATHS /usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/${CMAKE_INSTALL_LIBDIR}
|
/usr/${CMAKE_INSTALL_LIBDIR}
|
||||||
/usr/local/${CMAKE_INSTALL_LIBDIR}
|
/usr/local/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@ -69,7 +69,7 @@ endif()
|
|||||||
# Look for the header file.
|
# Look for the header file.
|
||||||
find_path(MATIO_INCLUDE_DIR
|
find_path(MATIO_INCLUDE_DIR
|
||||||
NAMES matio.h
|
NAMES matio.h
|
||||||
HINTS
|
PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
@ -81,7 +81,7 @@ find_path(MATIO_INCLUDE_DIR
|
|||||||
# Look for the library.
|
# Look for the library.
|
||||||
find_library(MATIO_LIBRARY
|
find_library(MATIO_LIBRARY
|
||||||
NAMES matio
|
NAMES matio
|
||||||
HINTS
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/usr/lib/alpha-linux-gnu
|
/usr/lib/alpha-linux-gnu
|
||||||
|
@ -38,22 +38,34 @@ endfunction()
|
|||||||
|
|
||||||
message(STATUS "Checking for ARM")
|
message(STATUS "Checking for ARM")
|
||||||
|
|
||||||
set(IS_ARM NO)
|
set(IS_ARM FALSE)
|
||||||
set(ARM_VERSION "")
|
set(ARM_VERSION "")
|
||||||
|
|
||||||
|
if(ENABLE_PACKAGING)
|
||||||
|
set(VERBOSE_BUILDING "-v")
|
||||||
|
else()
|
||||||
|
set(VERBOSE_BUILDING "")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
execute_process(COMMAND echo "int main(){}"
|
execute_process(COMMAND echo "int main(){}"
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dM -E -
|
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dM ${VERBOSE_BUILDING} -E -
|
||||||
OUTPUT_VARIABLE TEST_FOR_ARM_RESULTS)
|
OUTPUT_VARIABLE TEST_FOR_ARM_RESULTS
|
||||||
|
)
|
||||||
|
|
||||||
string(REGEX MATCH "__arm" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
|
string(REGEX MATCH "__arm" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
|
||||||
if(ARM_FOUND STREQUAL "")
|
if(ARM_FOUND STREQUAL "")
|
||||||
string(REGEX MATCH "__aarch64" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
|
string(REGEX MATCH "__aarch64" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
|
||||||
endif()
|
endif()
|
||||||
|
if(ARM_FOUND STREQUAL "")
|
||||||
|
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm")
|
||||||
|
set(ARM_FOUND ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ARM_FOUND STREQUAL "")
|
if(NOT ARM_FOUND STREQUAL "")
|
||||||
set(IS_ARM YES)
|
set(IS_ARM TRUE)
|
||||||
message(STATUS "ARM system detected")
|
message(STATUS "ARM system detected.")
|
||||||
|
|
||||||
# detect the version
|
# detect the version
|
||||||
check_arm_version("__ARM_ARCH_2__" ${TEST_FOR_ARM_RESULTS} "armv2" ARM_VERSION)
|
check_arm_version("__ARM_ARCH_2__" ${TEST_FOR_ARM_RESULTS} "armv2" ARM_VERSION)
|
||||||
@ -82,21 +94,32 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
check_arm_version("__ARM_ARCH_8A__" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
|
check_arm_version("__ARM_ARCH_8A__" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
|
||||||
check_arm_version("__ARM_ARCH_8A" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
|
check_arm_version("__ARM_ARCH_8A" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
|
||||||
|
|
||||||
# anything else just define as arm
|
# anything else just define as unknown
|
||||||
if(ARM_VERSION STREQUAL "")
|
if(ARM_VERSION STREQUAL "")
|
||||||
message(STATUS "Couldn't detect ARM version. Setting to 'arm'")
|
message(STATUS "Couldn't detect ARM version.")
|
||||||
|
set(ARM_VERSION "unknown")
|
||||||
|
else()
|
||||||
|
message(STATUS "ARM version ${ARM_VERSION} detected.")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "System is not ARM.")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm")
|
||||||
|
set(IS_ARM TRUE)
|
||||||
|
set(ARM_VERSION ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
message(STATUS "ARM version ${ARM_VERSION} detected.")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang")
|
||||||
|
set(IS_ARM TRUE)
|
||||||
set(ARM_VERSION "arm")
|
set(ARM_VERSION "arm")
|
||||||
else()
|
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm")
|
||||||
message(STATUS "ARM version ${ARM_VERSION} detected")
|
set(ARM_VERSION ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
message(STATUS "ARM version ${ARM_VERSION} detected.")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "System is not ARM")
|
message(STATUS "Not detecting ARM on non-GNUCXX or non-Clang compiler. Defaulting to false.")
|
||||||
endif()
|
message(STATUS "If you are compiling for ARM, set -DIS_ARM=ON manually.")
|
||||||
|
|
||||||
else()
|
|
||||||
# TODO: Other compilers
|
|
||||||
message(STATUS "Not detecting ARM on non-GNUCXX compiler. Defaulting to false")
|
|
||||||
message(STATUS "If you are compiling for ARM, set IS_ARM=ON manually")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(IS_ARM ${IS_ARM} CACHE BOOL "Compiling for ARM")
|
set(IS_ARM ${IS_ARM} CACHE BOOL "Compiling for ARM")
|
||||||
|
50
cmake/Toolchains/aarch64-linux-gnu.cmake
Normal file
50
cmake/Toolchains/aarch64-linux-gnu.cmake
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR ARM)
|
||||||
|
|
||||||
|
if(MINGW OR CYGWIN OR WIN32)
|
||||||
|
set(UTIL_SEARCH_CMD where)
|
||||||
|
elseif(UNIX OR APPLE)
|
||||||
|
set(UTIL_SEARCH_CMD which)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TOOLCHAIN_PREFIX aarch64-linux-gnu-)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
|
||||||
|
OUTPUT_VARIABLE BINUTILS_PATH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
|
||||||
|
|
||||||
|
# The following is not needed on debian
|
||||||
|
# Without that flag CMake is not able to pass test compilation check
|
||||||
|
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
||||||
|
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
||||||
|
|
||||||
|
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
|
||||||
|
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-aarch64 -L /usr/aarch64-linux-gnu/")
|
53
cmake/Toolchains/arm-linux-gnueabihf.cmake
Normal file
53
cmake/Toolchains/arm-linux-gnueabihf.cmake
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR ARM)
|
||||||
|
|
||||||
|
if(MINGW OR CYGWIN OR WIN32)
|
||||||
|
set(UTIL_SEARCH_CMD where)
|
||||||
|
elseif(UNIX OR APPLE)
|
||||||
|
set(UTIL_SEARCH_CMD which)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TOOLCHAIN_PREFIX arm-linux-gnueabihf-)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
|
||||||
|
OUTPUT_VARIABLE BINUTILS_PATH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
|
||||||
|
|
||||||
|
# The following is not needed on debian
|
||||||
|
# Without that flag CMake is not able to pass test compilation check
|
||||||
|
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
||||||
|
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
||||||
|
## the following is needed for CheckCSourceCompiles used in lib/CMakeLists.txt
|
||||||
|
set(CMAKE_C_FLAGS "-mfpu=neon" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
|
||||||
|
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-arm -L /usr/arm-linux-gnueabihf/")
|
26
cmake/Toolchains/arm_cortex_a15_hardfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a15_hardfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/arm_cortex_a53_hardfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a53_hardfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/arm_cortex_a72_hardfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a72_hardfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/arm_cortex_a8_hardfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a8_hardfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/arm_cortex_a8_softfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a8_softfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/arm_cortex_a9_hardfp_native.cmake
Normal file
26
cmake/Toolchains/arm_cortex_a9_hardfp_native.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/raspi3.cmake
Normal file
26
cmake/Toolchains/raspi3.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
26
cmake/Toolchains/raspi4.cmake
Normal file
26
cmake/Toolchains/raspi4.cmake
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
@ -195,7 +195,6 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t
|
|||||||
if (total_block_exp > d_total_block_exp)
|
if (total_block_exp > d_total_block_exp)
|
||||||
{
|
{
|
||||||
// if the attenuation factor of the FPGA FFT-IFFT is smaller than the reference attenuation factor then we need to update the reference attenuation factor
|
// if the attenuation factor of the FPGA FFT-IFFT is smaller than the reference attenuation factor then we need to update the reference attenuation factor
|
||||||
std::cout << "changing blk exp..... d_total_block_exp = " << d_total_block_exp << " total_block_exp = " << total_block_exp << " chan = " << d_channel << std::endl;
|
|
||||||
d_total_block_exp = total_block_exp;
|
d_total_block_exp = total_block_exp;
|
||||||
d_test_statistics = 0;
|
d_test_statistics = 0;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,6 @@ endif()
|
|||||||
if(${FILESYSTEM_FOUND})
|
if(${FILESYSTEM_FOUND})
|
||||||
set(Boost_LIBRARIES "")
|
set(Boost_LIBRARIES "")
|
||||||
set(Boost_INCLUDE_DIRS "")
|
set(Boost_INCLUDE_DIRS "")
|
||||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH})
|
|
||||||
else()
|
else()
|
||||||
include(VolkBoost)
|
include(VolkBoost)
|
||||||
if(NOT Boost_FOUND)
|
if(NOT Boost_FOUND)
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Original Source: https://github.com/vector-of-bool/CMakeCM
|
# Original code from https://github.com/vector-of-bool/CMakeCM and modified
|
||||||
# Modified by C. Fernandez-Prades.
|
# by C. Fernandez. The original code is distributed under the OSI-approved
|
||||||
|
# BSD 3-Clause License. See https://cmake.org/licensing for details.
|
||||||
|
|
||||||
#[=======================================================================[.rst:
|
#[=======================================================================[.rst:
|
||||||
|
|
||||||
@ -135,6 +136,9 @@ endif()
|
|||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99"))
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99"))
|
||||||
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||||
endif()
|
endif()
|
||||||
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Normalize and check the component list we were given
|
# Normalize and check the component list we were given
|
||||||
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR ARM)
|
||||||
|
|
||||||
|
if(MINGW OR CYGWIN OR WIN32)
|
||||||
|
set(UTIL_SEARCH_CMD where)
|
||||||
|
elseif(UNIX OR APPLE)
|
||||||
|
set(UTIL_SEARCH_CMD which)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TOOLCHAIN_PREFIX aarch64-linux-gnu-)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
|
||||||
|
OUTPUT_VARIABLE BINUTILS_PATH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
|
||||||
|
|
||||||
|
# The following is not needed on debian
|
||||||
|
# Without that flag CMake is not able to pass test compilation check
|
||||||
|
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
||||||
|
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
||||||
|
|
||||||
|
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
|
||||||
|
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-aarch64 -L /usr/aarch64-linux-gnu/")
|
@ -0,0 +1,53 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR ARM)
|
||||||
|
|
||||||
|
if(MINGW OR CYGWIN OR WIN32)
|
||||||
|
set(UTIL_SEARCH_CMD where)
|
||||||
|
elseif(UNIX OR APPLE)
|
||||||
|
set(UTIL_SEARCH_CMD which)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TOOLCHAIN_PREFIX arm-linux-gnueabihf-)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
|
||||||
|
OUTPUT_VARIABLE BINUTILS_PATH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
|
||||||
|
|
||||||
|
# The following is not needed on debian
|
||||||
|
# Without that flag CMake is not able to pass test compilation check
|
||||||
|
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
||||||
|
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
||||||
|
## the following is needed for CheckCSourceCompiles used in lib/CMakeLists.txt
|
||||||
|
set(CMAKE_C_FLAGS "-mfpu=neon" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
|
||||||
|
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-arm -L /usr/arm-linux-gnueabihf/")
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
#
|
#
|
||||||
# This file is part of GNSS-SDR.
|
# This file is part of GNSS-SDR.
|
||||||
#
|
#
|
||||||
@ -23,3 +23,4 @@ set(CMAKE_CXX_COMPILER g++)
|
|||||||
set(CMAKE_C_COMPILER gcc)
|
set(CMAKE_C_COMPILER gcc)
|
||||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
@ -1,3 +1,20 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
|
||||||
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
@ -6,3 +23,4 @@ set(CMAKE_CXX_COMPILER g++)
|
|||||||
set(CMAKE_C_COMPILER gcc)
|
set(CMAKE_C_COMPILER gcc)
|
||||||
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
|
||||||
|
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
|
||||||
|
########################################################################
|
||||||
|
set(CMAKE_CXX_COMPILER g++)
|
||||||
|
set(CMAKE_C_COMPILER gcc)
|
||||||
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
#
|
#
|
||||||
# This file is part of GNSS-SDR.
|
# This file is part of GNSS-SDR.
|
||||||
#
|
#
|
||||||
@ -23,3 +23,4 @@ set(CMAKE_CXX_COMPILER g++)
|
|||||||
set(CMAKE_C_COMPILER gcc)
|
set(CMAKE_C_COMPILER gcc)
|
||||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
|
||||||
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
|
||||||
|
string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
|
set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
|
||||||
|
set(CMAKE_LIBRARY_PATH ${OECORE_TARGET_SYSROOT}/usr/lib)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT})
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4)
|
||||||
|
set(ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib)
|
@ -470,8 +470,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
|||||||
if(ASM_ARCH STREQUAL "neonv7")
|
if(ASM_ARCH STREQUAL "neonv7")
|
||||||
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
||||||
message(STATUS "-- Detected neon architecture; enabling ASM")
|
message(STATUS "-- Detected neon architecture; enabling ASM")
|
||||||
# setup architecture specific assembler flags
|
# architecture specific assembler flags are now set in the cmake toolchain file
|
||||||
set(ARCH_ASM_FLAGS "-mfpu=neon -g")
|
|
||||||
# then add the files
|
# then add the files
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon)
|
include_directories(${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon)
|
||||||
file(GLOB asm_files ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon/*.s)
|
file(GLOB asm_files ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon/*.s)
|
||||||
@ -482,7 +481,6 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${ARCH_ASM_FLAGS}")
|
|
||||||
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
||||||
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -39,20 +39,21 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <iio.h>
|
#include <iio.h>
|
||||||
#include <algorithm> // for max
|
#include <algorithm> // for max
|
||||||
|
#include <chrono> // for std::this_thread
|
||||||
#include <cmath> // for abs
|
#include <cmath> // for abs
|
||||||
#include <exception> // for exceptions
|
#include <exception> // for exceptions
|
||||||
#include <fcntl.h> // for open, O_WRONLY
|
#include <fcntl.h> // for open, O_WRONLY
|
||||||
#include <fstream> // for std::ifstream
|
#include <fstream> // for std::ifstream
|
||||||
#include <iostream> // for cout, endl
|
#include <iostream> // for cout, endl
|
||||||
#include <string> // for string manipulation
|
#include <string> // for string manipulation
|
||||||
|
#include <thread> // for std::chrono
|
||||||
#include <unistd.h> // for write
|
#include <unistd.h> // for write
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
void run_DMA_process(const std::string &FreqBand, const std::string &Filename1, const std::string &Filename2, const bool &enable_DMA)
|
void run_DMA_process(const std::string &FreqBand, const std::string &Filename1, const std::string &Filename2, const bool &enable_DMA)
|
||||||
{
|
{
|
||||||
const int MAX_INPUT_SAMPLES_TOTAL = 8192;
|
const int MAX_INPUT_SAMPLES_TOTAL = 16384;
|
||||||
int max_value = 0;
|
int max_value = 0;
|
||||||
int tx_fd; // DMA descriptor
|
int tx_fd; // DMA descriptor
|
||||||
std::ifstream infile1;
|
std::ifstream infile1;
|
||||||
@ -256,6 +257,9 @@ void run_DMA_process(const std::string &FreqBand, const std::string &Filename1,
|
|||||||
{
|
{
|
||||||
std::cerr << "Error: DMA could not send all the required samples " << std::endl;
|
std::cerr << "Error: DMA could not send all the required samples " << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Throttle the DMA
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nread_elements != MAX_INPUT_SAMPLES_TOTAL * 2)
|
if (nread_elements != MAX_INPUT_SAMPLES_TOTAL * 2)
|
||||||
|
@ -29,6 +29,9 @@ if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
|||||||
set(GTEST_COMPILER "")
|
set(GTEST_COMPILER "")
|
||||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
||||||
else()
|
else()
|
||||||
|
if(CMAKE_TOOLCHAIN_FILE)
|
||||||
|
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
|
endif()
|
||||||
if(ENABLE_PACKAGING)
|
if(ENABLE_PACKAGING)
|
||||||
set(TOOLCHAIN_ARG "-DCMAKE_VERBOSE_MAKEFILE=ON")
|
set(TOOLCHAIN_ARG "-DCMAKE_VERBOSE_MAKEFILE=ON")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user