lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Separating 'user' code from LWIP code base


From: Jonathan Larmour
Subject: Re: [lwip-users] Separating 'user' code from LWIP code base
Date: Wed, 28 Nov 2007 16:27:42 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Rasmussen, Art N. wrote:
> 
> An example is the settings of the debug flags. I would like to preserve
> my current settings by keeping them in a separate file called (for
> example) debug_local.h (the 'local' means my local changes to the LWIP
> code).
> 
> Relevant files are:
>   LWIP files:
>     opt.h
>     debug.h
>     arch.h
> The files that I supply are:
>    lwipopts.h
>    arch/cc.h
> 
> I cannot put the debug settings in lwipopts.h - it's too 'early' in the
> include chain and does not have access to the LWIP_DBG_ON, etc., tags.

I'm not sure what is going wrong for you. This works for me. You can just e.g.:
#define PBUF_DEBUG LWIP_DBG_ON
in lwipopts.h. Just like they are currently set to off in lwip/opt.h. You
don't need to have included debug.h first. Maybe your compiler has a
problem? What do you get when you process (e.g. with "cc -E foo.c") this file:

-=-=-=-=-=-=-=-
#define FOO DBG_ON

#define DBG_ON 1
#define DBG_OFF 0

FOO
-=-=-=-=-=-=-=-

You should get "1" (possibly along with other stuff your preprocessor puts
in, such as file/line number info).

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]