Re: Error when building custom board

2022-03-18 Thread Jukka Laitinen
Hi, It is working fine for me now, thanks! -jukka On 17.3.2022 15.22, Petro Karashchenko wrote: Helo Jukka, I just want to confirm that you do not have any issues with the build on the latest mainline. Best regards, Petro пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen пише: Hi, With this pa

Re: Error when building custom board

2022-03-17 Thread Petro Karashchenko
Helo Jukka, I just want to confirm that you do not have any issues with the build on the latest mainline. Best regards, Petro пт, 11 бер. 2022 р. о 08:12 Jukka Laitinen пише: > Hi, > > With this patch, all my targets fail with: > > Makefile:23: board/Make.defs: No such file or directory > make

Re: Error when building custom board

2022-03-16 Thread fft
Hi Petro, I tried rename Make.defs to Makefile and append the include $(TOPDIR)/boards/Board.mk at the end of file, the build of my custom board works well. thanks very much for your help, may your country defeat the invaders soon. Best regards, Zou -- Original -

Re: Error when building custom board

2022-03-16 Thread Petro Karashchenko
)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board) > > > Is it correct or not? > > > Best regards, > Zou > > > ------ Original -- > From:  "petro.karashchenko" Date:  Sun, Mar 13, 2022 01:14 AM > To:  "

Re: Error when building custom board

2022-03-12 Thread fft
Hello Petro, Thanks for your help, i didn't use board common code,and my custom board defconfig had not enable BOARD_STM32_COMMON config ,but when i tried add CONFIG_ARCH_BOARD_COMMON=y to my custom board defconfig according to your suggestion, the compile did succeed. Besides, I found that if

Re: Error when building custom board

2022-03-12 Thread Petro Karashchenko
RCH_CHIP_STM32F405RG=y > > > How should I modify the configuration to adapt to pull #5712 ? > > > > Best regards, > Zou > > > -- Original -- > From:  "petro.karashchenko" Date:  Fri, Mar 11, 2022 10:41 PM > To:  "

Re: Error when building custom board

2022-03-12 Thread fft
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 targe

Re: Error when building custom board

2022-03-11 Thread Petro Karashchenko
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_SY

Re: Error when building custom board

2022-03-11 Thread Petro Karashchenko
Hello Jukka, I'm still in the middle of building a docker image for your project. Currently with slow internet it takes a while. But what I see from the error that you report is that probably you applied https://github.com/apache/incubator-nuttx/pull/5712 while having https://github.com/apache/in

Re: Error when building custom board

2022-03-10 Thread Jukka Laitinen
Hi, With this patch, all my targets fail with: Makefile:23: board/Make.defs: No such file or directory make[3]: *** No rule to make target 'board/Make.defs'.  Stop. Should I add some new CONFIGs? Sorry but I don't have much time today to debug this further -Jukka On 10.3.2022 21.00, Petro

Re: Error when building custom board

2022-03-10 Thread Petro Karashchenko
Hello Jukka, I would like to ask you to try an alternative PR https://github.com/apache/incubator-nuttx/pull/5712 and feedback if it works for you. Best regards, Petro чт, 10 бер. 2022 р. о 07:24 Jukka Laitinen пише: > > Hi, > > This fixes the build for me, I just leave the > CONFIG_BOARD_CUSTO

Re: Error when building custom board

2022-03-09 Thread Jukka Laitinen
Hi, This fixes the build for me, I just leave the CONFIG_BOARD_CUSTOM_ARCH_BOARD_COMMON undefined. Thanks, Jukka On 9.3.2022 19.22, Petro Karashchenko wrote: Hello Jukka, I was able to localize the root cause of the issue. I've created https://github.com/apache/incubator-nuttx/pull/5705 to

Re: Error when building custom board

2022-03-09 Thread Petro Karashchenko
Hello Jukka, I was able to localize the root cause of the issue. I've created https://github.com/apache/incubator-nuttx/pull/5705 to recover things and added a separate option that should be explicitly enabled to re-use a board-level common code by custom boards users. Please try this change and

Re: Error when building custom board

2022-03-03 Thread Daniel Pereira Carvalho
Hi Petro, I forgot to mention that I need to enable BOARD_CUSTOM_LEDS, sorry about that. Now I was able to build without errors keeping src/Make.defs untouched. Thanks everybody Daniel Pereira de Carvalho Em qui., 3 de mar. de 2022 às 09:20, Petro Karashchenko < petro.karashche...@gmail.com>

Re: Error when building custom board

2022-03-03 Thread Jukka Laitinen
Hi, sorry but I am away from computer atm. In the project there is "packaging" subdirectory, it contains some docker env, which is also used in TII's CI - Jukka Petro Karashchenko kirjoitti torstai 3. maaliskuuta 2022: > Hello Jukka, > > Do you have any steps on how to build or download a dock

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hello Jukka, Do you have any steps on how to build or download a docker image that can be used to build that project? It takes me too much time to get build running. Best regards, Petro чт, 3 бер. 2022 р. о 12:43 Jukka Laitinen пише: > > And also note that the commit I mentioned is already reve

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hi, "I think in the current situation the symlink is created unconditionally." -- yes. If the in-tree board has a common folder the symlink points unconditionally to that location. Introducing "CONFIG_ARCH_BOARD_COMMON" may be a good option here, so the user can explicitly specify to create a sym

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> The case is only about creating a proper symlink. I think in the current situation the symlink is created unconditionally. > Abdelatif, I would really appreciate it if you can write and send me some small proposal at what level the option should exist. What I was referring to is similar to opt

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
The case is only about creating a proper symlink. "Again, the issue is to not use the common folder at all." -- agin, that is possible. Each "board/common" has options like "BOARD_STM32_COMMON" or "BOARD_SAMV7_COMMON" and that is exactly to or not to use in-tree "board/common". What other option do

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> Compilation failed, but not because of a common folder but because: Again, the issue is to not use the common folder at all. This was requested before. What you did here is that you used the one in-tree. > I think this is a weak argument as we change config option names sometimes as users are

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hello Abdelatif, I just tried to recreate the same scenario. To do this I did: 1. Recreated folder structure as in Daniel's case |-> apps |-> my-folder |-> my-boards |-> custom-board |-> nuttx 2. Copied nucleo-g431kb to custom-board: cd my-folder/my-boards && cp -r ../../nuttx/boards

Re: Error when building custom board

2022-03-03 Thread Jukka Laitinen
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 :) Jukka Laitinen kirjoitti torstai 3. maaliskuuta 2022: > Hi, sorry about that; you can just remove that submodule, it is not needed to > re-produce the

Re: Error when building custom board

2022-03-03 Thread Jukka Laitinen
Hi, sorry about that; you can just remove that submodule, it is not needed to re-produce the issue. - Jukka Petro Karashchenko kirjoitti torstai 3. maaliskuuta 2022: > Hi Jukka, > > I tried to replicate your case, but failed with: > $ git submodule update --init --recursive > Cloning into > '/

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hi Jukka, I tried to replicate your case, but failed with: $ git submodule update --init --recursive Cloning into '/home/pkarashchenko/workspace/px4-firmware/boards/ssrc/saluki-v1'... ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> If what you are writing is true, then compilation for any board that > does not have a "common" folder at board level should fail. No because in-tree this line: BOARD_COMMON_DIR = $(wildcard $(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)common) will result on an

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hi, There is no problem with that. We just need to copy source files from NuttX board common to custom board location and add files to compilation list together with disabling of NuttX board common layer (set CONFIG_BOARD_STM32_COMMON=n for example with STM32 case). Or maybe I'm missing the exact

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
If what you are writing is true, then compilation for any board that does not have a "common" folder at board level should fail. And there are plenty of boards in NuttX tree that compile without an error (CI on mainline pass without any problems). I'm not saying that "BOARD_COMMON_DIR" will not hav

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> I think with NuttX 10.2.0 you do not need to perform the next steps any more. These are necessary when someone is using a custom board without a common folder copied from a board in-tree that contains a common folder. On Thu, Mar 3, 2022 at 11:31 AM Abdelatif Guettouche wrote: > > > "Which is

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> "Which is forcing a common directory when there isn't one. " -- This > statement is not true as we have > https://github.com/apache/incubator-nuttx/blob/b953296de73ac75bb380a609f9f30e9fe34e7622/tools/Unix.mk#L272-L277 > that depends on if "BOARD_COMMON_DIR" exists or not. Unix.mk includes $(TOPD

Re: Error when building custom board

2022-03-03 Thread Petro Karashchenko
Hello Abdelatif, "Which is forcing a common directory when there isn't one. " -- This statement is not true as we have https://github.com/apache/incubator-nuttx/blob/b953296de73ac75bb380a609f9f30e9fe34e7622/tools/Unix.mk#L272-L277 that depends on if "BOARD_COMMON_DIR" exists or not. Getting back

Re: Error when building custom board

2022-03-03 Thread Abdelatif Guettouche
> It seems like Daniel is hitting the same issue Daniel is actually not using the common folder from the STM32 directory. This is why he had to do that renaming. The issue is this: https://github.com/apache/incubator-nuttx/blob/master/tools/Config.mk#L154-L156 Which is forcing a common directory

Re: Error when building custom board

2022-03-03 Thread Jukka Laitinen
Hi, Maybe I was jumping in to conclusion and the issue is not the same as what I had. I was building PX4, which uses CMake build system, so I am not having any Makefile or Make.defs in my own board directory. Also the platform is not stm or arm, but risc-v. Anyhow, this is the error which I

Re: Error when building custom board

2022-03-02 Thread Petro Karashchenko
Hello Jukka, So you experience the same problem as Daniel and reverting the commit helps? Before f77956a227f1db6ecb44eda3814e7b02aa2187a6 there was no way to reuse common code from "nuttx/board/...". I'm using a custom board based on SAME70 and after https://github.com/apache/incubator-nuttx/pull

Re: Error when building custom board

2022-03-02 Thread Jukka Laitinen
HI, Not sure what is the correct way to fix this, but I reverted: " commit f77956a227f1db6ecb44eda3814e7b02aa2187a6 Author: Petro Karashchenko Date:   Wed Jan 19 11:16:11 2022 +0200     tools: add option to reuse boards common files for custom boards     Signed-off-by: Petro Karashchenko "

Re: Error when building custom board

2022-03-02 Thread Abdelatif Guettouche
Please check the common/Make.defs file in-tree of the board you based your custom board on. There is a new variable introduced. (Sorry, writing from my phone. I'll try to send a direct link later.) On Thu, Mar 3, 2022, 07:10 Petro Karashchenko wrote: > Hi, > > Do you want to use board common cod

Re: Error when building custom board

2022-03-02 Thread Petro Karashchenko
Hi, Do you want to use board common code? There where some code tree restructurings to eliminate code duplication. There is an option to enable/disable common code in menu config. Please try to use it and feedback if it helps you. Best regards, Petro On Thu, Mar 3, 2022, 12:06 AM Daniel Pereira