1 Star 0 Fork 35

mars/RV-LINK

forked from 半斗米/RV-LINK 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.py 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
Bits 提交于 2019-10-10 13:30 . pio build pass.
from os.path import isdir, join
Import("env")
board = env.BoardConfig()
PROJ_DIR = "$PROJECT_DIR"
env.Replace(
ASFLAGS = ["-x", "assembler-with-cpp"],
CCFLAGS=[
"-Og",
"-g",
"-Wall",
"-march=%s" % board.get("build.march"),
"-mabi=%s" % board.get("build.mabi"),
#"-mcmodel=%s" % board.get("build.mcmodel"),
"-fshort-wchar",
"-ffunction-sections",
"-fdata-sections",
"-fstack-usage",
"-msmall-data-limit=8",
],
LINKFLAGS=[
"-march=%s" % board.get("build.march"),
"-mabi=%s" % board.get("build.mabi"),
#"-mcmodel=%s" % board.get("build.mcmodel"),
"-msmall-data-limit=8",
"-nostartfiles",
"-Wl,--gc-sections",
#"-specs=nano.specs"
],
LIBS=["c_nano"]
)
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
env.Append(
CPPPATH = [
join(PROJ_DIR, "src", "app", "gdb-server"),
join(PROJ_DIR, "src", "include"),
join(PROJ_DIR, "src", "link"),
join(PROJ_DIR, "src", "target", "family", "gd32vf103"),
join(PROJ_DIR, "src", "target", "arch", "riscv"),
join(PROJ_DIR, "src"),
join(PROJ_DIR, "src", "link", "longan-nano"),
join(PROJ_DIR, "src", "link", "gd32vf103c-start"),
join(PROJ_DIR, "src", "link", "gd32vf103c-start", "GD32VF103_standard_peripheral"),
join(PROJ_DIR, "src", "link", "gd32vf103c-start", "GD32VF103_standard_peripheral", "Include"),
join(PROJ_DIR, "src", "link", "gd32vf103c-start", "GD32VF103_usbfs_driver", "Include"),
join(PROJ_DIR, "src", "link", "gd32vf103c-start", "RISCV", "drivers"),
]
)
env.Replace(
LDSCRIPT_PATH = join(PROJ_DIR, "src", "link", "gd32vf103c-start", "RISCV", "gcc", board.get("build.ldscript"))
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/szmars/RV-LINK.git
git@gitee.com:szmars/RV-LINK.git
szmars
RV-LINK
RV-LINK
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385