This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Entry point
- From: Andrew Lunn <andrew at lunn dot ch>
- To: LONY David <david dot lony at pragmadev dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 25 Apr 2007 16:17:56 +0200
- Subject: Re: [ECOS] Entry point
- References: <462F562A.9050905@pragmadev.com>
On Wed, Apr 25, 2007 at 03:22:50PM +0200, LONY David wrote:
> Hi all,
>
> I'm new to eCos and I wanted to know if it possible to define an entry
> point when eCos start?
> For instance, I have this kind of code :
>
> #include <stdio.h>
>
> main()
> {
>
> printf("Hello\n");
> return;
> }
>
> In Linux Synthetic Target template it would work great... but if I
> change my code to this :
>
> #include <stdio.h>
>
> void test()
> {
> printf("Hello\n");
> return;
> }
>
> How I can specified to eCos kernel to execute this function? I see in
> gdb (when I debug eCos) that the function cyg_user_start is called so I
> change my code to this:
>
> #include <stdio.h>
>
> void cyg_user_start(void)
> {
> printf("Hello\n");
> }
>
> And It work too... But I don't know if it's the good method to do this...
> Could someone help me please?
http://ecos.sourceware.org/docs-latest/ref/kernel-overview.html
Section Calling Contexts
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss