how to add a macro function in symbols with S21DS?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to add a macro function in symbols with S21DS?

562 Views
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

Tags (1)
0 Kudos
3 Replies

533 Views
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 Kudos

469 Views
JhonYF
Contributor II

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

0 Kudos

511 Views
JhonYF
Contributor II

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

0 Kudos