Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

tp Initialization for new task (RH850/V850)

Posted by d0miller on January 11, 2018

Can anyone explain to me why the tp/R05 register is initialized to 0x55555555 for newly created tasks, by pxPortInitialiseStack() in port.c in SourceportableIARV850ES (9.0.0)? Is there any reason tasks should use a different tp value than that initialized at system startup?

After considerable experimenting and tweaking, I got multitasking working with the original value initialized for new processes. I then added Bull's Eye Coverage, which reads word values from memory based on tp. Since tp is odd, it generates a Misalignment exception and crashes multitasking.

I commented out the instruction that sets tp in portRESTORE_CONTEXT, so that tasks keep the same tp as system, to test. Multitasking is again functioning properly, but I'm concerned that there may have been a reason to use different tp for tasks.


tp Initialization for new task (RH850/V850)

Posted by rtel on January 11, 2018

Sorry, but I'm not following completely. The only place I can find 0x55555555 used in the port is on line 115 of port.c here https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/IAR/V850ES/port.c

That sets R05 to a known value at the time the task is created only, which is only done assist development in that it enables the developer to check the expected value ends up in the expected register. The values is actually arbitrary and could be anything.

Does something need to be changed?


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Careers

FreeRTOS and other careers at AWS.


Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner