"Stop failed" popup when suspending attached debug session

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

"Stop failed" popup when suspending attached debug session

跳至解决方案
1,687 次查看
niba
Contributor III

Hi,

when I try to suspend attached debug session, I get a popup with message "Target request failed: HC/RS/S12Z GDI Protocol Adapter: Stop failed. Non Fatal Error." (screenshot attached). When I download and then suspend the application everything works fine (I can step through the application ...).

- CodeWarrior 10.7 (Eclipse)
- PEmicro Universal Multilink Rev B (green).

- S12Z 64k

What is the reason for that error popup and how to suspend attached debug session correctly?

Additional information: The application reset vector is not VECTOR 0. Does it have something to do with that?

Thank you very much!

0 项奖励
回复
1 解答
1,544 次查看
niba
Contributor III

Hi!

I found the problem! The VECTOR address has to be "four bytes aligned".

works: VECTOR ADDRESS 0xFFFFFD _Startup

does not work: VECTOR ADDRESS 0xFFFFFC _Startup

Hope it helps someone!

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,545 次查看
niba
Contributor III

Hi!

I found the problem! The VECTOR address has to be "four bytes aligned".

works: VECTOR ADDRESS 0xFFFFFD _Startup

does not work: VECTOR ADDRESS 0xFFFFFC _Startup

Hope it helps someone!

0 项奖励
回复
1,544 次查看
RadekS
NXP Employee
NXP Employee

Hi Nikolai,

Thank you for this question and also answer.

Yes, the S12Z vectors have 4 bytes while the addresses are just 3 bytes (24bit address space). So, the lowest byte from a vector is unused.

I use PE code for generating user vector table:

/* ISR prototype */
typedef void (* tIsrFunc)(void);
/* Pack 3 byte pointers as 4 byte Interrupt Vector Table entries */
typedef struct
{
  byte padding;
  tIsrFunc address;
} InterruptTableEntry;
#define _VECTOR(v) {0xFFU, &v}
 
//Please replace aprropriate Unimplemented_ISR by implemented interrupt routine
//see Table 1-13. Interrupt Vector Locations in RM for more details
InterruptTableEntry _InterruptVectorTable[INT_VECTOR_TABLE_SIZE] @INT_VECTOR_TABLE_ADDR = { /* Interrupt vector table */
                               _VECTOR(Unimplemented_ISR),//0x10
                               _VECTOR(Unimplemented_ISR),//0x14
                               _VECTOR(Unimplemented_ISR),//0x18
//…‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------