I was trying to add some assembly code in my project.
I am using the following Codewarrior 10.7 evaluation edition.
Target MCU is MPC5604B.
The following default settings are ON for the project:
c/c++ build -> settings -> PowerPC CPU -> Processor is set to ZEN (I cant find e200z0h core)
c/c++ build -> settings -> PowerPC CPU -> Compress for PowerPC VLE (zen)
c/c++ build -> settings -> PowerPC Compiler -> Processor -> Translate PPC ASM to VLE ASM (ZEN)
I have created a normal c project. And I have one assembly source file within the project.
When the below code is executed, a Program interrupt is hit (IVOR6).
Snippet of code in the source file.
# Saves context to task stack
stw r1,-0x98 (r1) # store backchain ----> code causing the interrupt
addi r1,r1, 0x98 # allocate stack
stw r0, 0x24 (r1)
The disassembled code for the above pointed instruction is below. Though I am not quite sure how it is translated by Codewarrior.
40001418: se_stb r2,0(rsp)
4000141a: dc.w 0xff68 -----> the actual instruction that is causing the interrupt.
4000141c: e_lha rsp,152(rsp)
40001420: se_stb r0,0(rsp)
I couldn't find the what the instruction "dc.w" means.
The following are the register when the interrupt was generated.
ESR: 0x08000020 --- PIL = 1; VLEMI = 1
Can somebody help me with the reason for the interrupt being generated?
Pradeep M C