On Fri, May 19, 2023 at 8:24 AM Milan Obuch <nuttx-...@dino.sk> wrote:

> Hi,
>
> I started testing NuttX on Raspberry Pi Pico board, using FreeBSD as
> host for building. I was able to build NuttX using all configuration
> files for this board (but one - nshsram, it does not finish, but I
> don't care about it for now). All those configurations use default UART
> placement (pins 0, 1).
>
> These pins are not available on 01space board RP2040-0.42LCD, so I
> changed UART placement to pins 28, 29 running 'make menuconfig'. This
> way, .config in NuttX working/build directory is modified, and
> resulting binary (or uf2 for this board) file works as expected.
>
> This file, however, gets deleted when running 'make distclean' for
> different build. Thus I run 'make savedefconfig', altering defconfig
> file in working directory. This gets deleted on 'make distclean' as
> well, so I manually created new directory, where I copied defconfig
> file - boards/arm/rp2040/raspberrypi-pico/configs/nsh_28_29, and now my
> config is listed in 'tools/configure.sh -L' output, so I can use it as
> any other config file.
>
> So my questions now - is this intended way for saving and reusing
> config file? While it works for me, I'd like to have my configs
> separated from standard source files, maybe as third parallel directory
> to standard nuttx and apps, with ability to see them in
> 'tools/configure.sh -L' output, and using my configuration with
> 'tools/configure.sh <my_config>'.
>
> Any hints for this one?
>
> Regards,
> Milan



There are various possibilities:

After running 'make savedefconfig' you would normally want to copy the
resulting defconfig file somewhere.

You could copy it to a new config under the board in question, and if you
feel this configuration could be helpful to the wider community, you could
opt to open a PR to upstream it.

Or you could create your own variant of the board by copying the whole
board directory and then customizing it. The copy could be in-tree (in
boards/arm64/xxxx) or out-of-tree (leaving the nuttx sources alone and
putting your board in another directory, which you can specify). This
option (copying the whole board directory) makes sense if you want to
customize more than just the config and don't plan to upstream your
customizations.

As a side note, if you are customizing any in-tree nuttx sources, it's
probably a good idea to create your own long-lived branch, keep your master
branch up-to-date with upstream, add your customizations to your private
branch, and occasionally merge updates from master into your branch. Or you
could base your branch off of a release tag if you prefer to use released
versions.

Hope this helps,
Nathan

Reply via email to