MP3 音乐播放器【FatFs+SD/TF卡+I2S-DAC】@STC32G144K246 ,实时解码MP3, 2025/12/27

ffmpeg对mp3 预解码+裁剪:
ffmpeg -ss 00:01:10 -t 45 -i .\张灯结彩.mp3 -vn -ac 2 -f s16le -ar 16000 -acodec pcm_s16le 2.pcm
ffmpeg对mp3 转码,16K采样率,单通道,比特率32 kb/s:
ffmpeg -i .\张灯结彩.mp3 -vn -c:a libmp3lame -ar 16000 -b:a 32k -ac 1 -joint_stereo 0 d.mp3
ffplay(V7.1)试听pcm:
ffplay -f s16le -ar 16000 -ch_layout stereo -i .\2.pcm

简易usb命令:
test:sd+fatfs初始化测试
ls:文件列表
play 序号:播放指定序号文件
注意:
当前不支持打开含中文文件,此功能需要开启fatfs的page 936、LFN、UNICODE等编译选项,并占用180K+ROM。
所以不建议打开此功能~~如需中文显示和播放,建议自行建立文件名映射表。
更新记录:
V20251224:
1.增加SD读Block操作完成等待时间,不等会导致部分卡加载文件系统失败
V20251226:
1.增加单声道MP3解码
V20251227:
1.I2S中断中修改为双声道同步输出。
V20260112:
1.完善例程使用说明
2.test命令汉字乱码修改
MP3音乐播放器【FatFs+SD/TF卡+I2S-DAC】@STC32G144K246,实时解码MP3
https://www.stcaimcu.com/thread-21521-1-1.html
(出处: 国芯人工智能技术交流网站)
第一次编译
/*---------------------------------------------------------------------*/
/* --- Web: www.STCAI.com ---------------------------------------------*/
/*---------------------------------------------------------------------*/
/************* 功能说明 **************
下载时, 选择时钟 48MHz
******************************************/
#include "config.h"
#include "I2S.h"
#include "TLV320AIC23.h"
#include "audio.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "spi.h"
#include "file_system.h"
void sys_init();
void pll_init();
void play();
void main()
{
sys_init(); // 系统初始化
pll_init(); // 时钟初始化
fsInitFlag = 0;
aInfo.isPlay = 0;
SPI_Init();
Timer0_Init();
I2S_Init();
usb_init(); // USB初始化
EA = 1;
while (DeviceState != DEVSTATE_CONFIGURED)
{
}; // 等待USB完成配置
delay_ms(1000);
AIC23_Init();
delay_ms(50);
AIC32_InitSet();
SetHeadPhoneVolume(60); // 设置音量
memset(UsbOutBuffer, 0, 64);
while (1)
{
audio_play_run();
if (bUsbOutReady)
{
printf("%s\n", UsbOutBuffer);
if (strncmp(UsbOutBuffer, "test", 4) == 0)
{
if (!file_sys_init(FATFS_SD_PATH))
{
printf("fs初始化失败\n");
}
else
{
fatFsTest(FATFS_SD_PATH);
}
}
else if (strncmp(UsbOutBuffer, "ls", 2) == 0)
{
if (!file_sys_init(FATFS_SD_PATH))
{
printf("文件系统初始化失败\n");
}
else
{
list_files(FATFS_SD_PATH);
}
}
else if (strncmp(UsbOutBuffer, "play", 4) == 0)
{
play();
}
else if (strncmp(UsbOutBuffer, "stop", 4) == 0)
{
aInfo.isPlay = 0;
f_close(&pcm_file);
printf("播放已停止\n");
}
else
{
printf("USB OUT DONE\r\n");
}
memset(UsbOutBuffer, 0, 64);
usb_OUT_done(); // 接收应答(固定格式)
}
}
}
void sys_init()
{
EAXFR = 1; // 扩展寄存器(XFR)访问使能
CKCON = 0; // 提高访问XRAM速度
#if (MAIN_Fosc <= 64000000UL)
WTST = 1; // 64MHz以下写1
#elif (MAIN_Fosc <= 90000000UL)
WTST = 2; // 64~90MHz写2
#elif (MAIN_Fosc <= 120000000UL)
WTST = 3; // 90~120MHz写3
#else
WTST = 4; // 120MHz以上写1
#endif
P0M1 = 0x00;
P0M0 = 0x00;
P1M1 = 0x00;
P1M0 = 0x00;
P2M1 = 0x00;
P2M0 = 0x00;
P3M1 = 0x00;
P3M0 = 0x00;
P4M1 = 0x00;
P4M0 = 0x00;
P5M1 = 0x00;
P5M0 = 0x00;
P6M1 = 0x00;
P6M0 = 0x00;
P7M1 = 0x00;
P7M0 = 0x00;
P1SR = 0;
P2SR = 0;
P7SR = 0; // 设置为高速模式
//TFT SPI1
// P2M0 = 0x7c; P2M1 = 0x00; //P22~P25 推挽
// //P2PU = 0xFF; //使能所有的QSPI口的内部10K上拉电阻
// P2SR = 0xc3;
// P2DR = 0xc3;
//I2S AIC23_Init中定义
// FLASH USART4_ SPI 3
P7M0 = 0x0b;
P7M1 = 0x00; // 70 71 73 推挽
P7PU = 0xFF; // 使能所有的QSPI口的内部10K上拉电阻
// // TFT\SD SPI1
P2M0 = 0x6c;
P2M1 = 0x93; // P22\P23\P25\P26 推挽
//P2PU = 0x6c;//
P2SR = 0x93;
P2DR = 0x93;
// // P92 SD CS_PIN 推挽
P9M0 = 0x04;
P9M1 = 0xfb;
P9PU = 0x04;
// I2S
}
void pll_init()
{
HSCLKDIV = 1;
SPI_CLKDIV = 6;
I2S_CLKDIV = 6;
// 首先需要将HIRC主频调节到48MHz
HPLLCR &= ~0x10; // 选择HPLL输入时钟源为HIRC
// HPLLCR |= 0x10; //选择HPLL输入时钟源为IRCM
HPLLPDIV = 8; // 设置HPLL输入时钟预分频为8(HPLL输入频率必须为6MHz)
// HPLLCR |= 0x00; //HPLL=6MHz*52=312MHz
// HPLLCR |= 0x01; //HPLL=6MHz*54=324MHz
// HPLLCR |= 0x02; //HPLL=6MHz*56=336MHz
// HPLLCR |= 0x03; //HPLL=6MHz*58=348MHz
// HPLLCR |= 0x04; //HPLL=6MHz*60=360MHz
// HPLLCR |= 0x05; //HPLL=6MHz*62=372MHz
// HPLLCR |= 0x06; //HPLL=6MHz*64=384MHz
// HPLLCR |= 0x07; //HPLL=6MHz*66=396MHz
// HPLLCR |= 0x08; //HPLL=6MHz*68=408MHz
// HPLLCR |= 0x09; //HPLL=6MHz*70=420MHz
// HPLLCR |= 0x0a; //HPLL=6MHz*72=432MHz
// HPLLCR |= 0x0b; //HPLL=6MHz*74=444MHz
// HPLLCR |= 0x0c; //HPLL=6MHz*76=456MHz
// HPLLCR |= 0x0d; //HPLL=6MHz*78=468MHz
HPLLCR |= 0x0e; // HPLL=6MHz*80=480MHz
// HPLLCR |= 0x0f; // HPLL=6MHz*82=492MHz
// CLKDIV = 2; // 系统时钟=主时钟源/2 //120MHz
// CLKDIV = 3; // 系统时钟=主时钟源/5 //48MHz
// CLKDIV = 6; // 系统时钟=主时钟源/6 // 40M
HPLLCR |= 0x80; // 使能HPLL
CLKDIV = 6; // 系统时钟=主时钟源/2 //240/6=40M
CLKSEL = 0x04; // 选择HPLL/2作为主时钟源
}
void flash_read_2_spi(DWORD addr, WORD len)
{
DMA_P2P1_SRC = P2P_SRC_QSPIRX;
DMA_P2P1_DEST = P2P_DEST_SPI1TX;
DMA_SPI_Disable();
DMA_SPI_DisableInt();
DMA_SPI_ClearFlag(); // 清除SPI DMA中断标志
DMA_SPI_SetAmount(len);
//HSSPI_EnableFIFO();
HSSPI_DisableFIFO();
DMA_SPI_Enable();
DMA_QSPI_CFG = 0xa0; //使能DMA读取操作
DMA_QSPI_STA = 0x00; //清除DMA状态
DMA_QSPI_AMT = (len&0xFF); //设置DMA数据长度
DMA_QSPI_AMTH = (len) >> 8;
// DMA_QSPI_RXAH = ((u16)&dma_qspi_buffer) >> 8;
// DMA_QSPI_RXAL = ((u16)&dma_qspi_buffer) & 0xFF;
DMA_QSPI_CR = 0xa1; //启动DMA并触发QSPI读操作
printf("DMA START \r\n");
}
void delay_ms(WORD ms)
{
WORD i;
do
{
i = MAIN_Fosc / 6000;
while (--i)
;
} while (--ms);
}
void QSPI_DMA_Isr() interrupt DMA_QSPI_VECTOR
{
DMA_QSPI_STA = 0x00;
// //DMA_P2P1_CR1 = 0; // 关闭P2P
// DMA_P2P1_SRC = 0;
// DMA_P2P1_DEST = 0;
// SPSTAT = 0x80 + 0x40; // 清0 SPIF和WCOL标志
// HSSPI_DisableFIFO(); // 使用SPI查询或中断方式时,要禁止FIFO
// lcd_cs_pin = 1;
// qspiDmaFlag = 1;
printf("DMA END\n");
}
void play()
{
char *cmd_param = UsbOutBuffer + 5;
u16 file_index = atoi(cmd_param);
file_index--;
if (aInfo.isPlay)
{
printf("请先停止当前播放\n");
return;
}
if (!file_sys_init(FATFS_SD_PATH))
{
printf("文件系统初始化失败\n");
}
else
{
// 如果文件列表为空,先获取文件列表
if (file_list_count == 0)
{
list_files(FATFS_SD_PATH);
}
// 获取指定索引的文件路径
memset(aInfo.file_name, 0, sizeof(aInfo.file_name));
if (get_file_by_index(file_index, aInfo.file_name))
{
FRESULT res;
printf("play: %s\n", aInfo.file_name);
// 这里将调用audio.c中的函数来播放音频
// 首先需要打开文件,获取文件大小
res = f_open(&pcm_file, aInfo.file_name, FA_READ);
if (res == FR_OK)
{
DWORD file_size = f_size(&pcm_file);
// 初始化音频播放
aInfo.audio_size = file_size;
aInfo.audio_index = 0;
aInfo.isPlay = 1;
audio_play_init();
}
else
{
memset(aInfo.file_name, 0, sizeof(aInfo.file_name));
printf("open file %s fail: %u\n", aInfo.file_name, res);
}
}
}
}
编译结果
Build target 'demo'
compiling main.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\main.c(40): error C67: 'EA': undefined identifier
src\main.c(104): error C67: 'EAXFR': undefined identifier
src\main.c(105): error C67: 'CKCON': undefined identifier
src\main.c(107): error C67: 'WTST': undefined identifier
src\main.c(116): error C67: 'P0M1': undefined identifier
src\main.c(117): error C67: 'P0M0': undefined identifier
src\main.c(118): error C67: 'P1M1': undefined identifier
src\main.c(119): error C67: 'P1M0': undefined identifier
src\main.c(120): error C67: 'P2M1': undefined identifier
src\main.c(121): error C67: 'P2M0': undefined identifier
src\main.c(122): error C67: 'P3M1': undefined identifier
src\main.c(123): error C67: 'P3M0': undefined identifier
src\main.c(124): error C67: 'P4M1': undefined identifier
src\main.c(125): error C67: 'P4M0': undefined identifier
src\main.c(126): error C67: 'P5M1': undefined identifier
src\main.c(127): error C67: 'P5M0': undefined identifier
src\main.c(128): error C67: 'P6M1': undefined identifier
src\main.c(129): error C67: 'P6M0': undefined identifier
src\main.c(130): error C67: 'P7M1': undefined identifier
src\main.c(131): error C67: 'P7M0': undefined identifier
src\main.c(132): error C67: 'P1SR': undefined identifier
src\main.c(133): error C67: 'P2SR': undefined identifier
src\main.c(134): error C67: 'P7SR': undefined identifier
src\main.c(144): error C67: 'P7M0': undefined identifier
src\main.c(145): error C67: 'P7M1': undefined identifier
src\main.c(146): error C67: 'P7PU': undefined identifier
src\main.c(149): error C67: 'P2M0': undefined identifier
src\main.c(150): error C67: 'P2M1': undefined identifier
src\main.c(152): error C67: 'P2SR': undefined identifier
src\main.c(153): error C67: 'P2DR': undefined identifier
src\main.c(155): error C67: 'P9M0': undefined identifier
src\main.c(156): error C67: 'P9M1': undefined identifier
src\main.c(157): error C67: 'P9PU': undefined identifier
src\main.c(164): error C67: 'HSCLKDIV': undefined identifier
src\main.c(165): error C67: 'SPI_CLKDIV': undefined identifier
src\main.c(166): error C67: 'I2S_CLKDIV': undefined identifier
src\main.c(168): error C67: 'HPLLCR': undefined identifier
src\main.c(170): error C67: 'HPLLPDIV': undefined identifier
src\main.c(186): error C67: 'HPLLCR': undefined identifier
src\main.c(192): error C67: 'HPLLCR': undefined identifier
src\main.c(193): error C67: 'CLKDIV': undefined identifier
src\main.c(194): error C67: 'CLKSEL': undefined identifier
src\main.c(200): error C67: 'DMA_P2P1_SRC': undefined identifier
src\main.c(200): error C67: 'P2P_SRC_QSPIRX': undefined identifier
src\main.c(201): error C67: 'DMA_P2P1_DEST': undefined identifier
src\main.c(201): error C67: 'P2P_DEST_SPI1TX': undefined identifier
src\main.c(203): error C67: 'DMA_SPI_CR': undefined identifier
src\main.c(204): error C67: 'DMA_SPI_CFG': undefined identifier
src\main.c(205): error C67: 'DMA_SPI_STA': undefined identifier
src\main.c(206): error C67: 'DMA_SPI_AMTH': undefined identifier
src\main.c(206): error C67: 'DMA_SPI_AMT': undefined identifier
src\main.c(208): error C67: 'HSSPI_CFG2': undefined identifier
src\main.c(209): error C67: 'DMA_SPI_CR': undefined identifier
src\main.c(211): error C67: 'DMA_QSPI_CFG': undefined identifier
src\main.c(212): error C67: 'DMA_QSPI_STA': undefined identifier
src\main.c(213): error C67: 'DMA_QSPI_AMT': undefined identifier
src\main.c(214): error C67: 'DMA_QSPI_AMTH': undefined identifier
src\main.c(218): error C67: 'DMA_QSPI_CR': undefined identifier
src\main.c(197): warning C47: 'addr': unreferenced parameter
src\main.c(236): error C25: syntax error near 'DMA_QSPI_VECTOR'
src\main.c(237): warning C34: 'DMA_QSPI_VECTOR': missing declaration specifiers
src\main.c(237): error C42: 'DMA_QSPI_VECTOR': not in formal parameter list
src\main.c(237): error C25: syntax error near '{'
src\main.c(250): error C142: illegal initialization
src\main.c(251): error C142: illegal initialization
src\main.c(251): error C67: 'cmd_param': undefined identifier
src\main.c(252): warning C34: 'file_index': missing declaration specifiers
src\main.c(252): error C42: 'file_index': not in formal parameter list
src\main.c(252): error C25: syntax error near '--'
src\main.c(297): error C7: compilation aborted
compiling I2S.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\I2S.c(51): error C67: 'P_SW3': undefined identifier
src\I2S.c(51): error C67: 'P_SW3': undefined identifier
src\I2S.c(53): error C67: 'I2SCFGH': undefined identifier
src\I2S.c(53): error C67: 'I2SCFGH': undefined identifier
src\I2S.c(54): error C67: 'I2SCR': undefined identifier
src\I2S.c(55): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(56): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(56): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(57): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(58): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(58): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(59): error C67: 'I2SCFGL': undefined identifier
src\I2S.c(60): error C67: 'I2SPRH': undefined identifier
src\I2S.c(60): error C67: 'I2SPRH': undefined identifier
src\I2S.c(60): error C67: 'I2SPRL': undefined identifier
src\I2S.c(61): error C67: 'I2SPRH': undefined identifier
src\I2S.c(63): error C67: 'IP3': undefined identifier
src\I2S.c(63): error C67: 'IP3': undefined identifier
src\I2S.c(63): error C67: 'IP3H': undefined identifier
src\I2S.c(63): error C67: 'IP3H': undefined identifier
src\I2S.c(64): error C67: 'I2SCR': undefined identifier
src\I2S.c(66): error C67: 'I2SCFGH': undefined identifier
src\I2S.c(67): error C67: 'IP3': undefined identifier
src\I2S.c(68): error C67: 'IP3H': undefined identifier
src\I2S.c(86): error C25: syntax error near 'I2S_VECTOR'
src\I2S.c(87): warning C34: 'I2S_VECTOR': missing declaration specifiers
src\I2S.c(87): error C42: 'I2S_VECTOR': not in formal parameter list
src\I2S.c(87): error C25: syntax error near '{'
src\I2S.c(115): warning C34: 'buffer': missing declaration specifiers
src\I2S.c(115): error C42: 'buffer': not in formal parameter list
src\I2S.c(115): error C25: syntax error near 'u16'
src\I2S.c(126): error C7: compilation aborted
compiling TLV320AIC23.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\TLV320AIC23.c(38): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(40): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(45): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(49): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(56): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(58): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(60): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(64): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(71): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(73): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(76): error C67: 'P8IN': undefined identifier
src\TLV320AIC23.c(77): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(88): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(89): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(91): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(94): error C67: 'P8CLRB': undefined identifier
src\TLV320AIC23.c(145): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(146): error C67: 'P8SETB': undefined identifier
src\TLV320AIC23.c(148): error C67: 'P8M0': undefined identifier
src\TLV320AIC23.c(149): error C67: 'P8M1': undefined identifier
src\TLV320AIC23.c(150): error C67: 'P8PU': undefined identifier
compiling spi.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\spi.c(34): error C25: syntax error near 'SPI_VECTOR'
src\spi.c(35): warning C34: 'SPI_VECTOR': missing declaration specifiers
src\spi.c(35): error C42: 'SPI_VECTOR': not in formal parameter list
src\spi.c(35): error C25: syntax error near '{'
src\spi.c(185): error C7: compilation aborted
compiling audio.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\audio.c(77): error C67: 'AUXR': undefined identifier
src\audio.c(78): error C67: 'TMOD': undefined identifier
src\audio.c(79): error C67: 'TL0': undefined identifier
src\audio.c(80): error C67: 'TH0': undefined identifier
src\audio.c(81): error C67: 'TF0': undefined identifier
src\audio.c(82): error C67: 'TR0': undefined identifier
src\audio.c(83): error C67: 'ET0': undefined identifier
compiling file_system.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
compiling w25qxx.c...
src\config.h(4): error C318: can't open file 'STC32G144K246.H'
src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
src\w25qxx.h(30): error C67: 'P4': undefined identifier
src\w25qxx.h(31): error C67: 'P4': undefined identifier
src\w25qxx.h(32): error C67: 'P4': undefined identifier
src\w25qxx.h(33): error C67: 'P4': undefined identifier
src\w25qxx.c(45): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(49): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(51): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(55): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(57): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(61): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(70): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(78): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(115): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(124): error C67: 'DMA_SPI_RXAH': undefined identifier
src\w25qxx.c(124): error C67: 'DMA_SPI_RXAL': undefined identifier
src\w25qxx.c(126): error C67: 'DMA_SPI_AMTH': undefined identifier
src\w25qxx.c(126): error C67: 'DMA_SPI_AMT': undefined identifier
src\w25qxx.c(127): error C67: 'DMA_SPI_CR': undefined identifier
src\w25qxx.c(129): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(143): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(145): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(159): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(171): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(206): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(216): error C67: 'DMA_SPI_TXAH': undefined identifier
src\w25qxx.c(216): error C67: 'DMA_SPI_TXAL': undefined identifier
src\w25qxx.c(218): error C67: 'DMA_SPI_AMTH': undefined identifier
src\w25qxx.c(218): error C67: 'DMA_SPI_AMT': undefined identifier
src\w25qxx.c(219): error C67: 'DMA_SPI_CR': undefined identifier
src\w25qxx.c(221): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(237): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(240): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(252): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(258): error C67: 'SPI_CE': undefined identifier
src\w25qxx.c(292): error C67: 'HSSPI_CFG2': undefined identifier
src\w25qxx.c(293): error C67: 'P_SW1': undefined identifier
src\w25qxx.c(293): error C67: 'P_SW1': undefined identifier
src\w25qxx.c(294): error C67: 'SPI_SCK': undefined identifier
src\w25qxx.c(295): error C67: 'SPI_SI': undefined identifier
compiling diskio.c...
compiling diskio_SD.c...
.\src\config.h(4): error C318: can't open file 'STC32G144K246.H'
\Downloads\History\MP3\1224\audio_play_32G144_20251224\audio_play_32G144_20251224\src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
compiling ff.c...
.\src\config.h(4): error C318: can't open file 'STC32G144K246.H'
\Downloads\History\MP3\1224\audio_play_32G144_20251224\audio_play_32G144_20251224\src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
3rd\ff\ff.c(5526): warning C188: 'parameter 2': value truncated
compiling ffsystem.c...
compiling ffunicode.c...
compiling SD.c...
.\src\config.h(4): error C318: can't open file 'STC32G144K246.H'
\Downloads\History\MP3\1224\audio_play_32G144_20251224\audio_play_32G144_20251224\src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
3rd\ff\SD.c(72): error C67: 'P_SW1': undefined identifier
3rd\ff\SD.c(72): error C67: 'P_SW1': undefined identifier
3rd\ff\SD.c(73): error C67: 'HSSPI_CFG2': undefined identifier
3rd\ff\SD.c(77): error C67: 'P9SETB': undefined identifier
3rd\ff\SD.c(78): error C67: 'P26': undefined identifier
3rd\ff\SD.c(83): error C67: 'P9CLRB': undefined identifier
3rd\ff\SD.c(84): error C67: 'P26': undefined identifier
3rd\ff\SD.c(196): warning C47: 'i': unreferenced local variable
compiling diskio_W25QXX.c...
\Downloads\History\MP3\1224\audio_play_32G144_20251224\audio_play_32G144_20251224\src\config.h(4): error C318: can't open file 'STC32G144K246.H'
\Downloads\History\MP3\1224\audio_play_32G144_20251224\audio_play_32G144_20251224\src\my_def.h(5): error C318: can't open file 'STC32G144K246.H'
.\src\w25qxx.h(30): error C67: 'P4': undefined identifier
.\src\w25qxx.h(31): error C67: 'P4': undefined identifier
.\src\w25qxx.h(32): error C67: 'P4': undefined identifier
.\src\w25qxx.h(33): error C67: 'P4': undefined identifier
目标未创建