I'll provide a PR for review.
The change by itself is simple, we just need to add one config option
to nuttx/drivers/Kconfig.
However we need to update all of Spresense defconfigs (for now only
Spresense uses this folder).

On Wed, Aug 12, 2020 at 2:33 PM Fotis Panagiotopoulos
<f.j.pa...@gmail.com> wrote:
>
> Unfortunately I am not sure whether I can help with a PR. I don't feel that
> I understand the NuttX build system well enough to proceed with such a
> change.
> Could you help on this?
>
> Of course I can help with testing too.
>
> Στις Τετ, 12 Αυγ 2020 στις 4:29 μ.μ., ο/η David Sidrane <
> david.sidr...@nscdg.com> έγραψε:
>
> > I am volunteering to help test any of these type changes. There were many
> > subtle breakages in the past that tended to slip through. Also once all
> > this
> > settles out, it so needs to be documented.
> >
> > -----Original Message-----
> > From: Abdelatif Guettouche [mailto:abdelatif.guettou...@gmail.com]
> > Sent: Wednesday, August 12, 2020 6:41 AM
> > To: dev@nuttx.apache.org
> > Subject: Re: Board-specific drivers in NuttX 9.1.0.
> >
> > Note that this common board organisation and these two folders are
> > relatively new and didn't get as much attention as they need.
> > That said, I like the second suggestion.  Would you like to prepare a
> > PR and see what others have to say?  I could do that if you want.
> >
> > On Wed, Aug 12, 2020 at 12:31 PM Fotis Panagiotopoulos
> > <f.j.pa...@gmail.com> wrote:
> > >
> > > Thank you very much.
> > > Indeed it now works perfectly.
> > >
> > > However I would propose a little change on this.
> > > Currently board drivers require a specific directory structure, and this
> > > non-obvious (for me) config entry.
> > >
> > > Why not instead handle external drivers exactly like external boards?
> > > That is, add CONFIG_ARCH_DRIVERS_CUSTOM, CONFIG_ARCH_DRIVERS_CUSTOM_DIR,
> > > CONFIG_ARCH_DRIVERS_CUSTOM_DIR_RELPATH etc in nuttx/drivers/Kconfig and
> > > have the user select whether they need external drivers and where should
> > > they be located, instead of implying things.
> > >
> > > Or, at a minimum, I believe CONFIG_SPECIFIC_DRIVERS could be defined in
> > > nuttx/drivers/Kconfig. Since the build system uses this symbol, nuttx
> > > should define it, instead of relying on external Kconfigs.
> > >
> > > Στις Τετ, 12 Αυγ 2020 στις 2:02 μ.μ., ο/η Abdelatif Guettouche <
> > > abdelatif.guettou...@gmail.com> έγραψε:
> > >
> > > > > It's the drivers/Kconfig that
> > > > defines it (i.e. you add it), you can then enable it from menuconfig.
> > > >
> > > > To be clear I meant the "drivers" folder that's linked to "platform"
> > > > not the toplevel nuttx/drivers.
> > > >
> > > > On Wed, Aug 12, 2020 at 12:51 PM Abdelatif Guettouche
> > > > <abdelatif.guettou...@gmail.com> wrote:
> > > > >
> > > > > As far as I can tell it's the same, current master[1], 9.1[2],
> > 9.0[3],
> > > > 8.1[4]
> > > > > I do have some flashes about the necessity of a drivers folder
> > > > > alongside the board folder with custom boards, but I can't remember.
> > > > > That was an issue, it's now resolved.
> > > > >
> > > > > > But the code is not included in the build. I checked my Make.defs,
> > > > > > and
> > > > it
> > > > > > is similar to other Make.defs of the other drivers:
> > > > >
> > > > > You need CONFIG_SPECIFIC_DRIVERS set.  It's the drivers/Kconfig that
> > > > > defines it (i.e. you add it), you can then enable it from menuconfig.
> > > > >
> > > > > 1.
> > > >
> > https://github.com/apache/incubator-nuttx/tree/master/boards/arm/cxd56xx
> > > > > 2.
> > > >
> > https://github.com/apache/incubator-nuttx/tree/releases/9.1/boards/arm/cxd56xx
> > > > > 3.
> > > >
> > https://github.com/apache/incubator-nuttx/tree/releases/9.0/boards/arm/cxd56xx
> > > > > 4.
> > > >
> > https://github.com/apache/incubator-nuttx/tree/nuttx-8.1/boards/arm/cxd56xx
> > > > >
> > > > >
> > > > > On Wed, Aug 12, 2020 at 10:57 AM Fotis Panagiotopoulos
> > > > > <f.j.pa...@gmail.com> wrote:
> > > > > >
> > > > > > > NB: You'll need this patch too:
> > > > > > > https://github.com/apache/incubator-nuttx/pull/1480
> > > > > > <https://github.com/apache/incubator-nuttx/pull/1480>
> > > > > >
> > > > > > Oh, I didn't realize that I had to patch v9.1.0 with this. I
> > thought
> > > > it was
> > > > > > already included in the latest releases. After patching, linking of
> > > > > > my
> > > > > > drivers folder into nuttx/drivers/platform works.
> > > > > > Kconfig is parsed, and the new options appear in menuconfig.
> > > > > > But the code is not included in the build. I checked my Make.defs,
> > > > > > and
> > > > it
> > > > > > is similar to other Make.defs of the other drivers:
> > > > > >
> > > > > >     CSRCS += driver.c
> > > > > >     DEPPATH += --dep-path platform
> > > > > >     VPATH += :platform
> > > > > >     CFLAGS += $(shell $(INCDIR) "$(CC)"
> > > > > > $(TOPDIR)$(DELIM)drivers$(DELIM)platform)
> > > > > >
> > > > > >
> > > > > > > The structure has not changed, Xiang patch made it possible to
> > > > > > > omit
> > > > > > > the "drivers" folder when it's not needed, in that case a dummy
> > > > folder
> > > > > > > is linked
> > > > > >
> > > > > > As I see, in v9.0.0, the structure was:
> > > > > > └── boards_dir
> > > > > >     └── board1
> > > > > >         └── drivers
> > > > > >
> > > > > > but in v9.1.0 it is
> > > > > > └── boards_dir
> > > > > >     ├── board1
> > > > > >     └── drivers
> > > > > >
> > > > > > or am I missing anything?
> > > > > >
> > > > > >
> > > > > > Στις Τετ, 12 Αυγ 2020 στις 5:22 π.μ., ο/η Xiang Xiao <
> > > > > > xiaoxiang781...@gmail.com> έγραψε:
> > > > > >
> > > > > > > You can try
> > > > > > >
> > > >
> > https://github.com/apache/incubator-nuttx/tree/master/boards/arm/cxd56xx
> > > > > > > and compare the difference with yours.
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Nathan Hartman <hartman.nat...@gmail.com>
> > > > > > > > Sent: Wednesday, August 12, 2020 5:34 AM
> > > > > > > > To: dev@nuttx.apache.org
> > > > > > > > Subject: Re: Board-specific drivers in NuttX 9.1.0.
> > > > > > > >
> > > > > > > > On Tue, Aug 11, 2020 at 1:14 PM Fotis Panagiotopoulos <
> > > > > > > f.j.pa...@gmail.com>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > The structure proposed by Xiang Xiao is not working for me.
> > > > > > > > >
> > > > > > > > > By looking in the Makefiles, I did understand that the
> > > > > > > > > structure
> > > > has
> > > > > > > > > changed a bit.
> > > > > > > > > Now my structure is:
> > > > > > > > >
> > > > > > > > > ├── CustomBoard
> > > > > > > > > │   ├── defconfig
> > > > > > > > > │   ├── include
> > > > > > > > > │   ├── Kconfig
> > > > > > > > > │   ├── Make.defs
> > > > > > > > > │   ├── scripts
> > > > > > > > > │   └── src
> > > > > > > > > └── drivers
> > > > > > > > >     ├── driver.c
> > > > > > > > >     ├── driver.h
> > > > > > > > >     ├── Kconfig
> > > > > > > > >     └── Make.defs
> > > > > > > > >
> > > > > > > > > But still it does not work.
> > > > > > > > >
> > > > > > > > > Any ideas what may break it?
> > > > > > > >
> > > > > > > >
> > > > > > > > Maybe need to make distclean, followed by tools/configure.sh,
> > to
> > > > refresh
> > > > > > > NuttX's symbolic links?
> > > > > > > >
> > > > > > > > Nathan
> > > > > > >
> > > > > > >
> > > >
> >

Reply via email to