diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 10e282c571a0994ac40bae42b35a17041431d6e5..6df51343b32e1b76bdb0792e05f9b0b7b20eb42b 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -20,12 +20,12 @@ ] }, "configurations": [ - // Skyward boards { "name": "stm32f205rc_ciuti", "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f205rc_ciuti", @@ -48,6 +48,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_death_stack_v1", @@ -72,6 +73,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_death_stack_v2", @@ -95,6 +97,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_death_stack_v3", @@ -118,6 +121,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_nokia", @@ -141,6 +145,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_parafoil", @@ -164,6 +169,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_pyxis_auxiliary", @@ -186,6 +192,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_rig", @@ -209,6 +216,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_con_rig", @@ -232,6 +240,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_conrig_v2", @@ -254,6 +263,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f756zg_nucleo", @@ -277,6 +287,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_automated_antennas", @@ -300,6 +311,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_compute_unit", @@ -323,6 +335,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_compute_unit_v2", @@ -346,6 +359,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_rig_v2", @@ -369,6 +383,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_lyra_biscotto", @@ -392,6 +407,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_lyra_motor", @@ -415,6 +431,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_death_stack_v4", @@ -438,6 +455,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_gemini_gs", @@ -461,6 +479,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_gemini_motor", @@ -484,6 +503,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_lyra_gs", @@ -507,6 +527,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_orion_biscotto", @@ -530,6 +551,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_orion_engine", @@ -548,12 +570,12 @@ "${workspaceFolder}/src/bsps/stm32f767zi_orion_engine" ] }, - // Miosix boards { "name": "stm32f407vg_stm32f4discovery", "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f407vg_stm32f4discovery", @@ -576,6 +598,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_stm32f4discovery", @@ -599,6 +622,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f767zi_nucleo", @@ -622,6 +646,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f769ni_discovery", @@ -645,6 +670,7 @@ "cStandard": "c11", "cppStandard": "c++14", "compilerPath": "/opt/arm-miosix-eabi/bin/arm-miosix-eabi-g++", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", "defines": [ "${defaultDefines}", "_MIOSIX_BOARDNAME=stm32f429zi_lyra_cubesat", diff --git a/cmake/sbs.cmake b/cmake/sbs.cmake index 8cfd4768d4bf18019137171d3fbdcebe0ba96b2f..9df48c04a99ece503974294456ac899b39a32496 100644 --- a/cmake/sbs.cmake +++ b/cmake/sbs.cmake @@ -37,14 +37,33 @@ function(sbs_target TARGET OPT_BOARD) message(FATAL_ERROR "No board selected") endif() - # The only include directory of Boardcore is shared! target_include_directories(${TARGET} PRIVATE src/shared) + add_custom_target(${TARGET}-version-info + COMMAND "${CMAKE_COMMAND}" + "-D" "TARGET_NAME=${TARGET}" + "-D" "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" + "-D" "BOARDCORE_PATH=${BOARDCORE_PATH}" + "-D" "BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}/include/${TARGET}" + "-P" "${BOARDCORE_PATH}/cmake/version.cmake" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/include/${TARGET}/version.h" + COMMENT "Generating version information file for ${TARGET}" + VERBATIM + ) + add_dependencies(${TARGET} ${TARGET}-version-info) + if(CMAKE_CROSSCOMPILING) # Link the embedded Boardcore library target_link_libraries(${TARGET} PRIVATE Skyward::Boardcore::${OPT_BOARD}) - - # Linker script and linking options are eredited from the kernel library + + # Add the generated include directory to the target + # This also works for injecting include directories into consumed libs + # E.g. adding version information to the kernel library + target_include_directories(${TARGET} PRIVATE + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/${TARGET}> + ) + + # Linker script and linking options are inherited from the kernel library # Add a post build command to create the hex file to flash on the board add_custom_command( diff --git a/cmake/version.cmake b/cmake/version.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9b2b977adef80f0b4ac479d1614c4ddd8c30997d --- /dev/null +++ b/cmake/version.cmake @@ -0,0 +1,93 @@ +# Copyright (c) 2025 Skyward Experimental Rocketry +# Author: Niccolò Betto +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# --- Version Information File Generation --- + +# Find Git executable +find_package(Git REQUIRED QUIET) + +set(GIT_WORKING_DIR ${CMAKE_SOURCE_DIR}) + +# Determine dirty status +execute_process( + COMMAND ${GIT_EXECUTABLE} describe --dirty --always --broken + WORKING_DIRECTORY ${GIT_WORKING_DIR} + OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT # We don't use the output directly, just for the dirty check + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE GIT_DESCRIBE_RESULT + ERROR_QUIET # Ignore errors +) +set(GIT_DIRTY_SUFFIX "") +# Check if the command succeeded AND if its output ends with "-dirty" +if(GIT_DESCRIBE_RESULT EQUAL 0 AND GIT_DESCRIBE_OUTPUT MATCHES "-dirty$") + set(GIT_DIRTY_SUFFIX "-dirty") +endif() + +# Get *annotated* tag name +execute_process( + COMMAND ${GIT_EXECUTABLE} describe --exact-match HEAD + WORKING_DIRECTORY ${GIT_WORKING_DIR} + OUTPUT_VARIABLE GIT_TAG # Captures the annotated tag name if successful + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE GIT_EXACT_TAG_RESULT # Will be 0 on success, non-zero on failure + ERROR_QUIET # Ignore errors, we expect this to fail when not on an annotated tag +) + +# Get branch name +execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${GIT_WORKING_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + # No ERROR_QUIET/RESULT_VARIABLE -> CMake halts on git command failure +) + +# Get short commit hash +execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${GIT_WORKING_DIR} + OUTPUT_VARIABLE GIT_REV + OUTPUT_STRIP_TRAILING_WHITESPACE + # No ERROR_QUIET/RESULT_VARIABLE -> CMake halts on git command failure +) + +# Determine the version info based on tag match result +set(GIT_VERSION_INFO "") +if(GIT_EXACT_TAG_RESULT EQUAL 0) + # Use the tag name when exactly on an annotated tag + set(GIT_VERSION_INFO "${GIT_TAG}") +else() + # Use branch-rev when not on a tag + set(GIT_VERSION_INFO "${GIT_BRANCH}-${GIT_REV}") +endif() + +# Construct the final version string +# Format: <annotated_tag>[-dirty] OR <branch>-<hash>[-dirty] +set(GIT_VERSION_STRING "${GIT_VERSION_INFO}${GIT_DIRTY_SUFFIX}") + +# Additional variables set by the called of this script via command line args: +# - TARGET_NAME +# - CMAKE_BUILD_TYPE + +configure_file( + "${BOARDCORE_PATH}/cmake/version.h.in" + "${BIN_DIR}/version.h" +) diff --git a/cmake/version.h.in b/cmake/version.h.in new file mode 100644 index 0000000000000000000000000000000000000000..69b974da6299290bf70533eaf2ff7a3f381db4f9 --- /dev/null +++ b/cmake/version.h.in @@ -0,0 +1,18 @@ +#pragma once + +// This file is generated by CMake. Do not edit it directly. +// See cmake/version.cmake for details. + +#define GIT_REV "@GIT_REV@@GIT_DIRTY_SUFFIX@" +#define GIT_TAG "@GIT_TAG@" +#define GIT_BRANCH "@GIT_BRANCH@" + +#define GIT_VERSION_STRING "@GIT_VERSION_STRING@" + +#define TARGET_NAME "@TARGET_NAME@" +#define BUILD_TYPE "@CMAKE_BUILD_TYPE@" + +#define VERSION_STRING "@TARGET_NAME@ @ @GIT_VERSION_STRING@" + +#define SKYWARD_VERSION_STRING \ + "Skyward Eperimental Rocketry (c) " VERSION_STRING " (" BUILD_TYPE ")" diff --git a/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp index 02a27c32d8c55a8eb1d19dea758617d63305503e..5350dd9118c60b574e544cd5f14201e46d051732 100644 --- a/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -257,6 +258,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp index 6e54d48a8c2a09abda7eefb7acd1644b7072c1f7..e9bef821e172d2ff9d90a8a86a4964f182102979 100644 --- a/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -449,6 +450,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM // PA2,PA3 intrusive_ref_ptr<DevFs> devFs = diff --git a/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp index 8dc6f3db0635ae9438b635c522c1220b6e0b3740..25db6f8c5c24b85ff78df3e3fb5319a21c230383 100644 --- a/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -466,6 +467,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM // PA2,PA3 intrusive_ref_ptr<DevFs> devFs = diff --git a/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp index 4b7e269feaed9eca630cb7a71f9f53c09cd36080..bab51027fcd0e5458c590eefc4cd941d0d90815b 100644 --- a/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -473,6 +474,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM // PA2,PA3 intrusive_ref_ptr<DevFs> devFs = diff --git a/src/bsps/stm32f429zi_lyra_cubesat/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_lyra_cubesat/interfaces-impl/bsp.cpp index e4447baca376762c5756c10fd986634bdf98a03c..56570dcae50056c309b3b0d14afad113eba12458 100644 --- a/src/bsps/stm32f429zi_lyra_cubesat/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_lyra_cubesat/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -386,6 +387,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM // PA2,PA3 intrusive_ref_ptr<DevFs> devFs = diff --git a/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp index ab9c05cc6c7266f6dd622f8db7bf31a0bc156b6d..d1588b06d1c5adfe6ef9836f7cfb8bab43f1a4c2 100644 --- a/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp @@ -46,6 +46,7 @@ #include "kernel/logging.h" #include "kernel/sync.h" // #include "kernel/IRQDisplayPrint.h" +#include "version.h" namespace miosix { @@ -256,6 +257,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp index f4304b85ac1b8d38c42e7fb941dd75b0bcdc9527..7e53e9b6fb3d8578fd717cd314e61d08db59faa9 100644 --- a/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -272,6 +273,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp index 8a9efa1a4c34a780b73569d5dc0c544077d7568b..fbd28338e908e00d16dd3f8ec1e996126edeeb9e 100644 --- a/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -108,7 +109,11 @@ void IRQbspInit() : STM32Serial::NOFLOWCTRL))); } -void bspInit2() {} +void bspInit2() +{ + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); +} /** * For safety reasons, we never want the board to shutdown. diff --git a/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp index 42bd1607aa18eead9f5876fbda7a0283c0c2a2ad..8834f85c378cc9545e3b2585e625b948f792446a 100644 --- a/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp @@ -45,6 +45,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -323,6 +324,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp index c9fb4d970a732f717b830a0aaa617226c35a6584..d124e909f252f818ca88130e8c80ac7fd49e8bb2 100644 --- a/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -301,6 +302,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_compute_unit/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_compute_unit/interfaces-impl/bsp.cpp index c1f5a0d8095fdb2a9c10b2f496caf88a5ce468be..70a709dfb2535e09e5e11802072bcd25a5906d6f 100644 --- a/src/bsps/stm32f767zi_compute_unit/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_compute_unit/interfaces-impl/bsp.cpp @@ -46,6 +46,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -236,6 +237,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_compute_unit_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_compute_unit_v2/interfaces-impl/bsp.cpp index 91166cd5799f9e3e455a3e348250c81942dc0791..b8046e81be9744af777532c7270ed908b7b4b2c3 100644 --- a/src/bsps/stm32f767zi_compute_unit_v2/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_compute_unit_v2/interfaces-impl/bsp.cpp @@ -46,6 +46,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -260,6 +261,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_conrig_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_conrig_v2/interfaces-impl/bsp.cpp index 3be9bfc9481c39791edad79cf0d314e58526e652..67fb4d9e4067b1caf1a231899181de2d83a38eb4 100644 --- a/src/bsps/stm32f767zi_conrig_v2/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_conrig_v2/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -301,6 +302,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp index f839dacd5d40bc16b27ad09052176e3e34c94e3e..e44e7614b6aa435f8f74104749bc8d6f18a7035b 100644 --- a/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -353,6 +354,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp index 6737470e3aec6358a71542665212528174328e02..a9295f7fee7d41d191ad83aee112cf0cfb6b0af2 100644 --- a/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -288,6 +289,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM // Init devfs with empty device basicFilesystemSetup(intrusive_ref_ptr<Device>()); diff --git a/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp index aba9222316e1f728577aa45dafe0d85d9b8b0489..1b921436410c8ce302be434c3ff762d27f01ea42 100644 --- a/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp @@ -46,6 +46,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -304,6 +305,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp index 98eca468c954e8a360bacda17f3d9f2b20786d69..e2e11d0f0b79c44faad597b99df6d5dff89d7f6f 100644 --- a/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -372,6 +373,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp index 753e2dbeb668643f09ad73a8d4a167b348de60bd..fabbd381a7844c4255b47cc81aadd201f9b61377 100644 --- a/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp @@ -46,6 +46,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -342,6 +343,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp index 2f8f98c309eba8575c8240eb905af3f474459996..6ae339b52e9cc08fd0b07cd8a5be5da9d8f7c253 100644 --- a/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -316,6 +317,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp index a0096a7c76410f2d3cefd0b85b68978ebb2968d3..317be180a700db249a8c721944f61c55b35c3dee 100644 --- a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -373,6 +374,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_orion_engine/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_orion_engine/interfaces-impl/bsp.cpp index 74de72857e448c0da73ccddea7d91a4d0fb74998..1ab92598354402ed05ccaeddcddb78aed11cf1f9 100644 --- a/src/bsps/stm32f767zi_orion_engine/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_orion_engine/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -330,6 +331,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM diff --git a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp index 02d1867e688efaa9bc48803a03bf2ed49fa13ac8..bb197b843a2e6bd59c4efa1786950fa9e66f69bc 100644 --- a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp @@ -47,6 +47,7 @@ #include "kernel/kernel.h" #include "kernel/logging.h" #include "kernel/sync.h" +#include "version.h" namespace miosix { @@ -393,6 +394,9 @@ void IRQbspInit() void bspInit2() { + // Print Skyward version info + bootlog("%s\n", SKYWARD_VERSION_STRING); + #ifdef WITH_FILESYSTEM basicFilesystemSetup(SDIODriver::instance()); #endif // WITH_FILESYSTEM