The combination of FMCOMMS3 and PetaLinux is working only on Ubuntu 16.04 LTS, PetaLinux 2018.3, Vivado 2018.3
sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev zlib1g:i386 screen pax gzip
Create a new directory
sudo mkdir -m 755 PetaLinux sudo chown bijan ./PetaLinux
Install PetaLinux by running the following command.
./petalinux-v2018.3-final-installer.run .
Clone Analog Devices HDL repository
git clone https://github.com/analogdevicesinc/hdl.git
git clone https://github.com/analogdevicesinc/meta-adi.git
Make HDL Project
export PATH="$PATH:/mnt/hdd1/Vivado/Vivado/2018.3/bin" make fmcomms2.zc702
source ../settings.sh petalinux-create --type project --template zynq --name fmcomms3_linux
Then change directory to the created project directory.
petalinux-config --get-hw-description=<hdf file directory>
set Subsystem AUTO Hardware Settings -> Advanced bootable
images storage setting -> u-boot env partition settings -> image
storage media -> primary sd
/home/bijan/Projects/ADI_Linux/meta-adi/meta-adi-core /home/bijan/Projects/ADI_Linux/meta-adi/meta-adi-xilinx
Download following files and write it down to meta-adi/meta-adi-xilinx/recipes-bsp/device-tree/files
pl-delete-nodes-zynq-zc702-adv7511-ad9361-fmcomms2-3.dtsi
zynq-zc702-adv7511-ad9361-fmcomms2-3.dts
To build petalinux run following command inside petalinux directory
petalinux-build
In case of error remove -e from first line of system-user.dtsi
file inside build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/system-user.dtsi
Install Digilent Drivers
<Vivado Install Dir>/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers
To program the board using jtag interface. First we should package the kernel with the following command.
petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot --force
Then login to the root account and run following commands.
petalinux-package --prebuilt --fpga images/linux/system.bit --force petalinux-boot --jtag --prebuilt 3 -v petalinux-boot --jtag --fpga --bitstream images/linux/system.bit
Enable SW16.3 & SW16.4 on ZC702 Board.
Generate BOOT.BIN file by executing following command:
petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot --force
copy image.ub and BOOT.BIN to SD-Card
To change username and password open
meta-adi/meta-adi-xilinx/recipes-core/images/petalinux-user-image.bbappend
Change analog
to your desired password. If you want to remove login requirement comment EXTRA_USERS_PARAMS
and enable debug-tweak
in petalinux-config -c rootfs
.
To change UART baudrate run
petalinux-config
go to Subsystem AUTO Hardware Settings -> Serial Settings -> System stdin/stdout baudrate
Useful Links
Analog Wiki – Building with Petalinux
This is a bug I found in many versions of Xilinx Vivado package and I actually now struggling with it in 2017.2 version. I don’t check out newer versions so it maybe already been solved, idk! Anyway, in my version on the Linux platform, if you open the SDK normally and then for whatever reason kill the machine or the program you cannot open the SDK again whatsoever. As I said I’m running Vivado on Arch Linux 2016.10 version so again this maybe not happen on Windows hosts.
There may be a lot of workaround for this, but this works for me more or less.
<Vivado Project>/<proj name>.sdk/.metadata/.plugins/org.eclipse.core.resources
You may serach out all sites but there isn’t any adequate context in this subject. ARM family is a new platform that it’s compiler and other toolchains also matured recently so unfortunately there isn’t much quick start guide available out there. Here, I try to fill this gap and give you a hint about how to begin developing your fresh ARM-based board under GNU/Linux. Throughout this tutorial I work out with STM32F4 Discovery development board and Arch Linux distribution. If your board or your distribution is different don’t worry, with a little efforts all steps can be applied into your case.
Required tools:
sudo pacman -S arm-non-eabi-gcc
After installing toolchains you need to download CMSIS library for your microcontroller. CMSIS is a vendor based library, written to interface CPU and peripherals control register in a delicate manner. In our case, ST Microelectronic CMSIS library known as STMCube F4, can be downloaded from STMicroelectronics webpage.
Each stm32 device carry out with a two user manual so-called Programming Manual and Reference Manual. Reference Manual address to each peripheral registers and unit description. On the other hand Programming Manual show how to employ interrupt and hook up booting process. Both these manuals are essential in programming ARM microcontroller so ensure to have them before you start.
Unfortunately for the time being I’m busy to write down full guide on programming Arm Coretex M. so if you are in hurry to get things to work you can checkout our git repository for a clean and simple blink LED project. please keep in mind that follow all above steps and check ReadMe folder in the repository befor jump into the final stage.