UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
843 Views
Registered: ‎06-14-2018

multiple tasks in echo test SDK 2018.3

Jump to solution

Hi all,

The OpenAMP demos have a big change in SDK 2018.3 compare to previous. It makes my app which has multiple/parallel tasks stop working, because the poll function requests the core to sleep (https://github.com/Xilinx/embeddedsw/blob/release-2018.3/lib/sw_apps/openamp_echo_test/src/machine/zynqmp_r5/platform_info.c#L392). My application is based on FreeRTOS.

So, do you have any idea to add more tasks into echo test example? Thank you.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
779 Views
Registered: ‎06-14-2018

Re: multiple tasks in echo test SDK 2018.3

Jump to solution

I found it myself.

The echo_test (same with other OpenAMP demos) will disable the FreeRTOS task scheduler because of re-initialize GIC (code here: https://github.com/Xilinx/embeddedsw/blob/release-2018.3/lib/sw_apps/openamp_echo_test/src/system/freertos/machine/zynqmp_r5/helper.c#L23). So the FreeRTOS task scheduler will not work. Solution is update the app_gic_initialize() function to make it compatible with FreeRTOS task scheduler GIC setup.

0 Kudos
4 Replies
Adventurer
Adventurer
780 Views
Registered: ‎06-14-2018

Re: multiple tasks in echo test SDK 2018.3

Jump to solution

I found it myself.

The echo_test (same with other OpenAMP demos) will disable the FreeRTOS task scheduler because of re-initialize GIC (code here: https://github.com/Xilinx/embeddedsw/blob/release-2018.3/lib/sw_apps/openamp_echo_test/src/system/freertos/machine/zynqmp_r5/helper.c#L23). So the FreeRTOS task scheduler will not work. Solution is update the app_gic_initialize() function to make it compatible with FreeRTOS task scheduler GIC setup.

0 Kudos
Observer shinya
Observer
629 Views
Registered: ‎08-31-2017

Re: multiple tasks in echo test SDK 2018.3

Jump to solution

I have trouble with this problem.

Could you tell me how to update the app_gic_initialize() function to make compatible with FreeRTOS task scheduler GIC setup?

0 Kudos
Adventurer
Adventurer
625 Views
Registered: ‎06-14-2018

Re: multiple tasks in echo test SDK 2018.3

Jump to solution

Hi @shinya,

You can replace this code https://github.com/Xilinx/embeddedsw/blob/release-2018.3/lib/sw_apps/openamp_echo_test/src/system/freertos/machine/zynqmp_r5/helper.c#L20-L77 by below:

extern XScuGic xInterruptController;

/* Interrupt Controller setup */
static int app_gic_initialize(void)
{
	/* Connect Interrupt ID with ISR */
	XScuGic_Connect(&xInterruptController, IPI_IRQ_VECT_ID,
			(Xil_ExceptionHandler)metal_irq_isr,
			(void *)IPI_IRQ_VECT_ID);

	return 0;
}
Observer shinya
Observer
612 Views
Registered: ‎08-31-2017

Re: multiple tasks in echo test SDK 2018.3

Jump to solution

Hi, @nvl1109.

Thank you for your quick response. I can solve this problem!

 

0 Kudos