RTOSDemo on MicroZed with SDK 2015.4

I am working to get the demo working on my Microzed. I imported the demo project without copying and I get an error for the include “xparameters.h” The file is in the standalone_bsp project and I cannot find a way to include it. I have added the include path both using a workspace directive and a filepath workspace and I can’t figure it out. Has anyone run across this problem? Sorry I just failed to read all of the instructions.

RTOSDemo on MicroZed with SDK 2015.4

Hi Sting, Try the following steps: Unpack the entire ZIP in e.g. c:tempxilinx Start 2015.4 File -> Switch -> Other -> enter e.g. “c:tempxilinxworkspace” File -> Import -> General -> Existing project into workspace Root directory enter:
C:tempxilinxFreeRTOS-PlusDemoFreeRTOS_Plus_TCP_and_FAT_Zynq_SDK
and press TAB The box will fill with three projects. Select them all and press OK. When I press “Project -> Build All”, indeed I get mentioned error, a missing xparameters.h Solution: Press File -> New -> Board support package (BSP) Do not use the default but this location for the BSP :
C:tempxilinxFreeRTOS-PlusDemoFreeRTOS_Plus_TCP_and_FAT_Zynq_SDK
  • Hardware platform: MicroZedhwplatform
  • CPU: ps7cortexa90
  • standalone (because the project already contains FreeRTOS kernel)
Press Finish Choose libraries (none are needed) and press OK Now right-click in “Project Explorer” on RTOSDemo, select Project references and make sure that these are selected:
MicroZed_hw_platform
standalone_bsp_0
It makes the main project (RTOSDemo) dependent on these 2 sub-projects, they will be included when building. Now try “Project->Build All” again. RTOSDemo.elf will be created. And also this file will be present:
..standalone_bsp_0ps7_cortexa9_0includexparameters.h
Have a look at the attachment of this post: ‘MicroZed_debug.png’, it might answer your next questions 🙂 Regards.

RTOSDemo on MicroZed with SDK 2015.4

Thanks for your help. I solved the problem in both ways now. I really appreciate your help. I have the application running and I can ping it at the address that I set in the FreeRTOSConfig.h and I can ping the address. I for some reason can’t get the logging to the UDP to work. I probably have the addresses mixed up for some reason or some switch not set correctly and I will continue to grock through the config files to see what I missed. I have xxxUDPLOGGINGxxx setup at 192.168.1.115 and the Microzed xxxIP_ADDRx setup at 192.168.1.112 the source is supposed to output some debugging but I can’t track it. I setup the Udp_Term at 192.168.1.115 sendPort= 50000 recvPort at 1500

RTOSDemo on MicroZed with SDK 2015.4

I am starting to understand the issue here, but barely. The hw_platforms that ship with the demo do not have bit files associated with them. When I ‘Program FPGA’ a bitfile is installed in the fpga. I created a bitstream for processor 0 and program the fpga with that bitstream. When this is successful the MicroZed blue light comes on and is ready for the software. However when I try to run the software I believe, just a guess, that the hardware platform I am using is incompatible with the hardware platform that is shipped with the demo and the blue light goes off.

RTOSDemo on MicroZed with SDK 2015.4

This is Xilinx tools specific stuff, rather than FreeRTOS specific stuff. The demos ship with a hardware description in the form of a hardware project, from which the Xilinx tools auto-generate a BSP project, which in turn is used by the application project. The instructions on the documentation page give detailed information on how this is down – but the demo does not use anything outside of the hard wired ARM processor, the FPGA is not programmed so no bitstream is required [by the demo].

RTOSDemo on MicroZed with SDK 2015.4

Sting, about the UDP logging. Here are all config parameters that influence the UDP logging: ~~~~ /* Make this non-zero if your terminal needs CR+LF in stead of LF. */

define configUDPLOGGINGNEEDSCRLF ( 0 )

/* The UDP port to which the UDP logging facility sends messages. Open a UDP socket on this port number on your laptop: */

define configUDPLOGGINGPORT_REMOTE 2403

/* The local UDP port to which messages can be sent. If you want to send messages to the UDP logging socket, send them to the following port number: */

define configUDPLOGGINGPORT_LOCAL 2402

/* You can define configUDPLOGGINGADDR[0-3] which will be used as a fixed target IP address. As defined here, all UDP logging will be sent to 192.168.1.115 on port ‘configUDPLOGGINGPORT_REMOTE’ */

define configUDPLOGGINGADDR0 192

define configUDPLOGGINGADDR1 168

define configUDPLOGGINGADDR2 1

define configUDPLOGGINGADDR3 115

/* If you do not define configUDPLOGGINGADDR[0-3], the program will look at your network address and netmask, and (in your case) all logging will be sent to 192.168.1.255 port ‘configUDPLOGGINGPORT_REMOTE’ */ ~~~~ If you are able to PING, I don’t think you have a hardware problem and ALL UDP and TCP communication should be possible. About the hardware initialisation: in the examples that I sent, another platform ZC02 was used, sorry about that. I attached a new PGN file that shows the settings for MicroZedhwplatform. Regards.

RTOSDemo on MicroZed with SDK 2015.4

Thank you for your help. I couldn’t figure out why it wasn’t working so I turned off the Windows Firewall and ran Wireshark to check out what was happening on the network. Once I reasserted how brain dead I really am and fixed my addresses I can now get udp debug messages. I however cannot get the HTTP functionality of the demo working. I disabled all demo but udp and http as follows: ~~~~

define mainCREATEFTPSERVER 0

define mainCREATEHTTPSERVER 1

define mainCREATEUDPCLI_TASKS 0

define mainCREATETCPECHOCLIENTTASKS_SINGLE 0

define mainCREATESIMPLETCPECHOSERVER 0

define mainCREATEUDPLOGGING_TASK 1

~~~~ and when I go to either a windows machine or a linux machine on the network and attempt to look at the http page I get the following: ~~~~ 3.527.848 [SvrWork ] Socket 80 -> 0.0.0.0:0 State eCLOSED->eTCPLISTEN 24.731.194 [IP-task ] Gain: Socket 80 now has 1 / 12 child 24.731.218 [IP-task ] prvSocketSetMSS: 1460 bytes for 192.168.1.101:51418 24.731.327 [EMAC ] Network buffers: 62 lowest 62 24.731.360 [IP-task ] Socket 80 -> 192.168.1.101:51418 State eCLOSED->eSYNFIRST 24.731.394 [IP-task ] Socket 80 -> 192.168.1.101:51418 State eSYNFIRST->eSYNRECEIVED 24.731.452 [IP-task ] Gain: Socket 80 now has 2 / 12 children 24.731.474 [IP-task ] prvSocketSetMSS: 1460 bytes for 192.168.1.101:51419 24.731.501 [IP-task ] Socket 80 -> 192.168.1.101:51419 State eCLOSED->eSYNFIRST 24.731.546 [IP-task ] Socket 80 -> 192.168.1.101:51419 State eSYNFIRST->eSYNRECEIVED 24.731.598 [IP-task ] TCP: passive 80 => 192.168.1.101:51418 set ESTAB (sock 2820e0) 24.731.630 [IP-task ] Socket 80 -> 192.168.1.101:51418 State eSYNRECEIVED->eESTABLISHED 24.731.685 [IP-task ] TCP: passive 80 => 192.168.1.101:51419 set ESTAB (sock 1fc4f8) 24.731.716 [IP-task ] Socket 80 -> 192.168.1.101:51419 State eSYNRECEIVED->eESTABLISHED 24.731.776 [IP-task ] xTCPCheckNewClient[0]: client on port 80 24.731.818 [SvrWork ] TPC-server: new HTTP client 24.731.876 [SvrWork ] TPC-server: new HTTP client 24.786.066 [SvrWork ] Open file ‘/ram/websrc/’: Is a directory 34.741.327 [IP-task ] Socket 80 -> 192.168.1.101:51419 State eESTABLISHED->eLASTACK 34.741.451 [IP-task ] Socket 80 -> 192.168.1.101:51419 State eLASTACK->eCLOSEWAIT 34.741.511 [SvrWork ] xHTTPClientWork: rc = -128 34.741.534 [IP-task ] Lost: Socket 80 now has 1 / 12 child 34.741.555 [IP-task ] FreeRTOS_closesocket[80 to 192.168.1.101:51419]: buffers 64 socks 2 ~~~~ And the browser window waits forever, I will look at the wireshark capture next time. When I close the browser window because I am tired of waiting I get ~~~~ 290.390.277 [IP-task ] Socket 80 -> 192.168.1.101:51418 State eESTABLISHED->eLASTACK 290.390.396 [IP-task ] Socket 80 -> 192.168.1.101:51418 State eLASTACK->eCLOSEWAIT 290.390.457 [SvrWork ] xHTTPClientWork: rc = -128 290.390.482 [IP-task ] Lost: Socket 80 now has 0 / 12 children 290.390.503 [IP-task ] FreeRTOSclosesocket[80 to 192.168.1.101:51418]: buffers 64 socks 1 ~~~~ Is there something obvious I am doing wrong?

RTOSDemo on MicroZed with SDK 2015.4

I think a major disconnect that I am having is the hardware definition of the zynq processor. The demo hardware definition does not come with a bit file that determines the hardware on the zynq. Given there is no bit file and what I am doing doesn’t work, I assume I am not building this correctly. Does the demo assume something about the hardware on the zynq?

RTOSDemo on MicroZed with SDK 2015.4

….so the HTTP gets as far as “Open file ‘/ram/websrc/’: Is a directory” – what URL did you use? You have to use a complete URL to the file, rather than just the directory, as I think the default webpage is something like freertos.html. Unless you have changed the files on the RAM disk, you can see the URL used on this page: http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusTCP/HTTPwebServer.html Ref the bitfile. As far as I know, if you are just using the Cortex-A processors, then no bit file is needed. That is because the Cortex-A processors are hard processors that can be used just like any processor – they are not soft cores that need the FPGA to be programmed.

RTOSDemo on MicroZed with SDK 2015.4

I finally quit trying to take shortcuts. I ftp’d to the site and looked at the file, I somehow thought the page would automatically show and should have known better. Once I saw the page name I then was able to display the page with 192.168.1.112/freertos.html. I think I have all I need to start working on my proof of concept. I still don’t understand the lack of a bit file and will figure that out later. There might be a boot oprion to boot a cortex processor without one but if you want to add any fpga components and be able to connect to them, you have to generate a bit file and I think it is a hard processor, the bit file just loads all of the support for the processor to connect to the fpga ip. But thats a specific issue with the MicroZed and not FreeRTOS. So thank you everyone for being patient with me. I appreciate all of the guidance.