Hello Zou,

The https://github.com/apache/incubator-nuttx/pull/5712 unifies board
common logic usage under a single option ARCH_BOARD_COMMON that is
introduced instead of per-arch options like BOARD_SAMV7_COMMON or
BOARD_STM32_COMMON. So most probably if your board defconfig had
BOARD_STM32_COMMON config enabled you need to replace it with
ARCH_BOARD_COMMON option. Also while working on
https://github.com/apache/incubator-nuttx/pull/5712 I found out that
some boards that didn't have BOARD_STM32_COMMON enabled actually used
board common code. So the way to fix your build is to remove
CONFIG_BOARD_STM32_COMMON=y from defconfig if it was present and add
CONFIG_ARCH_BOARD_COMMON=y to your board defconfig.

Please give me feedback if that works for you. I will add a
description on how to migrate to a new NuttX release, so users will be
informed about this breaking change.

Best regards,
Petro

сб, 12 бер. 2022 р. о 16:10 fft <f...@feedforward.com.cn> пише:
>
> Hello Petro,
>
>
>
> After https://github.com/apache/incubator-nuttx/pull/5712, there's a error 
> when building my custom board:
>
>
> make[1]: Entering directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src'
> make[2]: Entering directory '/home/zouboan/G/NuttX/fft/fft-f405/src'
> make[2]: *** No rule to make target 'libboard.a'.&nbsp; Stop.
> make[2]: Leaving directory '/home/zouboan/G/NuttX/fft/fft-f405/src'
> Makefile:139: recipe for target 'board/libboard.a' failed
> make[1]: *** [board/libboard.a] Error 2
> make[1]: Leaving directory '/home/zouboan/G/NuttX/nuttx/arch/arm/src'
> tools/Unix.mk:509: recipe for target 'nuttx' failed
>
>
>
> My custom board's configs is like this:
>
>
> CONFIG_ARCH="arm"
> CONFIG_ARCH_BOARD_CUSTOM=y
> CONFIG_ARCH_BOARD_CUSTOM_DIR="../fft/fft-f405"
> CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
> CONFIG_ARCH_BOARD_CUSTOM_NAME="fft-f405"
> CONFIG_ARCH_CHIP="stm32"
> CONFIG_ARCH_CHIP_STM32=y
> CONFIG_ARCH_CHIP_STM32F405RG=y
>
>
> How should I modify the configuration to adapt to pull #5712 ?
>
>
>
> Best regards,
> Zou
>
>
> ------------------&nbsp;Original&nbsp;------------------
> From: &nbsp;"petro.karashchenko"<petro.karashche...@gmail.com&gt;;
> Date: &nbsp;Fri, Mar 11, 2022 10:41 PM
> To: &nbsp;"dev"<dev@nuttx.apache.org&gt;;
>
> Subject: &nbsp;Re: Error when building custom board
>
> &nbsp;
>
> Hello Jukka,
>
> Finally I was able to reproduce the situation that you are talking
> about. The case is that in PX4 environment the path to the board files
> is hardcoded to $(BOARD_DIR)/src unconditionally, but actually it
> depends on BOARD_COMMON_DIR value:
> ifneq ($(BOARD_COMMON_DIR),)
> ARCH_SRC_BOARD_SYMLINK=$(BOARD_COMMON_DIR)
> ARCH_SRC_BOARD_BOARD_SYMLINK=$(BOARD_DIR)/src
> else
> ARCH_SRC_BOARD_SYMLINK=$(BOARD_DIR)/src
> endif
>
> So the best solution that I can introduce without modification of PX4
> build system is https://github.com/apache/incubator-nuttx/pull/5715
>
> I do not like it a bit because this leads to a situation that leads to
> a need to make a distclean each time the ARCH_BOARD_COMMON is changed.
>
> Best regards,
> Petro
>
> Best regards,
> Petro
>
> пт, 11 бер. 2022 р. о 11:33 Petro Karashchenko
> <petro.karashche...@gmail.com&gt; пише:
> &gt;
> &gt; Hello Jukka,
> &gt;
> &gt; I'm still in the middle of building a docker image for your project.
> &gt; Currently with slow internet it takes a while.
> &gt;
> &gt; But what I see from the error that you report is that probably you
> &gt; applied https://github.com/apache/incubator-nuttx/pull/5712 while
> &gt; having https://github.com/apache/incubator-nuttx/pull/5274 still
> &gt; reverted.
> &gt;
> &gt; I will give feedback as soon as I will replicate your issue at my end.
> &gt;
> &gt; Best regards,
> &gt; Petro
> &gt;
> &gt; пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen <jukka.laiti...@iki.fi&gt; 
> пише:
> &gt; &gt;
> &gt; &gt; Hi,
> &gt; &gt;
> &gt; &gt; With this patch, all my targets fail with:
> &gt; &gt;
> &gt; &gt; Makefile:23: board/Make.defs: No such file or directory
> &gt; &gt; make[3]: *** No rule to make target 'board/Make.defs'.&nbsp; Stop.
> &gt; &gt;
> &gt; &gt; Should I add some new CONFIGs? Sorry but I don't have much time 
> today to
> &gt; &gt; debug this further
> &gt; &gt;
> &gt; &gt; -Jukka
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; On 10.3.2022 21.00, Petro Karashchenko wrote:
> &gt; &gt; &gt; Hello Jukka,
> &gt; &gt; &gt;
> &gt; &gt; &gt; I would like to ask you to try an alternative PR
> &gt; &gt; &gt; https://github.com/apache/incubator-nuttx/pull/5712 and 
> feedback if it
> &gt; &gt; &gt; works for you.
> &gt; &gt; &gt;
> &gt; &gt; &gt; Best regards,
> &gt; &gt; &gt; Petro
> &gt; &gt; &gt;
> &gt; &gt; &gt; чт, 10 бер. 2022 р. о 07:24 Jukka Laitinen 
> <jukka.laiti...@iki.fi&gt; пише:
> &gt; &gt; &gt;&gt; Hi,
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; This fixes the build for me, I just leave the
> &gt; &gt; &gt;&gt; CONFIG_BOARD_CUSTOM_ARCH_BOARD_COMMON undefined.
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; Thanks,
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; Jukka
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; On 9.3.2022 19.22, Petro Karashchenko wrote:
> &gt; &gt; &gt;&gt;&gt; Hello Jukka,
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; I was able to localize the root cause of the issue. 
> I've created
> &gt; &gt; &gt;&gt;&gt; https://github.com/apache/incubator-nuttx/pull/5705 to 
> recover things
> &gt; &gt; &gt;&gt;&gt; and added a separate option that should be explicitly 
> enabled to
> &gt; &gt; &gt;&gt;&gt; re-use a board-level common code by custom boards 
> users.
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; Please try this change and feedback if that solves the 
> problem.
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; Best regards,
> &gt; &gt; &gt;&gt;&gt; Petro
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; чт, 3 бер. 2022 р. о 15:33 Jukka Laitinen 
> <jukka.laiti...@iki.fi&gt; пише:
> &gt; &gt; &gt;&gt;&gt;&gt; Hi, sorry but I am away from computer atm.
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; In the project there is "packaging" subdirectory, 
> it contains some docker env, which is also used in TII's CI
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; - Jukka
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; Petro Karashchenko kirjoitti torstai 3. 
> maaliskuuta 2022:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; Hello Jukka,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; Do you have any steps on how to build or 
> download a docker image that
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; can be used to build that project?
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; It takes me too much time to get build running.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; Best regards,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; Petro
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt; чт, 3 бер. 2022 р. о 12:43 Jukka Laitinen 
> <jukka.laiti...@iki.fi&gt; пише:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt; And also note that the commit I mentioned 
> is already reverted in nuttx submodule, so you need to put it back in order 
> to re-produce the issue :)
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt; Jukka Laitinen kirjoitti torstai 3. 
> maaliskuuta 2022:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi, sorry about that; you can just 
> remove that submodule, it is not needed to re-produce the issue.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt; - Jukka
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt; Petro Karashchenko kirjoitti torstai 
> 3. maaliskuuta 2022:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi Jukka,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I tried to replicate your case, 
> but failed with:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; $ git submodule update --init 
> --recursive
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Cloning into 
> '/home/pkarashchenko/workspace/px4-firmware/boards/ssrc/saluki-v1'...
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ERROR: Repository not found.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fatal: Could not read from remote 
> repository.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Please make sure you have the 
> correct access rights
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and the repository exists.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fatal: clone of 
> 'g...@github.com:tiiuae/saluki-v1.git' into submodule
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; path 
> '/home/pkarashchenko/workspace/px4-firmware/boards/ssrc/saluki-v1'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; failed
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Failed to clone 
> 'boards/ssrc/saluki-v1'. Retry scheduled
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Cloning into 
> '/home/pkarashchenko/workspace/px4-firmware/boards/ssrc/saluki-v1'...
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ERROR: Repository not found.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fatal: Could not read from remote 
> repository.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Please make sure you have the 
> correct access rights
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and the repository exists.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fatal: clone of 
> 'g...@github.com:tiiuae/saluki-v1.git' into submodule
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; path 
> '/home/pkarashchenko$/workspace/px4-firmware/boards/ssrc/saluki-v1'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; failed
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Failed to clone 
> 'boards/ssrc/saluki-v1' a second time, aborting
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Best regards,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Petro
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; чт, 3 бер. 2022 р. о 09:34 Jukka 
> Laitinen <jukka.laiti...@iki.fi&gt; пише:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Maybe I was jumping in to 
> conclusion and the issue is not the same as
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; what I had. I was building 
> PX4, which uses CMake build system, so I am
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; not having any Makefile or 
> Make.defs in my own board directory. Also the
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; platform is not stm or arm, 
> but risc-v.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Anyhow, this is the error 
> which I started getting in my build scripts:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ninja: error:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> '../../platforms/nuttx/NuttX/nuttx/arch/risc-v/include/board', needed by
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 'NuttX/nuttx_copy.stamp', 
> missing and no known rule to make it
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make: *** [Makefile:225: 
> ssrc_icicle_default] Error 1
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; My configs are:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; CONFIG_ARCH="risc-v"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; CONFIG_ARCH_BOARD_CUSTOM=y
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; One version, where it fails is 
> available publicly in
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> https://github.com/tiiuae/px4-firmware/ (nuttx is included as a submodule)
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Building "make 
> ssrc_icicle_default". The board files are in
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> boards/ssrc/icicle/nuttx-config and NuttX cloned in
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; platforms/nuttx/Nuttx/nuttx.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I didn't yet start looking 
> into it in detail, what goes wrong, just
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; bisected the nuttx and 
> reverted the commit which broke it for me. I need
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; to look back later to see how 
> to change the off-tree board config to get
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; it back online.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Just noticed that the error is 
> somewhat similar, although coming from
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; different build env. But in my 
> case it is likely that I need to adapt
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the cmake build scripts 
> according to the changes in nuttx.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; -Jukka
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On 3.3.2022 9.37, Petro 
> Karashchenko wrote:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hello Jukka,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; So you experience the same 
> problem as Daniel and reverting the commit helps?
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Before 
> f77956a227f1db6ecb44eda3814e7b02aa2187a6 there was no way to
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; reuse common code from 
> "nuttx/board/...". I'm using a custom board
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; based on SAME70 and after
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> https://github.com/apache/incubator-nuttx/pull/4981 I found my code
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; tree broken. Now the 
> folder structure for "boards/arm/samv7" is the
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; same as in 
> "boards/arm/stm32". Here is what I did to get it back
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; running:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 1. Synced 
> "custom-board/scripts/Make.defs" with
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> "boards/arm/samv7/same70-xplained/scripts/Make.defs"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 2. Renamed 
> "custom-board/src/Makefile" to "custom-board/src/Make.defs"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and synced with 
> "boards/arm/samv7/same70-xplained/src/Make.defs"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 3. Removed files in my 
> code tree that have exactly the same
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; implementation as files 
> from "boards/arm/samv7/common"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; It seems like Daniel is 
> hitting the same issue, so I expect that
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; renaming Makefile to 
> Make.defs plus setting "BOARD_STM32_COMMON=n"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; should fix the issue 
> without any additional file clean-up.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Please give me feedback if 
> that helps.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Best regards,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Petro
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; чт, 3 бер. 2022 р. о 07:40 
> Jukka Laitinen <jukka.laiti...@iki.fi&gt; пише:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; HI,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Not sure what is the 
> correct way to fix this, but I reverted:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; commit 
> f77956a227f1db6ecb44eda3814e7b02aa2187a6
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Author: Petro 
> Karashchenko <petro.karashche...@gmail.com&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Date:&nbsp;&nbsp; Wed 
> Jan 19 11:16:11 2022 +0200
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  tools: add option to reuse boards common files for custom boards
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  Signed-off-by: Petro Karashchenko <petro.karashche...@gmail.com&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Petro, what is the 
> proper way to configure this?
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Thanks,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Jukka
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On 3.3.2022 0.06, 
> Daniel Pereira Carvalho wrote:
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi guys,
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I am having 
> problems building custom boards outside of the Nuttx folder
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; tree. Usually I 
> use the following folder structure.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; |-&gt; apps
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; |-&gt; my-folder
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  |-&gt; my-apps
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  |-&gt; custom-app
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  |-&gt; my-boards
> &gt; &gt; 
> &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>  |-&gt; custom-board
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; |-&gt; nuttx
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; To build my apps I 
> just need to create a symbolic link called external
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; inside apps 
> folder. To create a new custom board I start copying a similar
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; board (e.g 
> nucleo-g431kb) to my-boards folder and make the following changes
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *remove from 
> defconfig:*
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD="nucleo-g431kb"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_NUCLEO_G431KB=y
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *add on defconfig:*
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM=y
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_DIR="../my-folder/my-boards/custom-board"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> CONFIG_ARCH_BOARD_CUSTOM_NAME="custom-board"
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rename 
> src/Make.defs to src/Makefile and append the line *
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; include 
> $(TOPDIR)/boards/Board.mk at the end of file.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; This works well 
> for me up to Nuttx version 10.2.0 but now when I try to
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make I got the 
> errors
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Entering 
> directory '/home/daniel/nuttx-workspace/nuttx/tools'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Leaving 
> directory '/home/daniel/nuttx-workspace/nuttx/tools'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Entering 
> directory '/home/daniel/nuttx-workspace/nuttx/tools'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Leaving 
> directory '/home/daniel/nuttx-workspace/nuttx/tools'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Create version.h
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Entering 
> directory '/home/daniel/nuttx-workspace/nuttx/boards'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[2]: Entering 
> directory
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> '/home/daniel/nuttx-workspace/nuttx/boards/arm/stm32/common'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Makefile:23: 
> board/Make.defs: No such file or directory
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[2]: *** No 
> rule to make target 'board/Make.defs'.&nbsp; Stop.
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[2]: Leaving 
> directory
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
> '/home/daniel/nuttx-workspace/nuttx/boards/arm/stm32/common'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: *** 
> [Makefile:79: context] Error 2
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make[1]: Leaving 
> directory '/home/daniel/nuttx-workspace/nuttx/boards'
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; make: *** 
> [tools/Unix.mk:425: boards/.context] Error 2
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Does anyone know 
> how to fix this problem?
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Thanks
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Daniel Pereira de 
> Carvalho
> &gt; &gt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

Reply via email to