Hello, So, I have set up my workspace now, and I have NuttX running properly on my custom board. I have another question though, regarding how to set things up for development.
Usually I have at least 2 build configurations: one for debugging, one for releases etc. Debug builds have assertions enabled, optimizations disabled, various checks enabled etc etc, while release builds the do the opposite. How is this best to be handled by NuttX? Should I have various configuration files to load each time, or is there a better way? Στις Τετ, 15 Ιουλ 2020 στις 12:51 π.μ., ο/η Abdelatif Guettouche < abdelatif.guettou...@gmail.com> έγραψε: > > Then I tried: > > cd nuttx > > ./tools/configure.sh ../boards/stm32f4discovery:nsh > > This does not work with out-of-tree boards, you need the path to the board. > > > In other words, it looks like it expects a different structure for > > externally defined boards, than the provided ones. Correct? > > It doesn't expect a different structure but it doesn't support all the > structures of in-tree boards. > With an external custom board the Make.defs file needs to be located > at the same level as the defconfig. > Example: > ls ../boards/custom_board/nsh > defconfig > Make.defs > > You also need to set the CUSTOM* configs as said earlier. > > > On Tue, Jul 14, 2020 at 10:17 PM Fotis Panagiotopoulos > <f.j.pa...@gmail.com> wrote: > > > > Hi, > > > > I am trying to configure NuttX with an external board, following your > > advice, but I just can't make it work... > > > > My current workspace structure is the following: > > ├── apps > > ├── boards > > ├── Makefile > > └── nuttx > > > > I copied the directory ${TOPDIR}/nuttx/boards/arm/stm32/stm32f4discovery > > into ${TOPDIR}/boards/stm32f4discovery, to use it as an example. > > > > Then I tried: > > cd nuttx > > ./tools/configure.sh ../boards/stm32f4discovery:nsh > > But it fails with: > > Directory for ../boards/stm32f4discovery:nsh does not exist. > > Options are: ... > > > > I then tried: > > cd nuttx > > ./tools/configure.sh ../boards/stm32f4discovery/configs/nsh > > But again: > > File Make.defs could not be found > > > > I started looking into the code of configure.sh script. > > As I see, when it detects that an external board configuration is to be > > used, it does: > > configpath=${TOPDIR}/${boardconfig} > > and generally it uses the dir ${TOPDIR}/${boardconfig}, assuming that > every > > needed file will be in this specific directory. > > > > In other words, it looks like it expects a different structure for > > externally defined boards, than the provided ones. Correct? > > > > > > Στις Τρί, 14 Ιουλ 2020 στις 6:42 μ.μ., ο/η Gregory Nutt < > spudan...@gmail.com> > > έγραψε: > > > > > > > > > When not yet creating a custom board, I simply copy the config file > and > > > put it somewhere inside the workspace. If you eventually create a > custom > > > board, you can then place it in the proper directory > > > (board/configs/*/defconfig). Doing it this way also allows you to > configure > > > nuttx with my framework using the "make configure" command. > > > > > > configure.sh works with board directories that are outside of the > source > > > tree as well. You never have to put a custom board configuration in > the > > > repository's boards/ sub-directory. Instead of > > > > > > tools/configure.sh <board>:<config> > > > > > > Use > > > > > > tools/configures.sh <path to the custom board defconfig directory> > > > > > > >