From 537175829dff5e377c902106b1e93d69927e4c49 Mon Sep 17 00:00:00 2001 From: Alberto Nidasio <alberto.nidasio@skywarder.eu> Date: Wed, 24 Apr 2024 17:37:49 +0200 Subject: [PATCH] Split CMake example and test targets into multiple `CMakeLists.txt` --- CMakeLists.txt | 148 ------------------ miosix/_examples/asm/CMakeLists.txt | 37 +++++ miosix/_examples/atsam4l_lcd/CMakeLists.txt | 37 +++++ miosix/_examples/blinking_led/CMakeLists.txt | 37 +++++ miosix/_examples/datalogger/CMakeLists.txt | 39 +++++ miosix/_examples/deep_sleep/CMakeLists.txt | 37 +++++ miosix/_examples/hd44780/CMakeLists.txt | 37 +++++ miosix/_examples/ir_decoder/CMakeLists.txt | 37 +++++ miosix/_examples/led_display/CMakeLists.txt | 37 +++++ miosix/_examples/loop_mount/CMakeLists.txt | 37 +++++ miosix/_examples/sad_trombone/CMakeLists.txt | 37 +++++ miosix/_examples/servo/CMakeLists.txt | 40 +++++ miosix/_examples/streamwriter/CMakeLists.txt | 37 +++++ miosix/_examples/termios/CMakeLists.txt | 37 +++++ miosix/_examples/thread_native/CMakeLists.txt | 37 +++++ .../_examples/thread_pthread/CMakeLists.txt | 37 +++++ miosix/_tools/delay_test/CMakeLists.txt | 37 +++++ .../board/CMakeLists.txt | 41 +++++ .../{test.cpp => board/test1.cpp} | 0 .../{ => board}/test2.cpp | 0 .../{ => profiler}/CMakeLists.txt | 2 +- .../{ => profiler}/fdstream.h | 0 .../{ => profiler}/fdstream.tcc | 0 .../{ => profiler}/jtag_profiler.cpp | 0 miosix/_tools/fs_backend/CMakeLists.txt | 37 +++++ miosix/_tools/fs_misc_testcode/CMakeLists.txt | 37 +++++ miosix/_tools/processes/CMakeLists.txt | 46 ++++++ miosix/_tools/ram_test/CMakeLists.txt | 37 +++++ miosix/_tools/testsuite/CMakeLists.txt | 86 ++++++++++ 29 files changed, 882 insertions(+), 149 deletions(-) create mode 100644 miosix/_examples/asm/CMakeLists.txt create mode 100644 miosix/_examples/atsam4l_lcd/CMakeLists.txt create mode 100644 miosix/_examples/blinking_led/CMakeLists.txt create mode 100644 miosix/_examples/datalogger/CMakeLists.txt create mode 100644 miosix/_examples/deep_sleep/CMakeLists.txt create mode 100644 miosix/_examples/hd44780/CMakeLists.txt create mode 100644 miosix/_examples/ir_decoder/CMakeLists.txt create mode 100644 miosix/_examples/led_display/CMakeLists.txt create mode 100644 miosix/_examples/loop_mount/CMakeLists.txt create mode 100644 miosix/_examples/sad_trombone/CMakeLists.txt create mode 100644 miosix/_examples/servo/CMakeLists.txt create mode 100644 miosix/_examples/streamwriter/CMakeLists.txt create mode 100644 miosix/_examples/termios/CMakeLists.txt create mode 100644 miosix/_examples/thread_native/CMakeLists.txt create mode 100644 miosix/_examples/thread_pthread/CMakeLists.txt create mode 100644 miosix/_tools/delay_test/CMakeLists.txt create mode 100644 miosix/_tools/feedforward_profiling/board/CMakeLists.txt rename miosix/_tools/feedforward_profiling/{test.cpp => board/test1.cpp} (100%) rename miosix/_tools/feedforward_profiling/{ => board}/test2.cpp (100%) rename miosix/_tools/feedforward_profiling/{ => profiler}/CMakeLists.txt (85%) rename miosix/_tools/feedforward_profiling/{ => profiler}/fdstream.h (100%) rename miosix/_tools/feedforward_profiling/{ => profiler}/fdstream.tcc (100%) rename miosix/_tools/feedforward_profiling/{ => profiler}/jtag_profiler.cpp (100%) create mode 100644 miosix/_tools/fs_backend/CMakeLists.txt create mode 100644 miosix/_tools/fs_misc_testcode/CMakeLists.txt create mode 100644 miosix/_tools/processes/CMakeLists.txt create mode 100644 miosix/_tools/ram_test/CMakeLists.txt create mode 100644 miosix/_tools/testsuite/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f3dc73f..503b0540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,156 +27,8 @@ cmake_minimum_required(VERSION 3.25) project(MiosixExamples C CXX ASM) -add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) - add_subdirectory(miosix EXCLUDE_FROM_ALL) -add_subdirectory(miosix/_examples/datalogger/tscpp EXCLUDE_FROM_ALL) - include(miosix/cmake/miosix_link_target.cmake) -#-----------------------------------------------------------------------------# -# Examples # -#-----------------------------------------------------------------------------# - add_executable(main main.cpp) miosix_link_target(main stm32f407vg_discovery) - -add_executable(asm miosix/_examples/asm/main.s) -miosix_link_target(asm stm32f407vg_discovery) - -add_executable(atsam4l_lcd miosix/_examples/atsam4l_lcd/main.cpp) -miosix_link_target(atsam4l_lcd atsam4lc2aa_generic) - -add_executable(blinking_led miosix/_examples/blinking_led/simple.cpp) -miosix_link_target(blinking_led stm32f429zi_discovery) - -add_executable(datalogger - miosix/_examples/datalogger/main.cpp - miosix/_examples/datalogger/Logger.cpp -) -target_link_libraries(datalogger PUBLIC tscpp) -miosix_link_target(datalogger stm32f407vg_discovery) - -add_executable(hd44780 miosix/_examples/hd44780/hd44780.cpp) -miosix_link_target(hd44780 stm32f407vg_discovery) - -add_executable(ir_decoder miosix/_examples/ir_decoder/ir_decoder.cpp) -miosix_link_target(ir_decoder stm32f407vg_discovery) - -add_executable(led_display miosix/_examples/led_display/main.cpp) -miosix_link_target(led_display stm32f100rb_discovery) - -add_executable(sad_trombone - miosix/_examples/sad_trombone/main.cpp - miosix/_examples/sad_trombone/player.cpp - miosix/_examples/sad_trombone/adpcm.c -) -miosix_link_target(sad_trombone stm32f407vg_discovery) - -add_executable(servo-prompt miosix/_examples/servo/prompt.cpp) -miosix_link_target(servo-prompt stm32f407vg_discovery) - -add_executable(servo-sweep miosix/_examples/servo/sweep.cpp) -miosix_link_target(servo-sweep stm32f407vg_discovery) - -add_executable(streamwriter miosix/_examples/streamwriter/streamwriter.cpp) -miosix_link_target(streamwriter stm32f407vg_discovery) - -add_executable(termios miosix/_examples/termios/main.cpp) -miosix_link_target(termios stm32f407vg_discovery) - -add_executable(thread_native miosix/_examples/thread_native/native_thread_example.cpp) -miosix_link_target(thread_native stm32f407vg_discovery) - -add_executable(thread_pthread miosix/_examples/thread_pthread/pthread_example.cpp) -miosix_link_target(thread_pthread stm32f407vg_discovery) - -#-----------------------------------------------------------------------------# -# Others # -#-----------------------------------------------------------------------------# - -add_executable(delay_test miosix/_tools/delay_test/delay_test.cpp) -miosix_link_target(delay_test stm32f407vg_discovery) - -add_executable(feedforward_profiling miosix/_tools/feedforward_profiling/test.cpp) -miosix_link_target(feedforward_profiling stm32f407vg_discovery) - -add_executable(fs_backend miosix/_tools/fs_backend/backend_benchmark.cpp) -miosix_link_target(fs_backend stm32f407vg_discovery) - -add_executable(fs_misc_testcode miosix/_tools/fs_misc_testcode/dirlist.cpp) -miosix_link_target(fs_misc_testcode stm32f407vg_discovery) - -# To build this entrypoint remember to: -# - Define WITH_PROCESSES in miosix_settings.h -# - Select a linker script like stm32_1m+192k_rom_processes.ld -# add_executable(processes miosix/_tools/processes/main_processes.cpp) -# target_include_directories(processes PUBLIC miosix/_tools/processes) -# add_custom_command( -# TARGET processes -# PRE_BUILD COMMAND make -# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/miosix/_tools/processes/process_template -# ) -# miosix_link_target(processes stm32f407vg_discovery) - -add_executable(ram_test - miosix/_tools/ram_test/main.cpp - miosix/_tools/ram_test/sha1.cpp -) -miosix_link_target(ram_test stm32f407vg_discovery) - -# If you want to test the MPU remember to run build.sh in miosix/_tools/testsuite -# add_executable(testsuite miosix/_tools/testsuite/testsuite.cpp) -# miosix_link_target(testsuite stm32f407vg_discovery) - -# Build the testsuite for all supported boards to test compilation -set(TESTSUITE_BOARDS - lpc2138_miosix_board - # stm32f072rb_discovery - efm32gg332f1024_wandstem - # stm32f100c8_microboard - # stm32f100c8_vaisala_rs41 - # stm32f100cb_tempsensor - # stm32f100cx_generic - # stm32f100rb_discovery - stm32f100rc_solertegiard - # stm32f103c8_breakout - # stm32f103cb_als_mainboard_rev2 - # stm32f103cx_generic - stm32f103ve_mp3v2 - stm32f103ve_strive_mini - stm32f103ze_redbull_v2 - stm32f103ze_evaluation - stm32f205_generic - stm32f205rc_skyward_stormtrooper - stm32f205rg_sony_newman - stm32f207ig_evaluation - stm32f207ze_als_camboard - stm32f207zg_ethboard_v2 - stm32f207zg_nucleo - # stm32l151c8_als_mainboard - # atsam4lcc - stm32f303vc_discovery - stm32f401re_nucleo - stm32f401vc_discovery - stm32f407vg_bitsboard - stm32f407vg_discovery - stm32f407vg_thermal_test_chip - stm32f411ce_blackpill - stm32f411re_nucleo - stm32f429zi_oledboard2 - stm32f429zi_skyward_anakin - stm32f429zi_skyward_homeone - stm32f429zi_discovery - stm32f469ni_discovery - stm32l4r9zi_sensortile - stm32l476rg_nucleo - stm32f746zg_nucleo - stm32f767zi_nucleo - # stm32f769ni_discovery - stm32h753xi_evaluation -) -foreach(OPT_BOARD ${TESTSUITE_BOARDS}) - add_executable(testsuite-${OPT_BOARD} miosix/_tools/testsuite/testsuite.cpp) - miosix_link_target(testsuite-${OPT_BOARD} ${OPT_BOARD}) -endforeach() diff --git a/miosix/_examples/asm/CMakeLists.txt b/miosix/_examples/asm/CMakeLists.txt new file mode 100644 index 00000000..c4c52c88 --- /dev/null +++ b/miosix/_examples/asm/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Asm C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(asm main.s) +miosix_link_target(asm stm32f407vg_discovery) diff --git a/miosix/_examples/atsam4l_lcd/CMakeLists.txt b/miosix/_examples/atsam4l_lcd/CMakeLists.txt new file mode 100644 index 00000000..674fa5b9 --- /dev/null +++ b/miosix/_examples/atsam4l_lcd/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(atsam4lLCD C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(atsam4l_lcd main.cpp) +miosix_link_target(atsam4l_lcd atsam4lc2aa_generic) diff --git a/miosix/_examples/blinking_led/CMakeLists.txt b/miosix/_examples/blinking_led/CMakeLists.txt new file mode 100644 index 00000000..997358f2 --- /dev/null +++ b/miosix/_examples/blinking_led/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(BlinkingLED C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(blinking_led simple.cpp) +miosix_link_target(blinking_led stm32f429zi_discovery) diff --git a/miosix/_examples/datalogger/CMakeLists.txt b/miosix/_examples/datalogger/CMakeLists.txt new file mode 100644 index 00000000..34804eb2 --- /dev/null +++ b/miosix/_examples/datalogger/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Datalogger C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +add_subdirectory(tscpp EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(datalogger main.cpp Logger.cpp) +target_link_libraries(datalogger PUBLIC tscpp) +miosix_link_target(datalogger stm32f407vg_discovery) diff --git a/miosix/_examples/deep_sleep/CMakeLists.txt b/miosix/_examples/deep_sleep/CMakeLists.txt new file mode 100644 index 00000000..bd85e7fc --- /dev/null +++ b/miosix/_examples/deep_sleep/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(DeepSleep C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(deep_sleep main-test.cpp) +miosix_link_target(deep_sleep stm32f407vg_discovery) diff --git a/miosix/_examples/hd44780/CMakeLists.txt b/miosix/_examples/hd44780/CMakeLists.txt new file mode 100644 index 00000000..be242b06 --- /dev/null +++ b/miosix/_examples/hd44780/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(HD44780 C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(hd44780 hd44780.cpp) +miosix_link_target(hd44780 stm32f407vg_discovery) diff --git a/miosix/_examples/ir_decoder/CMakeLists.txt b/miosix/_examples/ir_decoder/CMakeLists.txt new file mode 100644 index 00000000..754aa894 --- /dev/null +++ b/miosix/_examples/ir_decoder/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(IRDecoder C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(ir_decoder ir_decoder.cpp) +miosix_link_target(ir_decoder stm32f407vg_discovery) diff --git a/miosix/_examples/led_display/CMakeLists.txt b/miosix/_examples/led_display/CMakeLists.txt new file mode 100644 index 00000000..a7933640 --- /dev/null +++ b/miosix/_examples/led_display/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(LEDDisplay C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(led_display main.cpp) +miosix_link_target(led_display stm32f100rb_discovery) diff --git a/miosix/_examples/loop_mount/CMakeLists.txt b/miosix/_examples/loop_mount/CMakeLists.txt new file mode 100644 index 00000000..d87fb617 --- /dev/null +++ b/miosix/_examples/loop_mount/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(LoopMount C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(loop_mount loop_mount.cpp) +miosix_link_target(loop_mount stm32f407vg_discovery) diff --git a/miosix/_examples/sad_trombone/CMakeLists.txt b/miosix/_examples/sad_trombone/CMakeLists.txt new file mode 100644 index 00000000..ac8678ac --- /dev/null +++ b/miosix/_examples/sad_trombone/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(SadTrombone C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(sad_trombone main.cpp player.cpp adpcm.c) +miosix_link_target(sad_trombone stm32f407vg_discovery) diff --git a/miosix/_examples/servo/CMakeLists.txt b/miosix/_examples/servo/CMakeLists.txt new file mode 100644 index 00000000..c2a6b831 --- /dev/null +++ b/miosix/_examples/servo/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Servo C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(servo-prompt prompt.cpp) +miosix_link_target(servo-prompt stm32f407vg_discovery) + +add_executable(servo-sweep sweep.cpp) +miosix_link_target(servo-sweep stm32f407vg_discovery) diff --git a/miosix/_examples/streamwriter/CMakeLists.txt b/miosix/_examples/streamwriter/CMakeLists.txt new file mode 100644 index 00000000..e4f69368 --- /dev/null +++ b/miosix/_examples/streamwriter/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(StreamWriter C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(streamwriter streamwriter.cpp) +miosix_link_target(streamwriter stm32f407vg_discovery) diff --git a/miosix/_examples/termios/CMakeLists.txt b/miosix/_examples/termios/CMakeLists.txt new file mode 100644 index 00000000..616eb79f --- /dev/null +++ b/miosix/_examples/termios/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Termios C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(termios main.cpp) +miosix_link_target(termios stm32f407vg_discovery) diff --git a/miosix/_examples/thread_native/CMakeLists.txt b/miosix/_examples/thread_native/CMakeLists.txt new file mode 100644 index 00000000..8f6fe559 --- /dev/null +++ b/miosix/_examples/thread_native/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(ThreadNative C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(thread_native native_thread_example.cpp) +miosix_link_target(thread_native stm32f407vg_discovery) diff --git a/miosix/_examples/thread_pthread/CMakeLists.txt b/miosix/_examples/thread_pthread/CMakeLists.txt new file mode 100644 index 00000000..108b09bc --- /dev/null +++ b/miosix/_examples/thread_pthread/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(ThreadPthread C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(thread_pthread pthread_example.cpp) +miosix_link_target(thread_pthread stm32f407vg_discovery) diff --git a/miosix/_tools/delay_test/CMakeLists.txt b/miosix/_tools/delay_test/CMakeLists.txt new file mode 100644 index 00000000..f87e79d5 --- /dev/null +++ b/miosix/_tools/delay_test/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(DelayTest C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(delay_test delay_test.cpp) +miosix_link_target(delay_test stm32f407vg_discovery) diff --git a/miosix/_tools/feedforward_profiling/board/CMakeLists.txt b/miosix/_tools/feedforward_profiling/board/CMakeLists.txt new file mode 100644 index 00000000..3d523afa --- /dev/null +++ b/miosix/_tools/feedforward_profiling/board/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(FeedForwardBoard C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../../.. miosix EXCLUDE_FROM_ALL) +include(../../../cmake/miosix_link_target.cmake) + +add_executable(test1 test1.cpp) +miosix_link_target(test1 stm32f407vg_discovery) + +add_executable(test2 test2.cpp) +miosix_link_target(test2 stm32f407vg_discovery) + diff --git a/miosix/_tools/feedforward_profiling/test.cpp b/miosix/_tools/feedforward_profiling/board/test1.cpp similarity index 100% rename from miosix/_tools/feedforward_profiling/test.cpp rename to miosix/_tools/feedforward_profiling/board/test1.cpp diff --git a/miosix/_tools/feedforward_profiling/test2.cpp b/miosix/_tools/feedforward_profiling/board/test2.cpp similarity index 100% rename from miosix/_tools/feedforward_profiling/test2.cpp rename to miosix/_tools/feedforward_profiling/board/test2.cpp diff --git a/miosix/_tools/feedforward_profiling/CMakeLists.txt b/miosix/_tools/feedforward_profiling/profiler/CMakeLists.txt similarity index 85% rename from miosix/_tools/feedforward_profiling/CMakeLists.txt rename to miosix/_tools/feedforward_profiling/profiler/CMakeLists.txt index 5b074d1d..248d95be 100644 --- a/miosix/_tools/feedforward_profiling/CMakeLists.txt +++ b/miosix/_tools/feedforward_profiling/profiler/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1) -project(JTAG_PROFILER) +project(FeedForwardProfiler) ## Targets set(CMAKE_BUILD_TYPE Release) diff --git a/miosix/_tools/feedforward_profiling/fdstream.h b/miosix/_tools/feedforward_profiling/profiler/fdstream.h similarity index 100% rename from miosix/_tools/feedforward_profiling/fdstream.h rename to miosix/_tools/feedforward_profiling/profiler/fdstream.h diff --git a/miosix/_tools/feedforward_profiling/fdstream.tcc b/miosix/_tools/feedforward_profiling/profiler/fdstream.tcc similarity index 100% rename from miosix/_tools/feedforward_profiling/fdstream.tcc rename to miosix/_tools/feedforward_profiling/profiler/fdstream.tcc diff --git a/miosix/_tools/feedforward_profiling/jtag_profiler.cpp b/miosix/_tools/feedforward_profiling/profiler/jtag_profiler.cpp similarity index 100% rename from miosix/_tools/feedforward_profiling/jtag_profiler.cpp rename to miosix/_tools/feedforward_profiling/profiler/jtag_profiler.cpp diff --git a/miosix/_tools/fs_backend/CMakeLists.txt b/miosix/_tools/fs_backend/CMakeLists.txt new file mode 100644 index 00000000..84ef6487 --- /dev/null +++ b/miosix/_tools/fs_backend/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(FSBackend C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(fs_backend backend_benchmark.cpp) +miosix_link_target(fs_backend stm32f407vg_discovery) diff --git a/miosix/_tools/fs_misc_testcode/CMakeLists.txt b/miosix/_tools/fs_misc_testcode/CMakeLists.txt new file mode 100644 index 00000000..ad4fd84a --- /dev/null +++ b/miosix/_tools/fs_misc_testcode/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(FSMiscTestCode C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(fs_misc_testcode dirlist.cpp) +miosix_link_target(fs_misc_testcode stm32f407vg_discovery) diff --git a/miosix/_tools/processes/CMakeLists.txt b/miosix/_tools/processes/CMakeLists.txt new file mode 100644 index 00000000..20dc4de7 --- /dev/null +++ b/miosix/_tools/processes/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Processes C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +# To build this entrypoint remember to: +# - Define WITH_PROCESSES in miosix_settings.h +# - Select a linker script like stm32_1m+192k_rom_processes.ld +add_executable(processes miosix/_tools/processes/main_processes.cpp) +target_include_directories(processes PUBLIC miosix/_tools/processes) +add_custom_command( + TARGET processes + PRE_BUILD COMMAND make + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/miosix/_tools/processes/process_template +) +miosix_link_target(processes stm32f407vg_discovery) diff --git a/miosix/_tools/ram_test/CMakeLists.txt b/miosix/_tools/ram_test/CMakeLists.txt new file mode 100644 index 00000000..e3c35ac9 --- /dev/null +++ b/miosix/_tools/ram_test/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(RamTest C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +add_executable(ram_test main.cpp sha1.cpp) +miosix_link_target(ram_test stm32f407vg_discovery) diff --git a/miosix/_tools/testsuite/CMakeLists.txt b/miosix/_tools/testsuite/CMakeLists.txt new file mode 100644 index 00000000..796bb070 --- /dev/null +++ b/miosix/_tools/testsuite/CMakeLists.txt @@ -0,0 +1,86 @@ +# Copyright (C) 2024 by Skyward +# +# This program is free software; you can redistribute it and/or +# it under the terms of the GNU General Public License as published +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception, if other files instantiate templates or use +# macros or inline functions from this file, or you compile this file +# and link it with other works to produce a work based on this file, +# this file does not by itself cause the resulting work to be covered +# by the GNU General Public License. However the source code for this +# file must still be made available in accordance with the GNU +# Public License. This exception does not invalidate any other +# why a work based on this file might be covered by the GNU General +# Public License. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/> + +cmake_minimum_required(VERSION 3.25) + +project(Testsuite C CXX ASM) + +# Bypass the ckeck in miosix_settings.h +add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:PARSING_FROM_IDE>) + +add_subdirectory(../.. miosix EXCLUDE_FROM_ALL) +include(../../cmake/miosix_link_target.cmake) + +# Build the testsuite for all supported boards to test compilation +set(TESTSUITE_BOARDS + lpc2138_miosix_board + # stm32f072rb_discovery + efm32gg332f1024_wandstem + # stm32f100c8_microboard + # stm32f100c8_vaisala_rs41 + # stm32f100cb_tempsensor + # stm32f100cx_generic + # stm32f100rb_discovery + stm32f100rc_solertegiard + # stm32f103c8_breakout + # stm32f103cb_als_mainboard_rev2 + # stm32f103cx_generic + stm32f103ve_mp3v2 + stm32f103ve_strive_mini + stm32f103ze_redbull_v2 + stm32f103ze_evaluation + stm32f205_generic + stm32f205rc_skyward_stormtrooper + stm32f205rg_sony_newman + stm32f207ig_evaluation + stm32f207ze_als_camboard + stm32f207zg_ethboard_v2 + stm32f207zg_nucleo + # stm32l151c8_als_mainboard + # atsam4lcc + stm32f303vc_discovery + stm32f401re_nucleo + stm32f401vc_discovery + stm32f407vg_bitsboard + stm32f407vg_discovery + stm32f407vg_thermal_test_chip + stm32f411ce_blackpill + stm32f411re_nucleo + stm32f429zi_oledboard2 + stm32f429zi_skyward_anakin + stm32f429zi_skyward_homeone + stm32f429zi_discovery + stm32f469ni_discovery + stm32l4r9zi_sensortile + stm32l476rg_nucleo + stm32f746zg_nucleo + stm32f767zi_nucleo + # stm32f769ni_discovery + stm32h753xi_evaluation +) +foreach(OPT_BOARD ${TESTSUITE_BOARDS}) + add_executable(testsuite-${OPT_BOARD} testsuite.cpp) + miosix_link_target(testsuite-${OPT_BOARD} ${OPT_BOARD}) +endforeach() -- GitLab