ZedBoard Learning Notes (4) Preparing for Linux System

Bare-metal control peripherals are very simple, and they are no different from ordinary single-chip microcomputers, but only the streaking code is far from playing the role of Cortex-A9 hard core. After all, Zynq chip integrates a dual core that can run up to 1GHz. CPU (XC7Z020 on ZedBoard can only reach 800MHz). And the ZedBoard is equipped with Gigabit Ethernet, HDMI and USB OTG interfaces, and it is not wasted without running the operating system. Some friends want to do WinCE on ZedBoard, but this information is extremely scarce, and WinCE is a large operating system with high copyright cost, so open source has small embedded Linux has become the first choice. In order to make a graphical interface, the rabbit was also committed to porting the desktop Linaro Ubuntu system. However, the reference examples given by ADI have not been optimized, and the official version of Xillinux has been delayed and only supports simple VGA with low color. The interface (the VGA on the ZedBoard doesn't even have a 16-bit color), so the rabbit had to give up the previous work and re-enable the ZedBoard factory default lightweight Linux. This system does not have a graphical desktop, but it already includes a network card, HDMI driver and other basic functions, enough to use. The most important part of controlling peripherals under Linux is the driver, but before you start the handwriting driver, you need to do some preparatory work. In order to reduce the workload, we directly modify the ZedBoard factory demo, join the previously completed my_gpio peripherals, and implement the Bootloader function through U-Boot. The source project for this demo can be found on the ZedBoard page of Digilent's website: NavPath=2,400,1028&Prod=ZEDBOARD Click on Download below to download the ZedBoard_OOB_Design.zip file, which contains XPS projects, U-Boot files, Linux. Kernel configuration files, DeviceTree source files, rootfs, etc. There are similar operating instructions in README.txt, it is recommended to read it again.

ZedBoard Learning Notes (4) Preparing for Linux System

The default XPS system project on ZedBoard is located in the hw\xps_proj folder. Double-click system.xmp to open the project. Import the my_gpio peripheral IP core into the project as described above. Portal: ZedBoard Learning Notes (2) Developing a custom AXI bus peripheral IP core - After taking LEDs and switches as an example, check if XPS allocates address space for our peripherals. If not, you need to manually set one. Address, here we set to 0x75C80000, the space size is 64K unified AXI equipment.

ZedBoard Learning Notes (4) Preparing for Linux System

Set up the bus connection according to the method in ZedBoard Learning Notes (2). The result is as follows:

ZedBoard Learning Notes (4) Preparing for Linux System

Modify the xps_proj\data\system.ucf file to assign external pins to the my_gpio peripheral (the pin names in the ucf constraint file must be the same as those in Ports, and many users have had problems here).

ZedBoard Learning Notes (4) Preparing for Linux System

After completing, click Generate BitStream to generate configuration data, then click Export Design, and select Export & Launch SDK to export the hardware information to the SDK.

ZedBoard Learning Notes (4) Preparing for Linux System

ZedBoard Learning Notes (4) Preparing for Linux System

In the SDK, create a new C project, different from the bare machine HelloWorld, this time to build a bootloader, so select the FSBL project, that is, First Stage Bootloader, to achieve initialization and startup work before U-Boot. Other options are available by default.

ZedBoard Learning Notes (4) Preparing for Linux System

Compile the project. After the completion, the SDK will generate the FSBL elf file. In addition, the System.bit exported from XPS and the u-boot.elf compiled in the first article can be used to implement the SD card. Start the system's full bootloader file. U-boot.elf is included in ZedBoard_OOB_Design, but this rabbit has not tried, the method of compiling u-boot.elf by Xilinx U-Boot can be found in: ZedBoard Learning Notes (1) First Step - Establishing Xilinx Cross Compilation Environment Set After these three files are combined, click on Xilinx Tools→Create Boot Image, add to the list, select an output path, and you can create a bootloader.

ZedBoard Learning Notes (4) Preparing for Linux System

ZedBoard Learning Notes (4) Preparing for Linux System

The SDK will generate the u-boot.bin file in the output path, change it to BOOT.bin, copy it to the SD card, and configure the appropriate jumper for the ZedBoard board. Then open the ZedBoard power supply, the Bootloader will initialize the PS, configure the PL with BitStream (including the my_gpio peripheral we created), and hand over the operation rights to U-Boot. U-Boot will automatically load Device Tree, Linux kernel image and RootFS, and finally start Linux. ZedBoard also comes with zImage, devicetree and rootfs files in the SD. These files can be used in the original. The C language driver compiled directly with the Xilinx cross-compiler can run and control the peripherals on this system. Of course, if you want to compile the kernel yourself, or do not want to call the peripherals with a static physical address, you need to go one step further. Note that this step is not necessary for controlling AXI bus custom peripherals under Linux. In order to make a further study for interested friends, the rabbit here will talk about compiling the Linux kernel and device tree running on ZedBoard. Of course, this method is also recorded in detail in the README file of ZedBoard_OOB_Design. In the Linux environment of the PC (the rabbit here is Ubuntu), download the Digilent Linux kernel source code via Git command: git clone git://github.com/Digilent/linux-3.3-digilent.git Switch to ZedBoard Branch: cd linux-3.3- Digirentgit checkout -b zedboard_oob v3.3.0-digilent-12.07-zed-beta Copy the .config file from ZedBoard_OOB_Design to the source directory and compile the kernel (refer to the directory where ZedBoard_OOB_Design is located): cp /linux/.config ./. The kernel image zImage generated by configmake is located in the /arch/arm/boot/ folder. Then modify the devicetree_ramdisk.dts file to add my_gpio peripheral information. /******* LED & SwTIch Controller ******/my_gpio@75c80000 { compaTIble = "xlnx,my_gpio-1.00.a"; reg = <0x75c80000 0x10000>; xlnx,dphase-TImeout = <0x8 >; xlnx,family = "virtex6"; xlnx,c_num_reg = <0x1>; xlnx,c_num_mem = <0x1>; xlnx,s-axi-min-size = <0x1ff>; xlnx,c_slv_awidth = <0x20>; xlnx, C_slv_dwidth = <0x20>; xlnx,use-wstrb = <0x0>;}; Generate the device tree with the following command, also copy to the SD card: ./scripts/dtc/dtc -O dtb –I dts –o ./devicetree_ramdisk .dtb \ /linux/devicetree_ramdisk.dts This device tree file is used by netizens to add drivers to the kernel, but the rabbit thinks it is not. If you do not want to load the driver through the static device physical address (0x75c80000 above), you can dynamically identify the device based on this device tree information (specifically via xlnx, my_gpio-1.00.a string). The specific method of interest for children's shoes can be tried, next time we will start to officially write the Linux driver for my_gpio peripherals.

Residual Current Circuit Breaker


RCCB named Residual Current Circuit Breaker. When there is human electricity shock or if the leakage current of the line exceeds the prescribed value, Residual current circuit breaker/RCCB(without over-current protection) will cut off the power rapidly to protect human safety and prevent the accident due to the current leakage. The rccb switch which made from Korlen electric can be used as infrequent changeover of the line in normal situation.

Korlen electric ---- the rccb switch manufacturer,produces types of Residual Current Circuit Breaker. It is applicable to industrial site, commercial site, tall building and civil house.



Residual Current Circuit Breaker,Ac Residual Current Circuit Breaker,Miniature Residual Current Circuit Breaker,Residual Current Electrical Circuit Breaker

Wenzhou Korlen Electric Appliances Co., Ltd. , https://www.zjmotorstarter.com