在线时间0 小时
UID425826
注册时间2013-4-9
NXP金币0
该用户从未签到
中级会员
 
- 积分
- 302
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2013-5-31 10:14:43
|
显示全部楼层
回复:CW10.3 #prgram #define等的用法(relocate code问题)(正解)
问题已解决:是由于CW版本不同使用编译器不同,CW10.3使用的是GCC compiler ,不通过以前的#pragma写法,正确写法应该如下:
#define __relocate_code__ __attribute__((section(".data2"), long_call))
void set_sys_dividers(uint32 outdiv1, uint32 outdiv2, uint32 outdiv3, uint32 outdiv4)__relocate_code__ ;
void __relocate_code__ set_sys_dividers(uint32 outdiv1, uint32 outdiv2, uint32 outdiv3, uint32 outdiv4)
{
......
} |
|