-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (40 loc) · 1.28 KB
/
Makefile
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
##### Project #####
PROJECT ?= app
# Top path of the template
TOP = .
# The path for generated files
BUILD_DIR = Build
##### Options #####
##### Toolchains #######
#GCC_TOOCHAIN ?= /opt/gcc-riscv/xpack-riscv-none-embed-gcc-10.2.0-1.2/bin
#GCC_TOOCHAIN ?= /opt/gcc-riscv/xpack-riscv-none-elf-gcc-12.2.0-3/bin
#GCC_TOOCHAIN ?= /opt/gcc-riscv/riscv-wch-embedded-gcc-v1.60/bin
#GCC_TOOCHAIN ?= /opt/gcc-riscv/riscv-wch-embedded-gcc-v1.70/bin
#GCC_TOOCHAIN ?= /opt/gcc-riscv/riscv-wch-embedded-gcc-v1.91/bin
GCC_TOOCHAIN ?= /opt/gcc-riscv/riscv-wch-embedded-gcc12-v170/bin
# GCC 12: riscv-none-elf-
# GCC 11 and below: riscv-none-embed-
GCC_PREFIX ?= riscv-none-elf-
OPENOCD_PATH ?= /opt/openocd/wch-openocd-v1.91/bin
##### Paths ############
LDSCRIPT = Libraries/Ld/Link.ld
OPENOCD_CFG = Misc/wch-riscv.cfg.v1.91
# add INT_SOFT for non-wch gcc
LIB_FLAGS =
# C source folders
CDIRS := User \
Libraries/RVMSIS \
Libraries/StdPeriphDriver
# C source files (if there are any single ones)
CFILES :=
# ASM source folders
ADIRS := User
# ASM single files
AFILES := Libraries/Startup/startup_CH583.S
LIBS := Libraries/StdPeriphDriver/libISP583.a
# Include paths
INCLUDES := User \
Libraries/RVMSIS \
Libraries/StdPeriphDriver/inc
##### Optional Libraries ############
include ./rules.mk