cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jeff1
Observer
Observer
529 Views
Registered: ‎06-01-2020

[OpenAMP] Not able to run OpenAMP on Linux Userspace

Trying to run open-amp userspace application. The application hangs

root@localhost:~# matrix_multiply-shared
metal: info: metal_uio_dev_open: No IRQ for device 3ed20000.shm.
Successfully open shm device.
Successfully added shared memory
Successfully probed IPI device
metal: error: metal_irq_register: irq 0 need drv_id and hd.
Successfully initialized Linux r5 remoteproc.
Successfully initialized remoteproc
Calling mmap resource table.
Successfully mmap resource table.
Successfully set resource table to remoteproc.
Creating virtio...
Successfully created virtio device.
initializing rpmsg vdev
CLIENT> Compute thread unblocked ..
CLIENT> It will generate two random matrices.
CLIENT> Send to the remote and get the computation result back.
CLIENT> It will then check if the result is expected.

<<<< stuck here >>>>

I could see r5 bootup log

Starting application...
                       Initialize remoteproc successfully.
creating remoteproc virtio
initializing rpmsg shared buffer pool
initializing rpmsg vdev

My bif file

the_ROM_image:
{
[bootloader, destination_cpu=a53-0] pre-built/linux/images/zynqmp_fsbl.elf
[destination_device=pl] images/linux/system.bit
[destination_cpu=pmu] images/linux/pmufw.elf
[destination_cpu=r5-0] ./image_echo_test
[destination_cpu=a53-0, exception_level=el-3, trustzone] pre-built/linux/images/bl31.elf
[destination_cpu=a53-0, exception_level=el-2] pre-built/linux/images/u-boot.elf
}

device tree

/ {
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                rproc_0_reserved: rproc@3ed000000 {
                        no-map;
                        reg = <0x0 0x3ed00000 0x0 0x1000000>;
                };
        };

        amba {
                vring: vring@0 {
                        compatible = "vring_uio";
                        reg = <0x0 0x3ed40000 0x0 0x40000>;
                };
                shm0: shm@0 {
                        compatible = "shm_uio";
                        reg = <0x0 0x3ed20000 0x0 0x0100000>;
                };
                ipi0: ipi@0 {
                        compatible = "ipi_uio";
                        reg = <0x0 0xff340000 0x0 0x1000>;
                        interrupt-parent = <&gic>;
                        interrupts = <0 29 4>;
                };
        };
};

The added following contains in lscript.ld

.resource_table 0x3ed20000 : {
. = ALIGN(4);
*(.resource_table)
} > psu_ddr_S_AXI_BASEADDR

I am very new to OpenAMP

Please help me to solve this issue

Thank you for your support!!!

0 Kudos
1 Reply
jovitac
Moderator
Moderator
487 Views
Registered: ‎05-10-2017

Which version of the tools is this?

Also I see you have image_echo_test in your bif but you are trying to run the matrix multiplication example

Did you build the matrix multiplication for R5 in SDK/Vitis?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos