Re: Hello World - No Output

Semion Prihodko <[email protected]> Thu, 16 Feb 2012 16:34:22 +0200
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <CAOLuvB0QGRAYVH3k7YMgPpTys3QpswbsvVSeWJ+m-K7VUk1c0Q@mail.gmail.com>
--047d7b33d4c26653e304b915b9af
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

You need to redirect serial port to console (your printf outputs into it).

2012/2/16 H=E5vard Ostnes <[email protected]>

> Hi!
>
> I have spent the past two days on learning how to make a simple roottask
> "hello
> world" application.
>
> I can successfully compile the following code <hello.cc> file:
>
> #include <l4io.h>
>
> int main (void)
> {
>
>   bool hello =3D true;
>
>   if (hello)
>     {
>        printf ("\nPlease select ipc type:\n");
>        return 0;
>     }
>
> }
>
> My Makefile looks like this:
> srcdir=3D        @srcdir@
> top_srcdir=3D    @top_srcdir@
> top_builddir=3D    @top_builddir@
>
> include $(top_srcdir)/Mk/l4.base.mk
>
> PROGRAM=3D    helloworld
> PROGRAM_DEPS=3D    $(top_builddir)/lib/l4/libl4.a \
>                 $(top_builddir)/lib/io/libio.a
>
> SRCS=3D        hello.cc
>
> LIBS+=3D        -ll4 -lio
> LDFLAGS+=3D    -Ttext=3D$(ROOTTASK_LINKBASE)
> CPPFLAGS+=3D    -I$(srcdir)/$(ARCH)
>
> include $(top_srcdir)/Mk/l4.prog.mk
>
>
> my menu.lst looks like this:
>
> root (fd0)
> default=3D0
> timeout=3D3
>
> title L4Ka::Pistachio
>  kernel /kickstart
>  module /x86-kernel
>  module /sigma0
>  module /helloworld
>
>
> I guess there might be a problem somewhere, especially my hunch is on the
> Makefile? (I am not a programmer by profession, but I really need to get =
a
> working hello world going). Any help is appreciated!
>
> best regards,
> h=E5vard
>
>
>
>
>
>

--047d7b33d4c26653e304b915b9af
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div style=3D"text-align:left"><font color=3D"#555555" face=3D"arial, sans-=
serif"><span style=3D"white-space:nowrap">You need to redirect serial port =
to console (your printf outputs into it).</span></font></div><br><div class=
=3D"gmail_quote">
2012/2/16 H=E5vard Ostnes <span dir=3D"ltr">&lt;<a href=3D"mailto:havard.os=
[email protected]">[email protected]</a>&gt;</span><br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
Hi!<br>
<br>
I have spent the past two days on learning how to make a simple roottask &q=
uot;hello<br>
world&quot; application.<br>
<br>
I can successfully compile the following code &lt;hello.cc&gt; file:<br>
<br>
#include &lt;l4io.h&gt;<br>
<br>
int main (void)<br>
{<br>
<br>
 =A0 bool hello =3D true;<br>
<br>
 =A0 if (hello)<br>
 =A0 =A0 {<br>
 =A0 =A0 =A0 =A0printf (&quot;\nPlease select ipc type:\n&quot;);<br>
 =A0 =A0 =A0 =A0return 0;<br>
 =A0 =A0 }<br>
<br>
}<br>
<br>
My Makefile looks like this:<br>
srcdir=3D =A0 =A0 =A0 =A0@srcdir@<br>
top_srcdir=3D =A0 =A0@top_srcdir@<br>
top_builddir=3D =A0 =A0@top_builddir@<br>
<br>
include $(top_srcdir)/Mk/<a href=3D"http://l4.base.mk" target=3D"_blank">l4=
.base.mk</a><br>
<br>
PROGRAM=3D =A0 =A0helloworld<br>
PROGRAM_DEPS=3D =A0 =A0$(top_builddir)/lib/l4/libl4.a \<br>
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $(top_builddir)/lib/io/libio.a<br>
<br>
SRCS=3D =A0 =A0 =A0 =A0hello.cc<br>
<br>
LIBS+=3D =A0 =A0 =A0 =A0-ll4 -lio<br>
LDFLAGS+=3D =A0 =A0-Ttext=3D$(ROOTTASK_LINKBASE)<br>
CPPFLAGS+=3D =A0 =A0-I$(srcdir)/$(ARCH)<br>
<br>
include $(top_srcdir)/Mk/<a href=3D"http://l4.prog.mk" target=3D"_blank">l4=
.prog.mk</a><br>
<br>
<br>
my menu.lst looks like this:<br>
<br>
root (fd0)<br>
default=3D0<br>
timeout=3D3<br>
<br>
title L4Ka::Pistachio<br>
=A0kernel /kickstart<br>
=A0module /x86-kernel<br>
=A0module /sigma0<br>
=A0module /helloworld<br>
<br>
<br>
I guess there might be a problem somewhere, especially my hunch is on the<b=
r>
Makefile? (I am not a programmer by profession, but I really need to get a<=
br>
working hello world going). Any help is appreciated!<br>
<br>
best regards,<br>
h=E5vard<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br>

--047d7b33d4c26653e304b915b9af--