找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

M452/453 USB 虚拟串口代码

  [复制链接]
楼主
hemingxian 发表于 2015-9-7 21:16:17 | 显示全部楼层
这个包我无法通过编译
Rebuild target 'USBD_VCOM'
assembling startup_M451Series.s...
creating preprocessor file for IP_Initial_Fun.c...
compiling IP_Initial_Fun.c...
..\Library\StdDriver\inc\sys.h(916): error:  #77-D: this declaration has no storage class or type specifier
..\Library\StdDriver\inc\sys.h(916): error:  #65: expected a ";"
..\Library\StdDriver\inc\sys.h(940): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(357): error:  #757: variable "__STATIC_INLINE" is not a type name
..\Library\StdDriver\inc\clk.h(357): error:  #101: "uint32_t" has already been declared in the current scope
..\Library\StdDriver\inc\clk.h(357): error:  #65: expected a ";"
..\Library\StdDriver\inc\clk.h(379): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(382): error:  #77-D: this declaration has no storage class or type specifier
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32FIN" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NF" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NR" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NO" is undefined
..\Library\StdDriver\inc\clk.h(384): error:  #169: expected a declaration
..\Library\StdDriver\inc\clk.h(385): error:  #169: expected a declaration
..\Library\StdDriver\inc\clk.h(407): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(411): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(412): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(413): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(414): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(415): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(416): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(417): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(417): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(418): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(418): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(420): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(421): error:  #757: variable "uint32_t" is not a type name
............
Target not created
但还是感谢楼主的奉献。
我的MDK是V4.23,编译M451SeriesBSP_CMSIS_v3.00.005的例程没有问题。
回复 支持 反对

使用道具 举报

沙发
hemingxian 发表于 2015-9-11 22:09:06 | 显示全部楼层
不像楼主说的那么简单,我试了试,不行。
回复 支持 反对

使用道具 举报

板凳
hemingxian 发表于 2015-10-30 11:40:21 | 显示全部楼层
能将你调整好路径的包发上来吗?我来测试一下真假
回复 支持 反对

使用道具 举报

地板
hemingxian 发表于 2016-1-29 20:29:36 | 显示全部楼层
本帖最后由 hemingxian 于 2016-1-29 20:34 编辑

我安装了MDK5.10,并安装了Nuvoton.NuMicro_DFP.1.0.5,可是却出现了这个
楼主能给个支持M451系列的包吗?

aa.jpg (33.63 KB, 下载次数: 385)

aa.jpg
回复 支持 反对

使用道具 举报

5#
hemingxian 发表于 2016-1-30 12:47:58 | 显示全部楼层
谢谢楼主指点。装了芯唐的 Nu_Link Keil Driver 就没有弹出错误了,可是我在编译时却出现下述错误,不知道应该如何处理。请楼主给予指点。
*** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'USBD_VCOM'
assembling startup_M451Series.s...
creating preprocessor file for IP_Initial_Fun.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\IP_Initial_Fun.c: 0 warnings, 1 error
creating preprocessor file for USB_Descriptor.c...
compiling IP_Initial_Fun.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\IP_Initial_Fun.c: 0 warnings, 1 error
creating preprocessor file for USB_Basic.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\USB_Basic.c: 0 warnings, 1 error
compiling USB_Descriptor.c...
creating preprocessor file for USB_EP_M453.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\USB_EP_M453.c: 0 warnings, 1 error
compiling USB_Basic.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\USB_Basic.c: 0 warnings, 1 error
creating preprocessor file for main.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\main.c: 0 warnings, 1 error
compiling USB_EP_M453.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\USB_EP_M453.c: 0 warnings, 1 error
compiling main.c...
..\Library\Device\Nuvoton\M451Series\Include\M451Series.h(215): error:  #5: cannot open source input file "core_cm4.h": No such file or directory
  #include "core_cm4.h"                       
* Cortex-M4 processor and core peripherals           */
App_Source\main.c: 0 warnings, 1 error
".\obj\USBD_VCOM.axf" - 8 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:00
回复 支持 反对

使用道具 举报

6#
hemingxian 发表于 2016-1-30 16:14:20 | 显示全部楼层
找到原因了,是路径设置有误,在Project\Options for Target ‘USBD_VCOM’\C/C++\Include Paths\ 中添加
..\Library\CMSIS\Include
即可编译成功。看来是原文路径设置有误。

bb.jpg (26.82 KB, 下载次数: 323)

bb.jpg
回复 支持 反对

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU