This is the mail archive of the ecos-discuss@sourceware.org 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: Infinite loop when excuting "Hello, eCos World!"


>>>>> " " == Kidong Lee <briankdlee@gmail.com> writes:

     > On 1/20/06, Andrew Lunn <andrew@lunn.ch> wrote:
    >> On Fri, Jan 20, 2006 at 06:08:27PM +0900, Kidong Lee wrote:
    >> > Hello,
    >> >
    >> > I compiled "Hello, eCos World!" Sample Appplication and try
    >> > to execute = on Linux, It print "Hello, eCos World!" and fall
    >> > in infinite loop.
    >> 
    >> What would you expect it to do when it has nothing to do?

     > I expect it would exit the process and return to the shell
     > prompt. Is falling in infinite loop normal?

The synthetic target tries to emulate an embedded system. A typical
embedded system runs forever, barring power failures, crashes leading
to watchdog timeouts, or similar unusual events. Hence by default the
synthetic target will do the same.

If you want your application to exit back to the shell prompt then
call cyg_hal_sys_exit(0). That call only exists on the synthetic
target. If you then want to move your application on to a real
embedded system you will have to do something different.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts
 Besuchen Sie uns vom 14.-16.02.06 auf der Embedded World 2006, Stand 11-222
 Visit us at Embedded World 2006, Nurnberg, Germany, 14-16 Feb, Stand 11-222


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


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