IAR中Zstack协议栈相关问题解决办法
1、Warning[w52]: More than one definition for the byte at address 0x4b in common segment INTVEC.
如果遇到类似
Warning[w52]: More than one definition for the byte at address 0x4b in common segment INTVEC. It is defined in module "hal_timer" as well as in module "Starry_Timer1"的警告
这是表明Timer1的ISR被重复定义了,通常是用户自己移植的Timer1定时器程序与Zstack自带的hal_timer文件中的ISR中断程序冲突

我们屏蔽掉hal_timer.c中的即可
HAL_ISR_FUNCTION( halTimer1Isr, T1_VECTOR )
{
halProcessTime1 ();
}

2、Warning[w2]: Symbol ?PBANK is redefined in command-line
解决方法,在f8w2530.xcl 文件中大约是第83行,注释掉 -D?PBANK=93

3、串口打印乱码解决方法
我们使用Zstack自带的串口通信API函数时,会出现上位机接受到的数据后面出现乱码,我们需要再配置选项中的所有预定义宏除了ZTOOL_P1,其余前面全部添加x,表示禁用

4、如何显示行号
在setting中选择IDE Options,打开在Editor中勾选上Show line numbers

5、Error[Pa045]: function "xxxx" has no prototype
这种错误正常是由于在协议栈中添加或移植了自己程序

我们需要在配置选项卡中,取消Require prototypes的选择














![NSS [SWPUCTF 2022 新生赛]xff](https://img-blog.csdnimg.cn/img_convert/652bb3ec9183b5831f0d29ec82771b79.png)




