">
1.設(shè)置工程時,如果忘記了在C/C++選項卡上設(shè)置STM32F10X_HD,USE_STDPEFIPH_DRIVER編譯時會報如下的錯誤
Build target 'USART'
compiling stm32f10x_it.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\User\stm32f10x_it.c: 0 warnings, 1 error
compiling main.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\User\main.c: 0 warnings, 1 error
compiling core_cm3.c...
compiling system_stm32f10x.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\User\system_stm32f10x.c: 0 warnings, 1 error
compiling stm32f10x_usart.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c: 0 warnings, 1 error
compiling stm32f10x_gpio.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c: 0 warnings, 1 error
compiling stm32f10x_rcc.c...
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ^
..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h: ..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c: 0 warnings, 1 error
Target not created
2.要注意新建工程包含庫文件的路徑是
\Libraries\STM32F10x_StdPeriph_Driver\inc
而不是
\Libraries\STM32F10x_StdPeriph_Driver\src
3.Overlapping of Algorithms at Address 08000000H錯誤
工程設(shè)置里,誤多添加了下載算法,刪除后即可。
//============================================================================================
備注::
1>今天燒寫STM32遇到一個新問題----出現(xiàn)data not matching at address 0x80000000,最后把問題找到是燒寫的串口線出了問題 ,導致燒完程序再讀回驗證出了問題。
上海紫卓電子科技有限公司
地址:上海市嘉定工業(yè)區(qū)葉城路925號B區(qū)4幢J
網(wǎng)址:fashioncenter.cn
電話:021-31007998
傳真:021-31007998
郵件:569998567@qq.com
在線咨詢:
569998567
致力成為優(yōu)秀的IC供應(yīng)配單專家及IC代理商
竭力為客戶提供一站式電子元器件采購及IC配套服務(wù)
上海紫卓電子科技有限公司 版權(quán)所有 未經(jīng)授權(quán)禁止復制或鏡像
CopyRight 2020-2025 fashioncenter.cn All rights reserved