-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
73 lines (60 loc) · 2.12 KB
/
meson.build
File metadata and controls
73 lines (60 loc) · 2.12 KB
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
project('freertos', 'c')
conf_data = configuration_data()
conf_data.set('configTOTAL_HEAP_SIZE', get_option('heap_size'))
conf_data.set('configTICK_RATE_HZ', get_option('tick_rate_hz'))
conf_data.set('configCPU_CLOCK_HZ', get_option('cpu_clock_hz'))
conf_data.set('configHEAP_SECTION', get_option('heap_section'))
sdir = 'upstream/'
freertos_inc = ['upstream/include', '.']
freertos_src = files([
sdir + 'croutine.c',
sdir + 'event_groups.c',
sdir + 'list.c',
sdir + 'queue.c',
sdir + 'tasks.c',
sdir + 'timers.c',
'src/freertos_print.c',
])
if (get_option('heap_size') > 0)
freertos_src += files([
sdir + 'portable/MemMang/heap_4.c',
'src/malloc.c',
'src/heap.c',
])
conf_data.set('configSUPPORT_DYNAMIC_ALLOCATION', 1)
conf_data.set('configAPPLICATION_ALLOCATED_HEAP', 1)
endif
configure_file(output : 'freertos_config.h', configuration: conf_data)
freertos_deps = []
freertos_deps += dependency('start', fallback: ['start', 'start_dep'])
freertos_deps += dependency('libc', fallback: ['picolibc', 'picolibc_dep'])
if get_option('arch') == 'c21'
freertos_port = meson.get_external_property('freertos_port')
freertos_src += files(sdir + 'portable/' + freertos_port + '/portasm.c')
endif
if get_option('arch') == 'c21' or get_option('arch') == 'e70'
freertos_src += files(['src/' + get_option('arch') + '/freertos_hooks.c'])
freertos_port = meson.get_external_property('freertos_port')
freertos_src += files(sdir + 'portable/' + freertos_port + '/port.c')
freertos_inc += sdir + 'portable/' + freertos_port
freertos_inc += 'src/' + get_option('arch')
elif get_option('arch') == 'zynq'
freertos_src += files(['src/zynq/port.c', 'src/zynq/portZynq7000.c'])
freertos_inc += 'src/zynq'
else
error('Must explicitly specify freertos:arch')
endif
freertos_inc = include_directories(freertos_inc)
freertos_lib = static_library('freertos',
include_directories : freertos_inc,
sources : freertos_src,
dependencies: freertos_deps,
)
freertos_dep = declare_dependency(
include_directories : freertos_inc,
link_with : freertos_lib,
)
freertos_dep_whole = declare_dependency(
include_directories : freertos_inc,
link_whole : freertos_lib,
)