-
Notifications
You must be signed in to change notification settings - Fork 19
/
SConscript
83 lines (75 loc) · 1.7 KB
/
SConscript
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
#
# Copyright (c) Michael Tharp <gxti@partiallystapled.com>
#
# This file is distributed under the terms of the MIT License.
# See the LICENSE file at the top of this tree, or if it is missing a copy can
# be found at http://opensource.org/licenses/MIT
#
Import('env')
env = env.Clone()
# Include path
env.PrependUnique(CPPPATH="""
src/conf
src
ports
lib
lib/lwip
lwip/src/include
lwip/src/include/ipv4
lwip/src/include/ipv6
FreeRTOS/Source/include
FreeRTOS/Source/portable/GCC/ARM_CM3
""".split())
# Regular sources
srcs = env.Globs("""
src/*.c
src/gps/*.c
src/net/*.c
lib/cmdline/core.c
lib/cmdline/settings.c
lib/freertos_plat.c
lib/hardfault.c
lib/info_table.c
lib/lwip/arch/sys_arch.c
lib/stm32/dma.c
lib/stm32/eth_mac.c
lib/stm32/i2c.c
lib/stm32/iwdg.c
lib/stm32/serial.c
lib/uptime.c
lib/util/parse.c
ports/core_cm3.c
ports/crt0.c
ports/stubs.c
ports/vectors.c
""")
# Build third-party code with relaxed warnings
libs = env.Object(env.Globs("""
lib/crypto/md5_dgst.c
lib/crypto/sha1dgst.c
lib/crypto/sha1_thumb.s
lwip/src/api/*.c
lwip/src/core/api/*.c
lwip/src/core/*.c
lwip/src/core/ipv4/*.c
lwip/src/core/ipv6/*.c
lwip/src/core/snmp/*.c
lwip/src/netif/etharp.c
FreeRTOS/Source/list.c
FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
FreeRTOS/Source/portable/MemMang/heap_3.c
FreeRTOS/Source/queue.c
FreeRTOS/Source/tasks.c
FreeRTOS/Source/timers.c
"""), CFLAGS_USER='$CFLAGS_USER -Wno-unused-value -Wno-error=aggressive-loop-optimizations')
env.VersionH('src/version.h',
HW_VERSION='$HW_VERSION',
HSE_FREQ='$HSE_FREQ',
)
default = env.EmbeddedProgram('laureline.elf',
srcs + libs,
script='ports/STM32F107xB.ld',
LIBS=['m', 'nosys'],
)
Alias('install', env.GDBInstall(default[0]))
Return('default')