04-26-2017 03:48 AM
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.
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)
04-26-2017 06:08 AM
I have come across this on my travels
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.
04-27-2017 04:17 AM
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.
04-27-2017 04:50 AM
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?
06-08-2017 02:34 AM
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 ?
06-14-2017 02:17 AM
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.