bare metal app

Applications, development tools, FPGA, C, WEB
pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Fri Jun 19, 2015 5:05 pm

I've adapted the instructions from this article to Red Pitaya.

I now have zynq_remoteproc loading app_cpu1.elf and starting CPU1.

You can find my instructions at the following location:

https://github.com/pavel-demin/red-pita ... metal_test

Mike1010
Posts: 23
Joined: Mon Jun 15, 2015 8:02 pm

Re: bare metal app

Post by Mike1010 » Fri Jun 19, 2015 5:36 pm

Really good work.

Will it also work with make NAME=red_pitaya_0_92 all ?

Did you figure out why linux starts with both cores? I try to update to kernel 4.0.

pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Fri Jun 19, 2015 7:33 pm

Mike1010 wrote: Will it also work with make NAME=red_pitaya_0_92 all ?
It should.
Mike1010 wrote: Did you figure out why linux starts with both cores? I try to update to kernel 4.0.
No. The zynq_remoteproc driver stops and starts CPU cores when needed.

Mike1010
Posts: 23
Joined: Mon Jun 15, 2015 8:02 pm

Re: bare metal app

Post by Mike1010 » Fri Jun 19, 2015 7:43 pm

ok.

The structs in file app_cpu1.c resource_table, fw_resource_type, fw_rsc_carveout, rproc_resource and the ams_vectors.S, boot.S, xtime_1.c patch file are all for the remoteproc driver?

i will try to see if changing to linux kernel 4.0 helps.

what will happen if cpu1_app.elf should be started on core1 but its blocked by linux (without your remoteproc approach)...it will not start and return no error?

pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Fri Jun 19, 2015 10:34 pm

Mike1010 wrote: The structs in file app_cpu1.c resource_table, fw_resource_type, fw_rsc_carveout, rproc_resource and the ams_vectors.S, boot.S, xtime_1.c patch file are all for the remoteproc driver?
Have you read this article that you and I referenced several times? It contains all the answers. I've even seen your comments at the end of this article :D

The answer is "yes" for resource_table, fw_resource_type, fw_rsc_carveout, rproc_resource.

The answer is "no" for ams_vectors.S, boot.S, xtime_1.c patches. They are essential for app_cpu1.elf to run even without zynq_remoteproc driver. They can be found in both XAPP1078 and XAPP1079.
Mike1010 wrote:what will happen if cpu1_app.elf should be started on core1 but its blocked by linux (without your remoteproc approach)...it will not start and return no error?
I don't know.

pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Fri Jun 19, 2015 10:38 pm

I've just replaced all the steps that required the SDK GUI with a couple of scripts. Now, all the steps can be done from the command line. I've updated the instructions accordingly.

Mike1010
Posts: 23
Joined: Mon Jun 15, 2015 8:02 pm

Re: bare metal app

Post by Mike1010 » Sat Jun 20, 2015 5:54 pm

Works great.

Just a note, what about the following warning?

Code: Select all

root@red-pitaya:/home# tar --directory=/lib/modules/3.18.0-xilinx/kernel/drivers -zxf drivers.tgz
root@red-pitaya:/home# depmod
depmod: WARNING: could not open /lib/modules/3.18.0-xilinx/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/3.18.0-xilinx/modules.builtin: No such file or directory

pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Sun Jun 21, 2015 10:14 am

Mike1010 wrote: Just a note, what about the following warning?

Code: Select all

root@red-pitaya:/home# tar --directory=/lib/modules/3.18.0-xilinx/kernel/drivers -zxf drivers.tgz
root@red-pitaya:/home# depmod
depmod: WARNING: could not open /lib/modules/3.18.0-xilinx/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/3.18.0-xilinx/modules.builtin: No such file or directory
I don't think that these warnings are critical. modules.builtin and modules.order can be copied from

Code: Select all

tmp/linux-xlnx-xilinx-v2015.1/modules.order
tmp/linux-xlnx-xilinx-v2015.1/modules.builtin
I've just found a description of these files
https://www.kernel.org/doc/Documentatio ... kbuild.txt

The following looks interesting:
modules.builtin
--------------------------------------------------
This file lists all modules that are built into the kernel. This is used
by modprobe to not fail when trying to load something builtin.
I'll try to make zynq_remoteproc, remoteproc, virtio and virtio_ring as builtin and then install only modules.builtin and modules.order.

pavel
Posts: 789
Joined: Sat May 23, 2015 5:22 pm

Re: bare metal app

Post by pavel » Sun Jun 21, 2015 8:18 pm

pavel wrote:I'll try to make zynq_remoteproc, remoteproc, virtio and virtio_ring as builtin and then install only modules.builtin and modules.order.
I tried but it didn't work. I've just added instructions on how to install the modules.builtin and modules.order files.

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: bare metal app

Post by Arnold » Wed Jun 24, 2015 10:01 am

hi pavel,

nice work. i found a bug in your makefile, https://github.com/pavel-demin/red-pita ... 1/Makefile:

Code: Select all

@$(CC) $(LDFLAGS) $(LIBRARIES) -o $@ $^
should be:

Code: Select all

@$(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
are there other compilers available rather than arm-xilinx-eabi-gcc?

what does not work?
Last edited by Arnold on Wed Jun 24, 2015 10:04 am, edited 1 time in total.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: Google [Bot] and 25 guests