Error in Adding a New Board Configuration

131 views
Skip to first unread message

Ivan Braga

unread,
Sep 23, 2019, 11:32:22 PM9/23/19
to NuttX

Just a little history.

About 3 years ago I bought this board, https://www.waveshare.com/product/mcu-tools/stm32/open/open429i-c-package-b.htm, to serve as the basis for some more elaborate testing with Nuttx.

More as usual, the lack of time made me forget about her along with others that we always buy and set aside.


That said, let's get down to business.


I copied the nuttx/boards/arm/stm32/stm32f429i-disco folder, pasted it, and named it nuttx/boards/arm/stm32/open4209i.


I changed nuttx/boards/arm/stm32/open4209i/src/stm32f429i-disco.h to nuttx/boards/arm/stm32/open4209i/src/open429i.h.


All references to “stm32f429i-disco” in the files within the folder “nuttx/boards/arm/stm32/open4209i” have been changed.


In /nuttx/boards/Kconfig:


================================================== ======


config ARCH_BOARD_OLIMEXINO_STM32

bool "Olimexino STM32 board"

depends on ARCH_CHIP_STM32F103RB

select ARCH_HAVE_LEDS

select ARCH_HAVE_BUTTONS

select ARCH_HAVE_IRQBUTTONS

--- help ---

This port uses the Olimexino STM32 board and the GNU arm-nuttx-elf

toolchain under Linux or Cygwin. See the http://www.olimex.com for

further information. This board features the STMicro STM32F103RBT6 MCU.

Contributed by David Sidrane.


config ARCH_BOARD_OPEN429I

bool "Wave Share Open429I"

depends on ARCH_CHIP_STM32F429II

select ARCH_HAVE_LEDS

select ARCH_HAVE_BUTTONS

select ARCH_HAVE_IRQBUTTONS

--- help ---

This port uses the Wave Share Open429I_C board. See the

https://www.waveshare.com/product/mcu-tools/stm32/open/open429i-c-package-b.htm

for further information. This board features the MCU STM32F429IIT

replacing the STM32F429IGT6.


config ARCH_BOARD_OPEN1788

bool "Wave Share Open1788"

depends on ARCH_CHIP_LPC1788

select ARCH_HAVE_LEDS

select ARCH_HAVE_BUTTONS

select ARCH_HAVE_IRQBUTTONS

--- help ---

This port uses the Wave Share Open1788 board. See the

http://wvshare.com/product/Open1788-Standard.htm for further

information. This board features the NXP LPC1788 MCU

…………………………………………………… ..


default "omnibusf4" if ARCH_BOARD_OMNIBUSF4

default "open429i" if ARCH_BOARD_OPEN429I

default "open1788" if ARCH_BOARD_OPEN1788


…………………………………………………….


if ARCH_BOARD_OMNIBUSF4

source "boards/arm/stm32/omnibusf4/Kconfig"

endif

if ARCH_BOARD_OPEN429I

source "boards/arm/stm32/open429i/Kconfig"

endif

if ARCH_BOARD_PHOTON

source "boards/arm/stm32/photon/Kconfig"

endif



Command:

ilb@ilb-pc:~/nuttx_code/nuttx$ make distclean
Create .version
make[1]: Entering directory '/home/ilb/nuttx_code/nuttx/sched'
make[1]: Leaving directory '/home/ilb/nuttx_code/nuttx/sched'
make[1]: Entering directory '/home/ilb/nuttx_code/nuttx/drivers'
make[1]: Leaving directory '/home/ilb/nuttx_code/nuttx/drivers'
make[1]: Entering directory '/home/ilb/nuttx_code/nuttx/boards'
make[1]: Leaving directory '/home/ilb/nuttx_code/nuttx/boards'
make[1]: Entering directory '/home/ilb/nuttx_code/nuttx/arch/arm/src'
make[1]: Leaving directory '/home/ilb/nuttx_code/nuttx/arch/arm/src'
make[1]: Entering directory '/home/ilb/nuttx_code/apps'
make[2]: Entering directory '/home/ilb/nuttx_code/apps/examples'
.........


-----------------------------------------------------------------------

(Everything is OK)



Command:

ilb@ilb-pc:~/nuttx_code/nuttx$ ./tools/configure.sh open429i:nsh
  Detected arm Architecture
  Detected stm32 Chip
  Copy files
  Refreshing...

-----------------------------------------------------------------------

(Everything is OK)



Command:

ilb@ilb-pc:~/nuttx_code/nuttx$ make menuconfig
Create .version
LN: include/arch/board to /home/ilb/nuttx_code/nuttx///include
LN: include/arch/chip to arch/arm/include/stm32
LN: arch/arm/src/board to /home/ilb/nuttx_code/nuttx///src
No directory at /home/ilb/nuttx_code/nuttx///src
tools/Makefile.unix:367: recipe for target 'arch/arm/src/board' failed
make: *** [arch/arm/src/board] Error 1


-----------------------------------------------------------------------


The highlight is “nuttx///include”, makes me believe the path is not found “///“.


Any suggestions for this problem is welcome.



TKS



Ivan

Ivan Braga

unread,
Sep 23, 2019, 11:45:24 PM9/23/19
to NuttX
A typo above occurred, "nuttx/boards/arm/stm32/open4209i/src/stm32f429i-disco.h to nuttx/boards/arm/stm32/open4209i/src/open429i.h".

More yes, nuttx/boards/arm/stm32/stm32f429i-disk/src/stm32f429i-disco.h to nuttx/boards/arm/stm32/open4209i/src/open429i.h.

Taking advantage, follows copy of nuttx/boards/Kconfig




Kconfig

Alan Carvalho de Assis

unread,
Sep 27, 2019, 5:38:54 AM9/27/19
to nu...@googlegroups.com
Hi Ivan,

You started the process correctly: you copied a similar board to other name and started renaming it.

Probably you missed changing some stm32f429i* to open429i. Or the CONFIG_NEW_BOARD_NAME has some typo in some places.

Try to Review all the files inside your board.

BR,

Alan
> --
> You received this message because you are subscribed to the Google Groups "NuttX" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nuttx/cb4656ac-bc1a-468b-aa07-1687834d653d%40googlegroups.com.
>

Ivan Braga

unread,
Sep 27, 2019, 4:51:33 PM9/27/19
to NuttX
Hi Alan.
Thanks for the feedback.
I believe I have changed all (stm32f429i * to open429i). I am more likely to believe that it is CONFIG_NEW_BOARD_NAME has some typo in some places.
Attached is a zip as my configuration.
My Kconfig inside / boards, and the open429i folder inside / boards / arm / stm32.
If you or anyone can check, I appreciate it.

Ivan
open429i_board_nuttx.zip

Alan Carvalho de Assis

unread,
Sep 27, 2019, 7:08:25 PM9/27/19
to nu...@googlegroups.com
Hi Ivan,

I fixed it and got the nuttx.bin generated correctly:

make[2]: Entering directory '/opt/NuttX/nuttx/boards/arm/stm32/open429i/src'
CC: stm32_boot.c
CC: stm32_bringup.c
CC: stm32_spi.c
CC: stm32_autoleds.c
CC: stm32_buttons.c
CC: stm32_extmem.c
CC: stm32_lcd.c
AR: stm32_boot.o stm32_bringup.o stm32_spi.o stm32_autoleds.o
stm32_buttons.o stm32_extmem.o stm32_lcd.o
make[2]: Leaving directory '/opt/NuttX/nuttx/boards/arm/stm32/open429i/src'
LD: nuttx
make[1]: Leaving directory '/opt/NuttX/nuttx/arch/arm/src'
CP: nuttx.hex
CP: nuttx.bin
alan@dev:/opt/NuttX/nuttx$ ls -l nuttx.bin
-rwxr-xr-x 1 alan alan 104092 set 27 20:01 nuttx.bin


As you can see the firmware is too big. It is happening because you
didn't remove the features from stm32f429i-disco board (LCD, etc).

Try to figure-out what you did incorrectly, it will help to learn how
things work. In fact porting NuttX for some board similar to existent
board is really easy. In less then 10 minutes you get it done.

Also as learning exercise, please remove all not used stm32f429i-disco
features from this Waveshare Open429i board and submit a patch to
NuttX mainline. It could be useful case other people decide to test
NuttX on this same board.

BR,

Alan
> --
> You received this message because you are subscribed to the Google Groups
> "NuttX" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nuttx+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nuttx/a4d82724-60be-4b1c-97b8-5abf51fe445b%40googlegroups.com.
>
0001-Add-board-support-to-Waveshare-Open429I.patch

Gregory Nutt

unread,
Sep 28, 2019, 9:12:34 AM9/28/19
to nu...@googlegroups.com

> Also as learning exercise, please remove all not used stm32f429i-disco
> features from this Waveshare Open429i board and submit a patch to
> NuttX mainline. It could be useful case other people decide to test
> NuttX on this same board.

Any patches coming to the mainline must be 100% clean and perfect.  Take
your time do it right:

- Remove all unverified configurations.  I only want fully tested
configurations in the NuttX repositories.

- Don't drag in any unused, garbage files from the
stm32f429i-discovery.  Every file must be used and verified.  You can
bring in other files (or configurations) later after they have been
verified.

- Make sure that the board.h header file does NOT include any stm32
files (see commit, I fixed that yesterday for the stm32f429i-discovery.

- Make sure that the code follows the NuttX coding style complete.  Run
the tools at tools/nxstyle.c to assure that every .c and .h file
conforms to the coding style.

Then, if you like I can consider a patch.


Reply all
Reply to author
Forward
0 new messages