From c67c5347290997200eceb2402e030d94de3390f8 Mon Sep 17 00:00:00 2001 From: jujihjuji <14168930+jujihjuji@user.noreply.gitee.com> Date: Tue, 21 Apr 2026 11:21:45 +0800 Subject: [PATCH] =?UTF-8?q?update(SConstruct):=E6=B7=BB=E5=8A=A0=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E7=BC=96=E8=AF=91=E6=8C=87=E4=BB=A4--EDU=5FTraining?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SConstruct | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SConstruct b/SConstruct index c88498f..3f6886c 100644 --- a/SConstruct +++ b/SConstruct @@ -2,6 +2,15 @@ import os import sys import rtconfig +# 增加参数 --custom EDU_Training +AddOption( + "--custom", + dest="custom", + type="string", + help="Specify the custom version, Edu_training etc.", +) + + if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') else: @@ -30,6 +39,10 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) +if GetOption("custom") == "EDU_Training": + env.Append(CPPDEFINES=["EDU_TRAINING"]) + print("Custom version: " + GetOption("custom")) + if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = [''])