public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Cannot go to cyg_start of application
@ 2010-01-08 11:57 m mariga
  2010-01-09  0:49 ` m mariga
  0 siblings, 1 reply; 4+ messages in thread
From: m mariga @ 2010-01-08 11:57 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

Hello,

I cannot start application via redboot's "go" command.
I am in a serious trouble so please help me.

I load application at RAM address 0x8c010000.
After loading RedBoot-bin in ROM using ICE,and loading application in 
RAM,then I set break point at cyg_start.
As I entered "go" command on serial terminal,then next error occured and did 
not stop at cyg_start().

Target board is implemented 16M bytes RAM in area3.
It is difficult to think application program overflows.

-- serial terminal log begin
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v3_0 - built 14:47:45, Jan  8 2010

Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
RedBoot is free software, covered by the eCos license, derived from the
GNU General Public License. You are welcome to change it and/or distribute
copies of it under certain conditions. Under the license terms, RedBoot's
source code and full license terms must have been made available to you.
Redboot comes with ABSOLUTELY NO WARRANTY.

Platform: lanboard (SH 7705)
RAM: 0x8c000000-0x8d000000 [0x8c004e90-0x8cfed000 available]
FLASH: 0xa0000000-0xa01fffff, 32 x 0x10000 blocks
== Executing boot script in 10.000 seconds - enter ^C to abort
^C
RedBoot> go 0x8c010000
$T0a10:8c010000;0f:8cfecf98;#22

-- serial terminal log end

I checked map file but appeared to me never accessed as high address as 
8cfecf98.
I beseech you to teach me what is wrong.

I send application map file and memory layout files in compressed file.

m mariga

[-- Attachment #2: sendfiles.tar.bz2 --]
[-- Type: application/octet-stream, Size: 16736 bytes --]

[-- 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] 4+ messages in thread

* Re: [ECOS] Cannot go to cyg_start of application
  2010-01-08 11:57 [ECOS] Cannot go to cyg_start of application m mariga
@ 2010-01-09  0:49 ` m mariga
  2010-01-09 10:26   ` Sergei Gavrikov
  0 siblings, 1 reply; 4+ messages in thread
From: m mariga @ 2010-01-09  0:49 UTC (permalink / raw)
  To: ecos-discuss

Hello,
Since I am urged to find the cause,I beseech you to answer what it seems 
easier for you to answer.
I would like you to teach me what that error 
"$T0a10:8c010000;0f:8cfecf98;#22" means.
For instance does it mean my program really accessed 8cfecf98 ?
Also I would like to know what other things 
"$T0a10:8c010000;0f:8cfecf98;#22" implies.
I would like to know what "$T0a10" and "#22" means.
Please enlighten me.

-- my previous mail
> I cannot start application via redboot's "go" command.
> I am in a serious trouble so please help me.
>
> I load application at RAM address 0x8c010000.
> After loading RedBoot-bin in ROM using ICE,and loading application in
> RAM,then I set break point at cyg_start.
> As I entered "go" command on serial terminal,then next error occured and 
> did
> not stop at cyg_start().
>
> Target board is implemented 16M bytes RAM in area3.
> It is difficult to think application program overflows.
>
> -- serial terminal log begin
> RedBoot(tm) bootstrap and debug environment [ROM]
> Non-certified release, version v3_0 - built 14:47:45, Jan  8 2010
>
> Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> Free Software Foundation, Inc.
> RedBoot is free software, covered by the eCos license, derived from the
> GNU General Public License. You are welcome to change it and/or distribute
> copies of it under certain conditions. Under the license terms, RedBoot's
> source code and full license terms must have been made available to you.
> Redboot comes with ABSOLUTELY NO WARRANTY.
>
> Platform: lanboard (SH 7705)
> RAM: 0x8c000000-0x8d000000 [0x8c004e90-0x8cfed000 available]
> FLASH: 0xa0000000-0xa01fffff, 32 x 0x10000 blocks
> == Executing boot script in 10.000 seconds - enter ^C to abort
> ^C
> RedBoot> go 0x8c010000
> $T0a10:8c010000;0f:8cfecf98;#22
>
> -- serial terminal log end
>
> I checked map file but appeared to me never accessed as high address as
> 8cfecf98.
> I beseech you to teach me what is wrong.
>
> I send application map file and memory layout files in compressed file.


m mariga 


-- 
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] 4+ messages in thread

* Re: [ECOS] Cannot go to cyg_start of application
  2010-01-09  0:49 ` m mariga
@ 2010-01-09 10:26   ` Sergei Gavrikov
  2010-01-23  0:25     ` [ECOS] Please clear me about ISR,DSR m mariga
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Gavrikov @ 2010-01-09 10:26 UTC (permalink / raw)
  To: m mariga; +Cc: ecos-discuss

On Sat, Jan 09, 2010 at 09:49:25AM +0900, m mariga wrote:
> Hello,
> Since I am urged to find the cause,I beseech you to answer what it
> seems easier for you to answer.  I would like you to teach me what
> that error "$T0a10:8c010000;0f:8cfecf98;#22" means.  For instance
> does it mean my program really accessed 8cfecf98 ?  Also I would
> like to know what other things "$T0a10:8c010000;0f:8cfecf98;#22"
> implies.  I would like to know what "$T0a10" and "#22" means.
> Please enlighten me.

Hello,

It looks like the GDB stop-reply-packet, i.e. program received signal
0Ah. I'm sorry I have not experince with SH arch, so refer to the GDB
sources for the target (include/gdb/signals.h) to know the signal's
name; two CPU register's values are followed by: register 10h (PC?) =
0x8c010000 and register 0Fh (SP?) = 0x8cfecf98 and 22h is checksum as
well.

HTH

Sergei

-- 
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] 4+ messages in thread

* [ECOS] Please clear me about ISR,DSR
  2010-01-09 10:26   ` Sergei Gavrikov
@ 2010-01-23  0:25     ` m mariga
  0 siblings, 0 replies; 4+ messages in thread
From: m mariga @ 2010-01-23  0:25 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I have ported eCos 3.0 into SH7705 target,and developing USB drivers.
But I am encountered a unclear question about interrup ISR/DSR,so would you 
please enlighten me.

SH7705's USB-module has Interrupt Status Register(IFR0) and Interrupt Enable 
Register(IER0).
When both bits are '1', generates Interrupt signal USI0.

First I coded ISR and DSR like (1) below.
In that case when I inserted USB cable into host PC, only ISR was breaked 
repeatedly and never entered DSR.
Next I deliberately added the codes to disable Interrupt signal like (2) 
below into ISR, then went to DSR after ISR.

My question is whether it is necessary I deliberately disable interrupt in 
ISR.
My image is that when ISR returned to VSR, then soon DSR is called so not 
necessary to disable Interrupt in ISR.
The point that is making the matter more fathomable is that when I developed 
ethernet ISR/DSR I did not need to disable interrupt in ISR.
I checked when cyg_drv_interrupt_mask is executed ,SR Register's mask bit4 
to bit7 became '1111'.

Would you please teach me what is right ?

Relating to the matter, I am perplexed to find two ways of returning ISR.
    return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
    return CYG_ISR_CALL_DSR;
Would you enlighten me the difference ?

--- (1) ISR,DSR not included deliberate disable
static cyg_uint32
usbs_sh7705mod_isr(cyg_vector_t vector, cyg_addrword_t data)
{
    CYG_ASSERT(SH7705MOD_IRQ_USB_SERVICE_REQUEST == vector, "USB ISR should 
only be invoked for USB interrupts" );
    CYG_ASSERT(0 == data, "The SH7705MOD USB ISR needs no global data 
pointer" );

    cyg_drv_interrupt_mask(SH7705MOD_IRQ_USB_SERVICE_REQUEST);
    cyg_drv_interrupt_acknowledge(SH7705MOD_IRQ_USB_SERVICE_REQUEST);

    return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
}

static void
usbs_sh7705mod_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t 
data)
{
    CYG_ASSERT(SH7705MOD_IRQ_USB_SERVICE_REQUEST == vector, "USB DSR should 
only be invoked for USB interrupts" );
    CYG_ASSERT(0 == data, "The SH7705MOD USB DSR needs no global data 
pointer");

    BranchOfInt();

    // This unmask is likely to cause another interrupt immediately
    cyg_drv_interrupt_unmask(vector);
}
--- (1) end

--- (2) ISR include deliberate disabling
static cyg_uint32
usbs_sh7705mod_isr(cyg_vector_t vector, cyg_addrword_t data)
{
    CYG_ASSERT(SH7705MOD_IRQ_USB_SERVICE_REQUEST == vector, "USB ISR should 
only be invoked for USB interrupts" );
    CYG_ASSERT(0 == data, "The SH7705MOD USB ISR needs no global data 
pointer" );

 volatile char *ifr0=(char *)0xa4480018;
 volatile char *ier0=(char *)0xa4480034;
 char ifr0val;

 /* disable interrupt */
 ifr0val = *ifr0;
 *ier0 &= ~ifr0val;

    cyg_drv_interrupt_mask(SH7705MOD_IRQ_USB_SERVICE_REQUEST);
    cyg_drv_interrupt_acknowledge(SH7705MOD_IRQ_USB_SERVICE_REQUEST);

    return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
}

I am very much obliged your help.

m mariga




-- 
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] 4+ messages in thread

end of thread, other threads:[~2010-01-23  0:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-08 11:57 [ECOS] Cannot go to cyg_start of application m mariga
2010-01-09  0:49 ` m mariga
2010-01-09 10:26   ` Sergei Gavrikov
2010-01-23  0:25     ` [ECOS] Please clear me about ISR,DSR m mariga

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).