Quality RTOS & Embedded Software

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


Register tests for V850 port using MINICUBE2

Posted by Charles Mao on July 23, 2012
I try to make freeRTOS v7.1.1 work on V850ES/Jx3-L low-power demonstrator (http://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/v850es_jx3l_lpd/index.jsp). I debugged the following code snippet excerpted from the register test code (RegTest.s85) using MINICUBE2 and found that R31's content is always 0x0. My question is anybody has verified freeRTOS's V850 port on any hardware?
MOV0xa101010b, R31
CMPR31, R1
JARLvRegTestFailed, lp

RE: Register tests for V850 port using MINICUBE2

Posted by Richard on July 23, 2012
In the code snippet you have posted, you are setting the value of R31, then testing the value of R31, all done in assembly code so the compiler cannot be interfering. If, after setting the value of R31 it does not hold the value you just wrote to it, then there is something strange going on indeed. Please not however, that this code is not part of the FreeRTOS code, it is just assembly code in the application. It could be feasible that an interrupt is occurring between setting R31 and testing R31, and that that interrupt is corrupting R31. To discount that try disabling interrupts in the asm code before the MOV instruction. It could also be feasible that the trap instruction before the MOV instruction (not shown in your code snippet) is causing the MOV to get skipped somehow - try adding a couple of NOP instructions between the TRAP and the MOV instructions.

That said...

The code in the FreeRTOS download is different to the code you posted in that the value written to R31 has changed. This is the code in the download:

MOV0x01010101, R31
CMPR31, R1
JARLvRegTestFailed, lp

What else did you change? Did you also change the value in R1 to match?


RE: Register tests for V850 port using MINICUBE2

Posted by Charles Mao on July 24, 2012

Thank you very much for your reply. Actually, the code I quoted is from the second register test routine and yours is from the first one. They stored different values in R1 register.

I commented out TRAP instruction because it stopped the debugger from functioning.

I think the reason causing the problem is because the on-chip monitor program downloaded by debugger uses interrupt and function calls. In order to using the debug function, I didn't disable the general interrupt mask using DI instruction. Instead, I just masked the tick timer interrupt.


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

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

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

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