在线时间0 小时
UID1682546
ST金币0
蝴蝶豆0
注册时间2009-9-18
新手上路
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-11-20 10:46:07
|
显示全部楼层
a0a.1 0b0c
RE:第一次接触ST芯片,STM8S.H编译不过去,请帮帮忙看看
在“stm8_interrupt_vector.c”里找到其中一句报错得代码“typedef void @far (*interrupt_handler_t)(void);”
然后我在“STM8S.H”里找“@far”的定义,
#ifdef _COSMIC_
#define FAR @far
#define NEAR @near
#define TINY @tiny
#define EEPROM @eeprom
#define CONST const
#elif defined (_RAISONANCE_) /* __RCST7__ */
#define FAR far
#define NEAR data
#define TINY page0
#define EEPROM eeprom
#define CONST code
#if defined (STM8S208) || defined (STM8S207) || defined (STM8S007) || defined (STM8AF52Ax) || \
defined (STM8AF62Ax)
/*!< Used with memory Models for code higher than 64K */
#define MEMCPY fmemcpy
#else /* STM8S903, STM8S103, STM8S003, STM8S105, STM8AF626x */
/*!< Used with memory Models for code less than 64K */
#define MEMCPY memcpy
#endif /* STM8S208 or STM8S207 or STM8S007 or STM8AF62Ax or STM8AF52Ax */
#else /*_IAR_*/
#define FAR __far
#define NEAR __near
#define TINY __tiny
#define EEPROM __eeprom
#define CONST const
#endif /* __CSMC__ */
我现在用的是IAR编译,是不是说只能用COSMIC编译?? |
|