| <!-- |
| Documentation/_templates/layout.html |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. The |
| ASF licenses this file to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance with the |
| License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| License for the specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| |
| |
| <!DOCTYPE html> |
| <html class="writer-html5" lang="en"> |
| <head> |
| <meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" /> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title>ST STM32F4 — NuttX latest documentation</title> |
| <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" /> |
| <link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css" /> |
| <link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css" /> |
| <link rel="stylesheet" type="text/css" href="../../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css" /> |
| <link rel="stylesheet" type="text/css" href="../../../_static/custom.css" /> |
| |
| |
| <link rel="shortcut icon" href="../../../_static/favicon.ico"/> |
| <script src="../../../_static/jquery.js"></script> |
| <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script> |
| <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script> |
| <script src="../../../_static/doctools.js"></script> |
| <script src="../../../_static/sphinx_highlight.js"></script> |
| <script src="../../../_static/clipboard.min.js"></script> |
| <script src="../../../_static/copybutton.js"></script> |
| <script src="../../../_static/design-tabs.js"></script> |
| <script src="../../../_static/js/theme.js"></script> |
| <link rel="index" title="Index" href="../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../search.html" /> |
| <link rel="next" title="Axoloti" href="boards/axoloti/index.html" /> |
| <link rel="prev" title="STM32F3Discovery" href="../stm32f3/boards/stm32f3discovery/index.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| <div class="wy-grid-for-nav"> |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| <a href="../../../index.html" class="icon icon-home"> NuttX |
| |
| |
| |
| </a> |
| |
| <!-- this version selector is quite ugly, should be probably replaced by something |
| more modern --> |
| |
| <div class="version-selector"> |
| <select onchange="javascript:location.href = this.value;"> |
| |
| <option value="../../../../latest" selected="selected">latest</option> |
| |
| <option value="../../../../10.0.0" >10.0.0</option> |
| |
| <option value="../../../../10.0.1" >10.0.1</option> |
| |
| <option value="../../../../10.1.0" >10.1.0</option> |
| |
| <option value="../../../../10.2.0" >10.2.0</option> |
| |
| <option value="../../../../10.3.0" >10.3.0</option> |
| |
| <option value="../../../../11.0.0" >11.0.0</option> |
| |
| <option value="../../../../12.0.0" >12.0.0</option> |
| |
| <option value="../../../../12.1.0" >12.1.0</option> |
| |
| <option value="../../../../12.2.0" >12.2.0</option> |
| |
| <option value="../../../../12.2.1" >12.2.1</option> |
| |
| <option value="../../../../12.3.0" >12.3.0</option> |
| |
| <option value="../../../../12.4.0" >12.4.0</option> |
| |
| <option value="../../../../12.5.0" >12.5.0</option> |
| |
| <option value="../../../../12.5.1" >12.5.1</option> |
| |
| <option value="../../../../12.6.0" >12.6.0</option> |
| |
| <option value="../../../../12.7.0" >12.7.0</option> |
| |
| <option value="../../../../12.8.0" >12.8.0</option> |
| |
| <option value="../../../../12.9.0" >12.9.0</option> |
| |
| <option value="../../../../12.10.0" >12.10.0</option> |
| |
| <option value="../../../../12.11.0" >12.11.0</option> |
| |
| </select> |
| </div> |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> |
| <p class="caption" role="heading"><span class="caption-text">Table of Contents</span></p> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../../index.html">Home</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../introduction/index.html">Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../quickstart/index.html">Getting Started</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../contributing/index.html">Contributing</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../introduction/inviolables.html">The Inviolable Principles of NuttX</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Supported Platforms</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="../index.html">ARM</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="../a1x/index.html">Allwinner A10</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../am335x/index.html">TI/Sitara AM335x</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../at32/index.html">Artery AT32</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../bcm2708/index.html">Broadcom BCM2708 (removed)</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../c5471/index.html">TI TMS320-C5471</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../cxd56xx/index.html">Sony CXD56xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../dm320/index.html">TI TMS320-DM320</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../efm32/index.html">SiLabs EFM32</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../eoss3/index.html">EOSS3</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../fvp-v8r-aarch32/index.html">FVP ARMv8-R Virt Chip</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../gd32f4/index.html">GD32F4</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../goldfish/goldfish_timer.html">GOLDFISH TIMER</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../goldfish/index.html">GOLDFISH</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../imx1/index.html">NXP/Freescale i.MX1</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../imx6/index.html">NXP/Freescale i.MX6</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../imx9/index.html">NXP i.MX9</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../imxrt/index.html">NXP i.MX RT</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../kinetis/index.html">NXP/FreeScale Kinetis</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../kl/index.html">NXP/FreeScale KLxx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lc823450/index.html">ON Semiconductor LC823450</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc17xx/index.html">NXP LPC17xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc214x/index.html">NXP LPC214x</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc2378/index.html">NXP LPC2378</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc31xx/index.html">NXP LPC31xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc40xx/index.html">NXP LPC40xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc43xx/index.html">NXP LPC43xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../lpc54xx/index.html">NXP LPC54xx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../max326xx/index.html">Maxim Integrated MAX32660</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../moxart/index.html">Moxa NP51x0</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../mps/index.html">MPS</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../nrf52/ieee802154.html">Nordic nRF52 IEEE 802.15.4</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../nrf52/index.html">Nordic nRF52</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../nrf53/index.html">Nordic nRF53</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../nrf91/index.html">Nordic nRF91</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../nuc1xx/index.html">nuvoTon NUC120</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../phy62xx/index.html">PHY+ PHY62</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../qemu/index.html">QEMU</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../ra4m1/index.html">Renesas RA4M1</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../rp2040/index.html">RaspberryPi rp2040</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../rp23xx/index.html">RaspberryPi rp2350</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../s32k1xx/index.html">NXP S32K1XX</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../s32k3xx/index.html">NXP S32K3XX</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../sam34/index.html">Microchip SAM34</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../sama5/index.html">Microchip SAMA5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../samd2l2/index.html">Microchip SAMD2x</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../samd5e5/index.html">Microchip samd5e5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../samv7/index.html">Microchip SAM V7</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32c0/index.html">ST STM32C0</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32f0/index.html">ST STM32F0</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32f1/index.html">ST STM32F1</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32f2/index.html">ST STM32F2</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32f3/index.html">ST STM32F3</a></li> |
| <li class="toctree-l3 current"><a class="current reference internal" href="#">ST STM32F4</a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#supported-mcus">Supported MCUs</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#peripheral-support">Peripheral Support</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="#memory">Memory</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#clock">Clock</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#timer">TIMER</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#jtag">JTAG</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#usart">USART</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#can">CAN</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#spi">SPI</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#sdio">SDIO</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#usb">USB</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#ltdc-hardware-acceleration">LTDC hardware acceleration</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#dma2d-hardware-acceleration">DMA2D hardware acceleration</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l4"><a class="reference internal" href="#fpu">FPU</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="#fpu-configuration-options">FPU Configuration Options</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l4"><a class="reference internal" href="#development-environment">Development Environment</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#gnu-toolchain-options">GNU Toolchain Options</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="#toolchain-configurations">Toolchain Configurations</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l4"><a class="reference internal" href="#ides">IDEs</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="#makefile-build">Makefile Build</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#native-build">Native Build</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l4"><a class="reference internal" href="#nuttx-eabi-buildroot-toolchain">NuttX EABI “buildroot” Toolchain</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#nxflat-toolchain">NXFLAT Toolchain</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#protected-mode-build">Protected Mode Build</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#flashing-and-debugging">Flashing and Debugging</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#supported-boards">Supported Boards</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="boards/axoloti/index.html">Axoloti</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/clicker2-stm32/index.html">Mikroe Clicker2 STM32</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/mikroe-stm32f4/index.html">mikroe-stm32f4</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f401re/index.html">ST Nucleo F401RE</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f410rb/index.html">ST Nucleo F410RB</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f411re/index.html">ST Nucleo F411RE</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f412zg/index.html">ST Nucleo F412ZG</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f429zi/index.html">ST Nucleo F429ZI</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/nucleo-f446re/index.html">ST Nucleo F446RE</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/odrive36/index.html">ODrive V3.6</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/olimex-stm32-e407/index.html">Olimex STM32-E407</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/olimex-stm32-h405/index.html">Olimex STM32-P207</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/olimex-stm32-h407/index.html">Olimex STM32-H407</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/olimex-stm32-p407/index.html">Olimex STM32-P207</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/omnibusf4/index.html">OMNIBUSF4</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm3240g-eval/index.html">ST STM3240G-EVAL</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm32f401rc-rs485/index.html">stm32f401rc-rs485</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm32f411-minimum/index.html">stm32f411-minimum</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm32f411e-disco/index.html">ST STM32F411E-Discovery</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm32f429i-disco/index.html">ST STM32F429I-DISCO</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="boards/stm32f4discovery/index.html">ST STM32F4-Discovery</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32f7/index.html">ST STM32F7</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32g0/index.html">ST STM32G0</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32g4/index.html">ST STM32G4</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32h5/index.html">ST STM32H5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32h7/index.html">ST STM32H7</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32l0/index.html">ST STM32L0</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32l1/index.html">ST STM32L1</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32l4/index.html">ST STM32L4</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32l5/index.html">ST STM32L5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32u5/index.html">ST STM32U5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32wb/index.html">ST STM32WB</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../stm32wl5/index.html">ST STM32WL5</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../str71x/index.html">ST STR71</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../tiva/index.html">TI/Stellaris Tiva</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../tms570/index.html">TI/Hercules TMS570xxx</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../xmc4/index.html">Infineon XMC4000</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../../arm64/index.html">ARM64</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../avr/index.html">Microchip AVR</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../ceva/index.html">CEVA</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../hc/index.html">HC</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../mips/index.html">MIPS</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../misco/index.html">Misoc</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../or1k/index.html">OpenRISC</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../renesas/index.html">Renesas</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../risc-v/index.html">RISC-V</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../sim/index.html">Simulators</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../sim/network_linux.html">Network Support on Linux</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../sim/network_vpnkit.html">Network support with VPNKit</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../sparc/index.html">SPARC</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../tricore/index.html">TriCore</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../x86/index.html">Intel 80x86</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../x86_64/index.html">Intel 80x86_64</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../xtensa/index.html">Xtensa</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../z16/index.html">Z16</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../z80/index.html">Z80</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../components/index.html">OS Components</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../applications/index.html">Applications</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../implementation/index.html">Implementation Details</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../reference/index.html">API Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../faq/index.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../debugging/index.html">Debugging</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../guides/index.html">Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../glossary.html">Glossary</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../logos/index.html">NuttX Logos</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../_tags/tagsindex.html">Tags</a></li> |
| </ul> |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../index.html">NuttX</a> |
| </nav> |
| |
| <div class="wy-nav-content"> |
| <div class="rst-content"> |
| <div role="navigation" aria-label="Page navigation"> |
| <ul class="wy-breadcrumbs"> |
| <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> |
| <li class="breadcrumb-item"><a href="../../index.html">Supported Platforms</a></li> |
| <li class="breadcrumb-item"><a href="../index.html">ARM</a></li> |
| <li class="breadcrumb-item active">ST STM32F4</li> |
| <li class="wy-breadcrumbs-aside"> |
| <a href="https://github.com/apache/nuttx/blob/master/Documentation/platforms/arm/stm32f4/index.rst" class="fa fa-github"> Edit on GitHub</a> |
| </li> |
| </ul> |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <section id="st-stm32f4"> |
| <h1>ST STM32F4<a class="headerlink" href="#st-stm32f4" title="Permalink to this heading"></a></h1> |
| <section id="supported-mcus"> |
| <h2>Supported MCUs<a class="headerlink" href="#supported-mcus" title="Permalink to this heading"></a></h2> |
| <p>TODO</p> |
| </section> |
| <section id="peripheral-support"> |
| <h2>Peripheral Support<a class="headerlink" href="#peripheral-support" title="Permalink to this heading"></a></h2> |
| <p>The following list indicates peripherals supported in NuttX:</p> |
| <table class="docutils align-default"> |
| <thead> |
| <tr class="row-odd"><th class="head"><p>Peripheral</p></th> |
| <th class="head"><p>Support</p></th> |
| <th class="head"><p>Notes</p></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>FLASH</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>CRC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>PM</p></td> |
| <td><p>?</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>RCC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>GPIO</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>SYSCFG</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>DMA</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>DMA2D</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>EXTI</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>FMC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>QUADSPI</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>ADC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>DAC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>DCMI</p></td> |
| <td><p>No</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>LTDC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>DSI</p></td> |
| <td><p>No</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>RNG</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>CRYP</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>HASH</p></td> |
| <td><p>?</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>TIM</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>IWDG</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>WWDG</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>RTC</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>I2C</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>USART</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>SPI</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>I2S</p></td> |
| <td><p>?</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>SAI</p></td> |
| <td><p>No</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>SDIO</p></td> |
| <td><p>?</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>CAN</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>OTG_FS</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-odd"><td><p>OTG_HS</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| <tr class="row-even"><td><p>ETH</p></td> |
| <td><p>Yes</p></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <section id="memory"> |
| <h3>Memory<a class="headerlink" href="#memory" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case)</p></li> |
| <li><p>CONFIG_RAM_START - The start address of installed DRAM</p></li> |
| <li><p>CONFIG_STM32_CCMEXCLUDE - Exclude CCM SRAM from the HEAP</p></li> |
| <li><p>CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt |
| stack. If defined, this symbol is the size of the interrupt |
| stack in bytes. If not defined, the user task stacks will be |
| used during interrupt handling.</p></li> |
| </ul> |
| </section> |
| <section id="clock"> |
| <h3>Clock<a class="headerlink" href="#clock" title="Permalink to this heading"></a></h3> |
| <ul> |
| <li><p>CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock |
| configuration features.:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n |
| </pre></div> |
| </div> |
| </li> |
| <li><p>CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation |
| of delay loops</p></li> |
| </ul> |
| </section> |
| <section id="timer"> |
| <h3>TIMER<a class="headerlink" href="#timer" title="Permalink to this heading"></a></h3> |
| <p>Timer devices may be used for different purposes. One special purpose is |
| to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn |
| is defined (as above) then the following may also be defined to indicate that |
| the timer is intended to be used for pulsed output modulation, ADC conversion, |
| or DAC conversion. Note that ADC/DAC require two definition: Not only do you have |
| to assign the timer (n) for used by the ADC or DAC, but then you also have to |
| configure which ADC or DAC (m) it is assigned to.</p> |
| <ul class="simple"> |
| <li><p>CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,14</p></li> |
| <li><p>CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,14</p></li> |
| <li><p>CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,14, m=1,..,3</p></li> |
| <li><p>CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,14</p></li> |
| <li><p>CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,14, m=1,..,2</p></li> |
| </ul> |
| <p>For each timer that is enabled for PWM usage, we need the following additional |
| configuration settings:</p> |
| <ul class="simple"> |
| <li><p>CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4}</p></li> |
| </ul> |
| <p>NOTE: The STM32 timers are each capable of generating different signals on |
| each of the four channels with different duty cycles. That capability is |
| not supported by this driver: Only one output channel per timer.</p> |
| </section> |
| <section id="jtag"> |
| <h3>JTAG<a class="headerlink" href="#jtag" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)</p></li> |
| <li><p>CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP) |
| but without JNTRST.</p></li> |
| <li><p>CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled</p></li> |
| </ul> |
| </section> |
| <section id="usart"> |
| <h3>USART<a class="headerlink" href="#usart" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART |
| m (m=4,5) for the console and ttys0 (default is the USART1).</p></li> |
| <li><p>CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. |
| This specific the size of the receive buffer</p></li> |
| <li><p>CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before |
| being sent. This specific the size of the transmit buffer</p></li> |
| <li><p>CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be</p></li> |
| <li><p>CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.</p></li> |
| <li><p>CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity</p></li> |
| <li><p>CONFIG_U[S]ARTn_2STOP - Two stop bits</p></li> |
| </ul> |
| </section> |
| <section id="can"> |
| <h3>CAN<a class="headerlink" href="#can" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or |
| CONFIG_STM32_CAN2 must also be defined)</p></li> |
| <li><p>CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default |
| Standard 11-bit IDs.</p></li> |
| <li><p>CONFIG_CAN_TXFIFOSIZE - The size of the circular tx buffer |
| of CAN messages. |
| Default: 8</p></li> |
| <li><p>CONFIG_CAN_RXFIFOSIZE - The size of the circular rx buffer |
| of CAN messages. |
| Default: 8</p></li> |
| <li><p>CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. |
| Default: 4</p></li> |
| <li><p>CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback |
| mode for testing. The STM32 CAN driver does support loopback mode.</p></li> |
| <li><p>CONFIG_STM32_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 |
| is defined.</p></li> |
| <li><p>CONFIG_STM32_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 |
| is defined.</p></li> |
| <li><p>CONFIG_STM32_CAN_TSEG1 - The number of CAN time quanta in segment 1. |
| Default: 6</p></li> |
| <li><p>CONFIG_STM32_CAN_TSEG2 - the number of CAN time quanta in segment 2. |
| Default: 7</p></li> |
| <li><p>CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an |
| dump of all CAN registers.</p></li> |
| </ul> |
| </section> |
| <section id="spi"> |
| <h3>SPI<a class="headerlink" href="#spi" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI |
| support. Non-interrupt-driven, poll-waiting is recommended if the |
| interrupt rate would be to high in the interrupt driven case.</p></li> |
| <li><p>CONFIG_STM32_SPIx_DMA - Use DMA to improve SPIx transfer performance. |
| Cannot be used with CONFIG_STM32_SPI_INTERRUPT.</p></li> |
| </ul> |
| </section> |
| <section id="sdio"> |
| <h3>SDIO<a class="headerlink" href="#sdio" title="Permalink to this heading"></a></h3> |
| <ul class="simple"> |
| <li><p>CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO and CONFIG_STM32_DMA2.</p></li> |
| <li><p>CONFIG_STM32_SDIO_PRI - Select SDIO interrupt priority. Default: 128</p></li> |
| <li><p>CONFIG_STM32_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. Default: Medium</p></li> |
| <li><p>CONFIG_STM32_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: |
| 4-bit transfer mode.</p></li> |
| </ul> |
| </section> |
| <section id="usb"> |
| <h3>USB<a class="headerlink" href="#usb" title="Permalink to this heading"></a></h3> |
| <p>STM32 USB OTG FS Host Driver Support</p> |
| <p>Pre-requisites:</p> |
| <ul class="simple"> |
| <li><p>CONFIG_USBHOST - Enable general USB host support</p></li> |
| <li><p>CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block</p></li> |
| <li><p>CONFIG_STM32_SYSCFG - Needed</p></li> |
| <li><p>CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words. |
| Default 128 (512 bytes)</p></li> |
| <li><p>CONFIG_STM32_OTGFS_NPTXFIFO_SIZE - Size of the non-periodic Tx FIFO |
| in 32-bit words. Default 96 (384 bytes)</p></li> |
| <li><p>CONFIG_STM32_OTGFS_PTXFIFO_SIZE - Size of the periodic Tx FIFO in 32-bit |
| words. Default 96 (384 bytes)</p></li> |
| <li><p>CONFIG_STM32_OTGFS_DESCSIZE - Maximum size of a descriptor. Default: 128</p></li> |
| <li><p>CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever |
| want to do that?</p></li> |
| <li><p>CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access |
| debug. Depends on CONFIG_DEBUG_FEATURES.</p></li> |
| <li><p>CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB |
| packets. Depends on CONFIG_DEBUG_FEATURES.</p></li> |
| </ul> |
| </section> |
| <section id="ltdc-hardware-acceleration"> |
| <h3>LTDC hardware acceleration<a class="headerlink" href="#ltdc-hardware-acceleration" title="Permalink to this heading"></a></h3> |
| <p>The LTDC driver provides two 2 LTDC overlays and supports the following hardware |
| acceleration and features:</p> |
| <p>Configured at build time:</p> |
| <ul class="simple"> |
| <li><p>background color</p></li> |
| <li><p>default color (outside visible screen)</p></li> |
| </ul> |
| <p>Configurable by nuttx framebuffer interface:</p> |
| <ul class="simple"> |
| <li><p>cmap support (color table is shared by both LTDC overlays and DMA2D when enabled)</p></li> |
| </ul> |
| <p>Configurable via the nuttx framebuffer interface (for each layer separately):</p> |
| <ul class="simple"> |
| <li><p>chromakey</p></li> |
| <li><p>transparency (const alpha and pixel alpha)</p></li> |
| <li><p>blank</p></li> |
| <li><p>color (if DMA2D is enabled and cmap is disabled)</p></li> |
| <li><p>blit (if DMA2D is enabled)</p></li> |
| <li><p>blend (if DMA2D is enabled and cmap is disabled)</p></li> |
| </ul> |
| <p>LTDC overlays are similar to a non-destructive overlay. Both LTDC overlays will |
| be permanently blended in the order (background -> overlay 0 -> overlay 1) and |
| converted to a resulting video signal by the LTDC controller. That means each |
| operation with a LTDC overlay (Overlay 0 and Overlay 1) via nuttx framebuffer |
| interface will be visible immediately. |
| Think about continuous blending between both overlays.</p> |
| </section> |
| <section id="dma2d-hardware-acceleration"> |
| <h3>DMA2D hardware acceleration<a class="headerlink" href="#dma2d-hardware-acceleration" title="Permalink to this heading"></a></h3> |
| <p>The DMA2D driver implements the following hardware acceleration:</p> |
| <p>Configurable via the nuttx framebuffer interface:</p> |
| <ul class="simple"> |
| <li><p>cmap support (color table is shared by all DMA2D overlays and LTDC overlays)</p></li> |
| </ul> |
| <p>Configurable via the nuttx framebuffer interface (for each layer separately):</p> |
| <ul class="simple"> |
| <li><p>color (fill memory region with a specific ARGB8888 color immediately), if |
| cmap is disabled</p></li> |
| <li><p>blit (copy memory region to another memory region with pixel format |
| conversion if necessary)</p></li> |
| <li><p>blend (blend two memory regions and copy the result to a third memory region |
| with pixel format conversion if necessary), if cmap is disabled</p></li> |
| </ul> |
| <p>Blit and blend operation using a fixes memory size defined by the background |
| layer. DMA2D controller doesn’t support scaling.</p> |
| <p>DMA2D overlays are similar to destructive overlays. They are invisible. They can |
| be used for image preprocessing. The memory region affected by the operations |
| (color, blit, blend) can be addressed by the area control command before. The |
| configured overlay transparency of DMA2D overlays will be used for subsequently |
| blend operation and is valid for the whole overlay.</p> |
| </section> |
| </section> |
| <section id="fpu"> |
| <h2>FPU<a class="headerlink" href="#fpu" title="Permalink to this heading"></a></h2> |
| <section id="fpu-configuration-options"> |
| <h3>FPU Configuration Options<a class="headerlink" href="#fpu-configuration-options" title="Permalink to this heading"></a></h3> |
| <p>There are two version of the FPU support built into the STM32 port.</p> |
| <ol class="arabic"> |
| <li><p>Non-Lazy Floating Point Register Save</p> |
| <p>In this configuration floating point register save and restore is |
| implemented on interrupt entry and return, respectively. In this |
| case, you may use floating point operations for interrupt handling |
| logic if necessary. This FPU behavior logic is enabled by default |
| with:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CONFIG_ARCH_FPU=y |
| </pre></div> |
| </div> |
| </li> |
| <li><p>Lazy Floating Point Register Save.</p> |
| <p>An alternative implementation only saves and restores FPU registers only |
| on context switches. This means: (1) floating point registers are not |
| stored on each context switch and, hence, possibly better interrupt |
| performance. But, (2) since floating point registers are not saved, |
| you cannot use floating point operations within interrupt handlers.</p> |
| <p>This logic can be enabled by simply adding the following to your .config file:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CONFIG_ARCH_FPU=y |
| </pre></div> |
| </div> |
| </li> |
| </ol> |
| </section> |
| </section> |
| <section id="development-environment"> |
| <h2>Development Environment<a class="headerlink" href="#development-environment" title="Permalink to this heading"></a></h2> |
| <p>Either Linux or Cygwin on Windows can be used for the development environment. |
| The source has been built only using the GNU toolchain (see below). Other |
| toolchains will likely cause problems.</p> |
| </section> |
| <section id="gnu-toolchain-options"> |
| <h2>GNU Toolchain Options<a class="headerlink" href="#gnu-toolchain-options" title="Permalink to this heading"></a></h2> |
| <section id="toolchain-configurations"> |
| <h3>Toolchain Configurations<a class="headerlink" href="#toolchain-configurations" title="Permalink to this heading"></a></h3> |
| <p>The NuttX make system has been modified to support the following different |
| toolchain options.</p> |
| <ol class="arabic simple"> |
| <li><p>The NuttX buildroot Toolchain (see below), or</p></li> |
| <li><p>Any generic arm-none-eabi GNU toolchain.</p></li> |
| </ol> |
| <p>All testing has been conducted using the NuttX Codesourcery toolchain. To use |
| a different toolchain, you simply need to modify the configuration. As an |
| example:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CONFIG_ARM_TOOLCHAIN_GNU_EABI : Generic arm-none-eabi toolchain |
| </pre></div> |
| </div> |
| </section> |
| </section> |
| <section id="ides"> |
| <h2>IDEs<a class="headerlink" href="#ides" title="Permalink to this heading"></a></h2> |
| <p>NuttX is built using command-line make. It can be used with an IDE, but some |
| effort will be required to create the project.</p> |
| <section id="makefile-build"> |
| <h3>Makefile Build<a class="headerlink" href="#makefile-build" title="Permalink to this heading"></a></h3> |
| <p>Under Eclipse, it is pretty easy to set up an “empty makefile project” and |
| simply use the NuttX makefile to build the system. That is almost for free |
| under Linux. Under Windows, you will need to set up the “Cygwin GCC” empty |
| makefile project in order to work with Windows (Google for “Eclipse Cygwin” - |
| there is a lot of help on the internet).</p> |
| <p>Using Sourcery CodeBench from <a class="reference external" href="http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview">http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview</a> |
| Download and install the latest version (as of this writing it was sourceryg++-2013.05-64-arm-none-eabi)</p> |
| <p>Import the project from git. |
| File->import->Git-URI, then import a Exiting code as a Makefile progject |
| from the working directory the git clone was done to.</p> |
| <p>Select the Sourcery CodeBench for ARM EABI. N.B. You must do one command line |
| build, before the make will work in CodeBench.</p> |
| </section> |
| <section id="native-build"> |
| <h3>Native Build<a class="headerlink" href="#native-build" title="Permalink to this heading"></a></h3> |
| <p>Here are a few tips before you start that effort:</p> |
| <ol class="arabic simple"> |
| <li><p>Select the toolchain that you will be using in your .config file</p></li> |
| <li><p>Start the NuttX build at least one time from the Cygwin command line |
| before trying to create your project. This is necessary to create |
| certain auto-generated files and directories that will be needed.</p></li> |
| <li><p>Set up include paths: You will need include/, arch/arm/src/stm32, |
| arch/arm/src/common, arch/arm/src/armv7-m, and sched/.</p></li> |
| <li><p>All assembly files need to have the definition option -D __ASSEMBLY__ |
| on the command line.</p></li> |
| </ol> |
| <p>Startup files will probably cause you some headaches. The NuttX startup file |
| is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX |
| one time from the Cygwin command line in order to obtain the pre-built |
| startup object needed by RIDE.</p> |
| </section> |
| </section> |
| <section id="nuttx-eabi-buildroot-toolchain"> |
| <h2>NuttX EABI “buildroot” Toolchain<a class="headerlink" href="#nuttx-eabi-buildroot-toolchain" title="Permalink to this heading"></a></h2> |
| <p>A GNU GCC-based toolchain is assumed. The PATH environment variable should |
| be modified to point to the correct path to the Cortex-M3 GCC toolchain (if |
| different from the default in your PATH variable).</p> |
| <p>If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX |
| Bitbucket download site (<a class="reference external" href="https://bitbucket.org/nuttx/buildroot/downloads/">https://bitbucket.org/nuttx/buildroot/downloads/</a>). |
| This GNU toolchain builds and executes in the Linux or Cygwin environment.</p> |
| </section> |
| <section id="nxflat-toolchain"> |
| <h2>NXFLAT Toolchain<a class="headerlink" href="#nxflat-toolchain" title="Permalink to this heading"></a></h2> |
| <p>If you are <em>not</em> using the NuttX buildroot toolchain and you want to use |
| the NXFLAT tools, then you will still have to build a portion of the buildroot |
| tools – just the NXFLAT tools. The buildroot with the NXFLAT tools can |
| be downloaded from the NuttX Bitbucket download site |
| (<a class="reference external" href="https://bitbucket.org/nuttx/nuttx/downloads/">https://bitbucket.org/nuttx/nuttx/downloads/</a>).</p> |
| <p>This GNU toolchain builds and executes in the Linux or Cygwin environment.</p> |
| <ol class="arabic"> |
| <li><p>You must have already configured NuttX in <some-dir>/nuttx.</p> |
| <p>tools/configure.sh lpcxpresso-lpc1768:<sub-dir></p> |
| </li> |
| <li><p>Download the latest buildroot package into <some-dir></p></li> |
| <li><p>unpack the buildroot tarball. The resulting directory may |
| have versioning information on it like buildroot-x.y.z. If so, |
| rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.</p></li> |
| <li><p>cd <some-dir>/buildroot</p></li> |
| <li><p>cp boards/cortexm3-defconfig-nxflat .config</p></li> |
| <li><p>make oldconfig</p></li> |
| <li><p>make</p></li> |
| <li><dl class="simple"> |
| <dt>Make sure that the PATH variable includes the path to the newly built</dt><dd><p>NXFLAT binaries.</p> |
| </dd> |
| </dl> |
| </li> |
| </ol> |
| </section> |
| <section id="protected-mode-build"> |
| <h2>Protected Mode Build<a class="headerlink" href="#protected-mode-build" title="Permalink to this heading"></a></h2> |
| <blockquote> |
| <div><p>The “protected” mode build uses the Cormtex-M4 MPU to separate the FLASH and |
| SRAM into kernel-mode and user-mode regions. The kernel mode regions are |
| then protected from any errant or mischievous behavior from user-space |
| applications.</p> |
| <p>Common notes for all protected mode builds follow:</p> |
| </div></blockquote> |
| <ol class="arabic"> |
| <li><p>It is recommends to use a special make command; not just ‘make’ but make |
| with the following two arguments:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>make pass1 pass2 |
| </pre></div> |
| </div> |
| <p>In the normal case (just ‘make’), make will attempt to build both user- |
| and kernel-mode blobs more or less interleaved. That actual works! |
| However, for me it is very confusing so I prefer the above make command: |
| Make the user-space binaries first (pass1), then make the kernel-space |
| binaries (pass2)</p> |
| </li> |
| <li><p>At the end of the build, there will be several files in the top-level |
| NuttX build directory:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>PASS1: |
| nuttx_user.elf - The pass1 user-space ELF file |
| nuttx_user.hex - The pass1 Intel HEX format file (selected in defconfig) |
| User.map - Symbols in the user-space ELF file |
| |
| PASS2: |
| nuttx - The pass2 kernel-space ELF file |
| nuttx.hex - The pass2 Intel HEX file (selected in defconfig) |
| System.map - Symbols in the kernel-space ELF file |
| |
| The J-Link programmer will accept files in .hex, .mot, .srec, and .bin |
| formats. |
| </pre></div> |
| </div> |
| </li> |
| <li><p>Combining .hex files. If you plan to use the .hex files with your |
| debugger or FLASH utility, then you may need to combine the two hex |
| files into a single .hex file. Here is how you can do that.</p> |
| <ol class="loweralpha"> |
| <li><p>The ‘tail’ of the nuttx.hex file should look something like this |
| (with my comments added):</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span> $ tail nuttx.hex |
| # 00, data records |
| ... |
| :10 9DC0 00 01000000000800006400020100001F0004 |
| :10 9DD0 00 3B005A0078009700B500D400F300110151 |
| :08 9DE0 00 30014E016D0100008D |
| # 05, Start Linear Address Record |
| :04 0000 05 0800 0419 D2 |
| # 01, End Of File record |
| :00 0000 01 FF |
| |
| Use an editor such as vi to remove the 05 and 01 records. |
| </pre></div> |
| </div> |
| </li> |
| <li><dl> |
| <dt>The ‘head’ of the nuttx_user.hex file should look something like</dt><dd><p>this (again with my comments added):</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ head nuttx_user.hex |
| # 04, Extended Linear Address Record |
| :02 0000 04 0801 F1 |
| # 00, data records |
| :10 8000 00 BD89 01084C800108C8110208D01102087E |
| :10 8010 00 0010 00201C1000201C1000203C16002026 |
| :10 8020 00 4D80 01085D80010869800108ED83010829 |
| ... |
| </pre></div> |
| </div> |
| <p>Nothing needs to be done here. The nuttx_user.hex file should |
| be fine.</p> |
| </dd> |
| </dl> |
| </li> |
| <li><p>Combine the edited nuttx.hex and un-edited nuttx_user.hex |
| file to produce a single combined hex file:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ cat nuttx.hex nuttx_user.hex >combined.hex |
| </pre></div> |
| </div> |
| </li> |
| </ol> |
| <blockquote> |
| <div><p>Then use the combined.hex file with the to write the FLASH image. With |
| GDB this would be:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>gdb> mon reset |
| gdb> mon halt |
| gdb> mon clrbp |
| gdb> load combined.hex |
| </pre></div> |
| </div> |
| <p>If you do this a lot, you will probably want to invest a little time |
| to develop a tool to automate these steps.</p> |
| </div></blockquote> |
| </li> |
| </ol> |
| </section> |
| <section id="flashing-and-debugging"> |
| <h2>Flashing and Debugging<a class="headerlink" href="#flashing-and-debugging" title="Permalink to this heading"></a></h2> |
| <p>NuttX firmware Flashing with STLink probe and OpenOCD:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c 'program nuttx.bin 0x08000000; reset run; exit' |
| </pre></div> |
| </div> |
| <p>Remote target Reset with STLink probe and OpenOCD:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c 'init; reset run; exit' |
| </pre></div> |
| </div> |
| <p>Remote target Debug with STLink probe and OpenOCD:</p> |
| <blockquote> |
| <div><ol class="arabic"> |
| <li><p>You need to have NuttX built with debug symbols, see <a class="reference internal" href="../../../quickstart/debugging.html#debugging"><span class="std std-ref">Debugging</span></a>.</p></li> |
| <li><p>Launch the OpenOCD GDB server:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c 'init; reset halt' |
| </pre></div> |
| </div> |
| </li> |
| <li><p>You can now attach to remote OpenOCD GDB server with your favorite debugger, |
| for instance gdb:</p> |
| <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>arm-none-eabi-gdb --tui nuttx -ex 'target extended-remote localhost:3333' |
| (gdb) monitor reset halt |
| (gdb) breakpoint nsh_main |
| (gdb) continue |
| </pre></div> |
| </div> |
| </li> |
| </ol> |
| </div></blockquote> |
| </section> |
| <section id="supported-boards"> |
| <h2>Supported Boards<a class="headerlink" href="#supported-boards" title="Permalink to this heading"></a></h2> |
| <div class="toctree-wrapper compound"> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="boards/axoloti/index.html">Axoloti</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/clicker2-stm32/index.html">Mikroe Clicker2 STM32</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/mikroe-stm32f4/index.html">mikroe-stm32f4</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f401re/index.html">ST Nucleo F401RE</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f410rb/index.html">ST Nucleo F410RB</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f411re/index.html">ST Nucleo F411RE</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f412zg/index.html">ST Nucleo F412ZG</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f429zi/index.html">ST Nucleo F429ZI</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/nucleo-f446re/index.html">ST Nucleo F446RE</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/odrive36/index.html">ODrive V3.6</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/olimex-stm32-e407/index.html">Olimex STM32-E407</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/olimex-stm32-h405/index.html">Olimex STM32-P207</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/olimex-stm32-h407/index.html">Olimex STM32-H407</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/olimex-stm32-p407/index.html">Olimex STM32-P207</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/omnibusf4/index.html">OMNIBUSF4</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm3240g-eval/index.html">ST STM3240G-EVAL</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm32f401rc-rs485/index.html">stm32f401rc-rs485</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm32f411-minimum/index.html">stm32f411-minimum</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm32f411e-disco/index.html">ST STM32F411E-Discovery</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm32f429i-disco/index.html">ST STM32F429I-DISCO</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="boards/stm32f4discovery/index.html">ST STM32F4-Discovery</a></li> |
| </ul> |
| </div> |
| </section> |
| </section> |
| |
| |
| </div> |
| </div> |
| <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> |
| <a href="../stm32f3/boards/stm32f3discovery/index.html" class="btn btn-neutral float-left" title="STM32F3Discovery" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> |
| <a href="boards/axoloti/index.html" class="btn btn-neutral float-right" title="Axoloti" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> |
| </div> |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p>© Copyright 2023, The Apache Software Foundation.</p> |
| </div> |
| |
| |
| |
| </footer> |
| </div> |
| </div> |
| </section> |
| </div> |
| <script> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| </body> |
| </html> |