Verifying FreeRTOS port

iamnitish wrote on Monday, January 21, 2019:

With the reference of renesas v850 port, we have ported RTOS for RH850.We have tested the tick freq. by toggling the led in the task using vTaskDelay function on oscilloscope.
Now we want to verify and validate our porting.
Is there any test code sequence for testing? or How to verify that the other functionallity of FreeRTOS?

rtel wrote on Monday, January 21, 2019:

I recommend the following three things.

  1. Register test tasks

These fill the registers with known values, then continuously check each
register still contains its expected value while a soak test is running.
Each register uses a different value, and at least one of the register
test tasks should yield. Run the tasks at the lowest priority. Examples:

https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/RegTest_GCC.c

https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/RegTest.S

  1. Run the interrupt nesting demo:
    https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/Common/Minimal/IntQueue.c

Which requires you to provide a port specific implementation of a few
functions that set up at least two, ideally three, hardware timers with
their appropriate interrupt handlers. You can copy examples from the
existing code (examples here chosen at random, there are lots of examples):
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.c

https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c
3) Run as many examples as you can, especially the newer examples for
things like task notifications, these are really test functions. Here
you can copy many of the ‘full demo’ configurations. They start loads
of examples then have a ‘check’ task ensure they are still functioning
correctly - all the while there are the interrupt nesting tests running.
Ensure that the interrupt nesting depth reaches at least 3. There are
some macros you can define in the code to insert null loop delays to
ensure code coverage - but generally doing all this together gives you
90+ % coverage without the delays. Example:
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c