错误提示如下:
..\OBJ\Template.axf: Error: L6200E: Symbol __ARM_use_no_argv multiply defined (by ′????o and main.o).
..\OBJ\Template.axf: Error: L6200E: Symbol main multiply defined (by ′????o and main.o).
代码:
#ifndef __GLF_H
#define __GLF_H
//GLF端口定义
#define GLF0 PAout(5) //DS0
#define GLF1 PDout(5) //DS1
#define GLF2 PFout(5) //DS1
void GLF_Init(void); //初始化
#endif
#include"sys.h"
#include"glf.h"
void GLF_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOF, ENABLE); //使能,PB,PE端口时钟
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //PA 端口配置
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz
GPIO_Init(GPIOA, &GPIO_InitStructure); //根据设定参数初始化GPIOA.5
GPIO_SetBits(GPIOA,GPIO_Pin_5); //PA.5 输出高
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //PD 端口配置
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz
GPIO_Init(GPIOD, &GPIO_InitStructure); //根据设定参数初始化GPIOD.5
GPIO_SetBits(GPIOD,GPIO_Pin_5); //PD.5 输出高
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //PF 端口配置
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz
GPIO_Init(GPIOA, &GPIO_InitStructure); //根据设定参数初始化GPIOF.5
GPIO_SetBits(GPIOA,GPIO_Pin_5); //PF.5 输出高
}
#include"sys.h"
#include"glf.h"
int main(void)
{
void GLF_Iint();
while(1)
{
GLF0 = 1;
GLF1 = 1;
GLF2 = 1;
}
}
看看,找不到哪里出问题了
|