Skip to content

Commit 4266a22

Browse files
committed
fix: 删除构建前bat脚本的注释,避免一些玄学问题
1 parent 1c40962 commit 4266a22

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Air MCU
2-
version=0.1.4
2+
version=0.1.5
33

44
## compiler variables 编译器的路径
55
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/

system/extras/prebuild.bat

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,11 @@ set BUILD_PATH=%1
33
set BUILD_SOURCE_PATH=%2
44
set BOARD_PLATFORM_PATH=%3
55

6-
:: 如果 sketch 目录不存在,则创建该目录
76
if not exist "%BUILD_PATH%\sketch" mkdir "%BUILD_PATH%\sketch"
8-
9-
:: 如果原始的 sketch 目录中不存在 build_opt.h 文件,则创建空的 build.opt 文件
10-
:: 然后添加或追加 -fmacro-prefix-map 选项以将 __FILE__ 的绝对路径转换为相对路径
11-
:: (即包含 boards.txt 文件的文件夹)。
127
if not exist "%BUILD_SOURCE_PATH%\build_opt.h" (
138
echo -e "-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." > "%BUILD_PATH%\sketch\build.opt"
149
) else (
15-
:: 否则将 build_opt.h 文件复制为 build.opt
16-
:: 这是对 arduino-cli 执行的头文件预处理的一种解决方法
17-
:: 参见 https://github.com/arduino/arduino-cli/issues/1338
1810
copy "%BUILD_SOURCE_PATH%\build_opt.h" "%BUILD_PATH%\sketch\build.opt"
1911
echo -e "-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." >> "%BUILD_PATH%\sketch\build.opt"
2012
)
21-
22-
:: 强制包含 SrcWrapper 库
2313
echo #include ^<SrcWrapper.h^> > "%BUILD_PATH%\sketch\SrcWrapper.cpp"

0 commit comments

Comments
 (0)