Skip to main content
Visitor II
March 13, 2006
Question

I am looking for an undefined instruction

  • March 13, 2006
  • 4 replies
  • 1024 views
Posted on March 13, 2006 at 10:22

I am looking for an undefined instruction

    This topic has been closed for replies.

    4 replies

    pchignonAuthor
    Visitor II
    August 9, 2005
    Posted on August 09, 2005 at 08:44

    Hi,

    I want to test my undefine instruction handler, but I don't know how?

    Is anybody known a undefine instruction ? I want to put this in my code :

    UNDEFINED_CODE:

    DCD 0X2C2C000A

    Thanks,

    Ludo

    pchignonAuthor
    Visitor II
    August 9, 2005
    Posted on August 09, 2005 at 10:06

    I have not found the undefined instruction. It seems to me that the code jump to 0x4000FFFC and call the undefined instruction because something was there, but It is not my case.

    Isn't it.

    pchignonAuthor
    Visitor II
    August 9, 2005
    Posted on August 09, 2005 at 10:11

    Ok,

    I found one ;

    DCD 0x776D2D75

    Thanks,

    Ludo

    Visitor II
    March 13, 2006
    Posted on March 13, 2006 at 06:34

    Hi Ludo,

    I have created the undefine handler that should reset the system when the program counter jumps to unused(filled with 0xFFFFFF) memory.

    Now I what to test this. How can I trigger an undefined exception from my C program?

    Here is what I want to do to trigger an undefined exception. I am running from SRAM(evaluation board) and I want the program counter to jump to a memory location in the flash. The flash contains only FFFFFF's, this way the undef exception will be triggert.

    But How do I make a jump with the PC?

    I tried with inline assembly in my main() function:

    __asm

    {

    B 0x40010000 //location in the flash

    }

    To jump to the flash memory. But this does not work.

    Does someone know how to jump to a specific memory location in a C program. I am not known with assembly instructions.

    Regards,

    Jimmey