2022-12-28 02:24:02 +08:00
|
|
|
#-*- encoding: utf-8 -*-
|
|
|
|
|
|
|
|
import os
|
2023-01-09 10:14:23 +08:00
|
|
|
from building import *
|
2022-12-28 02:24:02 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
# Package configuration
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
PKGNAME = "bmsis"
|
|
|
|
VERSION = "v1.0.0"
|
|
|
|
DEPENDS = [""]
|
|
|
|
#DEPENDS = ["PKG_USING_RW007"]
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
2023-01-09 10:14:23 +08:00
|
|
|
# Compile the configuration
|
2022-12-28 02:24:02 +08:00
|
|
|
#
|
|
|
|
# SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
|
2023-01-09 10:14:23 +08:00
|
|
|
#
|
2022-12-28 02:24:02 +08:00
|
|
|
# LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
|
2023-01-09 10:14:23 +08:00
|
|
|
# LOCAL_CCFLAGS: Local compilation parameter
|
2022-12-28 02:24:02 +08:00
|
|
|
# LOCAL_ASFLAGS: Local assembly parameters
|
2023-01-09 10:14:23 +08:00
|
|
|
#
|
|
|
|
# CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
|
2022-12-28 02:24:02 +08:00
|
|
|
# is empty # no pass!!!
|
2023-01-09 10:14:23 +08:00
|
|
|
# CCFLAGS: Global compilation parameter
|
2022-12-28 02:24:02 +08:00
|
|
|
# ASFLAGS: Global assembly parameters
|
|
|
|
#
|
|
|
|
# CPPDEFINES: Global macro definition
|
2023-01-09 10:14:23 +08:00
|
|
|
# LOCAL_CPPDEFINES: Local macro definition
|
|
|
|
#
|
2022-12-28 02:24:02 +08:00
|
|
|
# LIBS: Specify the static library that need to be linked
|
|
|
|
# LIBPATH: Specify the search directory for the library file (.lib/.a)
|
|
|
|
#
|
|
|
|
# LINKFLAGS: Link options
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
SOURCES = Glob("./source/*.c")
|
|
|
|
SOURCES += Glob("./source/startup_ch32v20x_D8W.S")
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
LOCAL_CPPPATH = []
|
|
|
|
LOCAL_CCFLAGS = ""
|
2022-12-28 02:24:02 +08:00
|
|
|
LOCAL_ASFLAGS = ""
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
CPPPATH = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'include')]
|
|
|
|
CCFLAGS = ""
|
2022-12-28 02:24:02 +08:00
|
|
|
ASFLAGS = ""
|
|
|
|
|
|
|
|
CPPDEFINES = []
|
|
|
|
LOCAL_CPPDEFINES = []
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
LIBS = []
|
|
|
|
LIBPATH = []
|
2022-12-28 02:24:02 +08:00
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
LINKFLAGS = ""
|
2022-12-28 02:24:02 +08:00
|
|
|
|
|
|
|
SOURCES_IGNORE = []
|
|
|
|
CPPPATH_IGNORE = []
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
# Main target
|
|
|
|
#---------------------------------------------------------------------------------
|
2023-01-09 10:14:23 +08:00
|
|
|
objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
|
|
|
|
CPPPATH = CPPPATH,
|
|
|
|
CCFLAGS = CCFLAGS,
|
|
|
|
ASFLAGS = ASFLAGS,
|
|
|
|
LOCAL_CPPPATH = LOCAL_CPPPATH,
|
|
|
|
LOCAL_CCFLAGS = LOCAL_CCFLAGS,
|
|
|
|
LOCAL_ASFLAGS = LOCAL_ASFLAGS,
|
|
|
|
CPPDEFINES = CPPDEFINES,
|
|
|
|
LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
|
|
|
|
LIBS = LIBS,
|
2022-12-28 02:24:02 +08:00
|
|
|
LIBPATH = LIBPATH,
|
2023-01-09 10:14:23 +08:00
|
|
|
LINKFLAGS = LINKFLAGS)
|
2022-12-28 02:24:02 +08:00
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
Return("objs")
|
2022-12-28 02:24:02 +08:00
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
# End
|
|
|
|
#---------------------------------------------------------------------------------
|