how to add a macro function in symbols with S21DS?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

how to add a macro function in symbols with S21DS?

1,053 次查看
JhonYF
Contributor II

As below,I want add a macro function named "Error_Handler()", the value is aseembly code,but it can not work and result the IDE report an error"expected string literal before 'BKPT",I don not konw what to do next , hope for help  ,thanks!

“Error_Handler()” is the macro function“Error_Handler()” is the macro function

标记 (1)
0 项奖励
回复
3 回复数

1,024 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @JhonYF 

I tried to reproduce your issue and got the same error as you. This error does not appear when you use the __asm__("BKPT") directly in the code, so it looks like the problem is macro. 

Please refer to the community post below, which provides recommendations that will be useful for you. 

Using Assembler Macros in C

 

B.R.

VaneB

0 项奖励
回复

960 次查看
JhonYF
Contributor II

@VaneB thanks for reply,but I still can not make it 

0 项奖励
回复

1,002 次查看
JhonYF
Contributor II

Thanks for reply,but I still didn't make it 

0 项奖励
回复