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: 
Observer allenguo
Observer
781 Views
Registered: ‎06-18-2018

failed to build r5 echo test firmware with SDK

Jump to solution

Hello,

 

I am trying to reproduce echo_test with source code following the steps in ug1186 v2018.2. I am using latest ZCU102 board. All my tools are v2018.2. I was able to create my own openamp Linux system, boot from SD card. From it, I was able to run echo_test successfully with petalinux-generated firmware/applications. 

Then I built my own echo_test firmware for R5 following the instruction in UG1186 pg.28 "Building OpenAMP application for RPU Firmware". The build was successful. 

However when I try to use my firmware instead of demo firmware in /lib/firmware, I got the error messages.

 

root@xilinx-zcu102-2018_2:~/echotest/Debug# echo ./echotest.elf > /sys/class/remoteproc/remoteproc0/firmware
root@xilinx-zcu102-2018_2:~/echotest/Debug# echo start > /sys/class/remoteproc/remoteproc0/state
-sh: echo: write error: No such file or directory

 

Comparing /lib/firmware/image_echo_test with my echotest.elf, they both have identical source code. However, it seems one is hard-float and one is soft-float.

 

root@xilinx-zcu102-2018_2:~/echotest/Debug# readelf ./echotest.elf -h
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x0
Start of program headers: 52 (bytes into file)
Start of section headers: 768872 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 3
Size of section headers: 40 (bytes)
Number of section headers: 29
Section header string table index: 28

 

root@xilinx-zcu102-2018_2:~/echotest/Debug# readelf /lib/firmware/image_echo_test -h
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x0
Start of program headers: 52 (bytes into file)
Start of section headers: 801428 (bytes into file)
Flags: 0x5000200, Version5 EABI, soft-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 3
Size of section headers: 40 (bytes)
Number of section headers: 28
Section header string table index: 27

 

Can you let me know how to build a working firmware?

 

Thank you,

Allen

0 Kudos
1 Solution

Accepted Solutions
Observer allenguo
Observer
734 Views
Registered: ‎06-18-2018

Re: failed to build r5 echo test firmware with SDK

Jump to solution

Hi jovitac,

 

Thank you for replying. I figured it out. Basically, all I need to do is to copy my cortex-r5 binary file to /lib/firmware, then use 

echo "file name" > /sys/class/remoteproc/remoteproc0/firmware

It works nicely.

 

Thanks for help,

Allen

 

0 Kudos
2 Replies
Moderator
Moderator
744 Views
Registered: ‎05-10-2017

Re: failed to build r5 echo test firmware with SDK

Jump to solution

Hi Allen,

 

Could you please share the recipe for your application?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer allenguo
Observer
735 Views
Registered: ‎06-18-2018

Re: failed to build r5 echo test firmware with SDK

Jump to solution

Hi jovitac,

 

Thank you for replying. I figured it out. Basically, all I need to do is to copy my cortex-r5 binary file to /lib/firmware, then use 

echo "file name" > /sys/class/remoteproc/remoteproc0/firmware

It works nicely.

 

Thanks for help,

Allen

 

0 Kudos