AN 961: IO Module Design Example for OPC UA: for Intel® MAX® 10 Devices

ID 691266
Date 10/30/2021
Public

Installing FreeRTOS and LwIP Templates on Nios Eclipse IDE

To correctly generate the .bsp file for the IO Module Design Example, run the script that installs FreeRTOS, LwIP, and Intel driver files in the Nios Eclipse IDE directory. Engineering Spirit B.V. provides the script and NetTimeLogic GmbH updates it (refer to fork history of the NetTime Logic Repository).
  1. Download and extract the NetTimeLogic GmbH installation files:
    • SHA: 4b738bf09a93fcb51a66a684de6e350b78555cf9
  2. Create a new directory: /FreeLwIP-Nios-II-master/FreeRTOS_src/.
    Figure 7. FreeLwIP-Nios II Master Installation Directory
  3. Download FreeRTOS and extract contents of /FreeRTOSvX.X.X/FreeRTOS to the newly created directory /FreeRTOS_src.
    Figure 8. FreeRTOS_src directory with extracted FreeRTOS source code
  4. Open /FreeLwIP-Nios-II/lwip/FreeRTOS/src/arch/altera_avalon_tse.c and modify line 1277:
    for (phyadd = 0x00; phyadd < 0x20; phyadd++)
  5. Open /FreeLwIP-Nios-II/freertos/FreeRTOS/src/tse_ethernet_phys.c and modify lines 41, 44, 47 to replace TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO(X,X,X,X,0,X) input 5 (0) with &marvell_cfg_rgmii.
  6. Run alt-freertos-lwip-install.bat as indicated in the readme file provided in the Nettime Logic repository.
  7. To test theFreeRTOS and lwIP installations, build the FreeRTOS/LwIP template demo:
    1. Open Nios II Software Build Tools for Eclipse.
    2. Click File > New > Nios II Application and BSP from Template.
    3. Select from the Template list FreeRTOS - LwIP Demo. This template is available in the template list after the successful execution of the alt-freertos-lwip-install.bat script.
    4. Select ./<Quartus_Project>/nios.sopcinfo in SOPC Information File name and provide a project name.
    5. Click on Finish…