From 23c2dee80fe35cd3140124e4f52bf30c4e399423 Mon Sep 17 00:00:00 2001 From: yuquanjun Date: Mon, 7 Sep 2026 09:29:01 +0800 Subject: [PATCH] Release 0.2.2: package ALL extflash only and bump firmware version. Co-authored-by: Cursor --- Global/Global.c | 2 +- tools/publish_k1_release.py | 28 ++++++++++------------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Global/Global.c b/Global/Global.c index a426894..a4fba39 100644 --- a/Global/Global.c +++ b/Global/Global.c @@ -101,7 +101,7 @@ int16_t MIC_VOL_MAP[11]= {-9000,-7000,-5000,-3000,-1000,1000,3000,5000,7000,9000 uint8_t TOUCH_AREA_NUM = (sizeof(Touch_Areas)/sizeof(Touch_AreaTypeDef)); -const uint8_t Version[3] = {0,2,1}; /* major.minor.patch — 0.2.1: keep mixer/master vol across power cycle */ +const uint8_t Version[3] = {0,2,2}; /* major.minor.patch — 0.2.2: BT persist, settings icon focus, auto-off UI */ uint8_t Led = 8; bool PressFlag = 0; diff --git a/tools/publish_k1_release.py b/tools/publish_k1_release.py index b749c04..cc65347 100644 --- a/tools/publish_k1_release.py +++ b/tools/publish_k1_release.py @@ -25,7 +25,7 @@ MAP_TXT = REPO / "Doc" / "音色文件" / "0903" / "FLASH_MAP.txt" IAP_DIR = REPO / "升级" / "MCU主控升级" OUT_ROOT = REPO / "tools" / "out" -FW_VER = "0.2.1" +FW_VER = "0.2.2" TONE_RES_VER = "0903" UI0902_RES_BASE = 0x00100000 @@ -87,18 +87,12 @@ def main() -> None: combined = build_combined_extflash(tone_data, ui_data) mcu_name = f"YNGJ-GT1-M_MCU_v{FW_VER}_{stamp}.bin" - tone_name = f"extflash_toneRes_v{TONE_RES_VER}_{stamp}.res" - ui_name = f"extflash_ui0902_{stamp}.res" comb_name = f"extflash_ALL_tone0903_ui0902_{stamp}.res" mcu_dst = pkg / mcu_name - tone_dst = pkg / tone_name - ui_dst = pkg / ui_name comb_dst = pkg / comb_name shutil.copy2(EXE_BIN, mcu_dst) - tone_dst.write_bytes(tone_data) - ui_dst.write_bytes(ui_data) comb_dst.write_bytes(combined) shutil.copy2(iap, pkg / "SoundWalkerIAP.exe") shutil.copy2(guide, pkg / "升级步骤.docx") @@ -106,9 +100,10 @@ def main() -> None: shutil.copy2(MAP_TXT, pkg / "FLASH_MAP.txt") shutil.copy2(mcu_dst, OUT_ROOT / mcu_name) - shutil.copy2(tone_dst, OUT_ROOT / "extflash_tone_0903.res") - shutil.copy2(ui_dst, OUT_ROOT / "extflash_ui0902.res") shutil.copy2(comb_dst, OUT_ROOT / "extflash_ALL_tone0903_ui0902.res") + # Keep build intermediates under tools/out for local rebuilds; not shipped in package. + (OUT_ROOT / "extflash_tone_0903.res").write_bytes(tone_data) + (OUT_ROOT / "extflash_ui0902.res").write_bytes(ui_data) readme = pkg / "README.txt" readme.write_text( @@ -120,29 +115,26 @@ def main() -> None: f"Git subject {subject}", f"FW version {FW_VER}", "", - "==== 同事整机升级请优先刷这两项 ====", + "==== 整机升级请刷这两项 ====", f" 1) {mcu_name} -> MCU APP", f" 2) {comb_name} -> 外部 Flash 从 0x0 起整包", " (= 音色区 + 填充 + UI0902 图片区)", "", + "建议步骤:", + " - 先整片擦除外部 Flash,再刷上述 ALL .res @ 0x00000000", + " - 勿只刷音色区,否则模式选择页会花屏(UI 图在 0x100000)", + "", "外部 Flash 分区:", " 0x00000000 音色/充电图 (toneRes)", " logo pad + Charg@0xCB70 + 1.bin@0x1B8F0 + 2.bin + 3.bin", " 0x00100000 UI0902 图片 (模式选择大图、全屏开机 Logo、设置/调音台素材等)", "", - "分文件(仅在工具支持指定偏移时使用):", - f" {tone_name} size={tone_dst.stat().st_size} @ 0x00000000", - f" sha256={sha256(tone_dst)}", - f" {ui_name} size={ui_dst.stat().st_size} @ 0x00100000", - f" sha256={sha256(ui_dst)}", - f" {comb_name} size={comb_dst.stat().st_size} @ 0x00000000 (推荐)", + f" {comb_name} size={comb_dst.stat().st_size} @ 0x00000000", f" sha256={sha256(comb_dst)}", "", f"MCU: {mcu_name} size={mcu_dst.stat().st_size} sha256={sha256(mcu_dst)}", "", "说明:", - " - 只刷音色 .res、不刷 UI0902 时,模式选择页会花屏(读图地址在 0x100000)。", - " - 本机开发板若早已刷过 UI0902,只更新音色+MCU 仍可能正常;同事空片/整片擦除会中招。", " - 开机全屏 Logo、关机充电全屏画面在 UI0902,不在音色包里的 logo.bin/Charg.bin 占位。", " - AutoBand 0x9EB5F 本版未重排。", "",