Difference between revisions of "Host setup and development flow (BELK/BXELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Introduction==
+
{{InfoBoxTop}}
The [[Logical_structure_of_Bora_and_BoraX_Embedded_Linux_Kits_(BELK/BXELK)|software development flows]] for BoraX requires the use of several tools on host side. This document describes how to install and set up these tools.
+
{{Applies To Bora}}
 +
{{Applies To BoraX}}
 +
{{Applies To BoraLite}}
 +
{{InfoBoxBottom}}
  
The following figure shows the developing environment for an Embedded Linux system based on BoraX: it is composed of a host machine and a target machine.
+
<section begin=BELK/>
 +
== Host setup and development flow==
 +
The software development environment for Processing Subsystem (PS) is quite complex because it is based on several tools. This document collects the resources, available in this wiki, which are related to these tools, in order to illustrate how to install and set up them.
  
 +
First, '''it is strongly recommended the reading of [[BORA_SOM/BELK-L/General/Logical_structure_of_BELK|this document]] to understand the general structure of the kit'''.
  
[[File:TBD.png|thumb|center|600px|caption]]
+
For setting up the development environment, please refer to the following documents:
 +
* [[BORA_SOM/BELK-L/Development/Introduction_to_the_development_environment | Introduction to the development environment]] which provides an overview of it
 +
* [[BORA_SOM/BELK-L/Development/Build_system | Build system]] for operational instructions.
  
 +
To deepen target software-related aspects, these specific pages are available:
 +
* [[BORA_SOM/BELK-L/Development/Building_U-Boot |This page]] for detailed instruction on U-Boot building
 +
* [[BORA_SOM/BELK-L/Development/Building_Linux_kernel|This page]] for detailed instruction on Linux kernel building
 +
* [[BORA_SOM/BELK-L/Development/Advanced_use_of_Yocto_build_system|This link]] shows hot to use Yocto build system to build the entire BSP, including U-Boot bootloader, Linux kernel and root file system.
  
In a typical environment, the host is used by the developer to (cross-)compile the code that is to run on the target. In our case the target is a SOM, while the host is assumed to be a PC running the Linux operating system, either in a physical installation or as a virtual machine. The bootloader running on the target can download the Linux kernel image through the network (TFTP), as well as the u-boot binary images (useful when an update of the bootloader is required). Moreover, the Linux kernel running on the target is able to mount the root file system from different physical media, for example from a directory exported via Network File System (NFS) by the host. This strategy (kernel image and RFS retrieved from the network) saves time during the development phase, since no flash reprogramming or removable storage (SD, usb pen drives, external disks) is required to test new versions or updates of the software components. In contrast with a typical embedded system, BoraX adds some complexity, due to the nature of the Zynq processor, which provides both a CPU core (PS, processing system) and an integrated FPGA (PL, programmable logic). This means that additional tools are required to manage this complexity. In particular, the Vivado® Design Suite and the Xilinx Software Development Kit are required for the hardware level configuration and for building the first stage boot loader (FSBL).
+
About Programmable Logic (PL), please refer to [[BORA_SOM/BELK-L/Development/Creating_and_building_a_Vivado_example|this page]] that illustrates a simple reference design for [[BORA_SOM/BORA_Evaluation_Kit | BORA Evaluation kit]] and [[BORA_Xpress_SOM/BORA_Xpress_Evaluation_Kit | BORA Xpress Evaluation kit]].
==Software components==
+
<section end=BELK/>
===Xilinx Zynq-7000 development tools===
 
====Vivado® Design Suite====
 
Xilinx provides the [https://www.xilinx.com/products/design-tools/vivado.html
 
Vivado® Design Suite], a SoC-strength, IP-centric and system-centric, next generation comprehensive development environment for All Programmable SoCs. The Vivado® Design Suite is used to configure the PS for embedded processor hardware system development. Specification of the microprocessor, memory parameters, boot peripherals, MIO settings and the interconnection of these components, along with their respective detailed configuration, takes place in Vivado IP Integrator.
 
====Xilinx Software Development Kit (SDK)====
 
The Software Development Kit (SDK) is the Xilinx Integrated Design Environment for creating embedded applications on Zynq™-7000 All Programmable SoCs. SDK is the first application IDE to deliver true homogeneous and heterogeneous multi-processor design and debug, it is optionally included with the Vivado Design Suite or ISE Design Suite, or available as a separate free download for application developers. It is based on Eclipse and CDT and it directly interfaces to the Vivado embedded hardware design environment. The SDK offers support for complete software design and debug flows including multi-processor and hardware/software debug capabilities, integrating editor, compilers, build tools, flash memory management, JTAG/GDB debug, custom libraries and device drivers.
 
=====Zynq application development flow=====
 
The following diagram describes the development flow for Zynq-based Linux applications:
 
 
 
[[File:TBD.png|thumb|center|600px|caption]]
 
 
 
====Toolchain====
 
With the term "toolchain" we refer to the set of programs that allow the building of a generic application. For applications built to run on the same platform as the tool chain, we use a native toolchain. On the contrary, for applications built to run on a target architecture different from the host architecture, we use a cross-toolchain. In this case all the tools involved in this process are lead by the “cross-” prefix. So we talk about cross-compiler, cross-toolchain and so on. The cross-toolchain used to build U-Boot, the Linux kernel and the applications is the GNU toolchain for the ARM architecture built for x86 hosts. In other words, the toolchain runs on x86 machines but generates binaries for ARM processors. As for all the software compliant to the GPL license, it is released in source code. Thus the first thing to do to set up the developing environment should be building the cross-toolchain. This is not a trivial task, it takes a lot of time and hard disk space. To avoid this tedious task, we suggest using a pre-built toolchain as explained in the following sections.
 
 
 
====First stage bootloader (FSBL)====
 
The first stage bootloader is loaded by the internal bootrom during the boot process. FSBL is run to set up the PS and load the second stage bootloader (U-Boot). The FSBL must be created using the Xilinx development tools and must be stored into the boot memory.
 
 
 
====Second stage bootloader: U-Boot====
 
U-Boot is a very powerful boot loader and it became the "de facto" standard on non-x86 embedded platforms. The main tasks performed by U-Boot are:
 
*Hardware initialization
 
*Starting a shell on the serial port allowing the user to interact with the system through the provided commands
 
*Automatic execution of the boot script (if any).
 
After system power-up, U-Boot prints some information about itself and about the system it is running on. Once the bootstrap sequence is completed, the prompt is printed and U-Boot is ready to accept user's commands. U-Boot manages an environment space where several variables can be stored. These variables are extremely useful to permanently save system settings (such as Ethernet MAC address) and to automate boot procedures. This environment is redundantly stored in two physical sectors of boot flash memory; the default variables set is hard-coded in the source code itself. User can modify these variables and add new ones in order to create his/her own custom set of configurations. The commands used to do that are <code>setenv</code> and <code>saveenv</code>. This process allows the user to easily set up the required configuration. Once U-Boot prompt is available, it is possible to print the whole environment by issuing the command <code>printenv</code>.
 
 
 
For further information on use of U-Boot, please refer to [http://www.denx.de/wiki/view/DULG/UBoot this page].
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
===Host setup===
 
As stated previously, XUELK host tools are based on a [[Managed_Virtual_Machine_(MVM)|Managed Virtual Machine]]. As indicated [[#XUELK microSD Layout|here]], microSD card delivered along with XUELK includes basic version of MVM that is the default option.
 
 
 
In case you choose to use the [[Managed_Virtual_Machine_(MVM)#Advanced_version|''Advanced'' version]] of the MVM instead, the <code><i>project-name</i></code> to be used is <code>lynx</code>.
 
 
 
Either version you choose, please follow the procedure described [[Managed_Virtual_Machine_(MVM)#Installation_and_configuration|here]] to install the MVM.
 
 
 
It is also worth remembering that access to git repositories is required to download target source code. To enable it, please refer to [[Accessing_DAVE_Embedded_Systems_restricted_git_repositories|this page]].
 
 
 
{{ImportantMessage|text=Either version of MVM is installed, it provides the tools required to build [[Building_U-Boot_(XUELK)|U-boot]] and [[Building_Linux_kernel_(XUELK)|Linux kernel]]. It does not include the tools required to run Yocto build system instead.}}
 

Latest revision as of 14:15, 23 November 2021

Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress
BORALite-TOP.png Applies to BORA Lite


Host setup and development flow[edit | edit source]

The software development environment for Processing Subsystem (PS) is quite complex because it is based on several tools. This document collects the resources, available in this wiki, which are related to these tools, in order to illustrate how to install and set up them.

First, it is strongly recommended the reading of this document to understand the general structure of the kit.

For setting up the development environment, please refer to the following documents:

To deepen target software-related aspects, these specific pages are available:

  • This page for detailed instruction on U-Boot building
  • This page for detailed instruction on Linux kernel building
  • This link shows hot to use Yocto build system to build the entire BSP, including U-Boot bootloader, Linux kernel and root file system.

About Programmable Logic (PL), please refer to this page that illustrates a simple reference design for BORA Evaluation kit and BORA Xpress Evaluation kit.