[ECOS] ISR Sim ? / Psim ?

Nick Garnett nickg@ecoscentric.com
Mon Aug 4 09:32:00 GMT 2003


Matthieu.GIRARDIN@fr.thalesgroup.com writes:

> Hello world !
> 
> Just a little question from a beginner : can I simulate a interruption ?
> I mean, if I have a thread which set an ISR, can I have another one which
> set the corresponding interrupt in order to test my interrupt
> procedure ?

This depends on the hardware. If there is a software interrupt
mechanism, and the HAL supports it, then you can use that. You could
try simulating the conditions for an interrupt entry in software, but
in many architectures it is not possible to get all the CPU registers
into the same state that the hardware can.

> Another thing : I saw in the eCos doc a PowerPC simulator (psim) but the doc
> is very short on it. How can I install it and use it ? Does it works well ?

The powerpc simulator is part of the powerpc toolchain. In
powerpc-eabi-gdb use the following command line to set it up for eCos:

target sim -o '/#address-cells 1' -o '/openprom/init/register/pc 0x100' -o '/iobus@0xf0000000/reg 0xf0000000 0x01000000' -o '/iobus/pal@0xf0001000/reg 0xf0001000 32'

To avoid too much typing, put this into a macro in your ~/.gdbinit
file.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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



More information about the Ecos-discuss mailing list