发帖
2 0 0

VC-02 Custom Audio Replacement - pcm.bin Generated but Not Included in Firmware

Draak
注册会员

1

主题

0

回帖

51

积分

注册会员

积分
51
VC系列 42 2 3 天前
Hello,
I'm trying to replace the VC-02 audio with custom voice (112 WAV files converted to 16kHz mono MP3). I followed the method from post #6 (AI-Thinker Xiaoze):
What I did:

Converted 112 custom WAV files to 16kHz mono MP3 (using ffmpeg)
Replaced all MP3 files in /tools/scripts/tones/ folder (126 total MP3s)
Fixed Python 2→3 compatibility issues in res_build_tool.py and auto_code.py
Ran python res_build_tool.py manual
Built firmware using v3s NDS32 toolchain

Results:

✅ pcm.bin is generated successfully (340KB - correct size for custom audio)
✅ pcm_bin.h is generated (2.1MB)
✅ Firmware compiles without errors
❌ Final uni_app.bin is only 1.5MB (should be ~1.6MB like original)
❌ VC-02 flashes successfully but has no audio output (completely silent)

Analysis:

uni_pcm_player.c includes pcm_bin.h correctly (line 28)
pcm_bin[] array is referenced in code (line 74)
uni_pcm_player.o is compiled successfully
But pcm_bin symbol is NOT in final binary (checked with nm)
Firmware is ~60KB smaller than original (missing audio data)

Suspected cause:
Linker flag --gc-sections in makefile might be removing pcm_bin[] as "unused" even though it's referenced in code.
Question:
How can I ensure pcm_bin[] data is included in the final firmware? Is there a linker script modification or compiler flag needed?
Environment:

SDK: uni_hb_m_solution v3.3.4
Toolchain: nds32le-elf-mculib-v3s (Linux/WSL2)
Platform: VC-02 module (NDS32 d1088-spu)

Thank you for any help!
──── 0人觉得很赞 ────

使用道具 举报

The playable audio files should not only be in 16kHz mono format but also have a depth of 16 bits. It is recommended to use Format Factory for conversion. Additionally, you can replace the corresponding MP3 files in the directory: replace/uni_hb_m_solution/unione_lite_app_hb_m/tools/scripts/tones. Other unused files do not need to be replaced.
Please wait a moment. I’m asking the technical staff for help.
您需要登录后才可以回帖 立即登录
高级模式
返回
统计信息
  • 会员数: 30499 个
  • 话题数: 44667 篇