public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] HAL_PLATFORM_RESET
@ 2002-10-24 13:12 Tim Drury
  2002-10-24 13:18 ` Gary Thomas
  2002-10-25  1:21 ` [ECOS] HAL_PLATFORM_RESET Daniel Néri
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Drury @ 2002-10-24 13:12 UTC (permalink / raw)
  To: ecos-discuss


I'm still trying to get my board to return to a reset
(or redboot) state after running a test instead of
looping forever inside cyg_test_exit().  The macro
to reset the board, HAL_PLATFORM_RESET, is not
defined for my ARM eb40a.  What would be the
best way to define it?  Jump to the reset vector?
Call cyg_start()?

-tim


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

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

* Re: [ECOS] HAL_PLATFORM_RESET
  2002-10-24 13:12 [ECOS] HAL_PLATFORM_RESET Tim Drury
@ 2002-10-24 13:18 ` Gary Thomas
  2002-10-24 21:54   ` Jonathan Larmour
  2002-10-25  1:21 ` [ECOS] HAL_PLATFORM_RESET Daniel Néri
  1 sibling, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2002-10-24 13:18 UTC (permalink / raw)
  To: Tim Drury; +Cc: eCos Discussion

On Thu, 2002-10-24 at 14:12, Tim Drury wrote:
> 
> I'm still trying to get my board to return to a reset
> (or redboot) state after running a test instead of
> looping forever inside cyg_test_exit().  The macro
> to reset the board, HAL_PLATFORM_RESET, is not
> defined for my ARM eb40a.  What would be the
> best way to define it?  Jump to the reset vector?
> Call cyg_start()?

Jumping to the reset vector would be the first thing to try.
Calling 'cyg_start()' won't do anything for you.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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

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

* Re: [ECOS] HAL_PLATFORM_RESET
  2002-10-24 13:18 ` Gary Thomas
@ 2002-10-24 21:54   ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2002-10-24 21:54 UTC (permalink / raw)
  To: Tim Drury; +Cc: Gary Thomas, eCos Discussion

Gary Thomas wrote:
> On Thu, 2002-10-24 at 14:12, Tim Drury wrote:
> 
>>I'm still trying to get my board to return to a reset
>>(or redboot) state after running a test instead of
>>looping forever inside cyg_test_exit().  The macro
>>to reset the board, HAL_PLATFORM_RESET, is not
>>defined for my ARM eb40a.  What would be the
>>best way to define it?  Jump to the reset vector?
>>Call cyg_start()?
> 
> 
> Jumping to the reset vector would be the first thing to try.

Or it may be a little better to call CYGACC_CALL_IF_RESET(); from
<cyg/hal/hal_if.h> which should always use the right reset mechanism
if it exists, or entry point in the worst case.

Another way to automatically reboot is to do something like set a 
breakpoint on cyg_test_exit, and when it is hit go:

maintenance packet r
detach    (or quit)

That also uses the stuff from hal_if.h.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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

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

* [ECOS] Re: HAL_PLATFORM_RESET
  2002-10-24 13:12 [ECOS] HAL_PLATFORM_RESET Tim Drury
  2002-10-24 13:18 ` Gary Thomas
@ 2002-10-25  1:21 ` Daniel Néri
  2002-10-25  7:56   ` Tim Drury
  2002-10-25  8:12   ` Tim Drury
  1 sibling, 2 replies; 6+ messages in thread
From: Daniel Néri @ 2002-10-25  1:21 UTC (permalink / raw)
  To: ecos-discuss

Tim Drury <tdrury@siliconmotorsports.com> writes:

> I'm still trying to get my board to return to a reset (or redboot)
> state after running a test instead of looping forever inside
> cyg_test_exit().  The macro to reset the board, HAL_PLATFORM_RESET,
> is not defined for my ARM eb40a.  What would be the best way to
> define it?

Here's what I've been using (on a custom AT91R40807 board):

#define HAL_PLATFORM_RESET() \
    CYG_MACRO_START          \
    HAL_WRITE_UINT32(AT91_WD+AT91_WD_CMR, 0x3700); \
    HAL_WRITE_UINT32(AT91_WD+AT91_WD_OMR, 0x2343); \
    CYG_MACRO_END



Regards,
   --Daniel



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

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

* Re: [ECOS] Re: HAL_PLATFORM_RESET
  2002-10-25  1:21 ` [ECOS] HAL_PLATFORM_RESET Daniel Néri
@ 2002-10-25  7:56   ` Tim Drury
  2002-10-25  8:12   ` Tim Drury
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Drury @ 2002-10-25  7:56 UTC (permalink / raw)
  To: ecos-discuss

(resending this email - the first didn't seem to post to the list)


Just to wrap up this thread, here's what I did:

#define HAL_PLATFORM_RESET() 	goto *HAL_PLATFORM_RESET_ENTRY;
#define HAL_PLATFORM_RESET_ENTRY 0x02000000

The HAL_PLATFORM_RESET_ENTRY was already there, I did not have
to add it.  However, it was defined as 0x01000000 which may be
correct for redboot_rom but not ram or romram.

This brings me back to one of the first posts I made to this
list when porting the eb40a.  There doesn't seem to be a unified,
single way of using very important addresses like start of
flash, ram, and memory sizes which are defined in the pkgconf/
mlt_xxx.ldi files.  Until I get more familiar with ecos and
the build process, I can't figure out how to do this, but what
I'd _really_ like to see is a way to declare the platform
memory map and be able to reference it from .ldi, .h, .c, .cpp,
and .S and insure those addresses are declared once and only once.

Thanks all for your help.  If anyone is interested I'm almost
finished creating a automated test script that will run through
all the test cases and log the results to a file, then print
a summary.  IIRC, the windows version of the config tool can
do this, but I wanted a text-based version running on linux.  I'm
using java's build tool, ant, (http://jakarta.apache.org/ant) to
build ecos, redboot, the ecos tests, then run the tests on the
target. Having written java for the past 2 or 3 years, I've gotten
spoiled with its tools.  Ant blows makefiles away.

-tim



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

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

* Re: [ECOS] Re: HAL_PLATFORM_RESET
  2002-10-25  1:21 ` [ECOS] HAL_PLATFORM_RESET Daniel Néri
  2002-10-25  7:56   ` Tim Drury
@ 2002-10-25  8:12   ` Tim Drury
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Drury @ 2002-10-25  8:12 UTC (permalink / raw)
  To: ecos-discuss


Just to wrap up this thread, here's what I did:

#define HAL_PLATFORM_RESET() 	goto *HAL_PLATFORM_RESET_ENTRY;
#define HAL_PLATFORM_RESET_ENTRY 0x02000000

The HAL_PLATFORM_RESET_ENTRY was already there, I did not have
to add it.  However, it was defined as 0x01000000 which may be
correct for redboot_rom but not ram or romram.

This brings me back to one of the first posts I made to this
list when porting the eb40a.  There doesn't seem to be a unified,
single way of using very important addresses like start of
flash, ram, and memory sizes which are defined in the pkgconf/
mlt_xxx.ldi files.  Until I get more familiar with ecos and
the build process, I can't figure out how to do this, but what
I'd _really_ like to see is a way to declare the platform
memory map and be able to reference it from .ldi, .h, .c, .cpp,
and .S and insure those addresses are declared once and only once.

Thanks all for your help.  If anyone is interested I'm almost
finished creating a automated test script that will run through
all the test cases and log the results to a file, then print
a summary.  IIRC, the windows version of the config tool can
do this, but I wanted a text-based version running on linux.  I'm
using java's build tool, ant, (http://jakarta.apache.org/ant) to
build ecos, redboot, the ecos tests, then run the tests on the
target. Having written java for the past 2 or 3 years, I've gotten
spoiled with its tools.  Ant blows makefiles away.

-tim


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

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

end of thread, other threads:[~2002-10-25 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 13:12 [ECOS] HAL_PLATFORM_RESET Tim Drury
2002-10-24 13:18 ` Gary Thomas
2002-10-24 21:54   ` Jonathan Larmour
2002-10-25  1:21 ` [ECOS] HAL_PLATFORM_RESET Daniel Néri
2002-10-25  7:56   ` Tim Drury
2002-10-25  8:12   ` Tim Drury

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