How to access ethernet ports from both RPU and APU?

349 Views Asked by At

I am using ZU19EG Zynq UltraScale+ MPSoC bought from iWave with APU – Cortex 53 (quadcore) and RPU – Cortex R5 (dualcore). On this board, I am trying to run the sample lwIP echo server application provided in Vitis 2021.1 on RPU in lockstep mode and Linux on APU. When I power on the board, the RPU application starts fine and I am able to see UDP messages on host PC. But, while Linux boots on APU, the connection to RPU is lost and I am unable to ping RPU any more. But, I continue to see that the application is running fine on RPU from the messages over UART. I would like to know how to fix this issue of losing connection to RPU from host while Linux boots on APU.

Here are the detailed steps on how I am booting the board:

First I am building the image using petalinux (Attaching patch and xsa files):

  • source ~/petalinux/settings.sh
  • petalinux-create --type project --template zynqMP --name zynqmp-iwg35m
  • cd zynqmp-iwg35m/
  • patch -Np1 < ../PATCH000-iW-PRGBZ-SC-01-R1.5-REL1.0-ED3.0-PL21.1_customization.patch
  • petalinux-config --get-hw-description=/home/docs/19EG-1I-R15-ED30-21_1-F1_0/system.xsa
  • petalinux-build
  • petalinux-package --boot --format BIN --fsbl images/linux/zynqmp_fsbl.elf --pmufw images/linux/pmufw.elf --atf images/linux/bl31.elf --fpga images/linux/system.bit --u-boot images/linux/u-boot.elf -o images/linux/BOOT.bin

Generate Platform Project from xsa:

  • In the Vitis IDE, go to File → New → Platform Project.
  • In the Create New Platform page, enter the 'platform_name' and click Next.
  • In the Platform view, go with the default tab Create from hardware specification (XSA).
  • Click Browse… to select the XSA file.
  • In the platform window select Operating system as 'standalone', Processor as 'psu_cortexa53_0' and Target processor to create FSBL as 'psu_cortexa53_0' and click on Finish.
  • Build the platform project.

Create lwIP application for R5:

  • In Vitis, File -> New -> Application Project
  • Next
  • Give application name, select psu_cortexr5_0 -> next
  • Choose operating system as standalone -> next
  • Select lwIP Echo Server template -> finish
  • In src/ldscript.ld change psu_r5ddr_0_MEM_0 Base Address: 0x70000000 and Size: 0x10000000
  • Replace xemacpsif_physpeed.c with the file from BareMetal FTP attached here
  • Save and build

Create Linux Domain:

  • Open platform.spr -> click on “+”
  • Name: Linux_Domain
  • Display Name: Linux_Domain
  • OS: Linux
  • Processor: psu_cortexa53
  • Supported Runtimes: C/C++
  • Architecture: 64-bit
  • Bif File: vitis_ws\zu19eg\export\zu19eg\sw\zu19eg\boot\zu19eg.bif
  • Boot Component Directory: The linux/images directory that you created in petalinux step
  • FAT32 Partition Directory: The linux/images directory that you created in petalinux step
  • OK
  • Build the platform project

Create Linux application:

  • In Vitis, File -> New -> Application Project
  • Next
  • Give application name, select psu_cortexa53_0 -> next
  • Choose operating system as Linux (should be set automatically) -> next
  • Select Hello world template -> finish
  • Build the project

Finally, generate boot image:

  • Xilinx -> create boot image -> zynq and zynqMP UltraScale
  • Create new bif file
  • arch: ZynqMP
  • select bif output path
  • Add FSBL (under zu19eg/export/sw/……/Linux_domain/images/zynqmp_fsbl.elf) -> ok (default values)
  • Add pmufw.elf from same path as above -> pmu(loaded by bootrom) -> ok
  • Add system.bit from same path -> default values -> ok
  • bl31.elf -> enable trust zone -> ok
  • add R5 lwip application elf -> R5 lockstep -> ok
  • add u-boot.elf from same path as other files before R5 app -> Exception: EL2 -> ok
  • create Image

Copy Contents to SD card:

  • Copy: BOOT.bin, image.ub to SD card and set board to SD boot -> connect ethernet to first port beside UART and to PC.
  • On PC set IP: 192.168.1.1, mask 255.255.255.0, default gateway: 192.168.1.10
  • Open serial terminal -> both boot from APU and app messages from RPU printed here (in current config )
  • Open wireshark -> All I see is ARP and no response from board
  • Tried ping 192.168.1.10 But, destination is unreachable.

Please let me know if you need any further details from my end that could help you in providing required support.

Any help is appreciated.

Thanks.

PS: I am not sure how to attach files here. Let me know if you need them.

0

There are 0 best solutions below