This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linux Synthetic Target -- How to exit eCos back to linux-shell


>>>>> "David" == David Marqvar (DAM) <DAM@tt.dk> writes:

    David> We are using eCos under Linux to simulate and test our
    David> software. We would like to do some automated tests, and
    David> therefore need to be able to exit (shutdown) ecos and
    David> return to the linux-shell.

    David> Does anyone know how to do this?

    David> We have tried variations of exit() etc., but it seems that
    David> eCos just keeps running the idle-thread (as it should from
    David> another point of view). We are using the Kernel and
    David> scheduler.

The official way to do this is to call cyg_test_exit(), defined in
<cyg/infra/testcase.h>, either directly or via one of the macros such
as CYG_TEST_EXIT().

On most platforms cyg_test_exit() will do nothing because it does not
make sense for a deeply embedded application to exit (although
perhaps, in a typical development environment it should return control
to RedBoot). On the synthetic target cyg_test_exit() ends up making a
system call cyg_hal_sys_exit() which will terminate the current
process, i.e. the eCos application.

Bart

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]