From 8ae0c3de142b0473677623151354c0a80da8dfc9 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Mon, 29 Apr 2019 13:36:34 +0200 Subject: [PATCH] stm32f7: Add documentation for STM32F7-nucleo As support is "experimental", so far it's an annex of SMT32F4. Note for later, once support has been validated for all modules it would make sense to move contents to specific file for STM32F7. Relate-to: https://github.com/rzr/webthing-iotjs/issues/3 Change-Id: I22f6552b00b86444986c4d5c652f15ff73509b90 Signed-off-by: Philippe Coval --- docs/build/Build-for-STM32F4-NuttX.md | 99 +++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/docs/build/Build-for-STM32F4-NuttX.md b/docs/build/Build-for-STM32F4-NuttX.md index ed168458c3..f7d6ae088d 100644 --- a/docs/build/Build-for-STM32F4-NuttX.md +++ b/docs/build/Build-for-STM32F4-NuttX.md @@ -294,3 +294,102 @@ If you see +-----------------------------+ ``` and it stays on the screen, something is wrong. Blue LED may blink if NuttX is in abnormal state. Press black(reset) button on the board and try again. If you still see this warning message, begin with original NuttX code and check your board, USB line and other softwares. + + +## EXTRA STM32 SUPPORT + +While STM32F4-Discovery is the reference target, +IoT.js can be built for other based STM32 boards: + +* [Nucleo-F767zi](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) + +The procedure is similar to STM32F4, so only specific info will be explained in following chapters: + +## NUCLEO-F767ZI + +### 1. Prepare for prerequisite + +See general instructions for STM32F4 in related chapter. + +### 2. Set up the build environment for STM32F7-Nucleo board + +#### Supported Nuttx version for NUCLEO-F767ZI + +Since development is still in progress, master branch of NuttX will be used +until a version is released with relevent STM32F7 support. + +#### Clone repository for NUCLEO-F767ZI + +Clone IoT.js and NuttX into iotjs-nuttx directory: + +```bash +$ mkdir iotjs-nuttx +$ cd iotjs-nuttx +$ git clone https://github.com/pando-project/iotjs.git +$ git clone https://bitbucket.org/nuttx/nuttx.git --branch master +$ git clone https://bitbucket.org/nuttx/apps.git --branch master +``` +### 3. Build NuttX (For the first time) for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter. + +#### Add IoT.js as a builtin application for NuttX for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter. + +##### Configure NuttX for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter. but instead of configuring for discovery in STM32F4: + +```bash +$ ./configure.sh stm32f4discovery/usbnsh +``` + +Nucleo-144 board configuration will be needed with STM32F7 MCU (with Network Controller support): + +```bash +$ ./configure.sh nucleo-144/f767-netnsh +``` + +Now you can configure nuttx like either of below. For convenience, we provide built-in configure file for you. (This configure file is equipped with modules specified as `always`. For `optional` modules, you might follow instructions below.) +```bash +$ cd .. +$ cp ../iotjs/config/nuttx/stm32f7nucleo/config.default .config +``` + +### 4. Build IoT.js for NuttX for NUCLEO-F767ZI + + +These options are needed. +```bash +--target-arch=arm +--target-os=nuttx +--nuttx-home=/path/to/nuttx +--target-board=stm32f7nucleo +--jerry-heaplimit=[..] +``` + +For example, +```bash +$ ./tools/build.py \ +--target-arch=arm --target-os=nuttx --nuttx-home=../nuttx \ +--target-board=stm32f7nucleo --jerry-heaplimit=78 +``` +Library files will be generated like below when build is successful, at least expect to find: + +```bash +$ ls build/arm-nuttx/*/lib +libhttpparser.a libiotjs.a libjerrycore.a libtuv.a +``` + +### 5. Build NuttX for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter. + +### 6. Flashing for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter. + +### 7. Run IoT.js for NUCLEO-F767ZI + +See general instructions for STM32F4 in related chapter.