I'm not sure if there's support for custom-board common-code (in the same sense 
as for in-tree boards). In any case, we've introduced an external/ directory 
for the purpose of adding external OS level code. Simply point nuttx/external 
symlink to your common directory.

Best,
Matias

On Wed, May 5, 2021, at 04:56, Frank-Christian Kruegel wrote:
> Hi.
> 
> I've created several board support packages, each in its own out-of-tree 
> directory. Ive configured them as custom boards with a relative path 
> like ...
> 
> +- nuttx
> +- apps
> +- company-boards
> |  +- board1
> |  +- board2
> |  +- board3
> +- company-apps
> |  +- app1
> |  +- app2
> ...
> 
> Works fine.
> 
> These boards have different microcontrollers from different 
> architectures, but they all have common hardware and configuration 
> items. It would be very helpful, it i could share code between the 
> boards like...
> 
> +- company-boards
> |  +- board1
> |     +-Kconfig
> |     +-src
> |  +- board2
> |     +-Kconfig
> |     +-src
> |  +- board3
> |     +-Kconfig
> |     +-src
> |  +- board-common  <-- NEW SHARED DIRECTORY
> |     +-Kconfig
> |     +-src
> 
> so I can reference the common codefrom each board. The shared code is 
> kernel code, custom drivers, driver initialisation etc, no application 
> logic, and since it is very specific to my hardware the nuttx tree is 
> not a good place for it.
> 
> How do I do it the correct way?
> 
> I've notices that the board Kconfig gets copied over to 
> nuttx/boards/dummy, so a mere "source ../../board-common/Kconfig" 
> doesn't work. I managed to make Kconfig work by using "source 
> $TOPDIR/../company-boards/board-common/Kconfig". Now I'm stuck with 
> makefiles.
> 
> Best regards
> 
> Frank-Christian
> 

Reply via email to