关于库文件报错

2019-07-14 17:30发布


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
8条回答
hongliwei
1楼-- · 2019-07-14 21:31
C:/Users/Administrator/Desktop/捕获.PNG
hongliwei
2楼-- · 2019-07-14 21:34
报错信息:
*** Using Compiler 'V5.05 update 1 (build 106)', folder: 'E:Keil_v5ARMARMCCBin'
Build target 'STM32F429ZIT'
compiling stm32f4xx_rcc.c...
LIBsrcstm32f4xx_rcc.c(266): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_HSE(RCC_HSE));
LIBsrcstm32f4xx_rcc.c(297): error:  #20: identifier "HSE_STARTUP_TIMEOUT" is undefined
    } while((startupcounter != HSE_STARTUP_TIMEOUT) && (hsestatus == RESET));
LIBsrcstm32f4xx_rcc.c(322): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_CALIBRATION_VALUE(HSICalibrationValue));
LIBsrcstm32f4xx_rcc.c(357): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(382): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_LSE(RCC_LSE));
LIBsrcstm32f4xx_rcc.c(422): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(545): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(714): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(805): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(823): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(850): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_MCO1SOURCE(RCC_MCO1Source));
LIBsrcstm32f4xx_rcc.c(888): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_MCO2SOURCE(RCC_MCO2Source));
LIBsrcstm32f4xx_rcc.c(1084): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
LIBsrcstm32f4xx_rcc.c(1084): warning:  #223-D: function "IS_RCC_SYSCLK_SOURCE" declared implicitly
    assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
LIBsrcstm32f4xx_rcc.c(1138): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_HCLK(RCC_SYSCLK));
LIBsrcstm32f4xx_rcc.c(1170): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_PCLK(RCC_HCLK));
LIBsrcstm32f4xx_rcc.c(1201): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_PCLK(RCC_HCLK));
LIBsrcstm32f4xx_rcc.c(1261): error:  #20: identifier "HSI_VALUE" is undefined
      RCC_Clocks->SYSCLK_Frequency = HSI_VALUE;
LIBsrcstm32f4xx_rcc.c(1264): error:  #20: identifier "HSE_VALUE" is undefined
      RCC_Clocks->SYSCLK_Frequency = HSE_VALUE;
LIBsrcstm32f4xx_rcc.c(1406): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource));
LIBsrcstm32f4xx_rcc.c(1436): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(1453): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_FUNCTIONAL_STATE(NewState));
LIBsrcstm32f4xx_rcc.c(1648): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_PLLI2S_DIVQ_VALUE(RCC_PLLI2SDivQ));
LIBsrcstm32f4xx_rcc.c(1680): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_PLLSAI_DIVQ_VALUE(RCC_PLLSAIDivQ));
LIBsrcstm32f4xx_rcc.c(1716): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_PLLSAI_DIVR_VALUE(RCC_PLLSAIDivR));
LIBsrcstm32f4xx_rcc.c(1751): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_TIMCLK_PRESCALER(RCC_TIMCLKPrescaler));
LIBsrcstm32f4xx_rcc.c(1793): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph));
LIBsrcstm32f4xx_rcc.c(1825): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
LIBsrcstm32f4xx_rcc.c(1911): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));  
LIBsrcstm32f4xx_rcc.c(1957): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
LIBsrcstm32f4xx_rcc.c(1999): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph));
LIBsrcstm32f4xx_rcc.c(2028): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
LIBsrcstm32f4xx_rcc.c(2108): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
LIBsrcstm32f4xx_rcc.c(2150): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph));
LIBsrcstm32f4xx_rcc.c(2199): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB1_LPMODE_PERIPH(RCC_AHB1Periph));
LIBsrcstm32f4xx_rcc.c(2231): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph));
LIBsrcstm32f4xx_rcc.c(2317): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
LIBsrcstm32f4xx_rcc.c(2363): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
LIBsrcstm32f4xx_rcc.c(2387): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_LSE_MODE(RCC_Mode));
LIBsrcstm32f4xx_rcc.c(2391): error:  #20: identifier "RCC_BDCR_LSEMOD" is undefined
      SET_BIT(RCC->BDCR, RCC_BDCR_LSEMOD);
LIBsrcstm32f4xx_rcc.c(2395): error:  #20: identifier "RCC_BDCR_LSEMOD" is undefined
      CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEMOD);
LIBsrcstm32f4xx_rcc.c(2585): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_IT(RCC_IT));
LIBsrcstm32f4xx_rcc.c(2626): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_FLAG(RCC_FLAG));
LIBsrcstm32f4xx_rcc.c(2689): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_GET_IT(RCC_IT));
LIBsrcstm32f4xx_rcc.c(2721): warning:  #223-D: function "assert_param" declared implicitly
    assert_param(IS_RCC_CLEAR_IT(RCC_IT));
LIBsrcstm32f4xx_rcc.c: 40 warnings, 5 errors
compiling system_stm32f4xx.c...
SYSTEMsystem_stm32f4xx.c(564): error:  #20: identifier "HSI_VALUE" is undefined
        SystemCoreClock = HSI_VALUE;
SYSTEMsystem_stm32f4xx.c(567): error:  #20: identifier "HSE_VALUE" is undefined
        SystemCoreClock = HSE_VALUE;
SYSTEMsystem_stm32f4xx.c(554): warning:  #550-D: variable "pllsource" was set but never used
    uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
SYSTEMsystem_stm32f4xx.c(554): warning:  #550-D: variable "pllm" was set but never used
    uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
SYSTEMsystem_stm32f4xx.c: 2 warnings, 2 errors
".ObjectsSTM32F4XX_templet.axf" - 7 Error(s), 42 Warning(s).
Target not created.
Build Time Elapsed:  00:00:01
TOPCB
3楼-- · 2019-07-15 02:29
楼主把工程传上来吧
youxi8745
4楼-- · 2019-07-15 08:26
错误这么多,果断头文件包含出错了
TOPCB
5楼-- · 2019-07-15 09:03
 精彩回答 2  元偷偷看……
hongliwei
6楼-- · 2019-07-15 10:44
youxi8745 发表于 2018-9-24 07:31
错误这么多,果断头文件包含出错了

我昨天刚从st官网上下的,百度了一下,貌似没有这种情况

一周热门 更多>