My current project use STM32F407VET6 as the main processor.
And now my project need to install Nuttx to our board.
There are some difficulties that I met during the installation, I recorded all the problems occurred until the NuttShell worked on our own board.
Firstly we need a tool chain to compile the Nuttx. We can use mingw or cygwin on Windows or directly gcc on Linux.
While installing cygwin cost me lots of time, I choose ubuntu14.04 as my work environment.
The method can be found in the link :http://blog.csdn.net/xiaoxiaozhu5/article/details/51598220
While the Nuttx default support board doesn't has STM32F407VET6, I chose the stm32f4discovery as the target board, whose main processor is STM32F407VGT6. But when I download the bin file into by own board, it faild.
So we need to add our own board. The method will be shown as follow:
The folder name of our board: seerdioboard
chip: ARCH_CHIP_STM32F407VE
board: ARCH_BOARD_SEERDIOBOARD
path: configs/seerdioboard/Kconfig
The documentation of Nuttx tells how to add users own board to the config, the link is:
http://nuttx.org/doku.php?id=documentation:portingguide
However, there is still something that one need to notice:
1.Add the blue contents followed to configs/Kconfig line:1145.
config ARCH_BOARD_SEERDIOBOARD
bool "Seer DIO board"
depends on ARCH_CHIP_STM32F407VE
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help---
STMicro STM32F4-Discovery board based on the STMicro STM32F407VET6 MCU.
remember that "ARCH_BOARD_SEERDIOBOARD" is the board name that mentioned above.
"ARCH_CHIP_STM32F407VE" should be the chip you use, and the config in /configs/seerdioboard/nsh/Kconfig should also add this chip.
2.Add the blue contents followed to configs/Kconfig line: 1680.
default "seerdioboard" if ARCH_BOARD_SEERDIOBOARD
"seerdioboard" should be the same as the folder name of our board.
"ARCH_BOARD_SEERDIOBOARD" is the board name.
3. Add to configs/Kconfig line 2139:
if ARCH_BOARD_SEERDIOBOARD
source "configs/seerdioboard/Kconfig"
endif
All the macros should also be matched.
These three changes are for nuttx/configs/Kconfig.
Then we need to modify the nuttx/configs/seerdioboard/nsh, the whole folder called "seerdioboard" is copied from "stm32f4discovery".
CONFIG_ARCH_BOARD_SEERDIOBOARD=y
CONFIG_ARCH_BOARD="seerdioboard"
CONFIG_ARCH_CHIP_STM32F407VE=y
Mainly for these 3 changes. Then can we config, make oldconfig, and then make menuconfig.