Quantcast
Channel: Xilinx Wiki : Xilinx Wiki - all changes
Viewing all 11776 articles
Browse latest View live

MPSoC FressRTOS Development

$
0
0

Related Links
Title 1 & Link 1
Title 1 & Link 1


linux1.png

linux2.png

linux3.png

linux4.png

linux5.png

linux6.png

MPSoC Linux Application Development

$
0
0
This page will describe how to build an linux application using SDK.
How to Import a Hardware Project
1. Click File ->New -> Project then it opens below dialog
2. Select “Hardware Platform Specification” and click on “Next”
{linux4.png}
3. Specify the path for the HDF (hardware definition file) and click on “Finish”
{linux5.png}
How to Build Executable using SDK
ARM Cortex-A53 Linux Executable
1. Click File -> New -> Application Project as shown below
2. Specify the Project name, select “psu_cortexa53” from the dropdown list for Processor and “linux” for OS Platform, Click “Next” {linux6.png}
3. Select “Linux Hello World” for a hello world project or an “Linux Empty Application” and click “Finish”
{linux1.png}
Insert your code here.
Related Links
Title 1 & Link 1
Title 1 & Link 1


MPSoC Linux Application Development

$
0
0

Zynq Linux USB Device Driver: u_ether.ko should be loaded for Ethernet gadget.

$
0
0

insmod /mnt/configfs.ko
insmod /mnt/libcomposite.ko
insmod u_ether.ko
insmod /mnt/usb_f_rndis.ko

mount -t configfs none /sys/kernel/config
cd /sys/kernel/config/usb_gadget
mkdir g1
cd g1
echo "64" > bMaxPacketSize0
echo "0x200" > bcdUSB
echo "0x100" > bcdDevice
echo "0x03FD" > idVendor
echo "0x0500" > idProduct
mkdir functions/rndis.rn0
mkdir configs/c1.1
ln -s functions/rndis.rn0 configs/c1.1/
echo "ci_hdrc.0" > UDC
ifconfig usb0 10.10.70.1
ifconfig usb0 up

Zynq Linux USB Device Driver: Failed to run mass storage demo.

$
0
0
Xilinx Linux v2015.2 and Windows 7 is used. Windows does not pop up any message after I execute all commands in the article for mass storage.
Here is the log:
Built with PetaLinux v2015.2 (Yocto 1.8) zynq /dev/ttyPS0
zynq login: root
Password:
login[952]: root login on 'ttyPS0'
root@zynq:~# mount /dev/mmcblk0p1 /mnt
cd /mntFAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be c orrupt. Please run fsck.
root@zynq:~# ifconfig eth0 172.16.98.160 up
root@zynq:~# cd /mnt
root@zynq:/mnt#
root@zynq:/mnt# insmod /mnt/configfs.ko
root@zynq:/mnt# insmod /mnt/libcomposite.ko
root@zynq:/mnt# insmod /mnt/usb_f_mass_storage.ko
root@zynq:/mnt# dd if=/dev/zero of=/tmp/mydev count=10 bs=1M
10+0 records in
10+0 records out
root@zynq:/mnt# mount -t configfs none /sys/kernel/config
root@zynq:/mnt# cd /sys/kernel/config/usb_gadget
root@zynq:/sys/kernel/config/usb_gadget# mkdir g1
root@zynq:/sys/kernel/config/usb_gadget# ls -l
drwxr-xr-x 6 root root 0 Jun 24 07:10 g1
root@zynq:/sys/kernel/config/usb_gadget# cd g1
root@zynq:/sys/kernel/config/usb_gadget/g1# ls -l
-rw-r--r-- 1 root root 4096 Jun 24 07:11 UDC
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bDeviceClass
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bDeviceProtocol
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bDeviceSubClass
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bMaxPacketSize0
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bcdDevice
-rw-r--r-- 1 root root 4096 Jun 24 07:11 bcdUSB
drwxr-xr-x 2 root root 0 Jun 24 07:10 configs
drwxr-xr-x 2 root root 0 Jun 24 07:10 functions
-rw-r--r-- 1 root root 4096 Jun 24 07:11 idProduct
-rw-r--r-- 1 root root 4096 Jun 24 07:11 idVendor
drwxr-xr-x 2 root root 0 Jun 24 07:10 os_desc
drwxr-xr-x 2 root root 0 Jun 24 07:10 strings
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "64" > bMaxPacketSize0
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "0x200" > bcdUSB
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "0x100" > bcdDevice
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "0x03FD" > idVendor
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "0x0500" > idProduct
root@zynq:/sys/kernel/config/usb_gadget/g1# mkdir functions/mass_storage.ms0
Number of LUNs=8
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
root@zynq:/sys/kernel/config/usb_gadget/g1# mkdir configs/c1.1
<g/usb_gadget/g1# echo /tmp/mydev > functions/mass_storage.ms0/lun.0/file
root@zynq:/sys/kernel/config/usb_gadget/g1#
< /tmp/mydev > functions/mass_storage.ms0/lun.0/file
<g/usb_gadget/g1# echo 1 > functions/mass_storage.ms0/lun.0/removable
root@zynq:/sys/kernel/config/usb_gadget/g1#
<g/usb_gadget/g1# ln -s functions/mass_storage.ms0 configs/c1.1/
root@zynq:/sys/kernel/config/usb_gadget/g1# echo "ci_hdrc.0" > UDC
root@zynq:/sys/kernel/config/usb_gadget/g1# configfs-gadget gadget: high-speed config #1: c1

Zynq Linux USB Device Driver: Window 7 RNDIS driver for Ethernet gadget.

Zynq Ethernet Performance 2015.1 (XAPP_1082: Remove 2015.1 )

$
0
0
WORK IN PROGRESS
This article is work-in-progress. Contents are expected to change quite frequently. Please bookmark the page and visit soon...

XAPP1082 v3.0 2015.1
This wiki page summarizes the performance of PS-EMIO and PL Ethernet (with/without) CSO and jumbo frame support.

Device Tree Tips

$
0
0
...
}
clk_prepare_enable(xadc->clk);
Clock Status At Runtime
The clocks of the system can be viewed in the filesystem at /sys/kernel/debug/clk with clk_summary showing all the clocks. The debug filesystem must be turned on in the kernel configuration for this feature to be used. The following configuration path allows the debug filesystem to be turned on.
Kernel hacking -> Compile-time checks and compiler options -> Debug Filesystem

Disabling A Device Node
There are times when a device in the device tree, a node, is not wanted in the system. The status property of a node can be used to disable it. This property may not be present on all nodes by default, but can be added.

Device Tree Tips

$
0
0

Device Tree Tips

$
0
0
...
The clocks of the system can be viewed in the filesystem at /sys/kernel/debug/clk with clk_summary showing all the clocks. The debug filesystem must be turned on in the kernel configuration for this feature to be used. The following configuration path allows the debug filesystem to be turned on.
Kernel hacking -> Compile-time checks and compiler options -> Debug Filesystem
The following example illustrates the clock summary at runtime.
clock enable_cnt prepare_cnt rate accuracy phase
----------------------------------------------------------------------------------------
ps_clk 3 3 33333333 0 0
iopll_int 1 1 999999990 0 0
iopll 7 7 999999990 0 0
dbg_mux 1 1 999999990 0 0
dbg_div 1 1 66666666 0 0
dbg_emio_mux 1 1 66666666 0 0
dbg_trc 1 1 66666666 0 0
can_mux 0 0 999999990 0 0
can_div0 0 0 40000000 0 0
can_div1 0 0 8000000 0 0
can1_gate 0 0 8000000 0 0
can1 0 0 8000000 0 0
can0_gate 0 0 8000000 0 0
can0 0 0 8000000 0 0

Disabling A Device Node
There are times when a device in the device tree, a node, is not wanted in the system. The status property of a node can be used to disable it. This property may not be present on all nodes by default, but can be added.

Device Tree Tips

$
0
0
...
clock enable_cnt prepare_cnt rate accuracy phase
----------------------------------------------------------------------------------------
...
3 3 33333333 33333333 0 0
iopll_int 1 1 9999999901 999999990 0 0
iopll 7 7 999999990 0 0
dbg_mux 1 1 999999990 0 0
dbg_div 1 1 66666666 0 0
dbg_emio_mux 1 1 66666666 0 0
dbg_trc 1 1 66666666 0 0
can_mux 0 0 999999990 0 0
can_div0 0 0 40000000 0 0
can_div1 0 0 8000000 0 0
can1_gate 0 0 8000000 0 0
can1 0 0 8000000 0 0
can0_gate 0 0 8000000 0 0
can0 0 0 8000000
7 999999990 0 0
Disabling A Device Node
There are times when a device in the device tree, a node, is not wanted in the system. The status property of a node can be used to disable it. This property may not be present on all nodes by default, but can be added.

Device Tree Tips

$
0
0
...
The clocks of the system can be viewed in the filesystem at /sys/kernel/debug/clk with clk_summary showing all the clocks. The debug filesystem must be turned on in the kernel configuration for this feature to be used. The following configuration path allows the debug filesystem to be turned on.
Kernel hacking -> Compile-time checks and compiler options -> Debug Filesystem
...
at runtime. When the enable count is zero the clock is disabled.
clock enable_cnt prepare_cnt rate accuracy phase
----------------------------------------------------------------------------------------
...
3 3 33333333 033333333 0 0
iopll_int 1 1 999999990 01 999999990 0 0
iopll 7 7 999999990 07 999999990 0 0
Disabling A Device Node
There are times when a device in the device tree, a node, is not wanted in the system. The status property of a node can be used to disable it. This property may not be present on all nodes by default, but can be added.

Device Tree Tips

$
0
0
...
Linux Disables Clocks
By default Linux disables clocks which have no reference in the device tree (no nodes using the clock). This can create issues in an AMP design where Linux is running on one CPU and another non-Linux based design is running on the other CPU. When the non-Linux CPU software is trying to use devices that are not in the device tree the clock will be disabled such that the device is not accessible.
...
forum thread. This option is also documented in the kernel clock documentation referenced at the end of the page.
Clock Disable Linux Forum Thread
References to Clocks In Nodes
...
The clocks of the system can be viewed in the filesystem at /sys/kernel/debug/clk with clk_summary showing all the clocks. The debug filesystem must be turned on in the kernel configuration for this feature to be used. The following configuration path allows the debug filesystem to be turned on.
Kernel hacking -> Compile-time checks and compiler options -> Debug Filesystem
...
at runtime. WhenWhen the enable
...
is disabled. For more details see the link for the kernel clock documentation at the end of the page.
clock enable_cnt prepare_cnt rate accuracy phase
----------------------------------------------------------------------------------------
...
Links
Fabric Clock Control
Kernel Clock Documentation

Device Tree Tips

$
0
0
...
There are times when a device in the device tree, a node, is not wanted in the system. The status property of a node can be used to disable it. This property may not be present on all nodes by default, but can be added.
status = "disabled";
Interrupt Inputs Using GPIO
Interrupts can be connected direct to an interrupt controller or they can be connected to a GPIO input that can generate an interrupt. The following device tree illustrates the changes required to support this feature. It adds interrupt controller ability to the existing GPIO node and then indicates in the SPI device node that the gpio node is the interrupt controller. Note that the interrupts property on the SPI device node is the same as when connected to an interrupt controller.
&gpio0 {
#interrupt-cells = <2>;
interrupt-controller;
};
&spi1 {
adxl345 {
compatible = "adi,adxl34x";
reg = <1>;
spi-max-frequency = <1000000>;
spi-cpha;
spi-cpol;
interrupt-parent = <&gpio0>;
interrupts = < 0 4 >;
};
};
Note: This feature has less testing and early testing with a 3.19 kernel has shown there are GPIO driver issues related to clocking when using an interrupt that is active high level triggered.

Links
Fabric Clock Control
Viewing all 11776 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>