LwIP + yaffs port based on STM32CubeMX generated code and ChibiOS

Makefile template for STM32Cube generated HAL code linked with ChibiOS, lwIP and yaffs, running on the Nucleo-F746 board

Project motivation

I've expanded my ChibiOS based lwIP port for STM32 by a flash file system.


  • Runs on the STM32 Nucleo-F746 board
  • Requires additional hardware
  • Use yaffs to provide a file system
  • Use the CubeF7 firmware example to access the external QSPI memory
  • Provides a simple httpd to serve web pages from an external QSPI Flash memory
  • Provides a simple ftpd to access all the files on the external QSPI Flash
  • Terse Instructions

    Add an external QSPI Flash to your nucleo board. I've used the same chip that is provided on the STM32F746 discovery board: N25Q128A by Micron. Some of the pins of the nucleo board are labeled "QSPI", so I've used them to connect the chip. Read the N25Q128 datasheet and look up the QSPI I/O settings in the CubeMX project to figure out which particular pins to connect. Use short lines and provide a very short and low impedance ground connection. The QSPI signals are quite high speed and will fail on a breadboard.
    Watch the debug messages over the on-board virtual COM port: On the first start, yaffs will format the QSPI chip. This may take longer than you'd expect, so stay patient. The next start will be faster.
    After successful initialization, you can connect to the ftp server, create the directory "/htdocs" and put some files there.
    The simple http server should now deliver those files to your browser.


    By changing the STM32F746 pinout in the CubeMX tools and re-generating the code, this project should also work on a STM32F746 discovery board. I just haven't tried out this yet, so you are on your own right now.


    here: nucleo-f746-cyl.tar.gz

    All neccessary library files are included in the tarball. You do not need to download or install additional sources to compile the examples. The included sources may not be complete in terms of their original source. I've provided the appropriate download locations below.


    Download the full ChibiOS source code here: Chibios Homepage
    Get the most recent version of LwIP here: LwIP project homepage
    Yaffs: Yet another flash file system by aleph one
    Sources of the ftp-server (original code (c) 2002 Florian Schulze): lwip-ftpd
    Go to the ST website to get the CubeMX tools and libraries

    Look here: The STM32 files for my other STM32 related pages. ... und ein Zaehlpixel hab ich auch :-)