Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

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
BZ$+6
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
BZ$+6
JARLvRegTestFailed, lp


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

Regards.

RE: Register tests for V850 port using MINICUBE2

Posted by Charles Mao on July 24, 2012
Richard,

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.

Charles


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists