trap extension

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
IvanoBono
Level 3
Level 3
25 sign-ins 10 sign-ins 10 replies posted
[TC377, tasking v6.3r1, iLLD]
I'm trying to configure "the trap extension" to understand what triggered the trap.

following the iLLD User Documentation guide
I have:
-created a new TrapExtension.h file which I am attaching
-added
#define IFX_CFG_EXTEND_TRAP_HOOKS

in Ifx_Cfg.h
-added:
#include "TrapExtension.h" // Assuming this is the file name as in above example
#define IFX_CFG_CPU_TRAP_TSR_HOOK (trapInfo) myTrapExtensionHook (trapInfo) // This is INLINE function.
#define IFXCPU_TRAP_CFG_SYSCALL_CPU0_HOOK (trapInfo) mySysCallExtensionHook (trapInfo);

in Ifx_Cfg_Trap.h
- I cause the trap by reading an incorrect memory location (0x0000100).

the trap is unleashed but my trap function is not performed.

I forgot something?
0 Likes
2 Replies
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
What I see is that IFX_CFG_CPU_TRAP_TSR_HOOK is not used. If you want to add your code to the Bus Error Trap then you could try:
//#define IFX_CFG_CPU_TRAP_TSR_HOOK (trapInfo) myTrapExtensionHook (trapInfo) // This is INLINE function.
#define IFX_CFG_CPU_TRAP_BE_HOOK(trapWatch) myTrapExtensionHook(trapWatch)

0 Likes
IvanoBono
Level 3
Level 3
25 sign-ins 10 sign-ins 10 replies posted
in Ifx_Cfg_Trap.h, I have added all types of traps:

#define IFX_CFG_CPU_TRAP_NMI_HOOK(trapInfo)     myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_MME_HOOK(trapInfo) myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_IPE_HOOK(trapInfo) myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_IE_HOOK(trapInfo) myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_CME_HOOK(trapInfo) myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_BE_HOOK(trapInfo) myTrapExtensionHook(trapInfo)
#define IFX_CFG_CPU_TRAP_ASSERT_HOOK(trapInfo) myTrapExtensionHook(trapInfo)


but it still does not execute the "myTrapExtensionHook (trapInfo)"
0 Likes