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: 
Highlighted
4,863 Views
Registered: ‎04-25-2017

freertos823_xilinx thread debugging

Hi,

 

I am developing a RTOS application which includes both Ethernet and SPI communications. The application was written based on the freertos823_xilinx distibution included in my release of SDK (below), as the FreeRTOS + LWIP Echo Server example. This has been modified to the desired functionality. The FPGA is very simple, with only the Zynq PS, Quad SPI and GPIO, all designed and running on a Zedboard development board.

 

When the application is running with just the Ethernet threads executing, the application works as expected, however when I add in the SPI thread, the whole application initialises and then 'hangs'. Note, the SPI thread will work perfectly when the Ethernet thread is not enabled.

I have already checked stack sizes and changed task priorities, however the same behaviour always happens, the application just seems to 'hang'. 

 

From debugging, when the session is paused in SDK, the software breaks at prvIdleTask(), this happens when just the Ethernet thread is running or both threads are running.

 

Is there a way in the SDK to view realtime the status of all threads, stacks and queues? As debugging threads 'blind' is near impossible, as there is no way to see what state each thread is in.

 

Any help is very much appreciated, thank-you in advance.

 

J Hedges,

R&D Development Engineer

 

Hardware and software release;

Zedboard Rev. C

Vivado release 2016.2.

Xilinx SDK release 2016.2.

freertos823_xilinx V1.1 based on FreeRTOS V8.2.3 (delivered with SDK)

0 Kudos
7 Replies
Explorer
Explorer
4,848 Views
Registered: ‎07-14-2014

Re: freertos823_xilinx thread debugging

Hi,

 

I have come across this on my travels

 

https://mcuoneclipse.com/2016/07/06/freertos-kernel-awareness-for-eclipse-from-nxp/

 

but seems to be GDB only though. No idea if it can be made to work with the SDK though and I've not had chance to try it (it's on my ToDo list for one of the projects I'm working on, but not got round to it yet). I'll offer it as a possibility...

 

Not sure if Xilinx are working on something for a future release but I can't see anything like this in 2017.1 at the moment.

 

Regards

 

Simon

0 Kudos
4,819 Views
Registered: ‎04-25-2017

Re: freertos823_xilinx thread debugging

Hi Simon,

 

Thank you for your reply.

 

I believe that the NXP plugin is only compatible with the J-Link Segger debugger. Although on a whim I tried using the Xilinx SDK GDB server and it did not work, the tables just remain empty.

 

I have also tried the Stateviewer plugin, now provided by WITTENSTEIN High Integrity Systems. However this remains the same, the task and queue tables remain empty. This is claimes to be compatible with FreeRTOS and eclipse.

 

I am afraid it may be a problem with the port of FreeRTOS used in freertos823_xilinx.

 

It would be interesting to get an opinion from someone at Xilinx as it seems to be a pretty essential debugging tool that is needed.

 

Kind Regards,

 

Jack

0 Kudos
Explorer
Explorer
4,814 Views
Registered: ‎07-14-2014

Re: freertos823_xilinx thread debugging

Jack,

 

Sorry that didn't work out for you, I was hoping it would work. Thanks for letting me know. I guess I'll remove the bookmark I set for the NXP one then. :-(

 

It would be useful if Xilinx could provide something like this for the Microblaze/Zynq, especially as they are now deprecating xilkernel and suggesting that everyone uses FreeRTOS from now on.

 

Any thoughts Xilinx?

 

Simon

0 Kudos
Newbie ubicore
Newbie
4,321 Views
Registered: ‎06-08-2017

Re: freertos823_xilinx thread debugging

Hi all,

 

I use Stateviewer plugin and thread debbuging  (with OpenOCD) on other platform.... and it will be a very good news if it could work on zynq also.

Please Xilinx ?

 

Nicolas

0 Kudos
Newbie kenchang
Newbie
4,266 Views
Registered: ‎06-14-2017

Re: freertos823_xilinx thread debugging

I have seen this bahavior before with the FreeRTOS +TCP stack together with the MicroZed board. The whole CPU crashes when switching tasks.

The solution for me was to select a different boot sequence, for example select booting from QSPI with a simple FSBL and then use the debugger (JTAG) to download your code. I don't understand the mechanism yet, but it is related to the EMAC driver in combination with the boot ROM sequence.

regards,

Ken

0 Kudos
Newbie kenchang
Newbie
4,258 Views
Registered: ‎06-14-2017

Re: freertos823_xilinx thread debugging

I am also trying to install StateViewer in SDK 2016.4 to debug this. Sofar no luck. I can't even install it. There seems to be a version mismatch.

0 Kudos
Newbie kenchang
Newbie
4,247 Views
Registered: ‎06-14-2017

Re: freertos823_xilinx thread debugging

Wittenstein support has confirmed that Stateviewer does not work with Xilinx SDK.

0 Kudos