Page 5 of 6

Re: bare metal app

Posted: Fri Jun 19, 2015 5:05 pm
by pavel
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

Re: bare metal app

Posted: Fri Jun 19, 2015 5:36 pm
by Mike1010
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.

Re: bare metal app

Posted: Fri Jun 19, 2015 7:33 pm
by pavel
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.

Re: bare metal app

Posted: Fri Jun 19, 2015 7:43 pm
by Mike1010
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?

Re: bare metal app

Posted: Fri Jun 19, 2015 10:34 pm
by pavel
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.

Re: bare metal app

Posted: Fri Jun 19, 2015 10:38 pm
by pavel
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.

Re: bare metal app

Posted: Sat Jun 20, 2015 5:54 pm
by Mike1010
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

Re: bare metal app

Posted: Sun Jun 21, 2015 10:14 am
by pavel
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.

Re: bare metal app

Posted: Sun Jun 21, 2015 8:18 pm
by pavel
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.

Re: bare metal app

Posted: Wed Jun 24, 2015 10:01 am
by Arnold
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?