diff --git a/CMakeLists.txt b/CMakeLists.txt index e8d9af4bd870c8f526e8d14396fb65c98c6b655f..dc3cd7b76777f22a519733ab355c8d0c918a74f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,9 @@ sbs_target(test-trace-logger stm32f429zi_stm32f4discovery) add_executable(test-hil src/tests/hil/test-hil.cpp) sbs_target(test-hil stm32f767zi_compute_unit) +add_executable(test-aspis src/tests/aspis/test-aspis.cpp) +sbs_target(test-aspis stm32f767zi_compute_unit) + #-----------------------------------------------------------------------------# # Tests - Catch # #-----------------------------------------------------------------------------# diff --git a/src/tests/aspis/duplicate.cpp b/src/tests/aspis/duplicate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..782bcbf0894a30c9224fb924fd120b2175cc7464 --- /dev/null +++ b/src/tests/aspis/duplicate.cpp @@ -0,0 +1,30 @@ +/* Copyright (c) 2024 Skyward Experimental Rocketry + * Author: Emilio Corigliano + * + * 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. + */ + +#include <stdio.h> +#include "duplicate.h" + +static int duplicateVar = 0; + +void duplicateThis(){ + printf("%d duplicate this\n", duplicateVar++); +} \ No newline at end of file diff --git a/src/tests/aspis/duplicate.h b/src/tests/aspis/duplicate.h new file mode 100644 index 0000000000000000000000000000000000000000..1e9e269c7c2ba091545edd98a1956c268908caa0 --- /dev/null +++ b/src/tests/aspis/duplicate.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2024 Skyward Experimental Rocketry + * Author: Emilio Corigliano + * + * 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. + */ + +void duplicateThis(); \ No newline at end of file diff --git a/src/tests/aspis/test-aspis.cpp b/src/tests/aspis/test-aspis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b316ee62fbebdd3921be3b14ed479aa3dd03567 --- /dev/null +++ b/src/tests/aspis/test-aspis.cpp @@ -0,0 +1,47 @@ +/* Copyright (c) 2024 Skyward Experimental Rocketry + * Author: Emilio Corigliano + * + * 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. + */ + +#include <algorithms/AirBrakes/TrajectoryPoint.h> +#include <diagnostic/CpuMeter/CpuMeter.h> +#include <diagnostic/PrintLogger.h> +#include <diagnostic/StackLogger.h> +#include <drivers/timer/TimestampTimer.h> +#include <events/EventBroker.h> +#include <events/EventData.h> +#include <events/utils/EventSniffer.h> +#include <hil/HIL.h> +#include <scheduler/TaskScheduler.h> + +#include <utils/ModuleManager/ModuleManager.hpp> +#include "duplicate.h" + + +using namespace Boardcore; + +int main() +{ + while(1){ + duplicateThis(); + Thread::sleep(1000); + } + return 0; +} \ No newline at end of file