rt-thread/bsp/acm32/acm32f4xx-nucleo/SConstruct

35 lines
1001 B
Python
Raw Normal View History

2021-09-22 17:14:47 +08:00
import os
import sys
import rtconfig
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
else:
2022-03-29 17:36:01 +08:00
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
2021-09-22 17:14:47 +08:00
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import *
TARGET = 'rtthread_acm32f4xx.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
2023-01-09 10:14:23 +08:00
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
2021-09-22 17:14:47 +08:00
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM in ['iccarm']:
2023-01-09 10:14:23 +08:00
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
2021-09-22 17:14:47 +08:00
Export('RTT_ROOT')
Export('rtconfig')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
# make a building
DoBuilding(TARGET, objs)