This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: data abort exception (SWI)


trollepi jj wrote:
Hi,
I try to make a ecos project without Redboot for an atmel AT91M55800A (phycore). So it's a RAM project. I compile and debug an application without any problems.
When i try to generate a SWI (with asm("swi")), the application reach the exeption handler that I define but the number of the exception is not CYGNUM_HAL_VECTOR_SOFTWARE_INTERRUPT (number 2 that i give on cyg_exception_set_handler) but CYGNUM_HAL_VECTOR_ABORT_PREFETCH (number 3) . Maybe I might modify vector.S to do the remap (like hal_platform_setup.h ). If anybody have an idea? I search on your mailing and nothing fit well.

Why are you trying to use the SWI instruction?


In any case, it looks like there is a typo in the SWI handler.
I'm pretty sure no one has ever actually used this path!

Please try the attached patch and let me know if it fixes
your problem.

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
Index: hal/arm/arch/current/src/vectors.S
===================================================================
--- hal/arm/arch/current/src/vectors.S	(revision 3391)
+++ hal/arm/arch/current/src/vectors.S	(working copy)
@@ -539,7 +539,8 @@
         tst     r1,#CPSR_THUMB_ENABLE
         subeq   r0,lr,#4                // PC at time of SWI (ARM)
         subne   r0,lr,#2                // PC at time of SWI (thumb)
-        mov     r2,#CYGNUM_HAL_EXCEPTION_INTERRUPT
+        mov     r2,#CYGNUM_HAL_EXCEPTION_SOFTWARE_INTERRUPT
+        mov     r3,sp
         b       call_exception_handler
 
         .code   32

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]