Undefined symbol SDIO_Init (referred from stm32f4xx_hal_sd.o)

在STM32开发中遇到SDIO_Init编译错误?本文指导你如何查找函数来源并解决。只需在diskio.c中屏蔽错误,同时揭示了找到对应函数文件路径的技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Undefined symbol SDIO_Init (referred from stm32f4xx_hal_sd.o)

编写STM32的SD卡时候报错,头文件和.c文件都添加了,这时候需要找到SDIO_Init相对应的函数文件的具体位置

函数具体位置

在这里插入图片描述

添加函数文件,报错解决

在这里插入图片描述
对于剩下那个报错,只需要在diskio.c下屏蔽即可:
在这里插入图片描述

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'D:\Keil 524\ARM\ARMCC\Bin' Rebuild target 'Target 1' assembling startup_stm32f411xe.s... compiling stm32f4xx_dcmi.c... compiling stm32f4xx_it.c... compiling stm32f4xx_dac.c... compiling stm32f4xx_cryp_tdes.c... compiling misc.c... compiling stm32f4xx_cryp_des.c... compiling stm32f4xx_can.c... compiling stm32f4xx_dbgmcu.c... compiling stm32f4xx_adc.c... compiling stm32f4xx_cryp.c... compiling stm32f4xx_cec.c... compiling stm32f4xx_crc.c... compiling system_stm32f4xx.c... compiling stm32f4xx_cryp_aes.c... compiling stm32f4xx_dfsdm.c... compiling stm32f4xx_dma.c... compiling stm32f4xx_dma2d.c... compiling stm32f4xx_flash.c... compiling stm32f4xx_dsi.c... compiling stm32f4xx_exti.c... compiling stm32f4xx_flash_ramfunc.c... compiling stm32f4xx_ltdc.c... compiling stm32f4xx_iwdg.c... compiling stm32f4xx_i2c.c... compiling stm32f4xx_lptim.c... compiling stm32f4xx_fmpi2c.c... compiling stm32f4xx_gpio.c... compiling stm32f4xx_hash.c... compiling stm32f4xx_hash_md5.c... compiling stm32f4xx_hash_sha1.c... compiling main.c... ..\USER\main.c(2): error: #5: cannot open source input file "tjc_usart_hmi.h": No such file or directory #include "tjc_usart_hmi.h" ..\USER\main.c: 0 warnings, 1 error compiling tjc_usart_hmi.c... tjc_usart_hmi.h(27): warning: #1-D: last line of file ends without a newline #endif tjc_usart_hmi.c(7): error: #5: cannot open source input file "stm32f10x_usart.h": No such file or directory #include <stm32f10x_usart.h> tjc_usart_hmi.c: 1 warning, 1 error compiling stm32f4xx_qspi.c... compiling stm32f4xx_pwr.c... compiling stm32f4xx_rtc.c... compiling stm32f4xx_rcc.c... compiling stm32f4xx_sai.c... compiling stm32f4xx_rng.c... compiling stm32f4xx_syscfg.c... compiling stm32f4xx_sdio.c... compiling stm32f4xx_wwdg.c... compiling stm32f4xx_spdifrx.c... compiling stm32f4xx_spi.c... compiling stm32f4xx_usart.c... compiling stm32f4xx_tim.c... "..\OUTPUT\STM32F411CEU6.axf" - 2 Error(s), 1 Warning(s). Target not created. Build Time Elapsed: 00:03:35
最新发布
08-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值