SMP Kernel Demo

Hi All,

I’ve seen an error while running the Minimal Demo program. My platform is Cortex-A53 and I use the SMP FreeRTOS kernel. I ported the SMP Kernel into Cortex-A53 multi-core system. For the kernel testing purpose, I ran the Minimal Demo program for SMP kernel. But I see an error on the message buffer and the stream buffer test. Does anyone have seen the same error?

Would you please post the errors you are seeing, with some additional details if available ?

I see the following error messages on UART:
An Error has occurred - 00020000
Streambuffer task failed
Message buffer task failed

I’m using 8 cores and task affinity option (configUSE_CORE_AFFINITY) is disabled in the kernel.

It looks like the “check” task detected the associated tasks are not running for some reasons. In the testing_main.h header, comprehensive testing items are enabled as shown below. So it looks many other tasks are running fine but I don’t know why only streambuffer and message buffer tasks are failed. I haven’t yet dig into the details. So I don’t know the root cause of this problem.

19 /*** These tests run on all tiles **/
20 #define testingmainENABLE_REG_TEST_TASKS 0
21
22 /
Death cannot be run with any demo that creates or destroys tasks */
23 #define testingmainENABLE_DEATH_TASKS 1
24
25 #define testingmainENABLE_ABORT_DELAY_TASKS 0
26 #define testingmainENABLE_BLOCKING_QUEUE_TASKS 1
27 #define testingmainENABLE_BLOCK_TIME_TASKS 1
28 #define testingmainENABLE_COUNT_SEMAPHORE_TASKS 1
29 #define testingmainENABLE_DYNAMIC_PRIORITY_TASKS 1
30 #define testingmainENABLE_EVENT_GROUP_TASKS 1
31 #define testingmainENABLE_INTERRUPT_QUEUE_TASKS 0
32 #define testingmainENABLE_FLOP_MATH_TASKS 0
33 #define testingmainENABLE_INT_MATH_TASKS 0
34 #define testingmainENABLE_GENERIC_QUEUE_TASKS 1
35 #define testingmainENABLE_INTERRUPT_SEMAPHORE_TASKS 1
36 #define testingmainENABLE_MESSAGE_BUFFER_TASKS 1
37 #define testingmainENABLE_POLLED_QUEUE_TASKS 1
38 #define testingmainENABLE_QUEUE_PEEK_TASKS 1
39 #define testingmainENABLE_QUEUE_OVERWRITE_TASKS 1
40 #define testingmainENABLE_QUEUE_SET_TASKS 0
41 #define testingmainENABLE_QUEUE_SET_POLLING_TASKS 0
42 #define testingmainENABLE_RECURSIVE_MUTEX_TASKS 1
43 #define testingmainENABLE_SEMAPHORE_TASKS 1
44 #define testingmainENABLE_STREAMBUFFER_TASKS 1
45 #define testingmainENABLE_STREAMBUFFER_INTERRUPT_TASKS 1
46 #define testingmainENABLE_TASK_NOTIFY_TASKS 1
47 #define testingmainENABLE_TASK_NOTIFY_ARRAY_TASKS 1
48 #define testingmainENABLE_TIMER_DEMO_TASKS 1

Is the message buffer test valid in the SMP kernel? In the MessageBufferDemo.c file, I see that a non-blocking sender and receiver task are created. From the comments in the code, does it expect that the sender and receiver interleave? I think it doesn’t make sense in the SMP. Because the non-blocking sender can run at core 0 and the non-blocking receiver can run at core 1 at the same time. How come does it guarantee that the received message length is always equal to the message length sent?

There are several of the standard demo tasks (which, more recently, are actually integration tests) that are not valid on SMP because the execution sequence expected by the self tests assume only a single core. As you point out, with SMP tasks interleave, the execution sequence will be very different, triggering the self test to think something went wrong.

Thanks for the reply. I thought that all standard demo tests passed for SMP Kernel. But it looks not. Anyway, thanks for your comment.