This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_thread_delay() caused an exit on at91 platform
"Deli Geng (David)" wrote:
>
> Hi, there,
>
> The cyg_thread_delay() function invoked from a thread caused an exit on my
> at91 board.
>
> The arm-elf-gdb showed as attached. It stoped at line 77.
>
> Could anyone let me know why this happened? Is it a system bug or a fault of
> my own programme. BTW, cyg_thread_delay() worked well in standard main()
> style, but didn't work when I used cyg_user_start() with the same checkout
> of eCos.
What's happening is that you've set a breakpoint on exit, even though you
aren't using main. If you don't supply a main(), a default one is created
that just exits immediately - this allows eCos tests to continue working.
Normally this doesn't matter, since the only time you'll notice is if you
set a breakpoint on exit :-). You can remove the calling of main entirely
by removing the libc_startup package from your configuration. This will
also remove exit()!
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine