public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] doesn't compile like it should
@ 2009-04-26 19:47 Jeffrey Krasky
  2009-04-27 15:18 ` Sergei Gavrikov
  0 siblings, 1 reply; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-26 19:47 UTC (permalink / raw)
  To: ecos-discuss

First attempt at compiling hello.c program:

i386-elf-gcc: Command not found

Obviously something isn't set right. Can someone tell me what?

Thanks,



Jeff



-- 
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] 13+ messages in thread

* Re: [ECOS] doesn't compile like it should
  2009-04-26 19:47 [ECOS] doesn't compile like it should Jeffrey Krasky
@ 2009-04-27 15:18 ` Sergei Gavrikov
  2009-04-27 16:20   ` [ECOS] where's the printf output? Jeffrey Krasky
                     ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sergei Gavrikov @ 2009-04-27 15:18 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: ecos-discuss

Jeffrey Krasky wrote:
> First attempt at compiling hello.c program:
>
> i386-elf-gcc: Command not found
>
> Obviously something isn't set right. Can someone tell me what?

I hope that you have installed the eCos i386-elf GNU toolchain, if you
have, be sure that environment variable PATH is set properly. There is
ecosenv.sh script in the eCos installation (usually it is placed under
/opt/ecos directory) which should be sourced. Enter a few commands at
a bash prompt:

Find the script

  find / -name ecosenv.sh

if it finds it, source it
  
  . <path_to_script>/ecosenv.sh ;# dot is an alias of 'source' command

then try

  $ i386-elf-gcc -v

If you will see that i386-elf-gcc is installed, then put that source
command in your own shell profile file (.bash_profile or .profile) to
set the eCos environment on a login.

I hope that helps.

Sergei

-- 
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] 13+ messages in thread

* [ECOS] where's the printf output?
  2009-04-27 15:18 ` Sergei Gavrikov
@ 2009-04-27 16:20   ` Jeffrey Krasky
  2009-04-27 17:32     ` [ECOS] " Sergei Gavrikov
  2009-04-27 18:37   ` Jeffrey Krasky
  2009-04-27 19:45   ` Jeffrey Krasky
  2 siblings, 1 reply; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-27 16:20 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

Thanks Sergei, that was exactly what I needed to do regarding why I 
couldn't compile.

Now that I have a 'hello' executable, among others, how come when I do:

> i386-elf-gdb -nw hello

I don't see the "Hello, eCos world!" message printed?

I take it some other setting is wrong?

Thanks,


Jeff

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 16:20   ` [ECOS] where's the printf output? Jeffrey Krasky
@ 2009-04-27 17:32     ` Sergei Gavrikov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergei Gavrikov @ 2009-04-27 17:32 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: ecos-discuss

On Mon, Apr 27, 2009 at 10:18:06AM -0500, Jeffrey Krasky wrote:
> Thanks Sergei, that was exactly what I needed to do regarding why I  
> couldn't compile.
>
> Now that I have a 'hello' executable, among others, how come when I do:
>
>> i386-elf-gdb -nw hello
>
> I don't see the "Hello, eCos world!" message printed?
>
> I take it some other setting is wrong?
>

try

$ gdb -q -nx hello
(gdb) set args -io -nw
(gdb) b main
(gdb) run
(gdb) n

...

Sergei

> Thanks,
>
>
> Jeff

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 15:18 ` Sergei Gavrikov
  2009-04-27 16:20   ` [ECOS] where's the printf output? Jeffrey Krasky
@ 2009-04-27 18:37   ` Jeffrey Krasky
  2009-04-27 19:45   ` Jeffrey Krasky
  2 siblings, 0 replies; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-27 18:37 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

When I do

> i386-elf-gdb -q -nx hello

I don't notice anything different. All I get is my command prompt back. I 
don't even think my code is running, since I put a while(1); in it to see 
if it would return or not. So basically, executing this command is like 
hitting the return key in that all I do is get my prompt back.

> gdb -q -nx hello

Doesn't work because gdb command isn't found.


Thanks,



Jeff

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 15:18 ` Sergei Gavrikov
  2009-04-27 16:20   ` [ECOS] where's the printf output? Jeffrey Krasky
  2009-04-27 18:37   ` Jeffrey Krasky
@ 2009-04-27 19:45   ` Jeffrey Krasky
  2009-04-27 20:05     ` Sergei Gavrikov
  2 siblings, 1 reply; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-27 19:45 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

Could this have anything to do with "building eCos for debug"? I don't 
know how to check if I did this or not. Or something else with running 
ecosconfig? Is there a way I can check if I even ran ecosconfig?

Thanks,




Jeff

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 19:45   ` Jeffrey Krasky
@ 2009-04-27 20:05     ` Sergei Gavrikov
  2009-04-27 20:26       ` Jeffrey Krasky
  0 siblings, 1 reply; 13+ messages in thread
From: Sergei Gavrikov @ 2009-04-27 20:05 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: ecos-discuss

On Mon, Apr 27, 2009 at 01:24:01PM -0500, Jeffrey Krasky wrote:
> Could this have anything to do with "building eCos for debug"? I don't  
> know how to check if I did this or not. Or something else with running  
> ecosconfig? Is there a way I can check if I even ran ecosconfig?
>

It's seems I missed something. Is your host Cygwin? That snippet was for
Linux synthetic target. If it is Cygwin I am not sure that you can
gdebug the eCos applicatins are built for Linux synthetic target. What
is your host? What is your target? How had you  built that `hello'
program? If your target is not a PC-like board... Read a bit here
http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html

Sergei

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 20:05     ` Sergei Gavrikov
@ 2009-04-27 20:26       ` Jeffrey Krasky
  2009-04-27 20:26         ` Gary Thomas
  2009-04-27 20:42         ` Sergei Gavrikov
  0 siblings, 2 replies; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-27 20:26 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

I have a Windows XP machine with an Intel processor and I am running 
cygwin.

All I really want to do is make a hello world program and then try the 
timer/alarm program.

I have been reading from here:

http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-applications.html

If there is some place else I should be getting my examples from, please 
let me know.

Again, all I really wish to do is make some C programs and test the 
real-timeness of eCos.



Jeff



On Mon, 27 Apr 2009, Sergei Gavrikov wrote:
> It's seems I missed something. Is your host Cygwin? That snippet was for
> Linux synthetic target. If it is Cygwin I am not sure that you can
> gdebug the eCos applicatins are built for Linux synthetic target. What
> is your host? What is your target? How had you  built that `hello'
> program? If your target is not a PC-like board... Read a bit here
> http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html

-- 
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] 13+ messages in thread

* Re: [ECOS] Re: where's the printf output?
  2009-04-27 20:26       ` Jeffrey Krasky
@ 2009-04-27 20:26         ` Gary Thomas
  2009-04-27 20:42         ` Sergei Gavrikov
  1 sibling, 0 replies; 13+ messages in thread
From: Gary Thomas @ 2009-04-27 20:26 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: Sergei Gavrikov, ecos-discuss

Jeffrey Krasky wrote:
> I have a Windows XP machine with an Intel processor and I am running
> cygwin.
> 
> All I really want to do is make a hello world program and then try the
> timer/alarm program.
> 
> I have been reading from here:
> 
> http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-applications.html
> 
> 
> If there is some place else I should be getting my examples from, please
> let me know.
> 
> Again, all I really wish to do is make some C programs and test the
> real-timeness of eCos.

You can't run an acutal eCos application directly on Windows (it *is*
possible on Linux, running the synthetic target).  If this is all you
have, you'll need to run eCos on a virtual machine, e.g. VirtualBox or
Qemu.

eCos runs on the bare hardware, with the exception of the synthetic
target which runs as a cooperative process under Linux.

> On Mon, 27 Apr 2009, Sergei Gavrikov wrote:
>> It's seems I missed something. Is your host Cygwin? That snippet was for
>> Linux synthetic target. If it is Cygwin I am not sure that you can
>> gdebug the eCos applicatins are built for Linux synthetic target. What
>> is your host? What is your target? How had you  built that `hello'
>> program? If your target is not a PC-like board... Read a bit here
>> http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html
> 


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 20:26       ` Jeffrey Krasky
  2009-04-27 20:26         ` Gary Thomas
@ 2009-04-27 20:42         ` Sergei Gavrikov
  2009-04-27 21:00           ` Jeffrey Krasky
  1 sibling, 1 reply; 13+ messages in thread
From: Sergei Gavrikov @ 2009-04-27 20:42 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: ecos-discuss

Please, do not top post http://en.wikipedia.org/wiki/Top_posting
Bottom-posting or inline replying are welcome.

Jeffrey Krasky writes:
> I have a Windows XP machine with an Intel processor and I am running  
> cygwin.
>
> All I really want to do is make a hello world program and then try the  
> timer/alarm program.
>
> I have been reading from here:
>
> http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-applications.html

There is talk about that you need either a real target (in an example
that's some abstract ARM evolution board) or the synthetic linux target
which can "emulate" the real one on the _linux_ hosts only.

> If there is some place else I should be getting my examples from, please  
> let me know.
>
> Again, all I really wish to do is make some C programs and test the  
> real-timeness of eCos.

Hence two ways are exists. Either to have a real target (=board) which
is supported by eCos or install Linux. If you are advanced user and
familiar with Linux and GNU you can install some kind of Virtual Machine
and eCos for Linux on the guest OS (Linux) to play with it having no
real hardware. But, this is an off-topic for the discuss-list, however,
you can find the answers in the list's history.

Sergei

> On Mon, 27 Apr 2009, Sergei Gavrikov wrote:
>> It's seems I missed something. Is your host Cygwin? That snippet was for
>> Linux synthetic target. If it is Cygwin I am not sure that you can
>> gdebug the eCos applicatins are built for Linux synthetic target. What
>> is your host? What is your target? How had you  built that `hello'
>> program? If your target is not a PC-like board... Read a bit here
>> http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 20:42         ` Sergei Gavrikov
@ 2009-04-27 21:00           ` Jeffrey Krasky
  2009-04-27 21:09             ` Sergei Gavrikov
  2009-04-28  8:33             ` Grant Edwards
  0 siblings, 2 replies; 13+ messages in thread
From: Jeffrey Krasky @ 2009-04-27 21:00 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

> There is talk about that you need either a real target (in an example
> that's some abstract ARM evolution board) or the synthetic linux target
> which can "emulate" the real one on the _linux_ hosts only.

I need to get the words clear. By "real target" you mean something like a 
board with some company's microprocessor on it, such as Atmel? (I mention 
Atmel since a previous post today talks about AT91SAM7X256.) And by 
"synthentic target" you mean that I would have a Linux machine set up to 
emulate a board, and then I could eventually take the code from the Linux 
to the board itself?

Is my understanding correct?

If so, maybe eCos is not for me? I want to run an app on a Windows XP 
machine and I want to get some sort of RT behavior. Maybe I've had a 
misunderstanding of what eCos is for.

Please comment if possible.


Thanks,



Jeff

-- 
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] 13+ messages in thread

* [ECOS] Re: where's the printf output?
  2009-04-27 21:00           ` Jeffrey Krasky
@ 2009-04-27 21:09             ` Sergei Gavrikov
  2009-04-28  8:33             ` Grant Edwards
  1 sibling, 0 replies; 13+ messages in thread
From: Sergei Gavrikov @ 2009-04-27 21:09 UTC (permalink / raw)
  To: Jeffrey Krasky; +Cc: ecos-discuss

On Mon, Apr 27, 2009 at 03:42:08PM -0500, Jeffrey Krasky wrote:
>> There is talk about that you need either a real target (in an example
>> that's some abstract ARM evolution board) or the synthetic linux target
>> which can "emulate" the real one on the _linux_ hosts only.
>
> I need to get the words clear. By "real target" you mean something like a 
> board with some company's microprocessor on it, such as Atmel? (I mention 
> Atmel since a previous post today talks about AT91SAM7X256.) And by  

Yep.

> "synthentic target" you mean that I would have a Linux machine set up to  
> emulate a board, and then I could eventually take the code from the Linux 
> to the board itself?

Look on a Linux synthetic target as on a quasi board which has a couple
RAM, watchdog, wallclock, flash parts, etc. You will be able to run eCos
programs are written for synthetic Linux target on Linux host just as
is. eCos kernel itself is a platform independed core. 

> Is my understanding correct?
>
> If so, maybe eCos is not for me? I want to run an app on a Windows XP  
> machine and I want to get some sort of RT behavior. Maybe I've had a  
> misunderstanding of what eCos is for.
>
> Please comment if possible.

The "e" letter in eCos word stands from Embedded. Read a bit about what
eCos is for here http://en.wikipedia.org/wiki/ECos.

Sergei

-- 
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] 13+ messages in thread

* [ECOS]  Re: where's the printf output?
  2009-04-27 21:00           ` Jeffrey Krasky
  2009-04-27 21:09             ` Sergei Gavrikov
@ 2009-04-28  8:33             ` Grant Edwards
  1 sibling, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2009-04-28  8:33 UTC (permalink / raw)
  To: ecos-discuss

On 2009-04-27, Jeffrey Krasky <jkrasky@cs.umn.edu> wrote:

>> There is talk about that you need either a real target (in an
>> example that's some abstract ARM evolution board) or the
>> synthetic linux target which can "emulate" the real one on the
>> _linux_ hosts only.

Or you can run on a sw emulator like Qemu.

> I need to get the words clear. By "real target" you mean
> something like a board with some company's microprocessor on
> it, such as Atmel? (I mention Atmel since a previous post
> today talks about AT91SAM7X256.) And by "synthentic target"
> you mean that I would have a Linux machine set up to emulate a
> board, and then I could eventually take the code from the
> Linux to the board itself?
>
> Is my understanding correct?

Sort of. Except you don't really need Linux -- though
everything, including building eCos apps, is a _lot_ easier on
Linux than it is on Windows.

You can run eCos directly on the "bare metal" of a virtual
machine like Qemu or VirtualBox.  You don't need Linux to do
that.  You can run those VMs on Windows. However, you're not
going to get anything very "real time" out of that set-up
either.

> If so, maybe eCos is not for me? I want to run an app on a
> Windows XP machine and I want to get some sort of RT behavior.

That's not what eCos does.

> Maybe I've had a misunderstanding of what eCos is for.

I think you have.

-- 
Grant Edwards                   grante             Yow! I'm DESPONDENT ... I
                                  at               hope there's something
                               visi.com            DEEP-FRIED under this
                                                   miniature DOMED STADIUM ...


-- 
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] 13+ messages in thread

end of thread, other threads:[~2009-04-27 21:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-26 19:47 [ECOS] doesn't compile like it should Jeffrey Krasky
2009-04-27 15:18 ` Sergei Gavrikov
2009-04-27 16:20   ` [ECOS] where's the printf output? Jeffrey Krasky
2009-04-27 17:32     ` [ECOS] " Sergei Gavrikov
2009-04-27 18:37   ` Jeffrey Krasky
2009-04-27 19:45   ` Jeffrey Krasky
2009-04-27 20:05     ` Sergei Gavrikov
2009-04-27 20:26       ` Jeffrey Krasky
2009-04-27 20:26         ` Gary Thomas
2009-04-27 20:42         ` Sergei Gavrikov
2009-04-27 21:00           ` Jeffrey Krasky
2009-04-27 21:09             ` Sergei Gavrikov
2009-04-28  8:33             ` Grant Edwards

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