Fotis, The debug.h file defines a lot of debug log settings that can be set or unset to see debug logging for different functional areas within NuttX. To use the settings, you first need to set the level you are interested in, one or more of:
CONFIG_DEBUG_ERROR=yCONFIG_DEBUG_WARN=yCONFIG_DEBUG_INFO=y The debug.h file has documentation in it explaining how to use the functions. If I'm working in an area, I search the files I'm working in for log messages. Typically you'll see something like mcerr("Some message\n"); Then you know that's what that area is using for logging. Then look in debug.h to find the CONFIG_DEBUG_ variable that you need to set to turn on this logging. For the memory card area it's CONFIG_DEBUG_MEMCARD_ERROR. You can also define your own custom logging statements <https://nuttx-companion.readthedocs.io/en/latest/user/debugging.html#custom-debug-logging> if you want information that doesn't come along with that area's logging. You'll need to turn on both switches: the general one (for instance CONFIG_DEBUG_ERROR) and the one for the area you're interested in (CONFIG_DEBUG_MEMCARD_ERROR). I had to search the code of the area I'm working in to understand its particular debug settings. Does that help? cheers adam On Sat, Jul 25, 2020 at 4:09 AM Fotis Panagiotopoulos <f.j.pa...@gmail.com> wrote: > Perfect! kconfig-tweak is what I was looking for. I will give it a try > later today. > > However at this point I would like to ask. How is a debug build defined for > NuttX? > Surely there are configs that can be changed. But is there any system-wide > debug option? > Is NDEBUG defined in any case? > > For example I see CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG which is > active when CONFIG_DEBUG_SYMBOLS is also active. > So, I guess CONFIG_DEBUG_SYMBOLS is our general "debug" macro? > > My application will most probably need to know whether this is a debug > build or not. > > > > Στις Σάβ, 25 Ιουλ 2020 στις 7:44 π.μ., ο/η Adam Feuer <a...@starcat.io> > έγραψε: > > > I wrote up the kconfig-tweak usage here: > > > > > > > https://nuttx-companion.readthedocs.io/en/latest/user/debugging.html#changing-debug-settings-quickly > > > > -adam > > > > On Fri, Jul 24, 2020 at 3:24 PM Matias N. <mat...@imap.cc> wrote: > > > > > I'm thinking in implementing it in my nuttx workspace manager as well > =) > > > > > > On Fri, Jul 24, 2020, at 17:32, Nathan Hartman wrote: > > > > On Fri, Jul 24, 2020 at 3:49 PM Adam Feuer <a...@starcat.io> wrote: > > > > > > > > > > On Fri, Jul 24, 2020 at 12:40 PM Gregory Nutt <spudan...@gmail.com > > > > > wrote: > > > > > > > > > > > a dumb script like that one Abdelatif demonstrated > > > > > > will multiple calls to kconfig-tweak can be used to turn on all > of > > > the > > > > > > configuration options that you need. > > > > > > > > > > > > > > > > Cool! > > > > > > > > I didn't know I could do this. Now that I know, I think I'll convert > > > > my configs to work this way. It will be much more convenient to have > > > > just one config for "release" builds and then a script to add or > > > > remove debugging. > > > > > > > > Glad we had this conversation. :-) > > > > > > > > Nathan > > > > > > > > > > > > > -- > > Adam Feuer <a...@starcat.io> > > > -- Adam Feuer <a...@starcat.io>