i.MX Processors Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Processors Knowledge Base

Discussions

Sort by:
Flashing Kernel and Root File System using RedBoot Creating an image A kernel image and a root file system can be created using All Boards LTIB or compiling the kernel and setting the correct set of files. Create a root file system image from a set of files converting the files to a jffs2 file system. For this, install the package mtd-tools. In Ubuntu type apt-get install mtd-tools For making an root file system for flash, use the jffs2 file system like: mkfs.jffs2 -r rootfs -e 0x20000 -s 0x800 –n -o rootfs.jffs2 Where rootfs/ is the original set of file for the file system and rootfs.jffs2 is the output image file. Flashing Some connections errors can be avoided by Configuring RedBoot. The process below uses TFTP to copy the files between host and target. See All Boards TFTP for detail in configurations. Copy the kernel image and the root file system image to the TFTP dir. For example, in LTIB dir, type sudo cp ./rootfs/boot/zImage /tftpboot sudo cp rootfs.jffs2 /tftpboot/ Where /tftpboot is the dir configured for TFTP The next steps are performed in a Minicom session, and happens on the board. Formatting the flash: Format the flash redboot> fis init -f Make a Bad Block Table redboot> nand scan Flashing kernel Load kernel image (zImage) using the command below. Remember to modify the host IP address: redboot> load -r -b 0x100000 /tftpboot/zImage -h 10.29.244.99 The address 0x100000 is used as a temporary location Create the kernel at the right address (0x100000, for IMX27PDK) redboot> fis create -f 0x100000 kernel Flashing root file system Load root file system image (rootfs.jffs2) to the temporary address. Remember to modify the host IP address: redboot> load -r -b 0x100000 /tftpboot/rootfs.jffs2 -h 10.29.244.99 Create the root file system in the right address (0x600000, for IMX27PDK) redboot> fis create -f 0x600000 root Testing This step can be omitted! You can now load your kernel in the flash by typing: fis load kernel To know if the root file system written in the flash was correctly saved, execute the NFS file system and mount the flash. For load the the root file system by NFS, type: exec -c "noinitrd console=ttymxc0,115200 root=nfs nfsroot=<server_ip>:<root_path_on_server> ip=dhcp" Wait the system go up, then mount the flash at /mnt. Reminde that the flash has a jffs2 file system. mount -t jffs2 /dev/mtdblock4 /mnt ls /mnt List the /mnt contents. The output must be the right file system. For testing root file system on NAND, type exec -c "noinitrd console=ttymxc0,115200 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp" Modifying the initial script Reset the board and press CTRL-C. Type fc to modify the configurations and insert the initialization script. RedBoot> fc Run script at boot: true Boot script: Enter script, terminate with empty line >> fis load kernel >> exec -c "noinitrd console=ttymxc0,115200 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp" >> Boot script timeout (1000ms resolution): 1 Use BOOTP for network configuration: false Gateway IP address: 10.29.241.254 Local IP address: 10.29.241.6 Local IP address mask: 255.255.254.0 Default server IP address: 10.29.244.99 Board specifics: 0 Console baud rate: 115200 Set eth0 network hardware address [MAC]: false GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Update RedBoot non-volatile configuration - continue (y/n)? y ... Read from 0x07ee0000-0x07eff000 at 0x00080000: . ... Erase from 0x00080000-0x000a0000: . ... Program from 0x07ee0000-0x07f00000 at 0x00080000: . RedBoot> Remember to save the configuration in the flash by typing y Reset the system. To certify that the board is loading the system from flash, remove the ethernet cable.
View full article
First upload the U-Boot firmware using Network (Transferring file over network) or Serial (Transferring file over serial) This is a common serial transfer output: => loady ## Ready for binary (ymodem) download to 0xa0800000 at 115200 bps... CCmode, 1359(SOH)/0(STX)/0(CAN) packets, 9 retries ## Total Size      = 0x0002a388 = 172936 Bytes Unprotect the bootloader flash area: protect off C0000000 C003FFFF Erase the flash blocks: erase C0000000 C003FFFF Copy from RAM to Flash: If firmware has been thansfered over serial: cp.b A0800000 C0000000 2a388 If firmware has been transfered over tftp: cp.b 100000 C0000000 2a388 Installing U-Boot using BDI3000 You can use a BDI2000/3000 to write to the S71WS256 pSRAM: Get this config file. Thanks to the folks at Ultimate Solutions for being such a nice people and writing an almost ready file! Edit the [FLASH] section to this: [FLASH] CHIPTYPE              S29M32X16 CHIPSIZE                0x2000000 BUSWIDTH             16 FILE                        /home/lsantos/work/i.mx27/u-boot/u-boot-v2/uboot.bin ; change to you path FORMAT                 BIN 0xC0000000 ERASE                   0xC0000000 ERASE                   0xC0008000 ERASE                   0xC0018000 ERASE                   0xC0010000 ERASE                   0xC0020000 Don't forget to edit the [HOST] section to your machine's IP address. Telnet to the BDI - CONFIG: loading configuration file passed - CONFIG: loading register definition passed - TARGET: processing reset request - TARGET: BDI asserts TRST and RESET - TARGET: BDI removes TRST - TARGET: Bypass check 0x00000001 => 0x00000002 - TARGET: JTAG exists check passed - Core#0: ID code is 0x07926121 - TARGET: All ICEBreaker access checks passed - TARGET: BDI removes RESET - TARGET: BDI waits for RESET inactive - TARGET: resetting target passed - TARGET: processing target startup .... - TARGET: processing target startup passed Erase the first 128 KiB ADS>erase Erasing flash at 0xc0000000 Erasing flash at 0xc0008000 Erasing flash at 0xc0018000 Erasing flash at 0xc0010000 Erasing flash at 0xc0020000 Erasing flash passed Write the flash ADS>prog Programming /home/lsantos/work/i.mx27/u-boot/u-boot-v2/uboot.bin , please wait .... Programming flash passed Check everything went really well ADS>verify Verifying /home/lsantos/work/i.mx27/u-boot/u-boot-v2/uboot.bin , please wait .... Verifying target memory passed Now you can unplug the BDI and reset the board U-Boot 2.0.0-rc9-00136-gbf725a2-dirty (Jun 17 2009 - 15:45:23)  Board: Freescale i.MX27 ADS cfi_probe: cfi_flash base: 0xc0000000 size: 0x02000000  chip id: [2,882,1,01d] mpll:     265999329 Hz spll:     239999725 Hz arm:      177332886 Hz perclk1:    8866644 Hz perclk2:   17733288 Hz perclk3:   44333221 Hz perclk4:   17733288 Hz clkin26:   26000000 Hz ahb:       44333221 Hz ipg:       22166610 Hz Malloc space: 0xa7b00000 -> 0xa7f00000 (size  4 MB) Stack space : 0xa7af8000 -> 0xa7b00000 (size 32 kB) envfs: wrong magic on /dev/env0 no valid environment found on /dev/env0. Using default environment running /env/bin/init...  Hit any key to stop autoboot:  2  type update_kernel [<imagename>] to update kernel into flash type udate_root [<imagename>] to update rootfs into flash  uboot:/ Of course, this setup works with Redboot, just change the FILE entry at the [FLASH] section or use the prog command: ADS>prog 0xc0000000 /home/lsantos/work/i.mx27/redboot/build/install/bin/redboot.bin BIN Programming /home/lsantos/work/i.mx27/redboot/build/install/bin/redboot.bin , please wait .... Programming flash passed ADS>verify Verifying /home/lsantos/work/i.mx27/redboot/build/install/bin/redboot.bin , please wait .... Verifying target memory passed Rebooting ++... Read from 0x07ee0000-0x07f00000 at 0xc1fe0000: . ... Read from 0x07ed3000-0x07ed4000 at 0xc1fff000: . **Warning** FLASH configuration checksum error or invalid key Use 'fconfig -i' to [re]initialize database PMIC ID: 0x0000009b [Rev: 3.3] Ethernet FEC MAC address: is not set  Board Type: ADS Clock input: 26 MHz Booting from [NOR flash]  PHY ID 22 @ 1 FEC: [ HALF_DUPLEX ] [ disconnected ] [ 10M bps ]: Ethernet eth0: MAC address 00:04:9f:00:af:7a Can't get BOOTP info for device!  RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version FSL 200749 - built 19:37:28, Jun 17 2009  Platform: MX27 ADS/EVB (Freescale i.MX27 based) PASS 2.1 [x32 SDR] Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.  RAM: 0x00000000-0x07f00000, [0x00025260-0x07ed1000] available FLASH: 0xc0000000 - 0xc2000000, 256 blocks of 0x00020000 bytes each. RedBoot>
View full article
D1 Capture - kernel 2.6.22 diff --exclude CVS -uNr linux-2.6.22/include/asm-arm/arch-mxc/memory.h linux-2.6.22.modified/include/asm-arm/arch-mxc/memory.h --- linux-2.6.22/include/asm-arm/arch-mxc/memory.h     2009-07-16 16:29:45.000000000 -0300 +++ linux-2.6.22.modified/include/asm-arm/arch-mxc/memory.h     2009-07-15 15:38:34.000000000 -0300 @@ -28,6 +28,7 @@     /* Size of contiguous memory for DMA and other h/w blocks */     #define CONSISTENT_DMA_SIZE     SZ_16M    +     /*!      * @defgroup Memory_MX27 Memory Map      * @ingroup MSL_MX27 @@ -48,7 +49,7 @@     #ifdef CONFIG_DMA_ZONE_SIZE     #define MXC_DMA_ZONE_SIZE     ((CONFIG_DMA_ZONE_SIZE * SZ_1M) >> PAGE_SHIFT)     #else    -#define MXC_DMA_ZONE_SIZE     ((12 * SZ_1M) >> PAGE_SHIFT)   +#define MXC_DMA_ZONE_SIZE     ((20 * SZ_1M) >> PAGE_SHIFT)     #endif      static inline void __arch_adjust_zones(int node, unsigned long *zone_size, diff --exclude CVS -uNr linux-2.6.22/drivers/media/video/mxc/capture/mxc_v4l2_capture.c linux-2.6.22.modified/drivers/media/video/mxc/capture/mxc_v4l2_capture.c ---    linux-2.6.22/drivers/media/video/mxc/capture/mxc_v4l2_capture.c     2009-07-16 16:29:43.000000000 -0300 +++ linux-2.6.22.modified/drivers/media/video/mxc/capture/mxc_v4l2_capture.c     2009-07-16 16:08:02.000000000 -0300 @@ -1650,9 +1650,9 @@                  /* setup cropping */                 cam->crop_bounds.left = 0; -             cam->crop_bounds.width = 640; +             cam->crop_bounds.width = 800;                 cam->crop_bounds.top = 0; -             cam->crop_bounds.height = 480; +             cam->crop_bounds.height = 600;                 cam->crop_current = cam->crop_defrect = cam->crop_bounds;                 ipu_csi_set_window_size(cam->crop_current.width,                                                       cam->crop_current.height); @@ -1663,7 +1663,7 @@                 cam->standard.id = V4L2_STD_UNKNOWN;                 cam->standard.frameperiod.denominator = 30;                 cam->standard.frameperiod.numerator = 1; -             cam->standard.framelines = 480; +             cam->standard.framelines = 600;                 cam->streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;                 cam->streamparm.parm.capture.timeperframe =                 cam->standard.frameperiod; cam->streamparm.parm.capture.capability = V4L2_CAP_TIMEPERFRAME; diff --exclude CVS -uNr linux-2.6.22/drivers/media/video/mxc/capture/ov2640.c linux-2.6.22.modified/drivers/media/video/mxc/capture/ov2640.c ---    linux-2.6.22/drivers/media/video/mxc/capture/ov2640.c     2009-07-16 16:29:45.000000000 -0300 +++ linux-2.6.22.modified/drivers/media/video/mxc/capture/ov2640.c     2009-07-16 16:07:03.000000000 -0300 @@ -698,12 +698,12 @@     #endif                            g_cam->streamparm.parm.capture.capturemode = 1;                 } else { -          out_width = 640; -          out_height = 480; +          out_width = 800; +          out_height = 600;                 g_cam->crop_bounds.left = 0; -          g_cam->crop_bounds.width = 640; +          g_cam->crop_bounds.width = 800;                 g_cam->crop_bounds.top = 0; -          g_cam->crop_bounds.height = 480; +          g_cam->crop_bounds.height = 600;                 g_cam->crop_current = g_cam->crop_defrect = g_cam->crop_bounds;     #ifdef CONFIG_ARCH_MX3                              ipu_csi_set_window_size(g_cam->crop_current.width ,
View full article
i.MX27 PDK Board Flashing This tutorial teaches how to flash bootloader using ATK. To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot. Using ATK ATK (Advanced Toolkit) is a Windows software for programming the flash memory of i.MX boards. This section will describe the procedure to erase the flash memory and program the bootloader. 1 - Connect a serial cable between PC and i.MX board. 2 - Some hardware configurations (switches) must be done to flash the board. Set red and cream switches as below: Switch SW5 -> 00000 Switch SW4 -> 10000001 Installing ATK on Linux Download ATK: Download. Extract ATK: # unzip ATK_1_41_STD_installer.zip Execute the default install process: # wine SETUP.EXE Get mfc42.dll and msvcp60.dll from a Windows Machine (C:\Windows\System32) and copy to wine system32 (/root/.wine/drive_c/windows/system32) Run ATK: # wine ADSToolkit_std.exe Next Step To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot. PS: On SW5 and SW4, "1" means the keys selected towards the edge of the board. 3 - Run ATK by clicking Start -> Programs -> AdvancedToolKit -> AdvancedToolKit       Set the options:    Device memory -> DDR; Custom Initial File -> (keep it unmarked)    Communication Channel -> Serial Port (Usually COM1) 4 - Click on Flash Tools to erase, program or dump the the flash memory and click GO. Flash Erasing 1 - To erase Flash memory, select the parameters as shown in the figure below: 2 - Turn on the board and press Erase. 3 - ATK shows this message when flash is erased Flash Programming The next step is to program the bootloader image into the board's Flash following the steps below. 1 - Select the parameters as shown in the figure below and press Program. The bootloader binary image file can be found into your Board Support Package Set Program, NAND, Address: 0x00000000 2 - Add it on Image File field and press Program. 3 - Close ATK, turn off the board and set switch back as shown in the picture below. Installing ATK on Linux Download ATK: Download. Extract ATK: # unzip ATK_1_41_STD_installer.zip Execute the default install process: # wine SETUP.EXE Get mfc42.dll and msvcp60.dll from a Windows Machine (C:\Windows\System32) and copy to wine system32 (/root/.wine/drive_c/windows/system32) Run ATK: # wine ADSToolkit_std.exe Next Step To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot.
View full article
Play MPEG4 Video only gst-launch filesrc location=test.mpeg ! mfw_vpudecoder codec-type=std_mpeg4 ! mfw_v4lsink H.264 Video only gst-launch filesrc location=test.avi ! mfw_avidemuxer ! mfw_vpudecoder codec-type=std_avc ! mfw_v4lsink AVI(H264+MP3) gst-launch filesrc location=test.avi ! mfw_avidemuxer name=demux demux. !  mfw_vpudecoder \     codec-type=std_avc ! mfw_v4lsink demux. ! queue max-size-buffers=0 ! <mp3_decoder_plugin> ! alsasink MP4(H264+MP3) gst-launch filesrc location=test.mp4 ! mfw_mp4demuxer name=demux demux. ! \    mfw_vpudecoder codec-type=std_mpeg4 ! mfw_v4lsink demux. ! \    queue max-size-buffers=0 ! <mp3_decoder_plugin> ! alsasink <mp3_decoder_plugin> can be replaced by mad RAW Video Test gst-launch videotestsrc ! video/x-raw-yuv,format=\(fourcc\)I420 !  mfw_v4lsink
View full article
Encode From YUV to H.264 gst-launch-0.10 filesrc location=file_in.yuv blocksize=w*h*1.5 ! \ mfw_vpuencoder codec type=std_avc framerate=fr ! filesink location=file_out.mpg Where: file_in.yuv: is the input file, a raw file. w*h*1.5: is the blocksize, it's calculated from input file dimensions: width * height * 1.5 mfw_vpuencoder: is the encoder with hardware acceleration for iMX27 std_avc: chooses the codec type for output file fr: indicates the framerate in that input file was created file_out.mpg: is the output file encoded in H.264 From Camera to H.264 gst-launch-0.10 mfw_v4lsrc ! mfw_vpuencoder codec-type=std_avc \ width=176 height=144 framerate=25 ! filesink location=test.video
View full article
Splash Screen on U-boot for i.MX25 PDK Having a bitmap on the LCD a few seconds after boot is a requirement on several embedded systems, u-Boot supports this feature. However, currently, the code provided on Freescale's BSP only implements support for the LCD controller on Linux. This page provides instructions to add support for the LCDC on the u-boot. 1 - Install Freescale i.MX25 BSP, SDK 1.7 It is available on www.freescale.com. If needed follow the getting started section instructions. 2 - Update u-boot source After installing the BSP and running LTIB for the first time, it's time to update u-boot: - Download u-Boot patch and spec file. - Replace the file "u-boot.spec.in" located at <ltib_path>/config/platform/imx by the one downloaded - Copy the "u-boot-2009.08-1273860148.patch" downloaded to /opt/freescale/pkgs 3 - Extract and rebuild u-boot - To extract the source and aply the patch run: <Ltib_path>$ ./ltib -p u-boot -m prep - Now Build:     <Ltib_path>$ ./ltib -p u-boot -m scbuild    After completing this step an u-Boot binary (u-boot.bin) will be saved at <ltib_path>/rpm/BUILD/u-boot-2009.08 4 - Program the SD card Program a SD card with the new u-Boot binary and a bitmap image to be displayed. Insert the SD and run:      $sudo dd if=<ltib_path>/rpm/BUILD/u-boot-2009.08/u-boot.bin of=/dev/mmcblk0 bs=512 "/dev/mmcblk0" should replaced according to your host, use "dmesg" after inserting the SD to find out where is the SD on your host. Unmount it before issuing the dd command. $sudo dd if="your_image".bmp of=/dev/mmcblk0 bs=512 seek=608 Argument seek 608, skips the first 608 blocks of the SD (608x512) where the uboot is stored. If you need to relocate the image, update also the environment variable "splashimage_mmc_init_block", see step 6. 5 - Boot Boot the image from the SD. Personality Board settings:   12345678 SW22 -> 00000000 SW21 -> 11000000    Debug Board settings: SW5,6,7,8,9,10 -> OFF      12345678 SW4 -> 10000001 Turn on the board and stop at u-boot prompt: MX25 U-Boot > 6 - u-Boot environment variables Update u-Boot environment variables for the splash screen to work: The address in memory to load the splash screen from: MX25 U-Boot > setenv splashimage 0x80800000 The SD device on the board: MX25 U-Boot > setenv splashimage_mmc_dev 0 The block on the SD where the bitmap is stored, this must match the block on step 4. MX25 U-Boot > setenv splashimage_mmc_init_block 0x260  The amount in blocks to be read from the SD card, this depends on the bitmap size, i.e. for a 308278 bytes bitmap, 0x2B5 blocks are enough on a 512 bytes per block SD, (308278 / 512). MX25 U-Boot > setenv splashimage_mmc_blkcnt 0x2b5 The SD card block size in bytes: MX25 U-Boot > setenv splashimage_mmc_blksize 512 Save the environment variables: MX25 U-Boot > saveenv Now reboot the board and you should see the splash screen on the LCD. 7 - Booting Linux When Linux takes control of the board it initializes the LCD controller and Framebuffer again. To maintain the splash screen on the LCD you can replace the Linux Logo with the figure used for the splash screen, the side effect is a blink when Linux takes over the LCDC. To achieve this, create a new image in Gimp and save it as ".ppm". Copy it to Linux "logo" folder <ltib_path>/rpm/BUILD/linux-2.6.31/drivers/video/logo Run: $ ppmquant -mapfile clut_vga16.ppm "my_image.ppm" | pnmnoraw > logo_linux_vga16.ppm where: logo_linux_vga16.ppm is the current logo being used by Linux. Recompile the kernel and boot it.
View full article
Adding Support to USB Host High Speed on i.MX27ADS First, ensure these patches were applied: usbh2_cspi1_ss2.patch usbh2_set_ulpi_xcvr.patch Unselect SPI2: Device Drivers  --->              SPI support  --->                     [ ]   CSPI2 Select USB Host2: USB support  --->            <M>   EHCI HCD (USB 2.0) support                 [*]       Support for Host2 port on Freescale controller
View full article
You can use TV Out on i.MX27ADS board by following these steps: Remove the R71 and solder it on R69 place; See the image before of this process: And after this process: Set SWITCH S15: 1 = on; [2-5] = off. See the image for more details: Add to your Linux command line (in Redboot) the following parameter: video=mxcfb:TV-NTSC After this modification, the video signal will operate at 27MHz, that are applicable just with TV-OUT card. The LCD card will not work at this frequency.
View full article
This tutorial teaches how to flash bootloader using ATK. ATK (Advanced Toolkit) ATK (Advanced Toolkit) is a Windows software for programming the flash memory of i.MX boards. Using ATK This section will describe the procedure to erase the flash memory and program the bootloader. 1 - Connect a serial cable between PC and i.MX board. 2 - Some hardware configurations (switches) must be done to flash the board.    Set S18 switch as below: Switch S18 -> 111100 3 - Run ATK by clicking Start -> Programs -> AdvancedToolKit -> AdvancedToolKit      Set the options:    Device memory -> DDR; Custom Initial File -> (keep it unmarked)    Communication Channel -> Serial Port (Usually COM1) 4 - Click Flash Tools to erase, program or dump the the flash memory and click GO Flash Programming The next step is to program the bootloader image into the board's Flash following the steps below. 1 - Select the parameters as shown in the figure below and press Program.    The bootloader binary image file can be found into your Board Support PackageSet Program, NOR Spansion, Bi Swap 2 - Add it on Image File field and press Program. 3 - Close ATK, turn off the board and set switch back as shown in the picture below. Installing ATK on Linux Download ATK: Download. Extract ATK: # unzip ATK_1_41_STD_installer.zip Execute the default install process: # wine SETUP.EXE Get mfc42.dll and msvcp60.dll from a Windows Machine (C:\Windows\System32) and copy to wine system32 (/root/.wine/drive_c/windows/system32) Run ATK: # wine ADSToolkit_std.exe
View full article
Using the FEC on U-boot 1 - Start by programming U-boot into the SD or NAND, click here for SD or here for NAND. 2 - Boot the image programed on Step 1, for the SD Card: Personality Board settings:                   12345678 SW22 -> 00000000 SW21 -> 11000000  Debug Board settings:   SW5,6,7,8,9,10 -> OFF                    12345678   SW4 -> 10000001 For NAND:                              12345678   SW22 -> 00100000   SW21 -> 10011000  Debug Board settings:   SW5,6,7,8,9,10 -> OFF                      12345678     SW4 -> 10000001 Stop at u-boot prompt: MX25 U-Boot > 3 - Configure u-boot networking variables, replace the values according to your network configuration: MX25 U-Boot > setenv serverip 192.168.1.1 MX25 U-Boot > setenv ipaddr 192.168.1.2 MX25 U-Boot > setenv eth1addr 00:04:9f:00:3b:33 Update "ethact" var to enable the FEC. MX25 U-Boot > setenv ethact FEC0 4 - With the Ethernet cable connected, start a tftp transfer: MX25 U-Boot > tftpboot 0x80800000 uImage_mx25 FEC: enable RMII gasket Using FEC0 device TFTP from server 192.168.1.1; our IP address is 192.168.1.2 Filename 'uImage_mx25'. Load address: 0x80800000 Loading: #################################################################              #################################################################              #################################################################              #################################################################              #################################################################              #################################################################              ##### done Bytes transferred = 2022396 (1edbfc hex) 5 - If you transfered the kernel image, you can boot it (Don't forget to update bootargs): MX25 U-Boot > bootm 0x80800000
View full article
Video Streaming over Ethernet This section shows how to stream a video over Ethernet using UDP and RTP. Be sure to have the newest gst-plugin-good installed to ensure the best streaming quality. Define the environment variable HOST with the ip address of the receiver machine (that one that will show the video). $ export HOST=XX.XX.XX.XX Do you know how to get caps? i.MX 27 Video GST Caps H264 (MX->PC) in i.MX27: gst-launch-0.10 -v mfw_v4lsrc capture-width=640 capture-height=480 ! mfw_vpuencoder width=640 height=480  /     codec-type=std_avc ! rtph264pay ! udpsink host=$HOST port=5000 in PC: gst-launch-0.10 -v --gst-debug=2 udpsrc port=5000 /   caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, /   profile-level-id=(string)42001e, sprop-parameter-sets=(string)Z0IAHqaAoD2Q, payload=(int)96, /   ssrc=(guint)3296222373, clock-base=(guint)2921390826, seqnum-base=(guint)35161" ! /   rtph264depay  ! ffdec_h264 ! autovideosink MPEG4 (MX->PC) in i.MX27 gst-launch-0.10 -v mfw_v4lsrc capture-width=352 capture-height=288 ! mfw_vpuencoder width=352 height=255 bitrate=64 codec-type=std_mpeg4 ! rtpmp4vpay send-config=true / ! udpsink host=10.29.244.32 port=5000 Set send-config to true to send configuration with the video. Ensures better deconding PC gst-launch-0.10 -v --gst-debug=2 udpsrc port=5000 caps ="application/x-rtp, media=(string)video, clock-rate=(int)90000, / encoding-name=(string)MP4V-ES, profile-level-id=(string)2, config=(string)000001b002000001b59113000001000000012000c888800f50b042414103, / payload=(int)96, ssrc=(guint)4006671474, clock-base=(guint)3714140954, seqnum-base=(guint)29742" / ! rtpmp4vdepay ! ffdec_mpeg4 ! autovideosink MPEG4 (MX->MX) Sender gst-launch-0.10 -v mfw_v4lsrc capture-width=640 capture-height=480 ! mfw_vpuencoder width=640 height=480  codec-type=std_mpeg4 ! rtpmp4vpay send-config=true ! udpsink host=$HOST port=5000 Receiver gst-launch-0.10 -v udpsrc port=5000 caps= "application/x-rtp, media=(string)video, clock-rate=(int)90000, / encoding-name=(string)MP4V-ES, profile-level-id=(string)4, config=(string)000001b004000001b59113000001000000012000c888800f514043c14103, / payload=(int)96, ssrc=(guint)907905085, clock-base=(guint)2029414707, seqnum-base=(guint)22207" ! rtpmp4vdepay ! / mfw_vpudecoder codec-type= std_mpeg4 min_latency=true ! mfw_v4lsink sync=false   Setting min_latency true gives the better latency for the streaming H264 (MX->MX) Sender gst-launch-0.10 -v mfw_v4lsrc capture-width=640 capture-height=480 ! mfw_vpuencoder width=640 height=480  codec-type=std_avc ! rtph264pay ! udpsink host=10.29.240.51 port=5000 Receiver gst-launch-0.10 -v udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000" ! rtph264depay ! mfw_vpudecodr codec-type=std_avc ! mfw_v4lsink sync=false
View full article
This steps are basically the same used to boot Linux mainline on i.MX 31 ADS, just replacing Network Driver cs89x0 by i.MX 27 internal FEC. Download Linux kernel 2.6.30: $ wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2 Extract this: $ tar jxvf linux-2.6.30.tar.bz2 Export CROSS_COMPILE environmet: $ export PATH="$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/" $ export CROSS_COMPILE=arm-none-linux-gnueabi- Unselect all no essentials features: $ make ARCH=arm allnoconfig Start the configuration menu: $ make ARCH=arm menuconfig Change/Select the kernel options below. Select the MXC/iMX platform and iMX27ADS board: System Type ->             ARM system type -> (X) Freescale MXC/iMX-based             Freescale MXC Implementations  ->                            MXC/iMX Base Type -> (X) MX2-based                            MX2 Options  -> [*] Support MX27ADS platforms (NEW) Select ARM EABI standard to compile the kernel: Kernel Features  --->           [*] Use the ARM EABI to compile the kernel Add support to Linux Binary Format ELF: Userspace binary formats ->              [*] Kernel support for ELF binaries Add support to Network (TCP/IP): [*] Networking support  ->          Networking options  ->                           [*] Packet socket                           [*] Unix domain sockets                           [*] PF_KEY sockets                           [*] TCP/IP networking                                    [*] IP: kernel level autoconfiguration                                    [*]     IP: DHCP support Select network driver (FEC), serial driver and unselect VGA console: Device Drivers  ->                      [*] Network device support  --->                                       [*]   Ethernet (10 or 100Mbit)  --->                                              [*]   FEC ethernet controller (of ColdFire CPUs)                      Character devices  ->                              Serial drivers  --->                                       [*] IMX serial port support                                       [*]   Console on IMX serial port                      Graphics support  ->                              Console display driver support  --->                                         [ ] VGA text console Add support to NFS and support to use it as root file system: File systems  ->                           [*] Network File Systems (NEW)  ->                                    [*]   NFS client support                                    [*]     Root file system on NFS Compile the kernel: $ make ARCH=arm Copy the created zImage to tftp directory: $ cp arch/arm/boot/zImage /tftpboot/ Configure your RedBoot to boots with this kernel: load -r -b 0x100000 /tftpboot/zImage exec -b 0x100000 -l 0x200000 -c "noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=10.29.240.191:/tftpboot/rootfs ip=dhcp" Change the default network device on RedBoot to internal FEC: Default network device: mxc_fec Connect the network cable on FEC connector (connector T3). Notes: We are using rootfs from LTIB then select to get parameters from DHCP: "Target System Configuration" Options  --->               [*] start networking                      Network setup  --->                            [*]   get network parameters using dhcp
View full article
These instructions used ltib-imx27ads-20071219. First, get u-boot v2.0: git clone http://git.denx.de/u-boot-v2.git u-boot-v2 Enter the U-Boot directory: cd u-boot-v2 Export the proper compilation paths and environment variables: export ARCH=arm export PATH="$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/" export CROSS_COMPILE=arm-none-linux-gnueabi- Configure it for the i.MX27ADS board: make mx27ads_defconfig You may want to enable the FEC driver: make menuconfig And go to Drivers -> Network drivers and select Yes on i.MX FEC Ethernet driver Exit the config menu (don't forget to save the configuration) and just make it: make Or if you prefer the verbose mode make V=1 After a quick build, you should get a uboot.bin on your current directory. I used the ADS Toolkit to program the NOR flash.
View full article
You can boot from SPI NOR Flash using the following procedure:      1 - Download ATK Release 1.7. The version ATK 1.7 can be downloaded here. 2 - Unzip file iMX_AdvancedToolKit_R170.zip into "C:\Program Files\freescale\AdvancedToolKit-STD\image\".      3 - Open the file "C:\Program Files\freescale\AdvancedToolKit-STD\config\ADSToolkit.cfg" and add the following lines: [MX25_TO11] MMC/SD::image\mx25_mmc.bin:0x(unknown) NAND::image\mx25_nand.bin:0x(unknown) SPI::image\mx25_spi.bin:0x(unknown) [MX31]   4 - Set the SPI Boot Config on MX25PDK:   SW22: no influence SW21[1-8]: 11110010 BT_MEM_CTL[0:1] = 11 (Expansion) BT_MEM_TYPE[0:1] = 11 (Serial ROM via SPI) BT_PAGE_SIZE[0:1] = no influence BT_BUS_WIDTH[0:1] = 10 (3-Address SPI (24-bit) Note: BT_BUS_WIDTH[0]=1, BT_BUS_WIDTH[1]=0 On Debug Board the red switches: (SW5-SW10) = 000011 (0=off) Boot Config Switches (SW21, SW22) on Personality Board have no influence.   5 - Connect USB or Serial cable between Host PC and PDK and execute ATK   6 - Select USB/UART serial boot on MX25PDK and power on the board   7 - Configure ATK as following: Device = i.MX25_TO1.1 device memory initial = DDR2 Communication channel: COMn (select the COM port on your PC) or Communication channel: USB If you choose COM (serial UART connection) you MUST disconnect USB cable from OTG connector on i.MX25 PDK.   8 - Configure ATK "Flash Tool" as following: Tick "Program" Tick "Read Back Check" Flash Model = SPI Address = 0x0 Image = mx25_3stack_redboot_TO1_1.bin (same file as for NAND boot). Same should be applicable to U-boot.   Note: SPI NOR Boot requires internal boot mode. On Debug Card all red switches must be off (SW5-SW10) = 000000 (0=off). Note: if booting from SPI NOR, Redboot needs approx 2 seconds before it shows messages on the console.
View full article
i.MX27 and i.MX31 Issues When Interfacing Micron's 78nm mDDRs Micron is discontinuing some "-75" mDDR parts (133MHz) popular on i.MX27 and i.MX31 designs, newer "-6" are being used to replace the EOL devices. However, loss of data issues may be experienced when i.MX mDDR controller is used to interface with newer Micron's mDDR. On some cases, the bootloader works, memory tests on RedBoot pass. However, Linux hangs when booting. Here are the DDR Controller configuration changes that may be used to avoid the issue: (This configuration is not proven to work on every design, but has been validated on at least 3 different boards.) ESDRAMC Configuration Registers Set ESDCFG0/1 to 0x0079D72F 0xD800_1004 = 0x79D72F Drive Strength Control Registers Use "Normal". i.MX27 Default. Enhanced MDDR Delay Line Configuration Debug Register Set the ESDCDLYx to 0x002C0000 0xD800_1020 = 0x2C0000 0xD800_1024 = 0x2C0000 0xD800_1028 = 0x2C0000 0xD800_102C = 0x2C0000
View full article
When you do long test (days or weeks) test on i.MX board and your test fails, you often wants to know what has happen with a JTAG probe. The problem is when you have 50 boards running in parallel, you don't have the budget to have 50 JTAG debug probe. If you do a "hot plug" of your JTAG probe, you have roughly one chance out 2 to reset your board... so you'll have to wait another couple of hour to resee the problem. Anyway to have a reliable JTAG plug with no reset, it is really simple... cut the RESET line on your cable! then you'll still be able to "attach" to your i.MX. On the MEK board, with a 10-pin JTAG connector, you have the cut the cable line 10 of the ribbon cable: On the cable, cut the reset line like this: With my Lauterbach JTAG  probe, when I do a "hot plug" I never have a reset of my i.MX. BR Vincent
View full article
The following document contains a list of document, questions and discussions that are relevant in the community based on amount of views. If you are having a problem, doubt or getting started in i.MX processors, you should check the following links to see if your doubt is in there. Yocto Project Freescale Yocto Project main page‌ Yocto Training - HOME‌ i.MX Yocto Project: Frequently Asked Questions‌ Useful bitbake commands‌ Yocto Project Package Management - smart  How to add a new layer and a new recipe in Yocto  Setting up the Eclipse IDE for Yocto Application Development Guide to the .sdcard format  Yocto NFS &amp; TFTP boot  YOCTO project clean  Yocto with a package manager (ex: apt-get)  Yocto Setting the Default Ethernet address and disable DHCP on boot.  i.MX x Building QT for i.MX6  i.MX6/7 DDR Stress Test Tool V3.00  i.MX6DQSDL DDR3 Script Aid  Installing Ubuntu Rootfs on NXP i.MX6 boards  iMX6DQ MAX9286 MIPI CSI2 720P camera surround view solution for Linux BSP i.MX Design&amp;Tool Lists  Simple GPIO Example - quandry  i.MX6 GStreamer-imx Plugins - Tutorial &amp; Example Pipelines  Streaming USB Webcam over Network  Step-by-step: How to setup TI Wilink (WL18xx) with iMX6 Linux 3.10.53  Linux / Kernel Copying Files Between Windows and Linux using PuTTY  Building Linux Kernel  Patch to support uboot logo keep from uboot to kernel for NXP Linux and Android BSP (HDMI, LCD and LVDS)  load kernel from SD card in U-boot  Changing the Kernel configuration for i.MX6 SABRE  Android  The Android Booting process  What is inside the init.rc and what is it used for.  Others How to use qtmultimedia(QML) with Gstreamer 1.0
View full article
A new release of the manufacturing tool is was recently made available, "imx-3.10.53_1.1.0_ga-mfg-tools". It can be found in the software download sections for the iMX6 family. However, it can be used to program an iMX28 in a Win7 64-bit host by adding a few files. The steps to do so are listed below and can be checked against the script in ucl2.xml.   Download the attached "28.vbs" file and place it into where the manufacturing tool was installed, typically in  <install_dir>\mfgtools\   Replace <install_dir>\mfgtools\Profiles\Linux\OS Firmware\ucl2.xml with the attached ucl2.xml.    Copy the attached files "updater_ivt.sb" and "fdisk-u.input" into <install_dir>\mfgtools\Profiles\Linux\OS Firmware\firmware Copy your iMX28 image file into <install_dir>\mfgtools\Profiles\Linux\OS Firmware\files.  The file should be renamed to "linux.sb" to conform with the ucl2.xml script. Copy your "rootfs.tar.bz2" file into <install_dir>\mfgtools\Profiles\Linux\OS Firmware\files To launch the manufacturing tool, double click on "28.vbs". Issue: After MfgTool has finished and the progress bars have turned green, clock on the Stop button or the program will start another cycle.
View full article
This is an example of QR code encoding using i.MX28. The encoded QR image can show on the LCD display directly using frame buffer and the image saved as a BMP file. Board : i.MX28EVK BSP : L2.6.35_1.1.0_130130_source QR Code Lib:  qrencode-3.4.4.tar.gz Download from https://fukuchi.org/works/qrencode/ Libqrencode is a C library for encoding data in a QR Code symbol. This library is a free software made by Kentaro Fukuchi. Build the QR Code Lib source code into rootfs. 1. Create a new folder in <ltib>/dist/lfs-5.1/.     e.g. <ltib>/dist/lfs-5.1/qrencode 2. Copy the qrencode.spec to this new created folder 3. Build the source code    ./ltib –p qrencode.spec –m prep    ./ltib –p qrencode.spec –m scbuild    ./ltib –p qrencode.spec –m scdeploy Create and build the application in unit_test: - I use the existing unit_test package to build my application code. 1. Extract the source code of unit_test    ./ltib –p imx-test –m prep 2. cd <ltib>/rpm/BUILD/imx-test-2.6.35.3-1.1.0/test 3. mkdir qr_test 4. copy the Makefile and qr_test.c to qr_test folder 5. Build the unit_test     ./ltib –p imx-test  –m scbuild     ./ltib –p imx-test  –m scdeploy After built the code successfully, the qr_test.out will be generated in the unit_test folder. I start the board with NFS, so I can run the qr_test.out on the board directly. The command is : ./qr_test.out   (the default QR encode text is “http://www.freescale.com”) Or input the new text like this : ./qr_test.out –t https://community.freescale.com/community/imx The QR code  show on the display: And the BMP files will be generated in the unit_test folder.
View full article