2014-07-03

Hello,

I've got a Linux + Bare-metal OS configuration working thanks to the app note XAPP1078.  I'm currently working on trying to get the "official" FreeRTOS port working (http://www.freertos.org/RTOS-Xilinx-Zynq.html), but am hitting a few snags.  There are some older references on these Xilinx forums to getting this combo working, but I believe that was using the 'unofficial' FreeRTOS port (http://interactive.freertos.org/entries/21706962-xilinx-freertos-port-for-zynq).  For the record, I'm using buildroot to construct my kernel -- I am not using Petalinux.  I am using a relatively recent version of the Xilinx kernel from https://github.com/Xilinx/linux-xlnx for my build.

I've adjusted my cpu1_bootvec.bin file so that it initializes 0xFFFF.FFF0 to 0x1800.0000.  This is so that when Linux boots up, it kicks off CPU1 execution without me having to manually update 0xFFFF.FFF0 to point to 0x1800.0000.

I've updated the FreeRTOS main() with the code that updates L1/L2 cache handling, as in the bare-metal example provided by XAPP1078.  I've also updated the serial handling to utilize OCM / softUART so it doesn't conflict with Linux's use of the serial port.

Problem #1: I get a kernel panic when the Linux kernel starts initializing.  If I comment out prvSetupHardware() in FreeRTOS's main.c, I can boot to the Linux shell prompt just fine.  At this point, I'm not sure if I'm disabling things things that are relevant to FreeRTOS operation itself or if they simply affect some of the tasks that are part of the demo.  I do need to investigate that further.

Problem #2: With prvSetupHardware() disabled, the code doesn't get very far in terms of task setup when it hits a heap allocation problem.  It gets through creating several tasks and eventually hangs indefinitely in vApplicationMallocFailedHook().

I should note that I can get the RTOSDemo to work just fine if it runs alone on CPU0.

Has anyone out there gotten the official FreeRTOS port to work in AMP mode w/Linux?

Thanks,

--tim

Show more