OpenEdv-开源电子网

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

使用stm32f103c8t6求标准程序工程文件以后套用

[复制链接]

3

主题

10

帖子

0

精华

新手上路

积分
34
金钱
34
注册时间
2020-9-1
在线时间
6 小时
发表于 2020-9-3 09:40:07 | 显示全部楼层 |阅读模式
1金钱
新手在创建 工程后 报错26个无法修改 所以论坛求助 标准的工程文件希望以后可以套用

本人使用的是stm32f103c8t6    、 使用的是tuya的3.0的板子 不知道有没有大佬懂这个板子的可以交流一下



涂鸦tuya3.0

涂鸦tuya3.0
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

11

主题

314

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
1039
金钱
1039
注册时间
2020-7-21
在线时间
258 小时
发表于 2020-9-3 10:15:46 | 显示全部楼层
本帖最后由 DFY 于 2020-9-3 10:32 编辑

网上找个stm32f103c8t6标准库不可以吗?或者自己修改一下正点原子的分103例程,就改一下启动文件,和宏定义就可以了
回复

使用道具 举报

0

主题

3

帖子

0

精华

高级会员

Rank: 4

积分
722
金钱
722
注册时间
2018-4-14
在线时间
71 小时
发表于 2020-9-3 11:11:02 | 显示全部楼层
报错的提示内容是什么
回复

使用道具 举报

3

主题

10

帖子

0

精华

新手上路

积分
34
金钱
34
注册时间
2020-9-1
在线时间
6 小时
 楼主| 发表于 2020-9-3 12:53:07 | 显示全部楼层
陈三溪 发表于 2020-9-3 11:11
报错的提示内容是什么

compiling main.c...
main.c(62): error:  #5: cannot open source input file "stm32f103xb.h": No such file or directory
  #include "stm32f103xb.h"
main.c: 0 warnings, 1 error
compiling stm32f10x_it.c...
stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
stm32f10x_it.c: 1 warning, 1 error
compiling system_stm32f10x.c...
stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
system_stm32f10x.c: 1 warning, 1 error
compiling core_cm3.c...
assembling startup_stm32f10x_hd.s...
compiling misc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\misc.c: 1 warning, 1 error
compiling stm32f10x_adc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_adc.c: 1 warning, 1 error
compiling stm32f10x_bkp.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_bkp.c: 1 warning, 1 error
compiling stm32f10x_can.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_can.c: 1 warning, 1 error
compiling stm32f10x_cec.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_cec.c: 1 warning, 1 error
compiling stm32f10x_crc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_crc.c: 1 warning, 1 error
compiling stm32f10x_dac.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_dac.c: 1 warning, 1 error
compiling stm32f10x_dbgmcu.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_dbgmcu.c: 1 warning, 1 error
compiling stm32f10x_dma.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_dma.c: 1 warning, 1 error
compiling stm32f10x_exti.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_exti.c: 1 warning, 1 error
compiling stm32f10x_flash.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_flash.c: 1 warning, 1 error
compiling stm32f10x_fsmc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_fsmc.c: 1 warning, 1 error
compiling stm32f10x_gpio.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_gpio.c: 1 warning, 1 error
compiling stm32f10x_i2c.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_i2c.c: 1 warning, 1 error
compiling stm32f10x_iwdg.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_iwdg.c: 1 warning, 1 error
compiling stm32f10x_pwr.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_pwr.c: 1 warning, 1 error
compiling stm32f10x_rcc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_rcc.c: 1 warning, 1 error
compiling stm32f10x_rtc.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_rtc.c: 1 warning, 1 error
compiling stm32f10x_sdio.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_sdio.c: 1 warning, 1 error
compiling stm32f10x_spi.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_spi.c: 1 warning, 1 error
compiling stm32f10x_tim.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_tim.c: 1 warning, 1 error
compiling stm32f10x_usart.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_usart.c: 1 warning, 1 error
compiling stm32f10x_wwdg.c...
..\USER\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\FWLIB\src\stm32f10x_wwdg.c: 1 warning, 1 error
"..\OBJ\TEST.axf" - 26 Error(s), 25 Warning(s).
Target not created.
Build Time Elapsed:  00:00:11
回复

使用道具 举报

3

主题

10

帖子

0

精华

新手上路

积分
34
金钱
34
注册时间
2020-9-1
在线时间
6 小时
 楼主| 发表于 2020-9-3 12:54:03 | 显示全部楼层
上述是 26个正点原子看视频边学 创建stm32模板26个报错 大佬帮忙看看
回复

使用道具 举报

22

主题

2251

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
4477
金钱
4477
注册时间
2013-4-22
在线时间
336 小时
发表于 2020-9-3 12:57:22 | 显示全部楼层
.h文件没有包含进去吧,或者文件名引用错误
回复

使用道具 举报

3

主题

10

帖子

0

精华

新手上路

积分
34
金钱
34
注册时间
2020-9-1
在线时间
6 小时
 楼主| 发表于 2020-9-3 13:11:31 | 显示全部楼层
三叶草 发表于 2020-9-3 12:57
.h文件没有包含进去吧,或者文件名引用错误

解决了 25个 原来是define们那里要具体些 是什么芯片 我居然还用的 STM32F10X_HD,USE_STDPERIPH_DRIVER 改成STM32F103c8_HD,USE_STDPERIPH_DRIVER   和device选的相同就可以了 然后就是还差1个 报错
回复

使用道具 举报

3

主题

10

帖子

0

精华

新手上路

积分
34
金钱
34
注册时间
2020-9-1
在线时间
6 小时
 楼主| 发表于 2020-9-3 13:12:02 | 显示全部楼层
main.c(62): error:  #5: cannot open source input file "stm32f103xb.h": No such file or directory
  #include "stm32f103xb.h"
回复

使用道具 举报

0

主题

4

帖子

0

精华

新手入门

积分
7
金钱
7
注册时间
2020-9-3
在线时间
1 小时
发表于 2020-9-3 21:08:24 | 显示全部楼层
stm32f10x.h(298): error:  #67: expected a "}"
是不是67行少了个},查看下是不是修改时误删了?
回复

使用道具 举报

51

主题

2166

帖子

2

精华

论坛元老

Rank: 8Rank: 8

积分
10653
金钱
10653
注册时间
2017-4-14
在线时间
2780 小时
发表于 2020-9-4 10:36:20 | 显示全部楼层
白丁 发表于 2020-9-3 12:53
compiling main.c...
main.c(62): error:  #5: cannot open source input file "stm32f103xb.h": No suc ...

这个明显是宏选错了  用MD
回复

使用道具 举报

3

主题

808

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
3869
金钱
3869
注册时间
2017-3-7
在线时间
1688 小时
发表于 2020-9-4 16:14:11 | 显示全部楼层
其实用cubemx直接生成一个最简单了
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-4-30 11:53

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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