Skip to content

Commit 057ecd3

Browse files
authored
Merge pull request #417 from liuhy-2020/chibios-21.11.x
Added support for MCU ES32F0283.
2 parents f2107fc + 794f67c commit 057ecd3

File tree

11 files changed

+2211
-0
lines changed

11 files changed

+2211
-0
lines changed

demos/ES32/ES32F0283/Makefile

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
##############################################################################
2+
# Build global options
3+
# NOTE: Can be overridden externally.
4+
#
5+
6+
# Compiler options here.
7+
ifeq ($(USE_OPT),)
8+
USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
9+
endif
10+
11+
# C specific options here (added to USE_OPT).
12+
ifeq ($(USE_COPT),)
13+
USE_COPT =
14+
endif
15+
16+
# C++ specific options here (added to USE_OPT).
17+
ifeq ($(USE_CPPOPT),)
18+
USE_CPPOPT = -fno-rtti
19+
endif
20+
21+
# Enable this if you want the linker to remove unused code and data.
22+
ifeq ($(USE_LINK_GC),)
23+
USE_LINK_GC = yes
24+
endif
25+
26+
# Linker extra options here.
27+
ifeq ($(USE_LDOPT),)
28+
USE_LDOPT =
29+
endif
30+
31+
# Enable this if you want link time optimizations (LTO).
32+
ifeq ($(USE_LTO),)
33+
USE_LTO = yes
34+
endif
35+
36+
# Enable this if you want to see the full log while compiling.
37+
ifeq ($(USE_VERBOSE_COMPILE),)
38+
USE_VERBOSE_COMPILE = no
39+
endif
40+
41+
# If enabled, this option makes the build process faster by not compiling
42+
# modules not used in the current configuration.
43+
ifeq ($(USE_SMART_BUILD),)
44+
USE_SMART_BUILD = no
45+
endif
46+
47+
#
48+
# Build global options
49+
##############################################################################
50+
51+
##############################################################################
52+
# Architecture or project specific options
53+
#
54+
55+
# Stack size to be allocated to the Cortex-M process stack. This stack is
56+
# the stack used by the main() thread.
57+
ifeq ($(USE_PROCESS_STACKSIZE),)
58+
USE_PROCESS_STACKSIZE = 0x400
59+
endif
60+
61+
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
62+
# stack is used for processing interrupts and exceptions.
63+
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
64+
USE_EXCEPTIONS_STACKSIZE = 0x400
65+
endif
66+
67+
# Enables the use of FPU (no, softfp, hard).
68+
ifeq ($(USE_FPU),)
69+
USE_FPU = no
70+
endif
71+
72+
# FPU-related options.
73+
ifeq ($(USE_FPU_OPT),)
74+
USE_FPU_OPT =
75+
endif
76+
77+
#
78+
# Architecture or project specific options
79+
##############################################################################
80+
81+
##############################################################################
82+
# Project, target, sources and paths
83+
#
84+
85+
# Define project name here
86+
PROJECT = ch
87+
88+
# Target settings.
89+
MCU = cortex-m0
90+
91+
# Imported source files and paths.
92+
CHIBIOS := ../../../../ChibiOS
93+
CHIBIOS_CONTRIB := ../../../
94+
CONFDIR := ./cfg
95+
BUILDDIR := ./build
96+
DEPDIR := ./.dep
97+
BOARDDIR := $(CHIBIOS_CONTRIB)/os/hal/boards/ES32F0283
98+
99+
# Licensing files.
100+
include $(CHIBIOS)/os/license/license.mk
101+
# Startup files.
102+
include $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_ES32F0283.mk
103+
# HAL-OSAL files (optional).
104+
include $(CHIBIOS)/os/hal/hal.mk
105+
include $(CHIBIOS_CONTRIB)/os/hal/ports/ES32/ES32F0283/platform.mk
106+
include $(BOARDDIR)/board.mk
107+
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
108+
# RTOS files (optional).
109+
include $(CHIBIOS)/os/rt/rt.mk
110+
include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk
111+
# Auto-build files in ./source recursively.
112+
include $(CHIBIOS)/tools/mk/autobuild.mk
113+
# Other files (optional).
114+
include $(CHIBIOS)/os/test/test.mk
115+
include $(CHIBIOS)/test/rt/rt_test.mk
116+
include $(CHIBIOS)/test/oslib/oslib_test.mk
117+
118+
# Define linker script file here
119+
LDSCRIPT= $(STARTUPLD_CONTRIB)/ES32F0283.ld
120+
121+
# C sources that can be compiled in ARM or THUMB mode depending on the global
122+
# setting.
123+
CSRC = $(ALLCSRC) \
124+
$(TESTSRC) \
125+
main.c
126+
127+
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
128+
# setting.
129+
CPPSRC = $(ALLCPPSRC)
130+
131+
# List ASM source files here.
132+
ASMSRC = $(ALLASMSRC)
133+
134+
# List ASM with preprocessor source files here.
135+
ASMXSRC = $(ALLXASMSRC)
136+
137+
# Inclusion directories.
138+
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
139+
140+
# Define C warning options here.
141+
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -Wno-unused-function
142+
143+
# Define C++ warning options here.
144+
CPPWARN = -Wall -Wextra -Wundef -Wno-unused-function
145+
146+
#
147+
# Project, target, sources and paths
148+
##############################################################################
149+
150+
##############################################################################
151+
# Start of user section
152+
#
153+
154+
# List all user C define here, like -D_DEBUG=1
155+
UDEFS = -DPORT_IGNORE_GCC_VERSION_CHECK
156+
157+
# Define ASM defines here
158+
UADEFS = -DPORT_IGNORE_GCC_VERSION_CHECK
159+
160+
# List all user directories here
161+
UINCDIR =
162+
163+
# List the user directory to look for the libraries here
164+
ULIBDIR =
165+
166+
# List all user libraries here
167+
ULIBS =
168+
169+
#
170+
# End of user section
171+
##############################################################################
172+
173+
##############################################################################
174+
# Common rules
175+
#
176+
177+
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
178+
include $(RULESPATH)/arm-none-eabi.mk
179+
include $(RULESPATH)/rules.mk
180+
181+
#
182+
# Common rules
183+
##############################################################################
184+
185+
##############################################################################
186+
# Custom rules
187+
#
188+
189+
#
190+
# Custom rules
191+
##############################################################################

0 commit comments

Comments
 (0)