-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.projbuild
104 lines (91 loc) · 2.93 KB
/
Makefile.projbuild
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
ifneq (foo$(TEST_COMPONENTS), foo)
CFLAGS += -DRUN_TESTS
endif
CFLAGS += -DCONFIG_MAX_FD_BITS=4
CFLAGS += -DLWIP_IPV6=1
CFLAGS += -DLWIP_RAW=1
CFLAGS += -DLWIP_SO_LINGER=1
CFLAGS += -Wno-error=implicit-function-declaration -Wno-error=pointer-sign
LDFLAGS += -Wl,--wrap=_open_r
LDFLAGS += -Wl,--wrap=_unlink_r
LDFLAGS += -Wl,--wrap=_rename_r
LDFLAGS += -Wl,--wrap=_stat_r
LDFLAGS += -Wl,--wrap=mkdir
LDFLAGS += -Wl,--wrap=opendir
#LDFLAGS += -Wl,--wrap=closedir
#LDFLAGS += -Wl,--wrap=readdir
LDFLAGS += -Wl,--wrap=lwip_socket
LDFLAGS += -Wl,--wrap=lwip_accept_r
LDFLAGS += -Wl,--wrap=lwip_bind_r
LDFLAGS += -Wl,--wrap=lwip_shutdown_r
LDFLAGS += -Wl,--wrap=lwip_getpeername_r
LDFLAGS += -Wl,--wrap=lwip_getsockname_r
LDFLAGS += -Wl,--wrap=lwip_getsockopt_r
LDFLAGS += -Wl,--wrap=lwip_setsockopt_r
LDFLAGS += -Wl,--wrap=lwip_connect_r
LDFLAGS += -Wl,--wrap=lwip_listen_r
LDFLAGS += -Wl,--wrap=lwip_recv_r
LDFLAGS += -Wl,--wrap=lwip_read_r
LDFLAGS += -Wl,--wrap=lwip_recvfrom_r
LDFLAGS += -Wl,--wrap=lwip_send_r
LDFLAGS += -Wl,--wrap=lwip_sendmsg_r
LDFLAGS += -Wl,--wrap=lwip_sendto_r
LDFLAGS += -Wl,--wrap=lwip_write_r
LDFLAGS += -Wl,--wrap=lwip_writev_r
LDFLAGS += -Wl,--wrap=lwip_select
LDFLAGS += -Wl,--wrap=lwip_ioctl_r
LDFLAGS += -Wl,--wrap=lwip_fcntl_r
CFLAGS += -DPLATFORM_ESP32
CFLAGS += -DKERNEL
CFLAGS += -DLUA_USE_CTYPE
CFLAGS += -DLUA_32BITS
CFLAGS += -DLUA_USE_CTYPE
CFLAGS += -DLUA_C89_NUMBERS
#
# LuaOS configuration
#
CFLAGS += -DCPU_HZ=240000000L # CPU frequency in hertz
CFLAGS += -DCORE_TIMER_HZ=240000000L # CPU core timer frequency
CFLAGS += -D_CLOCKS_PER_SEC_=configTICK_RATE_HZ # Number of interrupt ticks for reach 1 second
CFLAGS += -DMTX_USE_EVENTS=0 # Use event groups in mtx implementation (experimental)
CFLAGS += -DUSE_RTC=0 # Enable RTC
CFLAGS += -DPATH_MAX=64
CFLAGS += -DMAXNAMLEN=64
#
# SDCARD configuration
#
CFLAGS += -DSD_KHZ=15000 # Speed
#
# Display driver configuration
#
CFLAGS += -DDISPLAY_SPI=3
CFLAGS += -DDISPLAY_CS=5
CFLAGS += -DDISPLAY_RE=25
CFLAGS += -DDISPLAY_RS=26
#
# I2C driver configuration
#
CFLAGS += -DI2C1_PINS=0
CFLAGS += -DI2C2_PINS=0
CFLAGS += -DI2C3_PINS=0
CFLAGS += -DI2C4_PINS=0
CFLAGS += -DI2C5_PINS=0
#
# Lua configuration
#
CFLAGS += -DDEBUG_FREE_MEM=0 # Enable LUA free mem debug utility (only for debug purposes)
CFLAGS += -DLUA_USE_LUA_LOCK=0 # Enable if Lua must use real lua_lock / lua_unlock implementation
CFLAGS += -DLUA_USE_SAFE_SIGNAL=0 # Enable use of LuaOS safe signal (experimental)
# CFLAGS += -DSTRCACHE_N=1
# CFLAGS += -DSTRCACHE_M=1
# CFLAGS += -DMINSTRTABSIZE=32
CFLAGS += -DLUA_USE_SHELL=1
CFLAGS += -DLUA_USE_EDITOR=1
CFLAGS += -DLUA_USE_HISTORY=1
# Define BUILD_TIME flag, with the EPOCH time when Lua RTOS is build.
# This is used for set system time when RTC is not set.
ifneq (foo$(LUA_RTOS_BUILD_TIME), foo)
CFLAGS += -DBUILD_TIME=$(LUA_RTOS_BUILD_TIME)
else
CFLAGS += -DBUILD_TIME=$(shell date +%s)
endif