Skip to content

[BUG] Incorrect pvParameters in RL78 FAR model tasks #1316

@sauleThsQuin

Description

@sauleThsQuin

Describe the bug

In RL78 builds using the FAR data model, tasks created with xTaskCreate do not receive the correct pvParameters.
The function pxPortInitialiseStack() initializes the register image with dummy values (0x1111, 0xDEDE) instead of the actual pointer.
At the first context restore, the compiler’s prologue loads a corrupted parameter from A:DE.

Target

IDE : IAR Embedded Workbench for Renesas RL78 Version 5.10.3
IAR/RL78 port

To Reproduce

Build FreeRTOS for RL78 with FAR data model.
Create a task with xTaskCreate(task, "name", stack, pvParameters, prio, NULL).
Inspect pvParameters inside the task → the value is corrupted.

Expected behavior

Task entry functions should receive the correct pvParameters, passed in A:DE according to the RL78 FAR calling convention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions