6、工程设置nDevice选:TSM32F103RBOutput输入: testC/C++页面:Processor Symbols Define:STM32F10X_MD,USE_STDPERIPH_DRIVER并添加:Includepaths
7、build建立目标代码
build过程中错误修改:问题及修改:
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"”8、buildtarget结果