问题 小安派S1 I2S编译报错

[复制链接]
查看331 | 回复6 | 2024-6-18 15:19:06 | 显示全部楼层 |阅读模式

今天想用下 I2S,看泽哥的教程配置

(十四)零基础开发小安派-Eyes-S1【外设篇】——I2S - 小安派&M61零基础开发教程(官方) - 物联网开发者社区-安信可论坛 - Powered by Discuz! (ai-thinker.com)

我按教程步骤复制了8388的库

修改了代码

image.png

CMakeLists.txt 和 flash_prog_cfg.ini 也修改了

复制好了 main.c 文件

结果无法编译

发现,CMakeLists.txt 不添加这一行,可以编译,但是喇叭没音,

sdk_set_linker_script($ENV{BL_SDK_BASE}/bsp/board/bl616dk/bl616_flash_old.ld)

添加了这一行,报老多错误了

这是报错日志

[ 99%] Linking C executable build_out/audio_bl616.elf
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000010100
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libstd.a(start_load.c.o): in function `start_load':
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__tcm_code_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__tcm_code_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__tcm_code_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__tcm_code_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__itcm_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__itcm_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:48: undefined reference to `__tcm_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__tcm_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__tcm_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__tcm_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__dtcm_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__dtcm_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:56: undefined reference to `__ram_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__ram_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__ram_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__ram_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__ram_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__ram_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__nocache_ram_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:64: undefined reference to `__nocache_ram_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:72: undefined reference to `__nocache_ram_data_start__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:72: undefined reference to `__nocache_ram_data_end__'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:72: undefined reference to `__nocache_ram_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:72: undefined reference to `__nocache_ram_load_addr'
/home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/timo/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/startup/start_load.c:73: undefined reference to `__bss_start__'
回复

使用道具 举报

爱笑 | 2024-6-18 15:37:21 | 显示全部楼层
让泽哥给你瞧瞧!
用心做好保姆工作
回复 支持 反对

使用道具 举报

WT_0213 | 2024-6-18 15:42:12 | 显示全部楼层
等泽哥解决
回复 支持 反对

使用道具 举报

bzhou830 | 2024-6-18 17:08:25 | 显示全部楼层
是不是新的SDK和帖子里面的不匹配
选择去发光,而不是被照亮
回复 支持 反对

使用道具 举报

timo | 2024-6-18 22:10:00 | 显示全部楼层
bzhou830 发表于 2024-6-18 17:08
是不是新的SDK和帖子里面的不匹配

我用的还是master分支,当然也可能是新的不兼容了,毕竟泽哥的教程好早了,只是不知如何处理
回复 支持 反对

使用道具 举报

爱笑 | 2024-6-19 08:34:46 | 显示全部楼层
timo 发表于 2024-6-18 22:10
我用的还是master分支,当然也可能是新的不兼容了,毕竟泽哥的教程好早了,只是不知如何处理 ...

别着急,泽哥出差了,等他回来后第一时间回复你。
用心做好保姆工作
回复 支持 反对

使用道具 举报

sansui | 2024-7-29 11:30:03 | 显示全部楼层
蹲个答案
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则