<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          stm32編譯出問題解決

          作者: 時間:2016-11-27 來源:網(wǎng)絡(luò) 收藏
          .FWlibincstm32f10x_conf.h(33): warning:#14-D: extra text after expected end of preprocessing directive額外的文本在在預(yù)處理命令后面出現(xiàn)

          #include "stm32f10x_dma.h" */出問題的地方就是這個 “*/

          本文引用地址:http://www.ex-cimer.com/article/201611/322420.htm

          仿照原子自己建立工程的時候出現(xiàn)的問題修改:

          問題及修改:

          1)..SYSTEMdelaydelay.c(27): error:#20: identifier "SysTick_CLKSource_HCLK_Div8" is undefined

          解決方法:在delay.c中添加“#include"misc.h"”

          2)..SYSTEMsyssys.c(18): error:#20: identifier "NVIC_PriorityGroup_2" is undefined

          解決方法:在sys.c中添加“#include"misc.h"”

          3). ..SYSTEMusartusart.c(75): error:#20: identifier "GPIO_InitTypeDef" is undefined

          解決方法:在usart.c中添加“#include”stm32f10x_gpio.h””

          4)..SYSTEMusartusart.c(77): error:#20: identifier "USART_InitTypeDef" is undefined

          解決方法:在usart.c中添加“#include"stm32f10x_usart.h"”

          5)..SYSTEMusartusart.c(80): error:#20: identifier "NVIC_InitTypeDef" is undefined

          解決方法:在usart.c中添加“#include"misc.h"”

          6)..SYSTEMusartusart.c(82): warning:#223-D: function "RCC_APB2PeriphClockCmd" declared implicitly

          解決方法:在usart.c中添加“#include"stm32f10x_rcc.h"”

          7)..HARDWARELEDled.c(22): error:#20: identifier "GPIO_InitTypeDef" is undefined

          解決方法:在led.c中添加“#include"stm32f10x_gpio.h"”

          8)..HARDWARELEDled.c(25): error:#20: identifier "RCC_APB2Periph_GPIOA" is undefined

          解決方法:在led.c中添加“#include"stm32f10x_rcc.h"”

          20150318

          ..SysTick_LED.axf: Error: L6218E: Undefined symbol uart_init (referred from main.o).

          這個錯誤說的是在main函數(shù)中引用了uart_init()函數(shù),但是這個函數(shù)沒有被定義。

          其實這個函數(shù)是在uart.c中定義的并且在uart.h中做了聲明,uart.h也被包含進了main函數(shù)了。

          出問題的原因是這樣的:uart.c中uart_init()函數(shù)是定義在預(yù)編譯命令對

          #if EN_USART1_RX

          ...............

          #endif

          中的。而#define EN_USART1_RX 0所以,這對預(yù)編譯命令不被編譯,即uart_init()沒有被定義。將

          #define EN_USART1_RX 0改成#define EN_USART1_RX1就好了。

          20150321

          編譯沒有錯誤,但是串口無法向串口中斷打印信息,原因是串口輸出要用到相應(yīng)的GPIO,程序中忘了使能這些IO的時鐘,使能一下就好了。



          關(guān)鍵詞: stm32編譯問題解

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();