Our in-house build system has a modified configure.sh that allows #include 
directives
in defconfig files and subsequent entries to override the inherited config 
vars, like this:

~/nuttx/boards/arm/stm32l4/haltian-example-board/configs/nsh-dbg$ cat defconfig
#include "../nsh/defconfig"

# CONFIG_BOARD_DEEPSLEEP_SKIP_DEBUG is not set
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_ASSERTIONS=y


If the inherited parent config had CONFIG_BOARD_DEEPSLEEP_SKIP_DEBUG=y,
then this turns it off again and enables the two additional debug options.

Best Regards,
   Juha


________________________________
From: Gregory Nutt <spudan...@gmail.com>
Sent: Monday, November 23, 2020 5:07 PM
To: dev@nuttx.apache.org <dev@nuttx.apache.org>
Subject: Re: Should TASK_NAME_SIZE be changed in most configs?

I wonder if we could automate that?  Instead of separate debug vs
production configurations, could not configure.sh/c just create a debug
configuration by disabling optimization, enabling symbols, enabling
debug features, assertions, basic error and warning output?

Of course specialize configurations like a networking configure would
need more (like network debug), but changes like that to configure.sh/c
would get you 90% there.

On 11/23/2020 7:29 AM, David Sidrane wrote:
> Perfect! Let's do this as time permits.
>
> -----Original Message-----
> From: Alan Carvalho de Assis [mailto:acas...@gmail.com]
> Sent: Monday, November 23, 2020 5:09 AM
> To: dev@nuttx.apache.org
> Subject: Re: Should TASK_NAME_SIZE be changed in most configs?
>
> Yes, I think nsh-debug will make its intention clear.
>
> On 11/23/20, Gregory Nutt <spudan...@gmail.com> wrote:
>> It has always been the policy to disable debug features in all shipped
>> configurations.  They were considered production configurations not
>> debug configurations.
>>
>> Configurations that have debug enable could, perhaps, be named like
>> nsh-debug.
>>
>> On 11/23/2020 5:38 AM, Alan Carvalho de Assis wrote:
>>> I think we need to have a good compromise between features and size.
>>>
>>> For instance, the default "nsh" demo should be small, basically just
>>> the terminal and minimum support to its commands to work, like the
>>> PROCFS to get 'free' working.
>>>
>>> Also keep in mind that for debugging purpose we need to "Suppress
>>> Optimization" that also will increase its size.
>>>
>>> So, I think it could be a good idea to have a predefined config for
>>> debug purpose, instead forcing the "nsh" to be debugging enabled ready
>>> by default, that will increase its size and send a wrong message for
>>> people testing NuttX for the very first time.
>>>
>>> See the mbedOS for example:
>>>
>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fos.mbed.com%2Fblog%2Fentry%2FOptimizing-memory-usage-in-mbed-OS-52%2F&amp;data=04%7C01%7Cjuha.niskanen%40haltian.com%7C4ac8b58ee8c24898b82108d88fc17d77%7C2f7c629267f24cc582be5d187e289ab2%7C1%7C0%7C637417408508276466%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=B4B6VcGPTkMPkktHCVV3%2BVLXnSJ%2B%2F8L39tgbRAFrGB0%3D&amp;reserved=0
>>>
>>> They went into 'rabbit's hole' to solve an issue that we don't have
>>> yet, but if nobody keep an eye on it soon we will have.
>>>
>>> BR,
>>>
>>> Alan
>>>
>>> On 11/23/20, David Sidrane <david.sidr...@nscdg.com> wrote:
>>>>> Do you think this is due to the....
>>>> I would say so.
>>>>
>>>> I agree better debugging out of the box is a good way to go. We have to
>>>> weigh that against the past goal of: Minimum size image. It was a first
>>>> impression thing. This was why debug had to be tuned off in all Kconfig.
>>>>
>>>> The first question to ask is do we as a group feel still that the size
>>>> of
>>>> the canned config built images should be as small as possible to
>>>> showcase
>>>> NuttX ability to be small?
>>>>
>>>>
>>>> David
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Matias N. [mailto:mat...@imap.cc]
>>>> Sent: Sunday, November 22, 2020 5:18 PM
>>>> To: dev@nuttx.apache.org
>>>> Subject: Should TASK_NAME_SIZE be changed in most configs?
>>>>
>>>> While trying the integration of openocd with NuttX it was complaining
>>>> due
>>>> to "name" not being defined, which happens when CONFIG_TASK_NAME_SIZE ==
>>>> 0. Looking at sched/Kconfig the default for this symbol is 31, yet many
>>>> configs have this set to zero. Do you think this is due to the default
>>>> having changed at some point or is this done to minimize memory use in
>>>> all
>>>> these boards? If the latter, maybe we need to make the default depend on
>>>> CONFIG_DEFAULT_SMALL and update all configs that do not have this set.
>>>>
>>>> Best,
>>>> Matias
>>>>

Reply via email to