* [ECOS] data abort exception (SWI)
@ 2008-03-20 16:12 trollepi jj
2008-03-20 16:18 ` Gary Thomas
0 siblings, 1 reply; 7+ messages in thread
From: trollepi jj @ 2008-03-20 16:12 UTC (permalink / raw)
To: ecos-discuss
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.
Best regards,
JJP
_________________________________________________________________
Découvrez Windows Live Spaces et créez votre site Web perso en quelques clics !
http://spaces.live.com/signup.aspx
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] data abort exception (SWI)
2008-03-20 16:12 [ECOS] data abort exception (SWI) trollepi jj
@ 2008-03-20 16:18 ` Gary Thomas
2008-03-21 3:22 ` trollepi jj
2008-03-21 12:20 ` trollepi jj
0 siblings, 2 replies; 7+ messages in thread
From: Gary Thomas @ 2008-03-20 16:18 UTC (permalink / raw)
To: trollepi jj; +Cc: ecos-discuss
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
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
------------------------------------------------------------
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 615 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [ECOS] data abort exception (SWI)
2008-03-20 16:18 ` Gary Thomas
@ 2008-03-21 3:22 ` trollepi jj
2008-03-21 12:20 ` trollepi jj
1 sibling, 0 replies; 7+ messages in thread
From: trollepi jj @ 2008-03-21 3:22 UTC (permalink / raw)
To: Gary Thomas; +Cc: ecos-discuss
Thanks for your quick response, I try it
----------------------------------------
> Date: Thu, 20 Mar 2008 10:11:33 -0600
> From: gary@mlbassoc.com
> To: jackoaway@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] 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
> ------------------------------------------------------------
_________________________________________________________________
Sur Windows Live Ideas, découvrez en exclusivité de nouveaux services en ligne... si nouveaux qu'ils ne sont pas encore sortis officiellement sur le marché !
http://ideas.live.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [ECOS] data abort exception (SWI)
2008-03-20 16:18 ` Gary Thomas
2008-03-21 3:22 ` trollepi jj
@ 2008-03-21 12:20 ` trollepi jj
2008-03-21 12:31 ` Gary Thomas
1 sibling, 1 reply; 7+ messages in thread
From: trollepi jj @ 2008-03-21 12:20 UTC (permalink / raw)
To: Gary Thomas; +Cc: ecos-discuss
Hi,
So your patch can't work, because, the program never reach the routine software_interrupt, it always goes on abort_prefetch. This is the sample of my .ld (I do a entirely RAM project). We
must not use RedBoot.
MEMORY
{
ram : ORIGIN = 0x04000000, LENGTH = 0x00080000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (ram, 0x04000000, LMA_EQ_VMA)
SECTION_fixed_vectors (ram, ALIGN (0x04), LMA_EQ_VMA)
SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}
We need swi to implement syscall like linux. So we make a swi to enter on the exception handler and after modify the fields of the info parameter (cast in HAL_SavedRegisters) to point
on a function we define(modify pc, sp). We need after all the stuff do return on the calling thread but it never goes.
Thank for future help
Best regards
----------------------------------------
> Date: Thu, 20 Mar 2008 10:11:33 -0600
> From: gary@mlbassoc.com
> To: jackoaway@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] 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
> ------------------------------------------------------------
_________________________________________________________________
Téléchargez le nouveau Windows Live Messenger !
http://get.live.com/messenger/overview
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] data abort exception (SWI)
2008-03-21 12:20 ` trollepi jj
@ 2008-03-21 12:31 ` Gary Thomas
2008-03-21 12:41 ` trollepi jj
0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2008-03-21 12:31 UTC (permalink / raw)
To: trollepi jj; +Cc: ecos-discuss
trollepi jj wrote:
> Hi,
> So your patch can't work, because, the program never reach the routine software_interrupt, it always goes on abort_prefetch. This is the sample of my .ld (I do a entirely RAM project). We
> must not use RedBoot.
Have you tried running the standard tests with your configuration?
Until those work, you can't really proceed.
> MEMORY
> {
> ram : ORIGIN = 0x04000000, LENGTH = 0x00080000
> }
>
> SECTIONS
> {
> SECTIONS_BEGIN
> SECTION_rom_vectors (ram, 0x04000000, LMA_EQ_VMA)
> SECTION_fixed_vectors (ram, ALIGN (0x04), LMA_EQ_VMA)
> SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> SECTIONS_END
> }
> We need swi to implement syscall like linux. So we make a swi to enter on the exception handler and after modify the fields of the info parameter (cast in HAL_SavedRegisters) to point
> on a function we define(modify pc, sp). We need after all the stuff do return on the calling thread but it never goes.
> Thank for future help
> Best regards
> ----------------------------------------
>> Date: Thu, 20 Mar 2008 10:11:33 -0600
>> From: gary@mlbassoc.com
>> To: jackoaway@hotmail.com
>> CC: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] 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
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [ECOS] data abort exception (SWI)
2008-03-21 12:31 ` Gary Thomas
@ 2008-03-21 12:41 ` trollepi jj
2008-03-21 12:50 ` Gary Thomas
0 siblings, 1 reply; 7+ messages in thread
From: trollepi jj @ 2008-03-21 12:41 UTC (permalink / raw)
To: Gary Thomas; +Cc: ecos-discuss
Hi,
What do you mean by "standard tests"?
I configure ecos with the minimal packages (hal+infra+kernel) and without swi it's work fine. (2 tasks with semaphore)
So, now i try to manage swi handler without ecos, just a simple syscall implementation.
Best regards.
ps : what is "standard tests?"
----------------------------------------
> Date: Fri, 21 Mar 2008 06:20:23 -0600
> From: gary@mlbassoc.com
> To: jackoaway@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] data abort exception (SWI)
>
> trollepi jj wrote:
>> Hi,
>> So your patch can't work, because, the program never reach the routine software_interrupt, it always goes on abort_prefetch. This is the sample of my .ld (I do a entirely RAM project). We
>> must not use RedBoot.
>
> Have you tried running the standard tests with your configuration?
> Until those work, you can't really proceed.
>
>> MEMORY
>> {
>> ram : ORIGIN = 0x04000000, LENGTH = 0x00080000
>> }
>>
>> SECTIONS
>> {
>> SECTIONS_BEGIN
>> SECTION_rom_vectors (ram, 0x04000000, LMA_EQ_VMA)
>> SECTION_fixed_vectors (ram, ALIGN (0x04), LMA_EQ_VMA)
>> SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
>> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
>> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>> SECTIONS_END
>> }
>> We need swi to implement syscall like linux. So we make a swi to enter on the exception handler and after modify the fields of the info parameter (cast in HAL_SavedRegisters) to point
>> on a function we define(modify pc, sp). We need after all the stuff do return on the calling thread but it never goes.
>> Thank for future help
>> Best regards
>> ----------------------------------------
>>> Date: Thu, 20 Mar 2008 10:11:33 -0600
>>> From: gary@mlbassoc.com
>>> To: jackoaway@hotmail.com
>>> CC: ecos-discuss@ecos.sourceware.org
>>> Subject: Re: [ECOS] 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
> ------------------------------------------------------------
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
_________________________________________________________________
Sur Windows Live Ideas, découvrez en exclusivité de nouveaux services en ligne... si nouveaux qu'ils ne sont pas encore sortis officiellement sur le marché !
http://ideas.live.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] data abort exception (SWI)
2008-03-21 12:41 ` trollepi jj
@ 2008-03-21 12:50 ` Gary Thomas
0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2008-03-21 12:50 UTC (permalink / raw)
To: trollepi jj; +Cc: ecos-discuss
trollepi jj wrote:
> Hi,
> What do you mean by "standard tests"?
> I configure ecos with the minimal packages (hal+infra+kernel) and without swi it's work fine. (2 tasks with semaphore)
> So, now i try to manage swi handler without ecos, just a simple syscall implementation.
> Best regards.
> ps : what is "standard tests?"
Read the documentation :-( There are a complete set of unit tests
for all components in eCos. Until they run, you don't have a functional
base system.
http://ecos.sourceware.org/docs-latest/user-guide/running-an-ecos-test-case.html
> ----------------------------------------
>> Date: Fri, 21 Mar 2008 06:20:23 -0600
>> From: gary@mlbassoc.com
>> To: jackoaway@hotmail.com
>> CC: ecos-discuss@ecos.sourceware.org
>> Subject: Re: [ECOS] data abort exception (SWI)
>>
>> trollepi jj wrote:
>>> Hi,
>>> So your patch can't work, because, the program never reach the routine software_interrupt, it always goes on abort_prefetch. This is the sample of my .ld (I do a entirely RAM project). We
>>> must not use RedBoot.
>> Have you tried running the standard tests with your configuration?
>> Until those work, you can't really proceed.
>>
>>> MEMORY
>>> {
>>> ram : ORIGIN = 0x04000000, LENGTH = 0x00080000
>>> }
>>>
>>> SECTIONS
>>> {
>>> SECTIONS_BEGIN
>>> SECTION_rom_vectors (ram, 0x04000000, LMA_EQ_VMA)
>>> SECTION_fixed_vectors (ram, ALIGN (0x04), LMA_EQ_VMA)
>>> SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
>>> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>>> SECTIONS_END
>>> }
>>> We need swi to implement syscall like linux. So we make a swi to enter on the exception handler and after modify the fields of the info parameter (cast in HAL_SavedRegisters) to point
>>> on a function we define(modify pc, sp). We need after all the stuff do return on the calling thread but it never goes.
>>> Thank for future help
>>> Best regards
>>> ----------------------------------------
>>>> Date: Thu, 20 Mar 2008 10:11:33 -0600
>>>> From: gary@mlbassoc.com
>>>> To: jackoaway@hotmail.com
>>>> CC: ecos-discuss@ecos.sourceware.org
>>>> Subject: Re: [ECOS] 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
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-21 12:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20 16:12 [ECOS] data abort exception (SWI) trollepi jj
2008-03-20 16:18 ` Gary Thomas
2008-03-21 3:22 ` trollepi jj
2008-03-21 12:20 ` trollepi jj
2008-03-21 12:31 ` Gary Thomas
2008-03-21 12:41 ` trollepi jj
2008-03-21 12:50 ` Gary Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).