"Stop failed" popup when suspending attached debug session

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

"Stop failed" popup when suspending attached debug session

Jump to solution
1,256 Views
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 Kudos
1 Solution
1,113 Views
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!

View solution in original post

0 Kudos
2 Replies
1,114 Views
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 Kudos
1,113 Views
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!
-----------------------------------------------------------------------------------------------------------------------