public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot
@ 2001-04-19 17:24 Anthony Massa
  2001-04-19 19:49 ` Jonathan Larmour
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony Massa @ 2001-04-19 17:24 UTC (permalink / raw)
  To: ecos-discuss

I am able to open my mbx.img file and download it to the target.

I have found that Insight hangs in the function hal_if_init() in
\common\hal_if.c.

Could you help me out as to what may be causing this problem?

Thanks.


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [ECOS] Re: RedBoot
@ 2001-04-23 12:35 Anthony Massa
  2001-04-23 12:47 ` Jonathan Larmour
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony Massa @ 2001-04-23 12:35 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: eCos (E-mail)

>> >> I am running RedBoot on an MBX board and downloading my eCos
>> >application
>> >> with networking support.
>> >>
>> >> I noticed your post about the Ethernet device shutdown and
>> >was wondering if
>> >> I could possibly be running
>> >> into the same problem.
>> >
>> >Only if you don't have a DHCP server on your net and you're
>> >trying to use
>> >the ethernet driver for other purposes than the TCP/IP stack.
>> 
>> I have a DHCP server on my net.  However, my confusion comes 
>with the fact
>> that I have RedBoot coming up using BOOTP, which I have a 
>server for as
>> well.  So, RedBoot gets its IP address.  Is this address 
>then passed onto
>> the application, or is the application layer supposed to get 
>its own, new
>> address?
>> 
>> I'm a little confused about how the RedBoot and eCos app 
>layer stack coexist
>> on my target.  I am using the RedBoot Ethernet for debugging the
>> application.
>
>They each get their own addresses. Or one can be static and the other
>dynamic, or whatever you want. Think of them as completely separate.


Is there a message that is output when the DHCP client gets its address?

If so, my hang problem is occurring before the address is received by the
application.  It's odd that it outputs the debug string over the serial port
when the whole time it has been using the Remote/TCP connection for
debugging.

When I don't set breakpoints the same thing happens.

>Also try enabling remote protocol debugging in GDB using "set remotedebug
>1" (or in newer versions, "set debug remote 1"). 

Doesn't this get set when I use Insight, hit Run and a dialog comes up and I
set Remote/TCP with the IP address and port?  Do you mean to explicitly do
this after I open the application using the console?

--Anthony

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [ECOS] RE: RedBoot
@ 2001-04-25 21:59 Anthony Massa
  2001-04-26  4:15 ` Hugo Tyson
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony Massa @ 2001-04-25 21:59 UTC (permalink / raw)
  To: hmtx, jlarmour; +Cc: ecos-discuss

> > > >Go into the TCP/IP configuration and enable
> > > >CYGHWR_NET_DRIVER_ETH0_BOOTP_SHOW, assuming it's eth0. Then rebuild.
> > >
> > > This option is already enabled in my eCos application build.  However,
I
> > > don't see any of
> > > this information printed out.
> >
> > That implies it's not getting an address. Thinking about it maybe
> > you can't
> > have both RedBoot and the app getting an addr from DHCP. Perhaps give
> > RedBoot a static address to see.
> >
> > Anyone else confirm?
>
> After reading a previous post from Hugo, I changed RedBoot to have a
static
> IP and gateway address.  The same thing happens when I do this.

>Uh, you have called "init_all_network_interfaces()" in you app?  The
>network doesn't initialize automatically - precisely to allow for the
>flexibility we've been discussing.  I mean, the dhcp thread will manage
>your leases *after the interfaces are brung up* but it won't initiate the
>bringup.

>I do advise staying with the static IP for RedBoot.

Sorry I couldn't get back to you yesterday.

I have the call to init_all_network_interfaces in my application properly -
as stated in the networking documentation.  I have the call in a thread that
gets created from my cyg_user_start routine.  Is there any additional
consideration I need to take into account for the call?

I have configured RedBoot to use a static IP address.

I am still running into the same problem as I mentioned before where the
network usage gets printed out on the GDB console window, then the hour
glass sits there for a while, and then the debugger shows program stopped at
the bottom.


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [ECOS] Re: RedBoot
@ 2001-04-26 21:44 Anthony Massa
  2001-04-27 11:32 ` Jonathan Larmour
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony Massa @ 2001-04-26 21:44 UTC (permalink / raw)
  To: Hugo Tyson, Jonathan Larmour; +Cc: eCos

I tried to run the tests by first selecting Build->Tests.  Then Tools->Run
Tests, which brought up an error dialog to add the mbx platform, which I
did.  Then I selected the tests to run, connected to my target via TCP
(using my static address in RedBoot).

However, each time I tried I got this message - no matter what test I ran:

*** 21:00:17 Run started
[ 13 Th 21:00:18] Couldn't get process information!
Failed to run "" - The system cannot find the file specified.

*** 21:00:22 Run complete

The same thing happened when I tried to connect via serial port as well.
What am I doing wrong?


Not being able to run the tests, I tried to get more insight as to where my
application was failing.  I find that it is failing in the function
quicc_eth_init in if_quicc.c.  This is called from cyg_net_init, in the for
loop after the thread (cyg_netint) is created and started.  I have had some
troubles with GDB crashing while stepping through various parts of the
quicc_eth_init routine - once it crashed when stepping over HAL_DCACHE_SYNC.
It seems to have problems with the cyg_drv_interrupt_unmask function call.

Any suggestions?

--Anthony

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [ECOS] Re: RedBoot
@ 2001-04-27 15:06 Anthony Massa
  2001-04-27 15:25 ` Jonathan Larmour
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony Massa @ 2001-04-27 15:06 UTC (permalink / raw)
  To: Jonathan Larmour (E-mail); +Cc: eCos (E-mail)

>Perhaps the cygwin tools aren't in the path. Have you installed the .reg
>file mentioned in "Updated configuration tools for Windows" at
> http://sources.redhat.com/ecos/anoncvs.html ?

I'll give that a try. I didn't notice the reg file back when I switched to
ConfigTool 1.3.1.2.

>> Not being able to run the tests, I tried to get more insight as to where
my
>> application was failing.  I find that it is failing in the function
>> quicc_eth_init in if_quicc.c.  This is called from cyg_net_init, in the
for
>> loop after the thread (cyg_netint) is created and started.  I have had
some
>> troubles with GDB crashing while stepping through various parts of the
>> quicc_eth_init routine - once it crashed when stepping over
HAL_DCACHE_SYNC.
>> It seems to have problems with the cyg_drv_interrupt_unmask function
call.



>Looking at it, the problem may be that the interrupts are set up so near
>the start. This means that any interrupts received before the init function
>finishes could lead to problems because the rest of the driver hasn't been
>initialised. And if RedBoot had been using the eth device, interrupts
>_would_ already be enabled.

>Try setting up the interrupt handling much closer to the end, or perhaps
>just try turning off interrupts throughout that function just to see if
>that helps.


I'll move the interrupt creation and unmasking to the end of the
quicc_eth_init function and see what happens. I'm not sure about that
because I have seen it fail at various points through that routine.  If that
doesn't work I'll give globally turning off interrupts a try and see where
that leads - although, won't that have an effect on GDB's communication?

I'm a little confused how the Ethernet switch over occurs since I'm
debugging over the Ethernet port as well.  Basically, RedBoot is receiving
debug packets from GDB over the Ethernet port while I am stepping through
the quicc_eth_init routine to setup control of the same Ethernet port for
the application.

--Anthony

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [ECOS] Re: RedBoot
@ 2001-04-30 10:04 Anthony Massa
  0 siblings, 0 replies; 20+ messages in thread
From: Anthony Massa @ 2001-04-30 10:04 UTC (permalink / raw)
  To: Jonathan Larmour (E-mail); +Cc: eCos (E-mail)

The .reg file helped out.  Now the tests run fine.

However, the ping_test still had the same result as running my application,
where it would try to initialize the Ethernet port and the board would hang.
Then the Config Tool would disconnect from the target.

The other things I tried were:

- Moving the creation of the interrupt in quicc_eth_init to the end of the
routine.  This failed with the same outcome as before.

- I removed a line (shown below) in the quicc_eth_init because of the
comment of shutting down the Ethernet.  I thought this would have been the
problem since I was debugging using the Ethernet port, and obviously,
shutting it down would be very bad.  This failed with the same outcome as
before, too.

    // Shut down ethernet, in case it is already running
    scc->scc_gsmr_l &= ~(QUICC_SCC_GSML_ENR | QUICC_SCC_GSML_ENT);


- I disabled interrupts at the beginning of the quicc_eth_init routine using
HAL_DISABLE_INTERRUPTS and re-enabled them at the end using
HAL_RESTORE_INTERRUPTS.  This failed and hung the board the same way as
before.

- I also tried using a static IP address.  I didn't think this would work
since the failure occurs way before the IP address is used.  This failed as
well.


It seemed as though the failure was occurring when the code tried to access
the volatile struct ethernet_pram *enet_pram variable in quicc_eth_init.  It
was hard to be absolutely certain because there were some failures that
occurred at different points in the routine, but it seemed that the code
that used this variable caused the most immediate failures.  I don't know if
there is some sort of contention problem with accessing the Ethernet
registers while RedBoot/GDB is running or what.

I did try to run while stepping through the quicc_eth_init routine and also
just running without any breakpoints, however, the hung board result was the
same in both running modes.

Do you have any additional insight for this problem?  I really appreciate
your help.

--Anthony

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2001-04-30 10:04 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-19 17:24 [ECOS] RedBoot Anthony Massa
2001-04-19 19:49 ` Jonathan Larmour
2001-04-20  7:22   ` Anthony Massa
2001-04-20  7:36     ` Jonathan Larmour
2001-04-20 17:24   ` Anthony Massa
2001-04-22 14:38   ` Anthony Massa
2001-04-23 12:09     ` Jonathan Larmour
2001-04-24  8:02       ` [ECOS] Anthony Massa
2001-04-24  8:11         ` [ECOS] Re: RedBoot Jonathan Larmour
2001-04-24  8:13           ` [ECOS] RedBoot Anthony Massa
2001-04-24  8:30             ` Hugo 'NOx' Tyson
2001-04-23 12:35 [ECOS] RedBoot Anthony Massa
2001-04-23 12:47 ` Jonathan Larmour
2001-04-25 21:59 [ECOS] RedBoot Anthony Massa
2001-04-26  4:15 ` Hugo Tyson
2001-04-26 21:44 [ECOS] RedBoot Anthony Massa
2001-04-27 11:32 ` Jonathan Larmour
2001-04-27 15:06 Anthony Massa
2001-04-27 15:25 ` Jonathan Larmour
2001-04-30 10:04 Anthony Massa

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