UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
252 Views
Registered: ‎04-19-2018

libmetal AMP Demo

I am following ug1186 page 13 has the steps to "Build Libmetal Bare-Metal Firmware with Xilinx SDK" , however the SDK crashs/hangs when clicking finish in step 1g as below

 

1. From the Xilinx SDK window, create the application project by selecting File > New >
Application Projects.
a. Specify the BSP (Board Support Package) OS platform: 
- standalone for a bare-metal application. I select Baremetal
b. Select one of the predefined hardware platform: ZCU102_hw_platform.  I select new and create a new hardware specification from the ZCU111 2019.1 BSP
c. Select the processor:
- One of the Cortex™-R5 (RPUs) is supported. Select psu_cortexr5_0 or I select psu_cortexr5_0
psu_cortexr5_1.
d. Select one of the following BSP options:
- Use Existing if you had previously created an application with a BSP and want to
reuse the same BSP. In this case, you need to make sure that the libmetal
library is selected in the BSP.
- Use Create New BSP to create a new BSP. If you make this selection, the
libmetal library is automatically included. I Select "create New"
e. Click Next to select an available template. (Do not click Finish.) I click Next
f. From the available templates, select libmetal AMP Demo. I select the "LibMetal AMP Demo"
g. Click Finish. SDK crashes here

Is this the same issue as the in which the SDK crashes when the libmetal library is included?

https://forums.xilinx.com/t5/Embedded-Development-Tools/XSDK-Eclipse-crashes-during-libmetal-BSP-generation/td-p/954535

 

0 Kudos
4 Replies
Adventurer
Adventurer
223 Views
Registered: ‎04-19-2018

Re: libmetal AMP Demo

indeed this is the same fault that causes the SDK to crash when libmetal library is included in a BSP project.

I manullay built the BSP with the commandline tools

0 Kudos
Adventurer
Adventurer
152 Views
Registered: ‎04-19-2018

Re: libmetal AMP Demo

I have managed to run the prebuilt demo on the Target (ZCU111), but i cannot seem to get the demo to run after building without error, using the guide ug1186

I manage to boot the kernel, however the device tree not loading correctly;

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Oct 9 13:34:33 UTC 2019
[    0.000000] Machine model: ZynqMP ZCU111 RevA
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] OF: fdt: Reserved memory: unsupported node format, ignoring
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.

This is with the following system-user.dtsi

/include/ "system-conf.dtsi"
/{
reserved-memory {
	#address-cells = <2>;
	#size-cells = <2>;
	ranges;
	rproc_0_reserved: rproc@3ed000000 {
		no-map;
		reg = <0x0 0x3ed00000 0x0 0x2000000>;
			};
	};

amba {
/* Shared memory */
	shm0: shm@0 {
		compatible = "shm_uio";
		reg = <0x0 0x3ed80000 0x0 0x1000000>;
		};
/* IPI device */
		ipi_amp: ipi@ff340000 {
			compatible = "ipi_uio";
			reg = <0x0 0xff340000 0x0 0x1000>;
			interrupt-parent = <&gic>;
			interrupts = <0 29 4>;
		};
	};
};&ttc0 {
	compatible = "ttc0";
	status = "okay";
};

/{
	power-domains {
		pd_r5_0: pd_r5_0 {
			#power-domain-cells = <0x0>;
			pd-id = <0x7>;
		};
		pd_tcm_0_a: pd_tcm_0_a {
			#power-domain-cells = <0x0>;
			pd-id = <0xf>;
		};
		pd_tcm_0_b: pd_tcm_0_b {
			#power-domain-cells = <0x0>;
			pd-id = <0x10>;
		};
	};

	amba {
		/* firmware memory nodes */
		r5_0_tcm_a: tcm@ffe00000 {
			compatible = "mmio-sram";
			reg = <0x0 0xFFE00000 0x0 0x10000>;
			pd-handle = <&pd_tcm_0_a>;
		};
	
		r5_0_tcm_b: tcm@ffe20000 {
			compatible = "mmio-sram";
			reg = <0x0 0xFFE20000 0x0 0x10000>;
			pd-handle = <&pd_tcm_0_b>;
		};

		elf_ddr_0: ddr@3ed00000 {
			compatible = "mmio-sram";
			reg = <0x0 0x3ed00000 0x0 0x100000>;
		};

		test_r5_0: zynqmp_r5_rproc@0 {
			compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
			reg = <0x0 0xff9a0100 0x0 0x100>,
			<0x0 0xff9a0000 0x0 0x100>;
			reg-names = "rpu_base", "rpu_glbl_base";
			dma-ranges;
			core_conf = "split0";
			srams = <&r5_0_tcm_a &r5_0_tcm_b &elf_ddr_0>;
			pd-handle = <&pd_r5_0>;
 		};
 	};
};

Running the DTC tool over the system.dts built using this throws up some errors.

user@user-VirtualBox:~/openAMP/openAMP$ dtc -I dtb -O dts images/linux/system.dtb -o output.dts
output.dts: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00000000 unit name should not have leading "0x"
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00000000 unit name should not have leading 0s
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x01e00000 unit name should not have leading "0x"
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x01e00000 unit name should not have leading 0s
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x01e40000 unit name should not have leading "0x"
output.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x01e40000 unit name should not have leading 0s
output.dts: Warning (pci_device_reg): Node /amba/pcie@fd0e0000/legacy-interrupt-controller missing PCI reg property
output.dts: Warning (simple_bus_reg): Node /amba/shm@0 simple-bus unit address format error, expected "3ed80000"
output.dts: Warning (simple_bus_reg): Node /amba/zynqmp_r5_rproc@0 simple-bus unit address format error, expected "ff9a0100"
output.dts: Warning (gpios_property): Could not get phandle node for /__symbols__:gpio(cell 0)

Any help would be apprecaited.

Thanks

Tim

0 Kudos
Highlighted
Moderator
Moderator
144 Views
Registered: ‎05-10-2017

Re: libmetal AMP Demo

Can you post the error you are seeing when booting?

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
112 Views
Registered: ‎04-19-2018

Re: libmetal AMP Demo

@jovitac The error was in the boot log as mentioned above;

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Oct 9 13:34:33 UTC 2019
[    0.000000] Machine model: ZynqMP ZCU111 RevA
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] OF: fdt: Reserved memory: unsupported node format, ignoring
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.

booting into  linux i woudl expect to see something in /proc/iomem

root@xilinx-zcu111-2019_1:~# cat /proc/iomem
00000000-7fefffff : System RAM
  00080000-0105ffff : Kernel code
  01060000-0112ffff : reserved
  01130000-01224fff : Kernel data
  07920000-0792bfff : reserved
  0792f000-07ffffff : reserved
  6bc00000-7fbfffff : reserved
  7fef7000-7fefefff : reserved
  7feff000-7fefffff : reserved
a0040000-a007ffff : sd-fec@a0040000
a0080000-a00bffff : sd-fec@a0080000
fd0b0000-fd0bffff : perf-monitor@fd0b0000
fd0c0000-fd0c1fff : ahci@fd0c0000
fd3d0000-fd3d0fff : siou
fd400000-fd43ffff : serdes
fd490000-fd49ffff : perf-monitor@fd490000
fd4a0000-fd4a0fff : dp
fd4aa000-fd4aafff : blend
fd4ab000-fd4abfff : av_buf
fd4ac000-fd4acfff : aud
fd4c0000-fd4c0fff : dma@fd4c0000
fd4d0000-fd4d0fff : watchdog@fd4d0000
fd500000-fd500fff : dma@fd500000
fd510000-fd510fff : dma@fd510000
fd520000-fd520fff : dma@fd520000
fd530000-fd530fff : dma@fd530000
fd540000-fd540fff : dma@fd540000
fd550000-fd550fff : dma@fd550000
fd560000-fd560fff : dma@fd560000
fd570000-fd570fff : dma@fd570000
fe200000-fe207fff : dwc3@fe200000
  fe200000-fe207fff : dwc3@fe200000
fe20c100-fe23ffff : dwc3@fe200000
ff000000-ff000fff : xuartps
ff010000-ff010fff : xuartps
ff020000-ff020fff : i2c@ff020000
ff030000-ff030fff : i2c@ff030000
ff0a0000-ff0a0fff : gpio@ff0a0000
ff0e0000-ff0e0fff : ethernet@ff0e0000
ff0f0000-ff0f0fff : spi@ff0f0000
ff150000-ff150fff : watchdog@ff150000
ff170000-ff170fff : mmc@ff170000
ff960000-ff960fff : memory-controller@ff960000
ff9d0000-ff9d00ff : usb0@ff9d0000
ffa00000-ffa0ffff : perf-monitor@ffa00000
ffa10000-ffa1ffff : perf-monitor@ffa10000
ffa50000-ffa507ff : ams-base
ffa60000-ffa600ff : rtc@ffa60000
ffa80000-ffa80fff : dma@ffa80000
ffa90000-ffa90fff : dma@ffa90000
ffaa0000-ffaa0fff : dma@ffaa0000
ffab0000-ffab0fff : dma@ffab0000
ffac0000-ffac0fff : dma@ffac0000
ffad0000-ffad0fff : dma@ffad0000
ffae0000-ffae0fff : dma@ffae0000
ffaf0000-ffaf0fff : dma@ffaf0000
800000000-87fffffff : System RAM
  87be00000-87c5fffff : reserved
  87c7bd000-87fdfffff : reserved
  87ff00000-87ffbbfff : reserved
  87ffbe000-87ffbefff : reserved
  87ffbf000-87fff4fff : reserved
  87fff5000-87fffefff : reserved
  87ffff000-87fffffff : reserved
root@xilinx-zcu111-2019_1:~#
0 Kudos