你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

查看: 3493|回复: 0

STVD编译STM8L系列单片机出现问题,求大侠解决。您一句话,可能让我少奋斗一下午。

[复制链接]

2

主题

4

回帖

0

蝴蝶豆

新手上路

最后登录
1970-1-1
发表于 2013-5-29 16:00:39 | 显示全部楼层 |阅读模式
用STVD编译STML151C8单片机出现的问题
 
                                                <script type="text/javascript">                        
            
                        已经下载了破解版的cosmic,程序和编译出错如下,已经解决了大部分,还有这3个解决不了,求助大神!在线等,望速回复。
            #include "stm8l15x.h"
            #include "stm8l15x_gpio.h"
            void agpio_init()
            {
             GPIO_DeInit(GPIOA);
             GPIO_DeInit(GPIOB);
             GPIO_DeInit(GPIOD);
             GPIO_Init(GPIOA,GPIO_Pin_5,GPIO_Mode_Out_PP_Low_Fast);
             GPIO_Init(GPIOB,GPIO_Pin_5,GPIO_Mode_In_FL_No_IT);
             GPIO_Init(GPIOD,GPIO_Pin_5,GPIO_Mode_In_FL_No_IT);
            }
             void main()
            {
             void agpio_init();
             GPIO_ResetBits(GPIOA,GPIO_Pin_5);
             while (1)
             { 
              if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_5)==0)
              {
               GPIO_ToggleBits(GPIOA,GPIO_Pin_5);
              };
              if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_5)==0)
              {
               GPIO_ResetBits(GPIOA,GPIO_Pin_5);
              };
              
             }
            }报的错误如下
            ----------- Project gpio_1 - STM8 Cosmic - Configuration Debug -------------
            Compiling main.c...
            cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8"  -clDebug\ -coDebug\ main.c
            #error cpstm8 C:\Program Files\COSMIC\CXSTM8_32K\Hstm8\stm8l15x_itc.h:105(0) missing enumeration member
            main.c:
             The command: "cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8"  -clDebug\ -coDebug\ main.c " has failed, the returned value is: 1
            exit code=1.
            gpio_1.elf - 3 error(s), 0 warning(s)
             
            
            
            

                                                [/td]        [/tr]    [/table]</p>已经下载了破解版的cosmic,程序和编译出错如下,已经解决了大部分,还有这3个解决不了,求助大神!在线等,望速回复。
#include "stm8l15x.h"
#include "stm8l15x_gpio.h"
void agpio_init()
{
 GPIO_DeInit(GPIOA);
 GPIO_DeInit(GPIOB);
 GPIO_DeInit(GPIOD);
 GPIO_Init(GPIOA,GPIO_Pin_5,GPIO_Mode_Out_PP_Low_Fast);
 GPIO_Init(GPIOB,GPIO_Pin_5,GPIO_Mode_In_FL_No_IT);
 GPIO_Init(GPIOD,GPIO_Pin_5,GPIO_Mode_In_FL_No_IT);
}
 void main()
{
 void agpio_init();
 GPIO_ResetBits(GPIOA,GPIO_Pin_5);
 while (1)
 { 
  if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_5)==0)
  {
   GPIO_ToggleBits(GPIOA,GPIO_Pin_5);
  };
  if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_5)==0)
  {
   GPIO_ResetBits(GPIOA,GPIO_Pin_5);
  };
  
 }
}报的错误如下
----------- Project gpio_1 - STM8 Cosmic - Configuration Debug -------------
Compiling main.c...
cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8"  -clDebug\ -coDebug\ main.c
#error cpstm8 C:\Program Files\COSMIC\CXSTM8_32K\Hstm8\stm8l15x_itc.h:105(0) missing enumeration member
main.c:
 The command: "cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8"  -clDebug\ -coDebug\ main.c " has failed, the returned value is: 1
exit code=1.
gpio_1.elf - 3 error(s), 0 warning(s)
 
11.png
回复

使用道具 举报

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
微信公众号二维码 微信公众号
手机版二维码 手机版