This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: basic question
- From: Edgar Grimberg <edgar dot grimberg at zylin dot com>
- To: Mandeep Sandhu <mandeepsandhu dot chd at gmail dot com>
- Cc: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 30 Jul 2009 16:15:40 +0200
- Subject: Re: [ECOS] basic question
- References: <b18c5f790907300446n2fa2b4a6ob8839b3c4b8bb22c@mail.gmail.com>
On Thu, Jul 30, 2009 at 1:46 PM, Mandeep
Sandhu<mandeepsandhu.chd@gmail.com> wrote:
> Hi All,
>
> A very basic question:
>
> What do people mean when they say running xyz app _without_ an operating
> system?
>
> Does it mean that basic ecos kernel support is not there, i.e no
> scheduler, HAL etc etc?
>
> What is an apps entry point then? Will it still call cyg_usre_start()
> and the likes?
The CPUs have defined a reset address (called reset vector and placed
inside the exceptions vector), that is the entry point for the program
counter when the power is ON, or when the CPU comes out of a hardware
reset. The very first line of code is the embedded application "real"
entry point. You will find eCos jumping from that place to _start. For
example, for PowerPC:
in packages/hal/powerpc/arch/current/src/vectors.S
you can find thie code:
# Reset vector macro
.macro reset_vector name
.p2align 8
.globl __exception_\name
__exception_\name:
#ifdef CYGSEM_HAL_POWERPC_RESET_USES_JUMP
bl _start
#else
lwi r3,_start
mtlr r3
blr
#endif
>From that point on, eCos (or any other OS) will initialize the memory,
peripherals and so on. By running without an OS, people often mean
that you should write your own start-up routines and take care of
(implement) the needed functions you will usually find in the OS. Of
course, that means no cyg_user_start or anything like it.
Unless you are really running out of memory (flash/ram to hold the
application or ram to use it in the application) or out of CPU cycles
(you want to optimize the "common" OS to death for you fancy
application), I would not recommend investing the time to rewrite all
that stuff.
Regards,
Edgar
> Thanks,
> -mandeep
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss