i.MX51 linux开发板介绍
- 格式:pdf
- 大小:632.27 KB
- 文档页数:8
硬件环境软件环境1 安装虚拟机1.1虚拟机选择Ubuntu 11.10以上版本(升级比较方便)1.2虚拟机的配置与升级apt-cache search package 搜索包apt-cache show package 获取包的相关信息,如说明、大小、版本等sudo apt-get install package 安装包sudo apt-get install package - - reinstall 重新安装包sudo apt-get -f install 修复安装"-f = ——fix-missing"sudo apt-get remove package 删除包sudo apt-get remove package - - purge 删除包,包括删除配置文件等sudo apt-get update 更新源sudo apt-get upgrade 更新已安装的包sudo apt-get dist-upgrade 升级系统sudo apt-get dselect-upgrade 使用dselect 升级apt-cache depends package 了解使用依赖apt-cache rdepends package 是查看该包被哪些包依赖sudo apt-get build-dep package 安装相关的编译环境apt-get source package 下载该包的源代码sudo apt-get clean && sudo apt-get autoclean 清理无用的包sudo apt-get check 检查是否有损坏的依赖2 Linux下安装交叉编译环境2.1安装步骤1)下载arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz22)命令行安装# tar xvzf arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2# cd arm-2011.033 安装arm设备编程工具SAM Boot Assistant(SAM-BA)3.1 Windows下安装1)安装sam-ba_2.11.exe软件;2)安装USB CDC驱动;图3.1图3.2图3.3图3.4图3.5图3.7打开SAM-BA 2图3.8图3.93.2 Linux下安装1)解压sam-ba_2.11.tar.bz2;2)安装USB CDC驱动;1/ Login with administrator rights2/ Unload usbserial module if it is already running #rmmod usbserial3/ Load usbserial kernel module#modprobe usbserial vendor=0x03eb product=0x61244/ Verify that the USB connection is established#lsusb -d 03eb:6124Bus 004 Device 006: ID 03eb:6124 Atmel Corp5/ Know which USB connection is established#dmesgkernel: usb 4-2: new full speed USB device using uhci_hcd and address 5kernel: usb 4-2: configuration #1 chosen from 1 choicekernel: usbserial_generic 4-2:1.0: generic converter detectedkernel: usbserial_generic: probe of 4-2:1.0 failed with error -5kernel: usbserial_generic 4-2:1.1: generic converter detectedkernel: usb 4-2: generic converter now attached to ttyUSBx=> you will have to use /dev/ttyUSBx to connect to your boardRunning SAM-BA CDC Serial version :Launch 'sam-ba_cdc_x.y.linux_zz' file, and select your board and the /dev/ttyUSBxdevice where your board in mounted on.- Update the kernel:# apt-get install linux-image-generic linux-headers-generic- On 64 bits version install 32 bits libraries:# apt-get install ia32-libs- Give sam-ba execute permission if needed:$ chmod +x sam-ba- Connect the board- Create a symlink on /dev/ttyACM0# ln -s /dev/ttyACM0 /dev/ttyUSB0- Launch sam-baTested on:Ubuntu 10.04 64 bits 2.6.32-33-generic (2.6.32-33.70)Ubuntu 10.10 32 bits 2.6.35.30-generic (2.6.35-30.56)Ubuntu 10.10 64 bits 2.6.35.30-generic (2.6.35-30.56)Ubuntu 10.10 64 bits 2.6.38-10-generic (2.6.38-10.25)Ubuntu 11.10 64 bits alpha3How to check if your kernel is up to date ?$ dmesgIf you have something like that (not exactly the same) it's ok:[227274.230016] usb 5-1: new full speed USB device using uhci_hcd and address 5[227274.395739] cdc_acm 5-1:1.0: This device cannot do calls on its own. It is not a modem.[227274.395768] cdc_acm 5-1:1.0: ttyACM0: USB ACM deviceIf you don't have this part: 'This device cannot do calls on its own. It is not a modem.',your kernel is probably not up to date or the cdc_acm patch has not been backported.4 示例4.1 下载AT91Bootstrap源码1)得到源码;2)解压# tar xvzf AT91Bootstrap-5series_1.2.tar.bz2#cd AT91Bootstrap-5series_1.24.2 配置AT91Bootstrap和选择启动媒介1) 从NAND FLASH启动#make at91sam9xnf_defconfig2)添加环境变量#vi .profilePATH="$PATH:/root/Public/arm-2011.03/bin"export PATH#souce .profile3)配置AT91Bootstrap#make menuconfig4.3 编译AT91Bootstrap#export $CROSS_COMPILE=” arm-none-eabi-”#make clear#make在../AT91Bootstrap-5series_1.2/binaries下产生at91sam9x5ek-nandflashboot-3.1.bin文件4.4 使用AT91Bootstrap二进制文件1)从NAND flash启动A T91Bootstrap图 4.1在NAND和SPI无效的前提下,启动SAM-BA,烧AT91Bootstrap到NAND flash,如图4.1所示:(1)在SAM-BA图形用户界面上选择NandFlash媒介选项卡;(2)1)在NAND有效的前提下,在Scripts下拉列表框中选择“Enable NandFlash”;然后点击“Execute”按钮,完成NandFlash的初始化,如图4.2所示;图 4.2.12)清除芯片上原来烧的信息图 4.2.2结果如图4.2.1、图4.2.2和图 4.5所示。
i.MX_6_BSP_Porting_Guidei.MX 6 BSP Porting GuideDocument Number: IMX6BSPPGRev L3.10.17_1.0.0-ga, 05/2014ContentsSection number Title PageChapter 1Porting U-Boot from an i.MX 6 Reference Board to an i.MX 6 Custom Board 1.1U-Boot Overview (7)1.2Obtaining the Source Code for the U-Boot (7)1.2.1Preparing the Code (8)1.3Customizing the i.MX 6 Custom Board Code (10)1.3.1Changing the DCD Table for i.MX 6 DDR3LPDDR2 Initialization (10) 1.3.2Booting with the Modified U-Boot (10)1.3.3Adding New Driver Initialization Code to Board Files (11)1.3.4Further Customization at System Boot (12)1.3.5Customizing the Printed Board Name (12)1.4Debugging (13)1.4.1Using RealView ICE for Debugging (13)1.4.2Using printf for debugging (13)Chapter 2Configuring the IOMUX Controller2.1IOMUX Overview (15)2.2Information for Setting IOMUX Controller Registers (16)2.3Using IOMUX in the Device Tree - Example (17)Chapter 3Registering a New UART Driver3.1Enabling UART on Kernel Menuconfig (19)3.2UART Settings (19)3.3File Names and Locations (19)Chapter 4Adding Support for SDHC4.1SDHC Overview (21)Chapter 5Configuring the SPI NOR Flash Memory Technology Device (MTD) Driver5.1SPI NOR Overview (23)5.2Source Code Structure (23)5.2.1Configuration Options (23)5.2.2Selecting SPI NOR on the Linux Image (24)5.3Changing the SPI Interface Configuration (24)5.4Hardware Operation (24)5.4.1Software Operation (25)Chapter 6Connecting an LVDS Panel to an i.MX 6Dual/6Quad/6Solo/6DualLite Reference Board 6.1LVDS Overview (27) 6.1.1Connecting an LVDS Panel to the i.MX 6Dual/6Quad/6DualLite Reference Board (27)6.2Enabling an LVDS Channel (28)6.2.1Locating Menu Configuration Options (28)6.3LDB Ports (28)6.3.1Input Parallel Display Ports (29)6.3.2Output LVDS Ports (30)6.4Additional Information (30)Chapter 7Supporting the i.MX 6Dual/6Quad/6Solo/6DualLite Camera Sensor with CSI7.1CSI Overview (31)7.1.1Required Software (31)7.1.2i.MX 6Dual/6Quad/6Solo/6DualLite CSI Interfaces Layout (32)7.1.3Configuring the CSI Unit in Test Mode (32)7.2Adding Support for a New CMOS Camera Sensor (33)7.2.1Adding a Camera Sensor Entry in Kconfig (33)7.2.2Creating the Camera Sensor File (34)7.2.3Adding a Compilation Flag for the New Camera (36)7.3Using the I2C Interface (37)7.3.1Loading and Testing the Camera Module (39)7.4Additional Reference Information (39)7.4.1CMOS Interfaces Supported by the i.MX 6Dual/6Quad/6Solo/6DualLite (39)7.4.2i.MX 6Dual/6Quad/6Solo/6DualLite CSI Parallel Interface (41)7.4.3Timing Data Mode Protocols (43)Chapter 8Porting Audio Codecs to a Custom Board8.1Audio Overview (45)8.1.1Common Porting Task (45)8.1.2Porting the Reference BSP to a Custom Board (audio codec is the same as in the reference design) (46)8.1.3Porting the Reference BSP to a Custom Board (audio codec is different than the reference design) (47)Chapter 9Porting the Ethernet Controller Driver9.1Ethernet Controller Overview (49)9.1.1Pin Configuration (49)9.1.2Source Code (50)9.1.3Ethernet Configuration (51)Chapter 10Porting USB Host1 and USB OTG10.1USB Overview for i.MX 6Dual/6Quad/6Solo/6DualLite (53)10.2USB Overview for i.MX 6SoloLite (55)Chapter 1Porting U-Boot from an i.MX 6 Reference Board to an i.MX 6 Custom Board1.1U-Boot OverviewThis chapter provides a step-by-step guide that explains how to add i.MX 6 custom board support for U-Boot.This developer guide is based on the U-Boot v2013.04 package. For the i.MX patches, refer to the release notes.1.2Obtaining the Source Code for the U-BootThe following steps describe how to obtain the source code.1.Install Yocto Project. See the Freescale Yocto Project User's Guide.2.In Yocto Project, set the U-Boot preferred provider to uboot-imx. Confirm that thesources/meta-fsl-bsp-release/imx/meta-fsl-arm/conf has the line PREFERRED_PROVIDER_u-boot_mx6 = "u-boot-imx" The U-Boot code is now located at /tmp/work/-poky-linux-gnueabi/u-boot-fslc//git, where can be one of the following: imx6qsabresdimx6qsabreautoimx6dlsabresdimx6dlsabreautoimx6solosabreautoimx6slevkThe U-Boot main directory is referred to as . It is also assumed that your shell working directory is .1.2.1Preparing the CodeThe following steps describes how to prepare the code.1.Copy the board directory, as shown below:$cp -R board/freescale/mx6_ board/freescale/mx6_2.Copy the existing mx6.h board configuration file as mx6.h, as shown below:$cp include/configs/mx6.h include/configs/mx6.hNOTEThe configuration files for the i.MX 6 are located atinclude/configs. The files associated with the boards are:i.MX 6 SABRE-SD:mx6sabresd_common.hmx6sabresd.hi.MX 6 SABRE-AI:mx6sabresd_common.hmx6sabreauto.hi.MX 6SL EVK:mx6slevk.hNOTEYou should pay attention to the following configurationswhen using a new board.CONFIG_LOADADDR : Normally your uImage will beloaded to this address for boot.CONFIG_SYS_MALLOC_LEN : Heap memory size.CONFIG_STACKSIZE : Stack size.CONFIG_NR_DRAM_BANKS : Number of ddr banks.CONFIG_DDR_MB : Configure the DDR size inMB.PHYS_SDRAM : Physical address for the DDRmemoryConfig file is important for U-Boot. It determines thesize, functionality, and performance of u-boot.bin.3.Create one entry in /boards.cfg for the new -based configuration.This file is in alphabetical order. The instruction is an example for i.MX 6Quad board:mx6q arm armv7 mx6qfreescale mx6mx6q:IMX_CONFIG=board/freescale/mx6q/mx6q.cfg,MX6Q,DEFAULT_FDT_FILE="imx6q-.dtb",DDR_MB2048,SYS_USE_SPINORNOTEU-Boot project developers recommend adding any newboard to the MAKEALL script and running this script tovalidate that the new code has not broken any otherplatform build. This is a requirement if you plan to submit apatch back to the U-Boot community. For furtherinformation, see the U-Boot README file.4.Renameboard/freescale/mx6/mx6.ctoboard/freescale/mx6/mx6.c.5.Change the lineCOBJS := mx6.o (inside board/freescale/mx6name>/Makefile)toCOBJS := mx6.oNOTEThe remaining instructions build the U-Boot manually anddo not use Yocto Project.6.Create a shell script under named build_u-boot.sh.The file contents are as follows:#!/bin/bashexport ARCH=armexport CROSS_COMPILE= (e.g./opt/poky/1.4.1/sysroots/i686-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-make distclean;make mx6make/doc/deacb36410a6f524ccbf85c6.html pile U-Boot by using $./build_u-boot.sh 8.If everything is correct, you should now have u-boot.bin, which indicates that yourbuild setup is correct and ready to be customized.The new i.MX 6 custom board that you have created is an exact copy of the i.MX 6reference board, but the boards are two independent builds. This allows you to proceed tothe next step: customizing the code to suit the new hardware design.1.3Customizing the i.MX 6 Custom Board CodeThe new i.MX 6 custom board is a part of the U-Boot source tree, but it is a duplicate of the i.MX 6 reference board code and needs to be customized.The DDR technology is a potential key difference between the two boards.If there is a difference in the DDR technology between the two boards, the DDRinitialization needs to be ported. DDR initialization is coded in the DCD table, inside the boot header of the U-Boot image. When porting bootloader, kernel or driver code, you must have the schematics easily accessible for reference.1.3.1Changing the DCD Table for i.MX 6 DDR3LPDDR2InitializationBefore you initialize the memory interface, you need to configure the relevant I/O pins with the right mode and impedance, and then initialize the MMDC module.1.To port to the custom board, the DDR needs to be initialized properly.2.Open the fileboard/freescale/mx6/ddr.cfg3.Modify all items in this file to match the memory specifications. These code blocks will be read by the ROM code to initialize your DDR memory.1.3.2Booting with the Modified U-BootThis section describes how to compile and write u-boot.bin to an SD card.If the DDR configuration (board/freescale/mx6/ddr.cfg) was modified successfully, you can compile and write u-boot.imx to an SD card. To verify this, insert the SD card into the SD card socket of the CPU board and power on the board.The following message should be displayed on the console if your board was based on the i.MX 6Quad SABRE_SD:U-Boot 2013.04-02326-gd20319c (Sep 13 2013 - 15:44:53)CPU: Freescale i.MX6Q rev1.2 at 792 MHz CPU: Temperature 31 C, calibration data: 0x5804d87d Reset cause: POR Board: MX6Q/SDL-SabreSD I2C: readyDRAM: 1 GiBMMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2In: serialOut: serialErr: serialFound PFUZE100! deviceid=10,revid=10Net: FEC [PRIME]Hit any key to stop autoboot: 0U-Boot >The following message should be displayed on the console if your custom board was based on the i.MX 6SoloLite EVK:U-Boot 2013.04-02326-gd20319c (Sep 13 2013 - 15:44:53)CPU: Freescale i.MX6SL rev1.2 at 396 MHzCPU: Temperature 31 C, calibration data: 0x5804d87dReset cause: PORBoard: MX6SLEVKI2C: readyDRAM: 1 GiBMMC: FSL_SDHC: 0In: serialOut: serialErr: serialFound PFUZE100! deviceid=10,revid=11Net: FECHit any key to stop autoboot: 0U-Boot >1.3.3Adding New Driver Initialization Code to Board Files The following steps describe how to add new driver and how to initialize code.1.Find mx6.c in board/freescale/mx6/.2.Edit mx6.c and add new driver initialization code, includingclock, iomux, and gpio.3.Put driver initialization function into board_init or board_late_init.NOTEThe board_early_init_f() function will be called at thevery early phase if you defineCONFIG_BOARD_EARLY_INIT_F. You can put theUART/SPI-NOR/NAND iomux setup function whichrequires to be set up at the very early phase.The board_init()function will be called betweenboard_early_init_f and board_late_init. You can dosome general board-level setup here. If you do notdefine CONFIG_BOARD_EARLY_INIT_F, do notcall printf before the uart setup is finished. Otherwise,the system may be down.board_late_init() function will be called fairly later.To debug the initialization code, put the initializationfunction into it.1.3.4Further Customization at System BootTo further customize your U-Boot board project, use the first function that system boot calls on:start_armboot in "lib_arm/board.c".board_early_init_f()board_init()All board initialization is executed inside this function. It starts by running through the init_sequence[] array of function pointers.The first board dependent function inside the init_sequence[] array isboard_early_init_f(). board_early_init_f() is implemented inside board/freescale/ mx6.c.The following line of code is most important:...setup_iomux_uart();...NOTEIf a device tree is used, the machine ID is not used. Thecompatible string of the DTS file is used to match the board.The device tree for file each boot variation is specified in themachine configuration files in the meta-fsl-arm/conf/machinedirectory.1.3.5Customizing the Printed Board NameTo customize the printed board name, use the checkboard() function.This function is called from the init_sequence[] array implemented inside board/ freescale/mx6.c. There are two ways to use checkboard() tocustomize the printed board name. The brute force way or by using a more flexibleidentification method if implemented on the custom board.To customize the brute force way, delete identify_board_id( ) inside checkboard() and replace printf("Board: "); withprintf("Board: i.MX 6 on \n");If this replacement is not made, the custom board may use another identification method. The identification can be detected and printed by implementing the__print_board_info() function according to the identification method on the custom board.1.4DebuggingThere are two ways for debugging:Use Realview ICE.Use printf.1.4.1Using RealView ICE for DebuggingGenerally, we use RealView ICE to debug at a very early stage, for example, before uart initialization, or when it is difficult todebug with printf.1.Make sure that your RealView ICE supports Cortex-A9. If not, you need to upgradethe firmware and the RealView software.2.Load U-Boot (which is an elf file) in the root directory of U-Boot fully, or justsymbol (faster) to debug step by step.NOTEWe can make optimization level 0 in rules.mk, which iseasier for debugging in RealView ICE.1.4.2Using printf for debuggingThis is the most common method we use in debugging. You can print your value in the driver for debugging.NOTEIf you want to use printf in early stages, such as in board_init,we can put uart initialization code earlier, such as in theboard_early_init_f().Chapter 2Configuring the IOMUX Controller2.1IOMUX OverviewBefore using the pins (or pads), users must select the desired function and correct values for characteristics such as voltage level, drive strength, and hysteresis. You can configure a set of registers from the IOMUX controller.i.MX 6Dual/6QuadFor detailed information about each pin, see the "External Signals and Pin Multiplexing" chapter in the i.MX 6Dual/6Quad Multimedia Applications Processor Reference Manual. For additional information about the IOMUX controller block, see the "IOMUX Controller (IOMUXC)" chapter in the i.MX 6Dual/6Quad Multimedia Applications Processor Reference Manual.i.MX 6DualLiteFor detailed information about each pin, see the "External Signals and Pin Multiplexing" chapter in the i.MX 6DualLite Multimedia Applications Processor Reference Manual. For additional information about the IOMUX controller block, see the "IOMUX Controller (IOMUXC)" chapter in the i.MX 6DualLite Multimedia Applications Processor Reference Manual.i.MX 6SoloLiteFor detailed information about each pin, see the "External Signals and Pin Multiplexing" chapter in the i.MX 6SoloLite Multimedia Applications Processor Reference Manual. For additional information about the IOMUX controller block, see the "IOMUX Controller (IOMUXC)" chapter in the i.MX 6SoloLite Multimedia Applications Processor Reference Manual.2.2Information for Setting IOMUX Controller RegistersThe IOMUX controller contains four sets of registers that affect the i.MX 6Dual/6Quadi.MX/6DualLite/i.MX 6Solo/i.MX 6SoloLite registers.General-purpose registers (IOMUXC_GPR x)-consist of registers that control PLL frequency, voltage, and other general purpose sets."Daisy Chain" control registers (IOMUXC__SELECT_INPUT)-control the input path to a module when more than one pad may drive the module's inputMUX control registers (changing pad modes):Select which of the pad's eight different functions (also called ALT modes) isused.Set the pad functions individually or by group using one of the followingregisters:IOMUXC_SW_MUX_CTL_PAD_IOMUXC_SW_MUX_CTL_GRP_Pad control registers (changing pad characteristics):Set pad characteristics individually or by group using one of the followingregisters:IOMUXC_SW_PAD_CTL_PAD_IOMUXC_SW_PAD_CTL_GRP_Pad characteristics are:SRE (1 bit slew rate control)-Slew rate control bit; selects between FAST/SLOW slew rate output. Fast slew rate is used for high frequency designs.DSE (2 bits drive strength control)-Drive strength control bits; selects thedrive strength (low, medium, high, or max).ODE (1 bit open drain control)-Open drain enable bit; selects open drain orCMOS output.HYS (1 bit hysteresis control)-Selects between CMOS or Schmitt Triggerwhen pad is an input.PUS (2 bits pull up/down configuration value)-Selects between pull up ordown and its value.PUE (1 bit pull/keep select)-Selects between pull up or keeper. A keepercircuit help assure that a pin stays in the last logic state when the pin is nolonger being driven.PKE (1 bit enable/disable pull up, pull down or keeper capability)-Enable ordisable pull up, pull down, or keeper.DDR_MODE_SEL (1 bit ddr_mode control)-Needed when interfacing DDRmemories.DDR_INPUT (1 bit ddr_input control)-Needed when interfacing DDRmemories.2.3Using IOMUX in the Device Tree - ExampleThis is an example which shows how to use IOMUX in the Device Tree usdhc@0219c000 { /* uSDHC4 */fsl,card-wired;vmmc-supply = <®_3p3v>;status = "okay";pinctrl-names = "default";pinctrl-0 = <&pinctrl_usdhc4_1>;};iomuxc@020e0000 {compatible = "fsl,imx6q-iomuxc";reg = <0x020e0000 0x4000>;/* shared pinctrl settings */usdhc4 {pinctrl_usdhc4_1: usdhc4grp-1 {fsl,pins = <MX6QDL_PAD_SD4_CMD__SD4_CMD0x17059MX6QDL_PAD_SD4_CLK__SD4_CLK0x10059MX6QDL_PAD_SD4_DAT0__SD4_DATA00x17059MX6QDL_PAD_SD4_DAT1__SD4_DATA10x17059MX6QDL_PAD_SD4_DAT2__SD4_DATA20x17059MX6QDL_PAD_SD4_DAT3__SD4_DATA30x17059MX6QDL_PAD_SD4_DAT4__SD4_DATA40x17059MX6QDL_PAD_SD4_DAT5__SD4_DATA50x17059MX6QDL_PAD_SD4_DAT6__SD4_DATA60x17059MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059 >;};};....};For details, see:Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt Documentation/devicetree/bindings/pinctrl/fsl,imx6*-pinctrl.txtChapter 3Registering a New UART Driver3.1Enabling UART on Kernel MenuconfigEnable the UART driver on Linux menuconfig. This option is located at:-> Device Drivers-> Character devices-> Serial drivers<*> IMX serial port support[*] Console on IMX serial portAfter enabling the UART driver, build the Linux kernel and boot the board.3.2UART SettingsBy default, the UART is configured as follows:Baud Rate: 9600Data bits: 8Parity: NoneStop bits: 1Flow Control: None3.3File Names and LocationsThere are three Linux source code directories that contain relevant UART files. The header file is available in the directory /drivers/tty/ serial/。
硬件环境软件环境1 安装虚拟机1.1虚拟机选择Ubuntu 以上版本(升级比较方便)1.2虚拟机的配置与升级apt-cache search package 搜索包apt-cache show package 获取包的相关信息,如说明、大小、版本等sudo apt-get install package 安装包sudo apt-get install package - - reinstall 从头安装包sudo apt-get -f install 修复安装"-f = ——fix-missing"sudo apt-get remove package 删除包sudo apt-get remove package - - purge 删除包,包括删除配置文件等sudo apt-get update 更新源sudo apt-get upgrade 更新已安装的包sudo apt-get dist-upgrade 升级系统sudo apt-get dselect-upgrade 利用dselect 升级apt-cache depends package 了解利用依托apt-cache rdepends package 是查看该包被哪些包依托sudo apt-get build-dep package 安装相关的编译环境apt-get source package 下载该包的源代码sudo apt-get clean && sudo apt-get autoclean 清理无用的包sudo apt-get check 检查是不是有损坏的依托2 Linux下安装交叉编译环境安装步骤1)下载命令行安装# tar xvzf cd3 安装arm设备编程工具SAM Boot Assistant(SAM-BA)Windows下安装1)安装软件;2)安装USB CDC驱动;图图图图图图打开SAM-BA 2图图Linux下安装1)解压;2)安装USB CDC驱动;1/ Login with administrator rights2/ Unload usbserial module if it is already running#rmmod usbserial3/ Load usbserial kernel module#modprobe usbserial vendor=0x03eb product=0x61244/ Verify that the USB connection is established#lsusb -d 03eb:6124Bus 004 Device 006: ID 03eb:6124 Atmel Corp5/ Know which USB connection is established#dmesgkernel: usb 4-2: new full speed USB device using uhci_hcd and address 5kernel: usb 4-2: configuration #1 chosen from 1 choicekernel: usbserial_generic 4-2:: generic converter detectedkernel: usbserial_generic: probe of 4-2: failed with error -5kernel: usbserial_generic 4-2:: generic converter detectedkernel: usb 4-2: generic converter now attached to ttyUSBx=> you will have to use /dev/ttyUSBx to connect to your boardRunning SAM-BA CDC Serial version :Launch '' file, and select your board and the /dev/ttyUSBxdevice where your board in mounted on.- Update the kernel:# apt-get install linux-image-generic linux-headers-generic- On 64 bits version install 32 bits libraries:# apt-get install ia32-libs- Give sam-ba execute permission if needed:$ chmod +x sam-ba- Connect the board- Create a symlink on /dev/ttyACM0# ln -s /dev/ttyACM0 /dev/ttyUSB0- Launch sam-baTested on:Ubuntu 64 bits 32 bits 64 bits 64 bits 64 bits alpha3How to check if your kernel is up to date ?$ dmesgIf you have something like that (not exactly the same) it's ok:[] usb 5-1: new full speed USB device using uhci_hcd and address 5[] cdc_acm 5-1:: This device cannot do calls on its own. It is not a modem.[] cdc_acm 5-1:: ttyACM0: USB ACM deviceIf you don't have this part: 'This device cannot do calls on its own. It is not a modem.', your kernel is probably not up to date or the cdc_acm patch has not been backported.4 例如下载AT91Bootstrap源码1)取得源码;2)解压# tar xvzf配置AT91Bootstrap和选择启动媒介1) 从NAND FLASH启动#make at91sam9xnf_defconfig2)添加环境变量#vi .profilePATH="$PATH:/root/Public/bin"export PATH#souce .profile1)配置AT91Bootstrap#make menuconfig编译AT91Bootstrap#export $CROSS_COMPILE=” arm-none-eabi-”#make clear#make在../binaries下产生文件利用AT91Bootstrap二进制文件1)从NAND flash启动A T91Bootstrap图在NAND和SPI无效的前提下,启动SAM-BA,烧AT91Bootstrap到NAND flash,如图所示:(1)在SAM-BA图形用户界面上选择NandFlash媒介选项卡;(2)1)在NAND有效的前提下,在Scripts下拉列表框当选择“Enable NandFlash”;然后点击“Execute”按钮,完成NandFlash的初始化,如图所示;图)清除芯片上原先烧的信息图结果如图、图和图所示。
© 2018 NXP B.V.i.MX 8M EVK Board Hardware User's Guide1.IntroductionThis document is the hardware User’s Guide for the i.MX 8M Evaluation Kit (EVK) based on the NXP Semiconductor’s i.MX 8MDQLQ Applications Processor. This board is fully supported by NXPSemiconductor. This manual includes system setup and debugging, and provides detailed information on the overall design and usage of the EVK board from a hardware system perspective.1.1. Board overviewThe EVK board is a platform designed to showcase themost commonly used features of the i.MX 8MDQLQ Applications Processor in a small, low cost package. The i.MX 8M EVK board is an entry level development board, which gives the developer the option ofbecoming familiar with the processor before investing a large amount of resources in more specific designs. Table 1 lists the features of the i.MX 8M EVK board.NXP Semiconductors Document Number: IMX8MDQLQEVKHUGUser's GuideRev. 0, 01/2018Contents1.Introduction ........................................................................ 11.1. Board overview ....................................................... 1 1.2. Board contents ........................................................ 2 1.3. Board revision history ............................................. 2 2.Specifications ..................................................................... 32.1. Processor ................................................................. 4 2.2. Boot mode operations and selections ...................... 4 2.3. Power tree ............................................................... 6 2.4. LPDDR4 DRAM memory ...................................... 8 2.5. SD card slot (J1601) ............................................... 8 2.6. eMMC memory (U601) .......................................... 9 2.7. Ethernet connector (J1201) ..................................... 9 2.8. USB connector (J901, J903) ................................... 9 2.9. Audio input/output (J1101) ..................................... 9 2.10. UART connector (J1701) ........................................ 9 2.11. JTAG connector (J401) ......................................... 10 2.12. Extension port (J1801) .......................................... 10 2.13. MIPI-CSI/MIPI-DSI connector (J1501, J1502, J1503) 102.14. User interface buttons ........................................... 11 2.15. WiFi/BT (U1301/J1401) ....................................... 12 2.16. User interface LED indicators ............................... 12 2.17. HDMI connector (J1001) ...................................... 12 3.PCB information .............................................................. 13 3.1. EVK design files (13)IntroductionTable 1. Board featuresProcessor NXP Applications Processor MIMX8MQ6DVAJZAADRAM memory Micron 3 GB LPDDR4 MT53B768M32D4NQ-062 WT:B Mass storage Micron 16 GB eMMC5.0 MTFC16GAKAECN-2M WTMicron 32 MB QSPI NOR MT25QL256ABA1EW9MicroSD card connector SD3.0 supportedPower NXP PMIC PF4210 + Discrete DCDC/LDODisplay interface HDMI 2.0a ConnectorDSI interface (Mini-SAS connector)Ethernet 1 GB Ethernet with RJ45 connectorUSB x1 USB (2.0/3.0) Type-C connector x1 USB (2.0/3.0) host connectorAudio connectors 3.5 mm Stereo Headphone outputDebug connectors JTAG (10-PIN header) MicroUSB for UART debugCamera CSI interface (Mini-SAS connector)WiFi/Bluetooth x1 on board WiFi/BT module x1 M.2 slot (KEY-E type)Buttons ONOFF, RESETLED Indicators Power status, UARTExpansion Port FPC connector (SAI ports)PCB 3.937-inch x 3.937-inch (10 cm x 10 cm), 10-layer board1.2. Board contentsThe i.MX 8M EVK contains the following items:•i.MX 8M EVK board•USB Cable (x1 Standard USB TYPE-A to MicroUSB TYPE-B connector; x1 Standard USB TYPE-A to USB TYPE-C connector)•12V/5.0A Power Supply•Quick Start Guide1.3. Board revision history•Rev A0/A1•Rev B1/B2•Rev B3The board assembly version will be printed on a label, usually attached to the bottom side. The assembly version will be the letter designation following the schematic revision: 700-29615 REV _.2. SpecificationsThis section provides the detailed information about the electrical design and practical considerations that go into the EVK board. Figure 1 describes each block in the high-level block diagram of the EVK board.Figure 1. MCIMX8M-EVK block diagramFigure 2 shows the overview of the i.MX 8M EVK board.SpecificationsFigure 2. i.MX 8M EVK board overview2.1. ProcessorThe i.MX 8MDQLQ processors represent NXP Semiconductor’s latest achievement in integrated multimedia-focused products offering high performance processing with a high degree of functional integration, targeted towards the growing market of connected devices. The i.MX 8MDQLQ processor features NXP’s advanced implementation of the Quad ARM Cortex®-A53+ ARM Cortex®-M4 core, which operates at speeds up to 1.5 GHz. i.MX 8MDQLQ includes integrated power management module that reduces the complexity of external power supply and simplifies the power sequencing. Each processor provides a 32-bit DDR3/LVDDR3/DDR4/LPDDR4 memory interface and other interfaces for connecting peripherals, such as HDMI, LCD, WLAN, Bluetooth™, GPS and camera sensors.For more detailed information about the processor, please refer to the datasheet and reference manual on /i.MX8M.2.2. Boot mode operations and selectionsThe i.MX 8MDQLQ Applications Processor can be the boot configuration selected on SW802 or by the boot configuration stored on internal eFUSE. Alternatively, the i.MX 8MDQLQ can download a program image from a USB connection when configured in serial downloader mode. The method used to determine where the processor finds its boot information is from two dedicated BOOT MODE pins. Table 2 shows the values used in the two methods.Figure 3. Boot modeTable 2. Boot mode pin settingsBOOT_MODE1 BOOT_MODE 0 Boot source0 0 Boot from fuses0 1 Serial downloader1 0 Internal boot1 1 ReservedIt is important for the developer to remember that these two pins are tied to the BOOT modules, therefore, on i.MX 8M EVK board, use a dual-switch (SW802) to select the input voltage of these two pins, 0 or 3.3 V. If the developer wants to boot the program Image from the Fuses Mode, the position of the switch 1 and 2 must be set to OFF, it is the same principle to choose the Serial Downloader Module or Internal Boot Module to load bootable code into the processor.If the method of determining the bootable source code is selected to be from the hardware, then the developer must set the switch S802:MODE0 to OFF, MODE1 to ON, and the four i.MX 8MDQLQ pins must be set on the EVK board as Table 3 and Figure 4.Table 3. Boot mode settingBOOT configuration SW801Boot from EMMC 0010Boot from SD2 1100SpecificationsFigure 4. Boot mode settingOn the i.MX 8M EVK board, the default boot mode is from eMMC device. There is one SD connector on the board. The board will check the eMMC connector first and then the SD connector. If you put the boot card into SD connector, and set the boot configuration as “BOOT from SD2”, the board will boot from the SD by default.NOTEFor more information about the boot module, such as the meaning ofevery bit of the Boot Switch, please refer to i.MX 8MDQLQ ReferenceManual on /i.MX8M.2.3. Power treeThere is a +12 V external wall power supply that needs to be connected to the i.MX 8M EVK board at connector J902. The other powers from internal adapters, on the EVK board, use discrete device to power the system. Figure 5 shows the power tree.Figure 5. Power tree diagramIn Figure 5, the developer can get all the voltage supply rails used on the EVK board. When some modules are not working, the developer needs to test whether the voltage of this module is correct. Table 4 lists the power rails on the board.SpecificationsTable 4. Power railsmScale850SRC TYPE Value SEQ PWR rail1 NVCC_SNVS 3.32 VDD_SNVS 0.9RTC_RESET_B3 VDD_SOC/VDDA_0P9 DC/DC BUCK 0.94 VDD_ARM DC/DC BUCK 0.9/1.04 VDD_GPU PMIC PF4210 0.9/1.04 VDD_VPU PMIC PF4210 0.9/1.04 VDD_DRAM PMIC PF4210 1.05 VDDA_1P8_xxx PMIC PF4210 1.85 VDDA_DRAM PMIC PF4210 1.86 NVCC_3V3 DC/DC BUCK 3.36 NVCC_1V8 PMIC PF4210 1.86 NVCC_DRAM PMIC PF4210 1.1/1.2/1.357 NVCC_SD2 LDO 1.8/3.38 1.8V PHY PMIC PF4210 1.88 0.9V PHY PMIC PF4210 0.98 3.3V PHY PMIC PF4210 3.3POR_BNOTEIf an alternate power supply is used (not the original power supply), itshould be no more than 20 V; otherwise the board will not work.2.4. LPDDR4 DRAM memoryThe i.MX 8M EVK board has one 768 Meg × 32 (4 channels × 16 I/O) LPDDR4 SDRAM chip (MT53B768M32D4NQ-062 WT:B) for a total of 3 GB RAM memory.In the physical layout, the LPDDR4 chip is placed on the TOP side, the data traces are not necessarily connected to the LPDDR4 chips in sequential order, but for ease of routing, are connected as best determined by the layout and other critical traces.The DRAM_VREF can be created by a simple voltage divider using 1.5 K Ohm 1% resistors and 0.1uF capacitors for stability. The relatively smaller-value resistors provide enough current to maintain a steady mid‐point voltage. The calibration resistors used by the LPDDR4 chips and processor are 240 Ohm 1% resistors.2.5. SD card slot (J1601)There is one MicroSD card connectors (J1601) on the i.MX 8M EVK board. J1601 on the i.MX 8M EVK board is the TF slot for SD2 interface. By default, this MicroSD connector supports one 4-bitSD3.0 card or MMC card.2.6. eMMC memory (U601)The eMMC interface is connected to uSDHC1 of i.MX 8M. It can support eMMC 5.0, eMMC and hinge type. MicroSD socket are co-layout, and the eMMC device is populated by default on the EVK board. To boot from eMMC, you need to change the Boot-mode switch (SW801) settings as shown in Table 3.2.7. Ethernet connector (J1201)There is one gigabit Ethernet module on the i.MX 8MDQLQ processor. The developer can use the ENET connector to send/receive the ENET signals. The Ethernet subsystem of the i.MX 8M EVK board is provided by the Qualcomm AR8031 Ethernet Transceiver (U1201). The Ethernet Transceiver (or PHY) receives standard RGMII Ethernet signals from the MAC-NET core of the i.MX 8MDQLQ Applications Processor. The processor takes care of all Ethernet protocols at the MAC layer and above. The PHY is only responsible for the Link Layer formatting. The PHY receives the clock signal from the ENET_TXC pin of i.MX 8MDQLQ processor.When the developer uses the i.MX 8M EVK board for the first time, he must set the MAC address for the EVK board. The MAC address is printed on the connector very clearly, and the developer just needs to set MAC address same as it.2.8. USB connector (J901, J903)The i.MX 8MDQLQ Applications Processors contain two USB 2.0/3.0 OTG controllers, with two integrated USB PHY. On the EVK board, one is used for USB host port and the other for the USB TYPE-C port.2.9. Audio input/output (J1101)The main Audio DAC used on the EVK board is CIRRUS LOGIC Low Power, high quality Stereo DAC, WM8524. The digital interface between i.MX 8MDQLQ and WM8524 includes three signals: SYNC_CLK, BCLK, and DACDAT. The i.MX 8MDQLQ also provides the MCLK to WM8960.i.MX 8M EVK includes one headphone interface (J1101). J1101 is a 3.5 mm 4-pole (or TRRS) phone jack.2.10. UART connector (J1701)The i.MX 8MDQLQ Applications Processor has four independent UART Ports (UART1 – UART4). Usually the developer can use a DB9 connector and a level shifter such as MAX3232 to complete the UART debug circuit. Nowadays, many computers may not have a RS-232 DB9 connector, so on the EVK board, SILICON LABS’s CP2105, there is a USB to Serial UART IC to cover the UART signal to the USB signal.SpecificationsOn the EVK board, UART1_TXD & UART1_RXD are used to output serial debugging information for A53-core. UART2_TXD & UART2_RXD are used to output serial debugging information for M4-core. No RTS or CTS signals are sent from the Processor to the Debug connector as these signals are ignored by most applications. The required terminal settings to receive debug information during the boot cycle are as shown in Table 5.Table 5. Terminal setting parametersData Rate 115,200 BaudData bits 8Parity NoneStop bits 12.11. JTAG connector (J401)The i.MX 8MDQLQ Applications Processor accepts five JATG signals from an attached debugging device on dedicated pins. A sixth pin on the processor accepts a board HW configuration input, specific to the EVK board only. The five JTAG signals used by the processor are:•JTAG_TCK TAP Clock•JTAG_TMS TAP Machine State•JTAG_TDI TAP Data In•JTAG_TDO TAP Data Out•JTAG_nTRST TAP Reset Request (Active Low)2.12. Extension port (J1801)One Expansion port (J1801) is provided on the EVK board to generate audio card connector, and the developer can use the processor to perform audio features development.2.13. MIPI-CSI/MIPI-DSI connector (J1501, J1502, J1503)The i.MX 8MDQLQ processor supports dual MIPI-CSI and single MIPI-DSI. The connectors are designed to support camera and LCD. The connectors are as shown in Figure 6.Figure 6. MIPI-DSI/CSI connector2.14. User interface buttonsThere are two user interface buttons on the EVK board.2.14.1. Power button (SW1701)The chip supports the use of a button input signal to request main SoC power state changes (i.e. ON or OFF) from the PMU.ON/OFF can be configured as debounce, OFF-to-ON time, and max timeout. The debounce and OFF-to-ON time can be configured as 0, 50, 100 and 500 ms. Debounce is used to generate the power-off interrupt. In the ON state, if ON/OFF button is held longer than the debounce time, the power-off interrupt is generated. OFF-to-ON time supports the time it takes to request power-on after a button has been held longer than the configured time. In the OFF state, if ON/OFF button is held longer than the OFF-to-ON time, the state will transit from OFF to ON. Max timeout can be configured as 5 s, 10 s, 15 s and disable. Max timeout can also be the time for requesting power down after ON/OFF button has been held for the defined time.PCB information2.14.2. Reset button (SW1702)In the ON state, holding the RESET button (SW1702) will force to reset the power rails except the VDD_SNVS on the i.MX 8M EVK board. The i.MX 8MDQLQ applications processor will be immediately turned off and reinitiate a boot cycle from the OFF state.2.15. WiFi/BT (U1301/J1401)The MCIMX8M EVK board has two ways to support WiFi/BT function:1.Chip on board WiFi: LBEE5U91CQ-TEMP;2.M.2 WiFi/BT card.Both ways share the same UART interface for BT function, so the BT function cannot be used at the same time. For WiFi, there are two standalone PCIe interfaces for this purpose, and WiFi function can be used at the same time.2.16. User interface LED indicatorsThere are two LED indicators on the board. These LEDs have the following functions: •Main Power Supply (D1601)—Green – CPU is running on OD mode.—Red – WALL_12V_DC_JACK is provided and SW701 is powered on.—OFF – The board is powered off.•UART (D1702/D1703)—Green light flashing – The UART data transmitted to PC.—Orange light flashing – The UART data received from PC.2.17. HDMI connector (J1001)The i.MX 8M EVK board has a Type-A HDMI connector that can playback 4K video.3. PCB informationThe overall dimensions of the i.MX 8M EVK board PCB are shown in Figure 3. The EVK board is made with standard 10-layer technology. The material used was FR-4, and the PCB stack-up information is shown in Table 6.Table 6. Board stack up informationLayer Description Coppoer (Oz.) Dielectric thickness (mil)1 Signal 0.333Dielectric TU768P:2.741mil2 GND 1Dielectric TU768P:3.94mil3 Power 1Dielectric TU768P:4.409mil4 Signal 1Dielectric TU768P:3.94mil5 GND 1 3.0Dielectric TU768P:4.491mil6 Signal 1Dielectric TU768P:3.94mil7 GND 1Dielectric TU768P:4.465mil8 Signal 1Dielectric TU768P:3.94mil9 GND 1Dielectric TU768P:2.743mil10 Signal 0.3333.1. EVK design filesYou can download the schematics, layout file, gerber files, and BOM from /i.MX8M.NOTEThe CPU dies when the temperature is over 95°C due to some use cases. Itis strongly recommended to install fans on the heatsink to avoid anypotential damages to the PCBA. You can get fans from/i.MX8M.Document Number: IMX8MDQLQEVKHUGRev. 0 1/2018How to Reach Us: Home Page: / Web Support:/supportInformation in this document is provided solely to enable system and softwareimplementers to use NXP products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. NXP reserves the right to make changes without further notice to any products herein.NXP makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does NXP assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical”parameters that may be provided in NXP data sheets and/or specifications can and do vary in different applications, and actual performance may vary over time. All operating parameters, including “typicals,” must be validated for each customer application by customer’s technical experts. NXP does not convey any license under its patent rights nor the rights of others. NXP sells products pursuant to standard terms and conditions of sale, which can be found at the following address: /SalesTermsandConditions .NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Freescale, the Freescale logo are the trademarks of NXP B.V. All other product or service names are the property of their respective owners.Arm, the Arm logo, and Cortex are registered trademarks of Arm Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. © 2018 NXP B.V.。
UBI文件系统简介作者:刘洪涛,华清远见嵌入式学院金牌讲师。
在linux-2.6.27以前,谈到Flash文件系统,大家很多时候多会想到cramfs、jffs2、yaffs2等文件系统。
它们也都是基于文件系统+mtd+flash设备的架构。
linux-2.6.27后,内核加入了一种新型的flash文件系统UBI(Unsorted Block Images)。
这里简单介绍下UBI文件系统加入的原因,及使用方法。
我也是刚接触到这个文件系统,可能有理解不对的地方,也请指正。
一、产生的背景FLASH具有的“先擦除再写入”、坏块、“有限的读写次数”等特性,目前管理FLASH的方法主要有:1、采用MTD+FTL/NFTL(flash 转换层/nand flash转换层)+传统文件系统,如:FAT、ext2等。
FTL /NFTL的使用就是针对FLASH的特有属性,通过软件的方式来实现日志管理、坏块管理、损益均衡等技术。
但实践证明,由于知识产权、效率等各方面因素导致本方案有一定的局限性。
2、采用硬件翻译层+传统文件系统的方案。
这种方法被很多存储卡产品采用,如:SD卡、U盘等。
这种方案对于一些产品来说,成本较高。
3、采用MTD+ FLASH专用文件系统,如JFFS1/2,YAFFS1/2等。
它们大大提高了FLASH的管理能力,并被广泛应用。
JFFS2、YAFFS2等专用文件系统也存在着一些技术瓶颈,如:内存消耗大,对FLASH容量、文件系统大小、内容、访问模式等的线性依赖,损益均衡能力差或过渡损益等。
在此背景下内核加入了UBI文件系统的支持。
二、用法环境:omap3530处理器、(128MByte 16 位NAND Flash) 、linnux-2.6.28内核1、配置内核支持UBIFSDevice Drivers --->Memory Technology Device (MTD) support --->UBI - Unsorted blockimages --->Enable UBI配置mtd支持UBI接口File systems --->Miscellaneous filesystems --->UBIFS file system support配置内核支持UBIFS文件系统2、将一个MTD分区4挂载为UBIFS格式● flash_eraseall /dev/mtd4 //擦除mtd4● ubiattach /dev/ubi_ctrl -m 4 //和mtd4关联● ubimkvol /dev/ubi0 -N rootfs -s 100MiB //设定volume 大小(不是固定值,可以用工具改变)及名称● mount -t ubifs ubi0_0 /mnt/ubi或mount -t ubifs ubi0:rootfs /mnt/ubi3、制作UBIFS文件系统在制作UBI镜像时,需要首先确定以下几个参数:MTD partition size; //对应的FLASH分区大小flash physical eraseblock size; // FLASH物理擦除块大小minimum flash input/output unit size; //最小的FLASH输入输出单元大小for NAND flashes - sub-page size; //对于nand flash来说,子页大小logical eraseblock size.//逻辑擦除块大小参数可以由几种方式得到1)如果使用的是2.6.30以后的内核,这些信息可以通过工具从内核获得,如:mtdinfo –u。
电子科技大学硕士学位论文基于ARM平台的嵌入式WEB服务器的设计与实现姓名:刘鑫申请学位级别:硕士专业:通信与信息系统指导教师:林水生20100501摘要摘要嵌入式设备凭借其体积小巧、高性能、低功耗等特点遍布生活中的每一个角落。
嵌入式设备的应用范围不断扩大,伴随着Intemet的快速发展,嵌入式设备在远程管理、监控方面的应用成为可能。
嵌入式Web服务器正是嵌入式技术与网络技术的一个完美结合。
传统Web服务器主要用于处理大量客户端的并发访问,对处理器能力和内存空间有很高的要求,而嵌入式设备往往处理能力、内存容量等硬件资源有限,故传统Web服务器通常无法运行在嵌入式平台上。
鉴于此,本课题详细研究了嵌入式Web服务器的设计方法,并搭建软硬件平台,在此基础上实现一个嵌入式Web服务器。
嵌入式Web服务器的实质是由一系列软件功能模块搭建而成,其作用的发挥需要相应的软硬件平台。
ARM内核处理器以其高性能、低功耗享誉全球市场。
而嵌入式Linux内核凭借源码开放、可移植性好、免费等特点成为一种广泛应用的嵌入式操作系统。
本设计使用ARM+L1NUX的模式搭建软硬件平台,为嵌入式Web服务器的实现奠定软硬件基础。
本课题首先研究了嵌入式系统和嵌入式Web服务器技术当前的发展现状,接着完成嵌入式Web服务器的基本架构设计,然后以ATMEL公司的ARM9芯片AT91SAM9263为核心搭建嵌入式Web服务器硬件平台,在此基础上进行嵌入式Linux内核的移植和相关外设的驱动开发,完成嵌入式Web服务器的软硬件环境搭建。
最后在该环境下自行实现嵌入式Web服务器MyWebServer,经过测试,客户端可以访问MyWebServer内嵌的静态网页,同时也可以与MyWebServer之间的动态交互,达到设计目标。
关键字:嵌入式Web,ARM,嵌入式Linux,MyWebServer服务器ABSTRACTABSTRACTEmbeddeddevicesextendeverywhereinhumanlifebyvirtualofitscompactsize,highperformanceandlowpowerconsumption.Thescopeofembeddeddeviceapplicationsisexpandingeverywhere.AccompaniedbyusedwebintherapiddevelopmentofInteract,embeddeddevicesbecomepossible.Embeddedtechnologyremoteisamanagement,monitoringperfectcombinationoftheapplicationserverembeddedconcurrenttheandnetworktechnology.aTraditionalwebserverismainlyusedforprocessingclientaccesseslargenumberofwhichrequireshi曲processorpowerandmemorycapacity.Whileprocessingpower,memorynotrunallcapacityofembeddeddevicesislimited,traditionalWebserverusuallyCanin也eembeddedplatform.Inonviewofthis,thisissuedescribesathewayofdesigningembeddedwebserverdesign,buildinganembeddedwebserverhardware・softwareplatform,andplatformTheatachievingthebasisofsoftware-hardwarethelast.embeddedwebserverisbuiltonacorrespondinghardwareandsoftwarethroughtheworldplatforms.ARMcoreprocessorsarelowpowerrenownedmarketforitsahigh-performanceandwidelyconsumption,whileembeddedLinuxkernelbecomesystemsasausesusedembeddedandoperatingwithcharacteristicsofopensource,goodthemodelARM+LINUXtobuildportability,fleeofchargeandothers.ThisdesignahardwaresoftwareplatformgoodfoundationfortherealizationoftheernbeddedWebserver.Firstofall,thebasicarchitectureoftheembeddedwebserverdesignisintroduced.ThenATMEL'sARM9platformtobuildehipAT91SAM9263chipisusedtoconsititutethehardwareanembeddedWebserver.Onthisbasis,embeddedtheaLinuxkemelandserverrelatedperipheraldriversaredeveloppedaleormigrated.NowembeddedembeddedWebhardwareandsoftwareenvironmentcompleted.Finallyachieved.webserverSelWeI"“MyWebServer'’isrealizeddynamicallyaftertestwhichonthisplatform.TheguestCaninteractwiththesignifiesthatourgoalisKeywords:EmbeddedWeb,ARM,EmbededLinux,MyWebServerⅡ图目录图目录图1.1嵌入式系统的一般架构………………………………………………………….3图1.2嵌入式硬件平台基本组成结构…………………………………………………3图2.1嵌入式Web服务器功能模块图………………………………………………..13图2.2浏览器与Web服务器的工作方式……………………………………………14图2.3TCP/P协议栈模型…………………………………………………………….17图2_4TCP/口协议栈协议依赖关系…………………………………………………18图2.5TCP“三次握手"建立连接……………………………………………………l9图2.6IP数据报收发流程……………………………………………………………..21图2.7HTTP协议的发展………………………………………………………………22图2-8HTTP通信模型………………………………………………………………..22图2-9客户端通过CGI程序与服务器端交互………………………………………23图2.10CGI程序开发一般流程……………………………………………………….25图2.11嵌入式Web服务器设计框架………………………………………………..26图3.1嵌入式Web服务器系统框图…………………………………………………28图3.2AT91S』州9263结构框图……………………………………………………..291图3.3CS8900A架构图…………………………………………………………………3图3_4系统平面布局图……………………………………………………………….33图3.5核心板实物图………………………………………………………………….33图3-6核心板与母板连接示意图…………………………………………………….34图3.7系统实物图……………………………………………………………………..34图3.8SDRAM存储系统电路图………………………………………………………35图3-9NANDFlash存储系统电路图…………………………………………………36图3.10电压转换电路5V一3.3V………………………………………………………36图3.11电压转换电路3.3V一1.2V……………………………………………………37图3.12复位电路………………………………………………………………………37图3.13RS232串行接口电路………………………………………………………….38图3.14网络接口电路…………………………………………………………………..38图3.15正确检测芯片………………………………………………………………….4l图3.16未检测出芯片…………………………………………………………………41图3.17串口调试结果…………………………………………………………………43图4.1典型嵌入式系统软件image的逻辑布局…………………………………….45图4.2ARMLinux的开发流程………………………………………………………。
OK335X-Linux用户手册第一章OK335X简介OK335X开发板基于TI AM335X处理器,运行主频最高720M,支持Linux,WinCE,Android三大操作系统,可用于工业产品设计。
OK335X有核心板和底板组成,核心板主要芯片有:CPU,NandFlash,Memory,PowerManage。
使用我们的核心板,只需要根据您的业务需求开发自己的底板,这样可加速您的产品上市时间,让您从平台搭建的复杂环境中脱离。
下面我们具体描述OK335X核心板和底板资源。
OK335X产品图片如下所示:核心板硬件资源:1CPU主频:720M(支持AM3352,AM3354,AM3356,AM3357,AM3358,AM3359)2NandFlash:256M(Micro SLC)3Memory:265M(Micro DDR2)4PowerManage IC:TPS65217B(TI AM335X专用电源IC)底板资源:14路串口(2个232电平,2个TTL电平,232电平已经使用DB9座子引出,其中COM0作为调试串口使用,注意:OK335X-V1底板中UART4暂时不能使用,下一硬件版本将修正这个问题)。
21路100M网口3音频接口(1路Phone输出,1路Line-in输入)41个SD卡接口56个用户按键63路I2C接口71个LCD接口(支持RGB888模式,支持电阻触摸和电容触摸。
默认标配7寸电阻屏)81路PWM接口,用于蜂鸣器测试。
91路Can接口101路SDIO接口11多路用户IO接口12四路USB2.0接口,一路USB2.0OTG(目前板子为一路USB Host接口,后续会增加到四路USB HUB)131路SPI接口148路AD(其中4路用于电阻触摸,1路用于滑动变阻器AD测试,其余3路通过插针引出,另外滑动变阻器端有跳线设置,通过跳线可以设置这路AD用于插针引出,还是用于可调电阻测试)15引出总线接口(缺省未焊接底座)161个RESET按钮,用于系统复位。
迅为龙芯2K1000开发板快速体验1 开箱LS2K1000开发板⼤家在拿到开发板以后⾸先检查下配件,配件如下所⽰:1. 电源适配器⼀个2. 232串⼝线⼀根3. ⽹线⼀根4. usb转串⼝⼀个5.器⼀个(选配)2 开发环境说明作者使⽤的开发环境如下,如⼤家是初次接触和龙芯开发板,建议电脑主机系统和虚拟机ubuntu系统的版本以及⽹络连接⽅式和作者保持⼀致。
电脑配置:CPU:I510400显卡:集成显卡内存:16G存储:2T系统:win10企业版10.0.17134版本17134⽹络连接:电脑以及开发板均使⽤有线连接到路由器。
建议:上述配置不是硬性要求。
但是⼤家在选择开发电脑时,内存最好不要低于8G,存储不要低于500G,CPU的性能决定编译速度,CPU 性能越强,编译源码的速度越快。
显卡⽆要求,可以点亮屏幕即可。
⽹络连接推荐使⽤路由器连接电脑以及开发板,避免造成后⾯ubuntu不能上⽹,不能互相ping通等问题。
虚拟机配置(后⾯会教⼤家安装):VMware版本:15.5系统版本:20.04建议⼤家不要使⽤双系统,为什么我们不选择双系统呢?⾸先,使⽤双系统,也就是⼀台电脑安装Windows和linux系统俩个系统,我们的数据会很不安全,如果双系统的其中⼀个系统崩溃了,可能电脑就不能启动了,这样我们的数据就损失了,所以,我们不能把鸡蛋都放在同⼀个篮⼦⾥⾯。
其次,在开发的过程中,我们需要经常在Windows和linux直接互相传⽂件,使⽤双系统也很不⽅便。
所以这⾥我们采⽤Windows+虚拟机的开发⽅式。
3 安装PL2303串⼝驱动usb转串⼝也叫U 转串⼝,顾名思义,它可以把没有串⼝的电脑通过usb接⼝虚拟⼀个串⼝出来,这样就让电脑具备了串⼝的功能,从⽽可以使得开发板和 PC 之间通过串⼝通讯了。
因为随开发板⼀起的usb转串⼝采⽤的是 PL2303芯⽚,所以⾸先我们需要安装PL2303的转串⼝驱动。
i.MX51L + 8吋LCD开发套件系统介绍
2010-10-26
更多信息请浏览以下网址:
i.MX51L:基于i..mx51的Linux系统开工具:/product_catalog/i.MX51L.htm
i.MX51W:基于i..mx51的Wince6.0系统开发工具:/product_catalog/i.MX51W.htm i.MX51A:基于i..mx51的Android系统开发工具:/product_catalog/i.MX51A.htm i.MX51U:基于i.mx51的Ubuntu系统开发工具:/product_catalog/i.MX51U.htm
从2009年10月开始, 远盈公司致力于Freescale的i.MX系列的研发. 至今相继已成功推出基于i.MX25、i.MX35等开发工具,远盈科技紧随市场需要推出基于freescale的i.MX51芯片的平台的 Linux开发工具:i.MX51L。
i.MX51以ARM Cortex A8为核心构架;主频可以扩展到600M~1GHZ, 拥有32K的指令缓存和数据缓存以及256K的二级缓存,并且集成了多媒体硬件加速单元:3D和2D图形加速的OpenGL ES 2.0和OpenVG 1.1;多格式高清HD 720P视频解码模块和多格式标清D1分辨率的视频编码模块,并且支持720P/1080i CVBS模拟视频信号的直接输出。
采用DVFS (Dynamic V olt Frequency Scalling)和SmartSpeed技术提供了功率管理保障的同时能以较低的功耗驱动高性能的处理内核及丰富的多媒体性能。
i.MX51L是基于Linux-2.6.31内核的Linux内核,采用ext2文件系统的开发工具,i.MX51L有着丰富的外围接口,如USB HOST、USB OTG、TVE、DVI、VGA、LVDS、TFT LCD、SDIO等等, i.MX5L可广泛应用于消费电子、汽车多媒体及工业计算机、工业控制等领域。
是智能本(SmartBook)、智能手机、MID、电子书(eBook)、数码相框、家庭信息娱乐终端、V2IP、汽车信息娱乐系统、工业计算机、工厂自动化、HMI等产品的上上之选。
CPU
※ i.MX51
※ARM Cortex A8 800M~1.2GHz主频
※256K L-2 Cache
※32K Instruction/Data Cache
※ARM NEON SIMD媒体加速器
※ VFPU矢量浮点运算单元
※OpenVG 1.1 & OpenGL ES 2.0
存储器
※ RAM:512MB DDR2 128MB*4
※ Nor Flash:4MB SPI(For Boot)(保留封装)
※ NAND/Nor Flash (保留封装)
接口
※ USB接口: HS USB OTG(MX51内置Phy),HS USB Host ※ SD: SD卡槽 * 2(可做Boot用)
※ FEC: 10/100M自适应以太网(MX51内置MAC层)
※ UART: UART Connector(调试用)
A-V输出
※LCD: TFT TCD 8吋屏幕接口
※DVI: DVI高清视频输出接口(同时兼容VGA接口)
※音频输入: Mic/Line in
※音频输出: Line out / Headphones
时钟与电源
※ RTC: 外部实时时钟,掉电保存时间。
※电源: 5V2A 电压压输入
板结构与尺寸
※主板: 11cm*12cm 2层PCB
※核心板: 4cm*6.5cm 6层PCB
注:TFT LCD 7吋与8吋可选其一
WiFi为可选配件(板载)
触模屏中的电阻屏和电容屏可选其一
SD2与iNAND可选其一
◆ 实板接口指示
OUT
◆ Linux BSP Bootloader
Redboot 支持SD卡更新内核和文件系统,支持FEC网络下载内核和文件系统
U-boot 支持SD卡更新内核和文件系统,支持FEC网络下载内核和文件系统
Linux Kernel
Linux 2.6.31
底层驱动
FEC Driver 以太网驱动程序
USB OTG Driver USB OTG驱动程序
USB Host Driver USB Host 驱动程序
UART Driver 串口驱动程序
Audio Driver 音频codec驱动程序
IPU Driver IPU驱动程序
VPU Driver VPU驱动程序
GPU Driver GPU驱动程序
Camera Driver 摄像头驱动程序
MMC/SD/SDIO Driver MMC/SD/SDIO驱动程序
SPI Driver SPI ROM驱动程序
TV driver TV编码驱动程序
I2C Driver I2C驱动程序
1-Wire 1-Wire驱动程序
PMIC Driver 电源MC13892驱动程序
RTC Driver RTC驱动程序
WDOG Driver 看门狗驱动程序
PWM Driver PWM驱动程序
多媒体支持
Video Decoding ● MPEG4 decode:720p,30fps
● H.264 decode:720,30fps
● H.263 decode:720,30fps
● VC-1 decode:720,30fps
● MPEG-2 decode:720,30fps
● MPRG decode:720p,30fps
Video Encoding ● MPEG-4 encode:D1,25/30fps
● H.263 encode:D1,25/30fps
● H.264 encode:D1,25/30fps
● MJPEG encode:baseline mode
Image Decoding BMP Decode, GIF Decode, JPEG Decode, PNG Decode,JPEG Encode Audio Encoding MP3/WMA/SBC
※i.MX51 Linux开发工具基本配置
① i.MX51 Linux开发板一块
②7吋液晶屏一片
③ 4G SD卡一张(内置demo)
④ RS232数据线一根
⑤ USB数据线一根
⑥ 5V 2A电源一个
⑦开发板资料光盘一张
⑧纸质开发板简介一份
※i.MX51 Linux开发资料列表
① i.MX51芯片手册
②开发板参考原理图一份(PDF)
③开发板硬件手册一份
④开发板Linux BSP用户手册一份
⑤ i.MX51 Linux操作说明一份。