From ce938e9756d29d288d98338693ccd3621ccd9f7f Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Sat, 21 Sep 2024 21:02:31 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=5F?= =?UTF-8?q?=5Fwrap=5FgetBuildInfo=E5=87=BD=E6=95=B0,=20=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=87=BA=E6=97=B6=E9=97=B4=E6=97=A0=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E5=9B=BA=E4=BB=B6,=20=E9=BB=98=E8=AE=A4=E4=B8=8D?= =?UTF-8?q?=E5=BC=80=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interface/src/__wrap.c | 9 +++++++++ project/project.lua | 2 ++ 2 files changed, 11 insertions(+) diff --git a/interface/src/__wrap.c b/interface/src/__wrap.c index 9d416caf..2858f6ce 100644 --- a/interface/src/__wrap.c +++ b/interface/src/__wrap.c @@ -75,3 +75,12 @@ __attribute__((used)) time_t __wrap_time (time_t *_Time) } return timeUtc->UTCsecs; } + +#include "bsp.h" +uint8_t* __wrap_getBuildInfo(void) +{ + return (uint8_t *)( + STRING_EOL"-- Board: " CHIP_TYPE " -- "STRING_EOL \ + VERSION_INFO STRING_EOL + ); +} diff --git a/project/project.lua b/project/project.lua index 846ae541..c410ce93 100644 --- a/project/project.lua +++ b/project/project.lua @@ -101,6 +101,8 @@ function description_csdk() "-Wl,--wrap=localtime", "-Wl,--wrap=gmtime", "-Wl,--wrap=time", + -- 开启这个配置,使用相同源码重复编译,会得到一样的固件,不随时间变化 + -- "-Wl,--wrap=getBuildInfo", {force = true}) -- 已经生效的GCC警告信息