public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]How to run testprograms for lwip
@ 2009-07-23  9:50 Robert Brusa
  2009-07-23 10:02 ` Simon Kallweit
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Brusa @ 2009-07-23  9:50 UTC (permalink / raw)
  To: ecos-discuss

Hi
I have included the package lwip_tcpip in my library and now I want to run
the test programs that come with it. But how? Take e.g. tcpecho. I built
it using my library, then download it into my at91sam7x256-based board and
run it. Nothing happens. What should happen? What "special actions" am I
supposed to do? Thanks for help.
     Robert

-- 
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] 10+ messages in thread
* Re: [ECOS]How to run testprograms for lwip
@ 2009-07-30  9:11 David Fernandez
  2009-07-30 11:02 ` Sergei Gavrikov
  0 siblings, 1 reply; 10+ messages in thread
From: David Fernandez @ 2009-07-30  9:11 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Sergei Gavrikov, Simon Kallweit

> #if defined(CYGFUN_LWIP_IP_FORWARD)
> # define IP_FORWARD 1
> #else
> # define IP_FORWARD 0
> #endif
>
> FYI: There are a few defines like this
>
> #define FOO defined(CYG_FOO)
>
> in lwipopts.h. Small testcase:
>
> #define CYG_FOO 1
> #define FOO defined(CYG_FOO)
>
> main ()
> {
> int foo = FOO;
> }
>
> It cannot be linked. FOO is not boolean ;-) I can check the same
> "rvalues" then and send a patch if you want.
>

May be I'm wrong, but I think that the macro CYG_FUN_LWIP_IP_FORWARD
is not only defined, but defined as 1 if the option is enabled. May be
that what you want is to use the macro directly instead of the
preprocessor operator applied to it.

That is simpler than defining another macro, and if the option is
disabled, the macro would be defined, but its value would be 0.

You might want to check it this way though, in case the lwip is
included, but those CDL options are not active for some reason...
which may be impossible, but here you are.

#ifndef CYG_FUN_LWIP_IP_FORWARD
#define IP_FORWARD 0
#else
#define IP_FORWARD CYG_FUN_LWIP_IP_FORWARD
#endif

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

end of thread, other threads:[~2009-07-30 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23  9:50 [ECOS]How to run testprograms for lwip Robert Brusa
2009-07-23 10:02 ` Simon Kallweit
2009-07-23 12:19   ` Robert Brusa
2009-07-23 12:25     ` Simon Kallweit
2009-07-24 15:51       ` Robert Brusa
2009-07-29 12:25       ` Sergei Gavrikov
2009-07-29 12:32         ` Simon Kallweit
2009-07-30  9:11 David Fernandez
2009-07-30 11:02 ` Sergei Gavrikov
2009-07-30 11:11   ` Simon Kallweit

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