ECE471/571 (RTOS) STM32 FreeRTOS + LwIP Examples

Key examples -- see "Create a FreeRTOS + LwIP project" first

More examples are added as course progresses.

Create a FreeRTOS project

  1. Run STM32CubeMX
  2. New project
  3. Choose Board Selector
  4. Search for F746
  5. From the list select board Nucleo-F746GZ (may require downloading components)
  6. Select tab "Features" -- Verify the picture of the board if the choice is correct
  7. Select tab "Docs and Resources" -- Download the board user manual UM1974
  8. Select "Docs and Resources" -- Download the getting started manual UM1727 (in case you get lost)
  9. Start Project (first time requires downloading the board expansion pack)
    1. initialize all peripherals with in default mode? - yes
    2. find PB0, PB7, PB14, PC13, verify that they are configured correctly
    3. enable Middleware - FreeRTOS
      • choose Interface: CMSIS V1
      • enable vTaskDelay (already enabled)
      • enable vTaskDelayUntil (if you are using it in your code)
      • enable USE_PREEMTPTION (already enabled)
    4. choose System Core - SYS - Timebase Source: TIM2
    5. enable Ethernet (already enabled)
    6. enable Middleware - LwIP
      • LWIP_DHCP: Enabled (already enabled)
      • LWIP_ICMP: Enabled (already enabled)
      • LWIP_UDP: Enabled (already enabled)
      • LWIP_TCP: Enabled (already enabled)
    7. configure additional features per each project specification
  10. Project Manager / Project
    1. select name for your project
    2. select a directory for your project - create a directory for your project as needed
    3. select Toolchain/IDE: STM32CubeIDE
  11. Project Manager / Code Generator (verify correct settings)
    1. Copy only the necessary library files
    2. Keep User Code when re-generated
  12. Generate Code (first time requires downloading the board expansion pack)
  13. Open project - yes (STM32CubeIDE, if not selected then run the STM32CubeIDE from start menu)
  14. File / Close Project
  15. Close STM32CubeMX

Adapt and compile a project

  1. Run STM32CubeIDE
  2. File / Open Project from file system -- select directory for scanning, select project for importing
  3. Project / Build All -- to test if it builds; if it does not, check why, potentially delete it and generate again with correct platform settings
  4. edit files and create new files as needed per each project specification
  5. Connect the board, use micro USB opposite to the Ethernet connector
  6. Project / Build All
  7. Run as... STM32 Cortex-M C/C++ Application (or Debug as...)

web site front local main page local list page general bookmarks software bookmarks go back copyright info