From 041b316c6c48c35bc0c04b7c2416f66a98b37d46 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 22:43:17 +0200 Subject: [PATCH] beagle bone build working --- .gitignore | 3 +- cmake/PreProjectConfig.cmake | 3 +- .../inspectionProfiles/profiles_settings.xml | 6 -- cmake/scripts/.idea/misc.xml | 4 - cmake/scripts/.idea/modules.xml | 8 -- cmake/scripts/.idea/scripts.iml | 8 -- cmake/scripts/.idea/vcs.xml | 6 -- cmake/scripts/.idea/workspace.xml | 89 ------------------- cmake/scripts/cmake_build_config.py | 33 +++++-- fsfw_hal | 2 +- 10 files changed, 28 insertions(+), 134 deletions(-) delete mode 100644 cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 cmake/scripts/.idea/misc.xml delete mode 100644 cmake/scripts/.idea/modules.xml delete mode 100644 cmake/scripts/.idea/scripts.iml delete mode 100644 cmake/scripts/.idea/vcs.xml delete mode 100644 cmake/scripts/.idea/workspace.xml diff --git a/.gitignore b/.gitignore index f9bfaa1d..70a3325b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ RelWithDebInfo* .cproject __pycache__ +.idea + !misc/eclipse/**/.cproject !misc/eclipse/**/.project -/eive_obsw cmake debug/ diff --git a/cmake/PreProjectConfig.cmake b/cmake/PreProjectConfig.cmake index b78b9d33..8a013d83 100644 --- a/cmake/PreProjectConfig.cmake +++ b/cmake/PreProjectConfig.cmake @@ -11,7 +11,6 @@ endif() # Disable compiler checks for cross-compiling. if(${OS_FSFW} STREQUAL linux AND TGT_BSP) - if(${TGT_BSP} MATCHES "arm/q7s") set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SCRIPT_PATH}/Q7SCrossCompileConfig.cmake" @@ -38,7 +37,7 @@ if(${OS_FSFW} STREQUAL linux AND TGT_BSP) else() message(STATUS "Setting RASPBERRY_VERSION to ${RASPBERRY_VERSION}") set(RASPBERRY_VERSION ${RASPBERRY_VERSION} CACHE STRING "Raspberry Pi version") - set(ENV{RASPBERRY_VERSION} ${RASPBERRY_VERSION}) + set(ENV{RASPBERRY_VERSION} ${RASPBERRY_VERSION}) endif() else() message(STATUS diff --git a/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml b/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da..00000000 --- a/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/misc.xml b/cmake/scripts/.idea/misc.xml deleted file mode 100644 index d56657ad..00000000 --- a/cmake/scripts/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/modules.xml b/cmake/scripts/.idea/modules.xml deleted file mode 100644 index bb83e262..00000000 --- a/cmake/scripts/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/scripts.iml b/cmake/scripts/.idea/scripts.iml deleted file mode 100644 index d0876a78..00000000 --- a/cmake/scripts/.idea/scripts.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/vcs.xml b/cmake/scripts/.idea/vcs.xml deleted file mode 100644 index c2365ab1..00000000 --- a/cmake/scripts/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/workspace.xml b/cmake/scripts/.idea/workspace.xml deleted file mode 100644 index 70a189f3..00000000 --- a/cmake/scripts/.idea/workspace.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1609084345199 - - - - - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/cmake_build_config.py b/cmake/scripts/cmake_build_config.py index 32b560f6..67f175d9 100644 --- a/cmake/scripts/cmake_build_config.py +++ b/cmake/scripts/cmake_build_config.py @@ -18,18 +18,26 @@ def main(): print("-- Python CMake build configurator utility --") print("Parsing command line arguments..") - parser = argparse.ArgumentParser(description="Processing arguments for CMake build configuration.") + parser = argparse.ArgumentParser( + description="Processing arguments for CMake build configuration." + ) parser.add_argument("-o", "--osal", type=str, choices=["freertos", "linux", "rtems", "host"], help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos") - parser.add_argument("-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"], - help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug " - "Information)", default="debug") + parser.add_argument( + "-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"], + help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug " + "Information)", default="debug" + ) parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.") parser.add_argument("-g", "--generator", type=str, help="CMake Generator") - parser.add_argument("-d", "--defines", - help="Additional custom defines passed to CMake (supply without -D prefix!)", - nargs="*", type=str) - parser.add_argument("-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine") + parser.add_argument( + "-d", "--defines", + help="Additional custom defines passed to CMake (supply without -D prefix!)", + nargs="*", type=str + ) + parser.add_argument( + "-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine" + ) args = parser.parse_args() @@ -64,6 +72,12 @@ def main(): else: cmake_target_cfg_cmd = "" + define_string = "" + if args.defines is not None: + define_list = args.defines[0].split() + for define in define_list: + define_string += f"-D{define} " + build_folder = cmake_build_type if args.builddir is not None: build_folder = args.builddir @@ -85,7 +99,8 @@ def main(): os.chdir(build_folder) cmake_command = f"cmake {generator_cmake_arg} -DOS_FSFW=\"{osal}\" " \ - f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} {source_location}" + f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \ + f"{define_string} {source_location}" # Remove redundant spaces cmake_command = ' '.join(cmake_command.split()) print("Running CMake command: ") diff --git a/fsfw_hal b/fsfw_hal index 14fe3257..a85c0146 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 14fe32572d62db9d19707dc1f9bb6fecb1993b73 +Subproject commit a85c01465bc8687773676f05c5e7eb8af54b25ff