public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* Loading image-file in SID.
@ 2010-07-19 11:04 Deaf Beed
  2010-07-19 11:09 ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Deaf Beed @ 2010-07-19 11:04 UTC (permalink / raw)
  To: sid

Hi,

I have been playing around with SID for a while and have created a
component of mine. I am using the arm7pid pre-configured settings
along with my new component. I have used eCos as the OS and have
written a small program which runs as expected (programs my component)
when loaded through GDB. Now, I have this requirement.

I would like to run the image without having to load it through GDB. I
used the redboot image & its conf file as an example, but have not
been successful in loading and running my image. The details are:

1. The eCos built elf (little) has been converted to a binary
(arm-eabi-objdump). The elf has an entry point address of 0x8040.

2. Have loaded it in place of the reboot image:
   >> set mem2 image-file "my-eCos.img"
   >> connect-pin init-sequence output-1 -> mem2 image-load

3. No other changes at all to the arm-pid-redboot-tksm.conf file.

I realize that the PC also needs to be set and tried to do that using
"set cpu pc (int of)0x8040" but without any success. Could you please
suggest the required changes, etc. required to load and run and
arbitrary image using SID alone?


Any help/direction would be appreciated,
regards,
Shamik

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

* Re: Loading image-file in SID.
  2010-07-19 11:04 Loading image-file in SID Deaf Beed
@ 2010-07-19 11:09 ` Frank Ch. Eigler
  2010-08-18 17:43   ` Deaf Beed
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Ch. Eigler @ 2010-07-19 11:09 UTC (permalink / raw)
  To: Slightly Deaf Beed; +Cc: sid

Hi -

On Mon, Jul 19, 2010 at 04:34:44PM +0530, Deaf Beed wrote:
> I have been playing around with SID for a while and have created a
> component of mine.  [...]

Great.  Please feel free to contribute any pieces you are able.

> [...]  I realize that the PC also needs to be set and tried to do
> that using "set cpu pc (int of)0x8040" but without any
> success. Could you please suggest the required changes,
> etc. required to load and run and arbitrary image using SID alone?

Certainly.  See the sw-load-elf component, for example as configured
by the bsp/configrun-sid perl script.  It connects to a memory mapper
bus (to write into memory), and a CPU (the start-pc-set! pins)

- FChE

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

* Re: Loading image-file in SID.
  2010-07-19 11:09 ` Frank Ch. Eigler
@ 2010-08-18 17:43   ` Deaf Beed
  2010-08-18 20:34     ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Deaf Beed @ 2010-08-18 17:43 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: sid

Hi

Thanks. That worked out well for me. Really appreciated the response.

I now generate a  sid configuration and edit it to add my component.
>$ arm-elf-sid --board=pid7t-normalmap --load cpu=program.x --no-run

The 'program.x' is a bunch of prints, linked with the eCos OS built
for pid7t. The program executes and I can trace the prints at the
UART.

However, once the prints have executed, the control passes to, I
think, the OS idle loop and the simulation does not exit on its own. I
have to stop it. Is there a way to make the simulation exit/finish on
its own? maybe by programming some sid simulation component.


-Shamik

On Mon, Jul 19, 2010 at 4:39 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Hi -
>
> On Mon, Jul 19, 2010 at 04:34:44PM +0530, Deaf Beed wrote:
>> I have been playing around with SID for a while and have created a
>> component of mine.  [...]
>
> Great.  Please feel free to contribute any pieces you are able.
>
>> [...]  I realize that the PC also needs to be set and tried to do
>> that using "set cpu pc (int of)0x8040" but without any
>> success. Could you please suggest the required changes,
>> etc. required to load and run and arbitrary image using SID alone?
>
> Certainly.  See the sw-load-elf component, for example as configured
> by the bsp/configrun-sid perl script.  It connects to a memory mapper
> bus (to write into memory), and a CPU (the start-pc-set! pins)
>
> - FChE
>

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

* Re: Loading image-file in SID.
  2010-08-18 17:43   ` Deaf Beed
@ 2010-08-18 20:34     ` Frank Ch. Eigler
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Ch. Eigler @ 2010-08-18 20:34 UTC (permalink / raw)
  To: Deaf Beed; +Cc: sid

Hi -

On Wed, Aug 18, 2010 at 11:13:29PM +0530, Deaf Beed wrote:
> [...]
> However, once the prints have executed, the control passes to, I
> think, the OS idle loop and the simulation does not exit on its own. I
> have to stop it. Is there a way to make the simulation exit/finish on
> its own? maybe by programming some sid simulation component.

The software needs to decide how it wishes to signal its own
termination, then some piece of sid configuration needs to map that to
a signal to the cfgroot stop! pin.  

If the sw-gloss* is not used, nor is gdb, then you could jury-rig what
is in effect a breakpoint using triggerpoints (connect the
watch:pc:value:0xsomething pseudo-pin on the cpu to the cfgroot
stop!).

Or you could wire up a virtual device such as hw-glue-probe-bus into
the bus mapper tree at some particular address, then poke at that
address from the arm software code.

- FChE

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

end of thread, other threads:[~2010-08-18 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 11:04 Loading image-file in SID Deaf Beed
2010-07-19 11:09 ` Frank Ch. Eigler
2010-08-18 17:43   ` Deaf Beed
2010-08-18 20:34     ` Frank Ch. Eigler

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