Add your own board to Nuttx configuration

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.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值