I use IAR assembler V8.11.2.13589 w32 for arm and the target is Kinetis KEAZN64 (Cortex M0+). We face a problem when we use assembly macros:
1- When I pass a value to the macro.
2- When I pass register name to the macro.
So could you provide us with a working example to these cases?
Hi Bahaa Sehsah,
About the IAR project macros, you totally can refer to the head file definition.
Please open the IAR path: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\NXP
You can find the SKEAZN642.h.
I post some macros code:
I also attach one head file for your reference.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
I need examples for assembly macros not C macros.
Thanks in advance.
Hi Bahaa,
Sorry, my mistake.
You can refer to asm_mac.h which can be find from this path:
C:\Program Files (x86)\IAR Systems\KinetisExample\TWR-K64F120M\mqx\source\psp\cortex_m\compiler\iar
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
Thanks for your reply. By the way my issue was resolved, but now I face
another problem:
When my assembly file ".s" exceeds almost 1KB code size the IAR assembler
fires error "Error[400]: Expression out of range".
What should I do? also What is the cause of this error?
Thanks in advance.
Hi Bahaa,
Thank you for your updated information.
What the detail chip you are using? I can't see your detail part number.
Please check the flash address, do you exceed the flash size? Please also check the IAR project options, do you select the correct chip? Please also check your .ld file which has the flash size definition.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------