Hi,
I am trying to make an AMP configuration on the zedboard with petalinux on core0 and freeRTOS on core1.
At the moment I have a working petalinux system. To start freertos on core1 I use modprobe zynq_remoteproc_debug. This is the standard zynq_remoteproc module that I copied from the xilinx linux github website with some added prints to see what the module was doing. I also added a single-threaded work queue to call rproc_boot after the firmware is loaded (copied from this website: http://henryomd.blogspot.be/2015/02/zynq-amp-linux-on-cpu0-and-bare-metal.html). The output can be found at the bottom of this page.
The problem is that I am not sure if the freeRTOS firmware is actually working.
I have tried a few different things:
1. Install openSSH on petalinux so I can use the UART port for freeRTOS. I added all openSSH libraries/applications to petalinux with the petalinux-config -c rootfs command.
Problem: Petalinux does not reply with a "SSH-protoversion-softwareversion" when I try to establish a connection ((http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_12-4/124_ssh.html figure 2). I am however able to ping between my laptop and the zedboard successfully. I discovered this problem with wireshark, the output file is also at the bottom of this page.
2. Forget openSSH and just use the UART port for freeRTOS. The kernel module zynq_remoteproc_debug was automatically loaded by adding zynq_remoteproc_debug to the /etc/modules file.
Problem: I couldn't get any output from the freeRTOS firmware.
Possible Reasons?:
*Wrong configuration of devive-tree or freeRTOS BSP? (I set stdin and stdout to UART1 in the BSP and set the output in the device-tree to UART0).
* firmware not started?
3. Write a fixed value to the OCM memory at the start of the freeRTOS firmware and in every running task. I then wrote a linux program to read the OCM memory.
Problem: The value did not correspond with the value I wrote in the freeRTOS firmware.
To test if the linux program was actually working I added the ability to write to the OCM. This seems to be working.
Furthermore it was weird to see that the value I wrote to the OCM memory didn't change as soon as I started the freeRTOS firmware.
I disabled the ICACHE and DCACHE of core0 and removed L2 cache from the device-tree to make sure there were no caching issues.
The only reason I can imagine, other than the firmware not being started, is that there is a mismatch between the addresses in the 2 cores. For petalinux I used /dev/mem and in the freeRTOS firmware I used Xil_Out32(); Software code is on the bottom of the page.
4. With the first 3 methods not working, I thought of another idea: sending a software interrupt instead of writing to the OCM memory. I would be able to count the incoming interrupts at core0 with the /proc/interrupts file.
Problem: I didn't receive any interrupts
Possible Reasons?:
*Bad interrupt configuration?
*Bad device-tree configuration?
*Firmware not started?
After all these tries I think the conclusion must be that there is something wrong with the loading of the firmware or the actual firmware. Which seems odd because of the fact that there are no errors in the modprobe output. Also the bootaddress that is being printed out by modprobe corresponds with the address in the linker script.
All my files can be accessed on my bitbucket account:
https://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/?at=uartRtos
https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217?at=werk
The most important files:
output modprobe zynq_remoteproc_debug: https://bitbucket.org/sammaes/petalinux/src/c2c536f91b3d80b2a115b005d66cf144c2dc2555/mimimum/modprobe.txt?at=uartRtos&fileviewer=file-view-default
wireshark ssh:thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/ssh.pcapng?at=uartRtos&fileviewer=file-view-default
dtsi files: thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/device-tree/system-conf.dtsi?at=uartRtos&fileviewer=file-view-default
tthttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/device-tree/zynq-7000.dtsi?at=uartRtos&fileviewer=file-view-default
kernel config: thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/kernel/config?at=uartRtos&fileviewer=file-view-default
Linux program that reads/writes OCM memory: https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217d2620d55f42ee2368ff10162d5ba/minimum.sdk/testFirmware/src/helloworld.c?at=werk&fileviewer=file-view-default
freeRTOS firmware: https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217d2620d55f42ee2368ff10162d5ba/minimum.sdk/freertos_minimum_application/src/freertos_hello_world.c?at=werk&fileviewer=file-view-default
In both programs is an include of "../../globalConfig.h". The content of this header file: #define STATUSADDR 0xFFFC0000 //The OCM address to read/write the data
TLDR: I am trying to build an AMP system with petalinux and freeRTOS. Trouble is that I am not sure if the freeRTOS firmware on core1 is actually started. I listed a few things I have tried but none of them seem to be working.
I would be very grateful if someone could help me out with this matter :).