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?
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.
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:
What else did you change? Did you also change the value in R1 to match?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.