Overview

group index

This library comprises the core components needed for Wi-Fi connectivity support - bundles FreeRTOS, lwIP TCP/IP stack, mbed TLS for security, Wi-Fi host driver (WHD), Secure Sockets interface configuration files, and associated code to bind these components together.The ModusToolbox Wi-Fi code examples download this library automatically, so you don’t need to.

Features and functionality

The following components are part of this library. These components are bundled as “.lib” entries; each “.lib” points to the respective repositories, where they are hosted. All but lwIP and mbed TLS libraries are hosted on Cypress’ GitHub repository. lwIP and mbed TLS libraries are hosted on their respective external repositories.

  • Wi-Fi Host Driver(WHD) - Embedded Wi-Fi host driver that provides a set of APIs to interact with Cypress WLAN chips. See Wi-Fi Host Driver(WHD) for details.

  • FreeRTOS - FreeRTOS kernel, distributed as standard C source files with the configuration header file, for use with the PSoC 6 MCU. This FreeRTOS library is based on publicly available FreeRTOS library version 10.0.1.37. See FreeRTOS.

  • The CLib FreeRTOS Support Library - This library provides the necessary hooks to make C library functions such as malloc and free thread-safe. This implementation is specific to FreeRTOS and requires it to be present to build. See CLib FreeRTOS Support Library.

  • lwIP - A Lightweight open-source TCP/IP stack, version: 2.1.2. See lwIP.

    note

    Using this library in a project will cause lwIP to be downloaded on your computer. It is your responsibility to understand and accept the lwIP license

  • mbed TLS - An open source, portable, easy to use, readable and flexible SSL library that has cryptographic capabilities, version: 2.16.6. See mbed TLS.

    note

    Using this library in a project will cause mbed TLS to be downloaded on your computer. It is your responsibility to understand and accept the mbed TLS license and regional use restrictions (including abiding by all applicable export control laws).

  • RTOS Abstraction Layer - The RTOS Abstraction APIs allow middleware to be written to be RTOS aware, but without depending on any particular RTOS. See RTOS Abstraction Layer.

  • Secure Sockets - Network abstraction APIs for underlying lwIP network stack and mbed TLS security library. Secure Sockets library eases application development by exposing a socket-like interface for both secure and non-secure socket communication. See Secure Sockets.

  • Predefined configuration files for FreeRTOS, lwIP and mbed TLS for typical embedded IoT use-cases. See the “Quick Start” section for details.

  • Associated glue layer between lwIP and WHD

This library is designed to work with PSoC 6 kits with Wi-Fi capability, supported through the ModusToolbox software environment.

In order to enable Wi-Fi connectivity on platforms with smaller memory footprint, a set of LwIP and MbedTLS configuration parameters that can be enabled/disabled have been documented here Optimization of Wi-Fi Middleware Core

Supported Platforms

This library and its features are supported on the following PSoC 6 platforms:

Quick Start

  • A set of pre-defined configuration files have been bundled with this library for FreeRTOS, lwIP, and mbed TLS. These files are located in the configs folder. The developer is expected to:

    • Copy the FreeRTOSConfig.h, lwipopts.h, and mbedtls_user_config.h files from the configs directory to the top-level code example directory in the project.

    • Configure C Macro MBEDTLS_USER_CONFIG_FILE to “mbedtls_user_config.h” in the Makefile to provide the user configuration to the mbed TLS library. The Makefile entry would look like,

      DEFINES+=MBEDTLS_USER_CONFIG_FILE='"mbedtls_user_config.h"'
      

    • Add the CYBSP_WIFI_CAPABLE build configuration to enable Wi-Fi functionality. The Makefile entry would look like,

      DEFINES+=CYBSP_WIFI_CAPABLE
      

    • Add the CY_RTOS_AWARE build configuration to inform the HAL that an RTOS environment is being used. The Makefile entry would look like,

      DEFINES+=CY_RTOS_AWARE
      

  • Secure Sockets, lwIP, and mbed TLS libraries contain reference and test applications. For these applications to not conflict with the code examples, a .cyignore file is also included with this library.

  • Add the following to COMPONENTS in the code example project’s Makefile - FREERTOS, LWIP, MBEDTLS. For example:

    COMPONENTS=FREERTOS LWIP MBEDTLS
    

    note

    PSOC6HAL and either 43012 or 4343W are necessary for the library depending on the platform used, but these are already included in BSP's Makefile. Hence no need to include them here again.