Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Embedded Artists exceptions in framework

2006-04-20 by frodri123123

I have some code which is causing  a dabort exception.  I am  
using an Embedded Artists board (with lpc 2148) with the gnu 
debugging environment.  I am trying to debug the code through a 
serial console.  Now, when the exception occurs, it gets caught in 
the follwing routine:  
  
static void  
exceptionHandlerDabort(void)  
{  
  register unsigned int programCounter asm ("lr");  
  unsigned int          value = programCounter - (unsigned int)0x08;  
  
  consolSendString("Dabort exception !!!\nAddress: 0x");  
  consolSendNumber(16, 8, 0, '0', value);  
  while(1)  
    ;  
}  
  
  
An I get:  
  
Dabort exception !!!  
Address: 0x00001E80  
  
thrown in the console...  However that address corresponds to:  
  
$ arm-elf-addr2line -e myproject.elf 1E80  
../startup/consol.c:263  
  
which is precisely the SendString instruction; so it would seem to  
me that value displayed is the current PC, and not the PC where the  
exception occurred...   
 
 
So I guess I am asking: 
 
1- Why is a dabort exception generated?  My understanding is that 
they are caused by invalid memory access; however I am not clear as 
to what constitues an invalid memory access for the lpc2148.  Is it 
unaligned access?  or is it access to non existing memory? 
 
2- Is the exception effectively generated at the consol.c file; or 
is there some magic to make the exception handling framework work 
properly?   
 
Hope someone can help... 
 
ps.  I am new to the ARM family; so maybe I am just being thick...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.