Possible bug in nutdebug.h?

View: New views
2 Messages — Rating Filter:   Alert me  

Possible bug in nutdebug.h?

by uprinz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi!
 
I have a system that hangs... Not prblematic, but I'd like to know if that
comes from some of the NUTASSERTS() that there are.
Unfortunately if you #include <sys/nutdebug.h> the NUTASSERT is never
actiavted as it depends on #define NUTDEBUG.
#define NUTDEBUg is configured via Nutconf and placed in sys/os.h. But
sys/os.h is not included ontop of sys/nutdebug.h...
 
Or is there a special ide behind foring a user to always include sys/os.h
before sys/nutdebug.h?
 
Best regards, Ulrich
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: Possible bug in nutdebug.h?

by Ethernut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ulrich,

Ulrich Prinz wrote:
> I have a system that hangs... Not prblematic, but I'd like to know if that
> comes from some of the NUTASSERTS() that there are.
> Unfortunately if you #include <sys/nutdebug.h> the NUTASSERT is never
> actiavted as it depends on #define NUTDEBUG.
> #define NUTDEBUg is configured via Nutconf and placed in sys/os.h. But
> sys/os.h is not included ontop of sys/nutdebug.h...

NUTDEBUG is an old feature, used in early days to track down spurious
bugs in the kernel. I'm not even sure if it still works.

To enable NUTASSERT, you need to add

 HWDEF += -DNUTDEBUG_USE_ASSERT

to UserConf.mk. See
http://www.ethernut.de/pdf/enswm28e.pdf
page 46

AFAIK, this option hadn't been implemented in the Configurator yet.


> Or is there a special ide behind foring a user to always include sys/os.h
> before sys/nutdebug.h?

No. But it often happens, that options will not work because the
required header file is missing in the source file.

Harald

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion