public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] basic question
@ 2009-07-30 11:46 Mandeep Sandhu
  2009-07-30 14:15 ` Edgar Grimberg
  0 siblings, 1 reply; 3+ messages in thread
From: Mandeep Sandhu @ 2009-07-30 11:46 UTC (permalink / raw)
  To: ecos-discuss

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?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] basic question
  2009-07-30 11:46 [ECOS] basic question Mandeep Sandhu
@ 2009-07-30 14:15 ` Edgar Grimberg
  2009-07-31  4:24   ` Mandeep Sandhu
  0 siblings, 1 reply; 3+ messages in thread
From: Edgar Grimberg @ 2009-07-30 14:15 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] basic question
  2009-07-30 14:15 ` Edgar Grimberg
@ 2009-07-31  4:24   ` Mandeep Sandhu
  0 siblings, 0 replies; 3+ messages in thread
From: Mandeep Sandhu @ 2009-07-31  4:24 UTC (permalink / raw)
  To: Edgar Grimberg; +Cc: ecos-discuss

On Thu, Jul 30, 2009 at 7:45 PM, Edgar Grimberg<edgar.grimberg@zylin.com> wrote:
> 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.

Thanks for this detailed explanation Edgar. I too don't want to reinvent the
wheel unless it's absolutely necessary.

My app will mostly do network centric stuff, so that took me to the lwip mailing
list! :) Thats where I saw a lot people using lwip "w/o OS"....and hence my
question.

Regards,
-mandeep

>
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-31  4:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-30 11:46 [ECOS] basic question Mandeep Sandhu
2009-07-30 14:15 ` Edgar Grimberg
2009-07-31  4:24   ` Mandeep Sandhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).