From ecb391b1e61b8e7ab9117b14664981b1953e1ebb Mon Sep 17 00:00:00 2001 From: Wuchuyuan <1917507415@qq.com> Date: Wed, 19 Aug 2026 17:02:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E8=BD=BD=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BA=AF=20ASCII=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=20cmd=20=E6=8C=89=20GBK=20=E6=8B=86=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .gitattributes | 16 ++++++++++++++++ cpu/br28/tools/download.c | 2 +- .../download/earphone/download_app_ota.bat | 18 +++++++++--------- 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dacd60b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# Windows cmd.exe 按系统 ANSI(中文 Windows 为 GBK)解析 .bat +# 因此:换行必须是 CRLF;.bat 正文保持纯 ASCII,不要写中文 +*.bat text eol=crlf +*.cmd text eol=crlf + +# 厂商二进制 / 库:禁止当文本做换行转换 +*.exe binary +*.dll binary +*.a binary +*.bin binary +*.boot binary +*.key binary +*.ufw binary +*.fw binary +*.wts binary +*.uart binary diff --git a/cpu/br28/tools/download.c b/cpu/br28/tools/download.c index 4d23cfb..a55c38d 100644 --- a/cpu/br28/tools/download.c +++ b/cpu/br28/tools/download.c @@ -189,7 +189,7 @@ call download/earphone/download.bat #else call download/earphone/download_app_ota.bat #endif -#elif defined(CONFIG_HID_CASE_ENABLE) ||defined(CONFIG_SPP_AND_LE_CASE_ENABLE)||defined(CONFIG_MESH_CASE_ENABLE)||defined(CONFIG_DONGLE_CASE_ENABLE) //数传 +#elif defined(CONFIG_HID_CASE_ENABLE) ||defined(CONFIG_SPP_AND_LE_CASE_ENABLE)||defined(CONFIG_MESH_CASE_ENABLE)||defined(CONFIG_DONGLE_CASE_ENABLE) // data-trans call download/data_trans/download.bat #else //to do other case diff --git a/cpu/br28/tools/download/earphone/download_app_ota.bat b/cpu/br28/tools/download/earphone/download_app_ota.bat index bb583c5..59fc4df 100644 --- a/cpu/br28/tools/download/earphone/download_app_ota.bat +++ b/cpu/br28/tools/download/earphone/download_app_ota.bat @@ -15,8 +15,8 @@ copy ..\..\anc_gains.bin . :: -format all -key RS-5B88.key ::-reboot 2500 -@rem ɾʱļ-format all -if exist *.mp3 del *.mp3 +@rem delete temp files +if exist *.mp3 del *.mp3 if exist *.PIX del *.PIX if exist *.TAB del *.TAB if exist *.res del *.res @@ -26,10 +26,10 @@ if exist *.sty del *.sty copy jl_isd.ufw update.ufw del jl_isd.ufw -@REM ļļ +@rem generate config ufw (disabled) ::ufw_maker.exe -chip AC800X %ADD_KEY% -output config.ufw -res bt_cfg.cfg -::IF EXIST jl_696x.bin del jl_696x.bin +::IF EXIST jl_696x.bin del jl_696x.bin if exist script.ver del script.ver if exist tone.cfg del tone.cfg @@ -38,10 +38,10 @@ if exist br28loader.bin del br28loader.bin if exist anc_coeff.bin del anc_coeff.bin if exist anc_gains.bin del anc_gains.bin -@rem ˵ -@rem -format vm //VM -@rem -format cfg //BT CFG -@rem -format 0x3f0-2 //ʾӵ 0x3f0 sector ʼ 2 sector(һΪ16ƻ10ƶɣڶ10) +@rem common isd_download flags +@rem -format vm +@rem -format cfg +@rem -format 0x3f0-2 ping /n 2 127.1>null -IF EXIST null del null +IF EXIST null del null \ No newline at end of file