5 Running the Example

  1. Create a new project → Select device → Select Tools → Select Save Directory.
  2. Launch MCC by clicking Tools→ Embedded→ MPLAB® Code Configurator or click on the MCC icon
  3. In the Device Resources panel under Libraries dropdown select FreeRTOS
  4. From Device Resources → Libraries → FreeRTOS Library
  5. Configure/customize FreeRTOS application in the GUI interface
    • FreeRTOS Config
      • Customize FreeRTOS (generates FreeRTOSConfig.h file)
    • Peripheral Config
      • Select the timer used as tick timer: FreeRTOS ➝ Peripheral Config ➝ FreeRTOS Tick Timer
      • Select the serial interface used (if any): FreeRTOS ➝ Peripheral Config ➝ Serial Port Settings
      • Enable the pins used as GPIO : FreeRTOS ➝ Peripheral Config ➝ I/O Pin Support
    • Configure used drivers/peripherals
      • Configure the system clock frequency: System ➝ CLKCTRL ➝ CLKCTRL Settings
      • For selected tick timer (TCBx), configure the tick rate by updating timer period: Drivers ➝ Timers ➝ TCBx ➝ Hardware Settings
      • If USART interface is selected, configure the communication protocol: FreeRTOS ➝ Peripheral Config ➝ Serial Port Settings
      • If I/O pins are enabled in FreeRTOS application (FreeRTOS ➝ Peripheral Config ➝ I/O Pin Support), the pins must be assigned in the Pin Grid View
  6. Check below for the Notifications [MCC] tab
  7. Resolve the notifications step by step
  8. Press the Generate Button. Initialization code will be produced
  9. Update the FreeRTOS_AppStart() in the freertos_interface.c file with the FreeRTOS application
  10. Build the firmware and program the hardware.

Tip: The tooltips provide additional information for UI options