tree: 0dd1c43e090bf836ac52a5657ccccb8b53764f82
  1. LICENSE
  2. port.c
  3. portasm.850
  4. portmacro.h
  5. README.md
GHS/U2x/README.md

RH850/U2x FreeRTOS Port with GHS Compiler

Introduction

This repository contains the port of FreeRTOS for Renesas RH850/U2x microcontrollers using the GHS compiler. The following sections provide instructions on how to use this port, a link to the test project, and other relevant information.

Prerequisites

  • Compiler: GHS
  • FreeRTOS version 11.2.0
DeviceFPUFXUSMP
U2A6YesNoYes
U2A8YesNoYes
U2A16YesNoYes
U2B6YesYesYes
U2B10YesYesYes

Link to Test Project

The test project can be found in RH850_U2Ax_GHS and RH850_U2Bx_GHS. These projects contain example tasks and configurations to help you get started with FreeRTOS on the RH850/U2Ax and U2Bx.

Note

  1. The minimal stack size configMINIMAL_STACK_SIZE must be included the reserved memory for nested interrupt. This formula can be referred: (task_context_size) * (2 + configMAX_INT_NESTING) + Stack_depth_of_taskcode In which, task_context_size is calculated as 36*4bytes = 144bytes (when FPU enabled) or 34*4bytes = 136 (when FPU disabled), configMAX_INT_NESTING is 02 as default (Note that a value of 0 is not allowed).
  2. Users need to create a memory section named mev_address in CRAM for Exclusive Control functionality. Users should initialize the mev_address section in the startup file.

Example:

-- .mev_address section in CRAM is used for Sync flags
mov     ___ghsbegin_mev_address, r20
st.w    r0, 0[r20]
  1. The FXU unit is only available on core 0. Users must ensure that FXU operations are restricted to core 0 by using the vTaskCoreAffinitySet function provided by FreeRTOS SMP.
  2. Set the macro configENABLE_FXU to 1 to enable the FXU unit; otherwise set 0 to disable FXU unit.
  3. This port supports both U2Ax and U2Bx devices. The user must configure configDEVICE_NAME with the value U2Bx_DEVICES or U2Ax_DEVICES to specify which device is being used.
  4. The User can configure the interrupt priority of the OSTM Timer using configTIMER_INT_PRIORITY, with 16 levels available (0 being the highest priority and 15 the lowest).
  5. This port also supports the configuration of contiguous CPU cores in FreeRTOS, allowing the user to set task affinity for execution on specific cores or subsets of cores.

Other Relevant Information

  • Documentation:

  • Support:

    • If you encounter any issues or have questions about this port, please open an issue in this repository or contact the maintainer.
  • Contributing:

    • Contributions to improve this port are welcome. Please fork the repository, make your changes, and submit a pull request.