forked from fedetft/miosix-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
172 lines (146 loc) · 6.4 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Copyright (C) 2023 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)
include(miosix/cmake/mbs.cmake)
project(MiosixExamples)
#-----------------------------------------------------------------------------#
# Examples #
#-----------------------------------------------------------------------------#
add_executable(asm miosix/_examples/asm/main.s)
mbs_target(asm stm32f407vg_stm32f4discovery)
add_executable(atsam4l_lcd miosix/_examples/atsam4l_lcd/main.cpp)
mbs_target(atsam4l_lcd atsam4lc2aa_generic)
add_executable(blinking_led miosix/_examples/blinking_led/simple.cpp)
mbs_target(blinking_led stm32f429zi_stm32f4discovery)
add_executable(datalogger
${KPATH}/_examples/datalogger/main.cpp
${KPATH}/_examples/datalogger/Logger.cpp
${KPATH}/_examples/datalogger/tscpp/buffer.cpp
)
target_include_directories(datalogger PUBLIC miosix/_examples/datalogger/)
mbs_target(datalogger stm32f407vg_stm32f4discovery)
add_executable(hd44780 miosix/_examples/hd44780/hd44780.cpp)
mbs_target(hd44780 stm32f407vg_stm32f4discovery)
add_executable(ir_decoder miosix/_examples/ir_decoder/ir_decoder.cpp)
mbs_target(ir_decoder stm32f407vg_stm32f4discovery)
add_executable(led_display miosix/_examples/led_display/main.cpp)
mbs_target(led_display stm32f100rb_stm32vldiscovery)
add_executable(sad_trombone
miosix/_examples/sad_trombone/main.cpp
miosix/_examples/sad_trombone/player.cpp
miosix/_examples/sad_trombone/adpcm.c
)
mbs_target(sad_trombone stm32f407vg_stm32f4discovery)
add_executable(servo-prompt miosix/_examples/servo/prompt.cpp)
mbs_target(servo-prompt stm32f407vg_stm32f4discovery)
add_executable(servo-sweep miosix/_examples/servo/sweep.cpp)
mbs_target(servo-sweep stm32f407vg_stm32f4discovery)
add_executable(streamwriter miosix/_examples/streamwriter/streamwriter.cpp)
mbs_target(streamwriter stm32f407vg_stm32f4discovery)
add_executable(termios miosix/_examples/termios/main.cpp)
mbs_target(termios stm32f407vg_stm32f4discovery)
add_executable(thread_native miosix/_examples/thread_native/native_thread_example.cpp)
mbs_target(thread_native stm32f407vg_stm32f4discovery)
add_executable(thread_pthread miosix/_examples/thread_pthread/pthread_example.cpp)
mbs_target(thread_pthread stm32f407vg_stm32f4discovery)
#-----------------------------------------------------------------------------#
# Others #
#-----------------------------------------------------------------------------#
add_executable(delay_test miosix/_tools/delay_test/delay_test.cpp)
mbs_target(delay_test stm32f407vg_stm32f4discovery)
add_executable(feedforward_profiling miosix/_tools/feedforward_profiling/test.cpp)
mbs_target(feedforward_profiling stm32f407vg_stm32f4discovery)
add_executable(fs_backend miosix/_tools/fs_backend/backend_benchmark.cpp)
mbs_target(fs_backend stm32f407vg_stm32f4discovery)
add_executable(fs_misc_testcode miosix/_tools/fs_misc_testcode/dirlist.cpp)
mbs_target(fs_misc_testcode stm32f407vg_stm32f4discovery)
# To build this entrypoint remember to define WITH_PROCESSES in miosix_settings.h
# add_executable(processes miosix/_tools/processes/main_processes.cpp)
# target_include_directories(processes PUBLIC miosix/_tools/processes/)
# add_custom_command(
# TARGET processes
# COMMAND make
# WORKING_DIRECTORY ${KPATH}/_tools/processes/process_template
# )
# mbs_target(processes stm32f407vg_stm32f4discovery)
add_executable(ram_test
miosix/_tools/ram_test/main.cpp
miosix/_tools/ram_test/sha1.cpp
)
mbs_target(ram_test stm32f407vg_stm32f4discovery)
# If you want to test the MPU remember to run build.sh in miosix/_tools/testsuite
# add_executable(testsuite miosix/_tools/testsuite/testsuite.cpp)
# mbs_target(testsuite stm32f407vg_stm32f4discovery)
# Build the testsuite for all supported boards to test compilation
set(TESTSUITE_BOARDS
lpc2138_miosix_board
# stm32f072rb_stm32f0discovery
efm32gg332f1024_wandstem
# stm32f100c8_microboard
# stm32f100c8_vaisala_rs41
# stm32f100cb_tempsensor
# stm32f100cx_generic
# stm32f100rb_stm32vldiscovery
stm32f100rc_solertegiard
# stm32f103c8_breakout
# stm32f103cb_als_mainboard_rev2
# stm32f103cx_generic
stm32f103ve_mp3v2
stm32f103ve_strive_mini
stm32f103ze_redbull_v2
stm32f103ze_stm3210e-eval
stm32f205_generic
stm32f205rc_skyward_stormtrooper
stm32f205rg_sony-newman
stm32f207ig_stm3220g-eval
stm32f207ze_als_camboard
stm32f207zg_EthBoardV2
stm32f207zg_nucleo
# stm32l151c8_als_mainboard
# atsam4lcc
stm32f303vc_stm32f3discovery
stm32f401re_nucleo
stm32f401vc_stm32f4discovery
stm32f407vg_bitsboard
stm32f407vg_stm32f4discovery
stm32f407vg_thermal_test_chip
stm32f411ce_blackpill
stm32f411re_nucleo
stm32f429zi_oledboard2
stm32f429zi_skyward_anakin
stm32f429zi_skyward_homeone
stm32f429zi_stm32f4discovery
stm32f469ni_stm32f469i-disco
stm32l4r9zi_sensortile
stm32l476rg_nucleo
stm32f746zg_nucleo
stm32f767zi_nucleo
# stm32f769ni_discovery
stm32h753xi_eval
)
foreach(OPT_BOARD ${TESTSUITE_BOARDS})
add_executable(testsuite-${OPT_BOARD} miosix/_tools/testsuite/testsuite.cpp)
mbs_target(testsuite-${OPT_BOARD} ${OPT_BOARD})
endforeach()