OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 7080|回复: 8

这个错得更惨了,求指教

[复制链接]

16

主题

85

帖子

0

精华

初级会员

Rank: 2

积分
170
金钱
170
注册时间
2013-5-15
在线时间
0 小时
发表于 2013-5-15 20:39:05 | 显示全部楼层 |阅读模式
            



compiling 跑马灯.c...
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(312): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(316): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(320): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(324): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(328): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(332): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(336): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(340): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error:  #101: "FALSE" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error:  #101: "TRUE" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error:  #256: invalid redeclaration of type name "bool" (declared at line 55 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error:  #101: "RESET" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error:  #101: "SET" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error:  #101: "DISABLE" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error:  #101: "ENABLE" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error:  #101: "ERROR" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error:  #101: "SUCCESS" has already been declared in the current scope
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(389): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(556): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(569): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(590): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x.h(600): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:\Program Files (x86)\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
跑马灯.c - 30 Error(s), 0 Warning(s).
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

9

主题

53

帖子

0

精华

初级会员

Rank: 2

积分
110
金钱
110
注册时间
2013-5-12
在线时间
0 小时
发表于 2013-5-15 20:42:53 | 显示全部楼层
大家好
回复 支持 反对

使用道具 举报

16

主题

85

帖子

0

精华

初级会员

Rank: 2

积分
170
金钱
170
注册时间
2013-5-15
在线时间
0 小时
 楼主| 发表于 2013-5-15 20:47:16 | 显示全部楼层
回复【2楼】渴望一份平淡:
---------------------------------
HARDWARE里面就是led.c和led.h
这是led.c
********************************
#include <stm32f10x_lib.h>
#include"led.h"
void LED_Init()
{
RCC->APB2ENR|=1<<2;
RCC->APB2ENR|=1<<5;
GPIOA->CRH&=0xFFFFFFF0;
GPIOA->CRH|=0x00000003;
GPIOA->ODR|=1<<8;
GPIOD->CRL&=0xFFFFF0FF;
GPIOD->CRL|=0x00000300;
GPIOD->ODR|=1<<2;

}
*******************************************

这是led.h
********************************
#ifndef __LED_H
#define __LED_H
#include "sys.h"
#define LED0 Aout(8)
#define LED0 Dout(2)
void LED_Init(void);
#endif
**********************************
回复 支持 反对

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2013-5-15 20:48:25 | 显示全部楼层
SYSTEM文件夹拷贝错了吧!
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复 支持 反对

使用道具 举报

9

主题

53

帖子

0

精华

初级会员

Rank: 2

积分
110
金钱
110
注册时间
2013-5-12
在线时间
0 小时
发表于 2013-5-15 20:49:56 | 显示全部楼层
不会啊,历程里面的啊。。。我弄了一天多了。都没调出来
大家好
回复 支持 反对

使用道具 举报

16

主题

85

帖子

0

精华

初级会员

Rank: 2

积分
170
金钱
170
注册时间
2013-5-15
在线时间
0 小时
 楼主| 发表于 2013-5-15 20:51:23 | 显示全部楼层
回复【4楼】正点原子:
---------------------------------
那在哪里能找到寄存器的system呀。。还有后面实验要用到OLED TFT-LCD吧,还有没什么配件需要买呢,,我想一起买齐下
回复 支持 反对

使用道具 举报

9

主题

53

帖子

0

精华

初级会员

Rank: 2

积分
110
金钱
110
注册时间
2013-5-12
在线时间
0 小时
发表于 2013-5-15 20:58:57 | 显示全部楼层
每个历程下都有。。。
大家好
回复 支持 反对

使用道具 举报

16

主题

85

帖子

0

精华

初级会员

Rank: 2

积分
170
金钱
170
注册时间
2013-5-15
在线时间
0 小时
 楼主| 发表于 2013-5-15 21:01:57 | 显示全部楼层
回复【7楼】渴望一份平淡:
---------------------------------
可以了,,做作业去了,,百度了好久,问问提问也挂在那没人回答
回复 支持 反对

使用道具 举报

9

主题

53

帖子

0

精华

初级会员

Rank: 2

积分
110
金钱
110
注册时间
2013-5-12
在线时间
0 小时
发表于 2013-5-15 21:04:02 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-7-19 18:39

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表