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:
Basic Linear Algebra Subprograms (BLAS) is a specification that prescribes a set of low-level routines for performing common linear algebra operations such as vector addition, scalar multiplication, dot products, linear combinations, and matrix multiplication. OpenBLAS is an optimized BLAS library which is uesd for deep learning accelerator in Caffe/Caffe2. I enable it in Yocto (Rocko) by adding bb file. And I build on i.MX6QP, i.MX7ULP and i.MX8MQ and also run its test example successfully. You can find test example(openblas_utest) under folder image/opt/openblas/bin of OpenBLAS work directory. Currently, version 0.3.0 is supported in the bb file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ update to v 0.3.6 and enable mutli-thread by set USE_OPENMP=1 and USE_THREAD=4 when compiling this library.
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-341641 
View full article
When working with IPU applications, sometimes image format converter is needed to check images generated by IPU that are not readable by PC (e.g. RGB565, common i.MX framebuffer format -> png or jpg) or generate a RGB picture from an encoded file to be read by IPU (e.g. png -> RGB565 framebuffer). There are some useful tools on Linux and some also available on Windows that can perform these conversions. I listed 5 tools with some usage examples below. IMAGEMAGICK // Display a 800x600 rgb image display -size 800x600 -depth 8 rgb:output.rgb // Show information of output.rgb identify -size 1296x972 -depth 8 output.rgb // Convert a 640x480 grayscale raw rgb file to png convert -size 640x480 -depth 8 imagefile.rgb image.png // To list all available color formats identify -list format For more information about Imagemagick and its format support. access: http://www.imagemagick.org/script/formats.php FFMPEG // List available formats for ffmpeg ffmpeg -pix_fmts // Convert raw rgb565 image to png ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 1024x768 -i freescale_1024x768.raw -f image2 -vcodec png screen.png // Convert png to raw rgb565 ffmpeg -vcodec png -i image.png -vcodec rawvideo -f rawvideo -pix_fmt rgb565 image.raw // Convert a 720x480 NV12 (YUV 420 semi-planar) image to png ffmpeg -s 720x480 -pix_fmt nv12 -i image-nv12.yuv -f image2 -pix_fmt rgb24 image-png.png // Convert a 640x480 uyvy422 image to png ffmpeg -s 640x480 -pix_fmt uyvy422 -i image-uyvy422.yuv -f image2 -pix_fmt rgb24 image-uyvy422.png MENCODER http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html TRANSCODING http://www.transcoding.org/cgi-bin/transcode?Examples GRAPHICSMAGICK http://www.graphicsmagick.org/
View full article
The Linux L4.9.51 and SDKv2.3 for i.MX 8MQuad(mScale850D) RFP(GA) release files are now available. Linux on IMX_SW web page, Overview -> BSP Updates and Releases ->Linux L4.9.51 for i.MX 8MQuad GA. SDK on https://mcuxpresso.nxp.com/ web page.   Files available: Linux: # Name Description 1 fsl-yocto-L4.9.51_mx8mq-ga.tar.gz L4.9.51 i.MX 8MQuad GA Linux BSP Documentation. Includes Release Notes, User Guide. 2 L4.9.51-ga_images_mx8mq.tar.gz Linux Binary Demo files for i.MX 8MQuad EVK 3 L4.9.51_8mq-ga_mfg-tools.tar.gz Manufacturing Toolkit for Linux L4.9.51 i.MX8MQuad GA 4 L4.9.51_8mq-ga_gpu-tools.tar.gz VivanteVTK file for L4.9.51 i.MX8MQuad GA 5 imx-aacpcodec-4.3.4.tar.gz AAC Plus Codec for L4.9.51 of iMX 8MQuad GA   SDK:   On https://mcuxpresso.nxp.com/, click the Select Development Board to customize the SDK based on your configuration then download the SDK package. CMSIS pack is also supported.   Target board: i.MX 8MQuad EVK   What’s New/Features: Please consult the Release Notes.   Known issues For known issues and more details please consult the Release Notes.   More information on changes of Yocto, see: README: https://source.codeaurora.org/external/imx/imx-manifest/tree/README?h=imx-linux-morty ChangeLog: https://source.codeaurora.org/external/imx/imx-manifest/tree/ChangeLog?h=imx-linux-morty  
View full article
OpenCV is a computer vision library originally developed by Intel. It is free for commercial and research use under the open source BSD license. The library is cross-platform. It focuses mainly on real-time image processing; as such, if it finds Intel's Integrated Performance Primitives on the system, it will use these commercial optimized routines to accelerate itself. Application OpenCV's application areas include: * 2D and 3D feature toolkits * Egomotion estimation * Face Recognition * Gesture Recognition * Human-Computer Interface (HCI) * Mobile robotics * Motion Understanding * Object Identification * Segmentation and Recognition * Stereopsis Stereo vision: depth perception from 2 cameras * Structure from motion (SFM) * Motion Tracking To support some of the above areas, OpenCV includes a statistical machine learning library that contains: * Boosting * Decision Trees * Expectation Maximization * k-nearest neighbor algorithm * Naive Bayes classifier * Artificial neural networks * Random forest * Support Vector Machine Installing OpenCV on i.MX 51 EVK Board running Ubuntu Linux Assuming that you already have the Ubuntu Linux running on your board, you can use this wiki page to guide you to get your USB camera running on your system in order to use real time image processing features of this library. In a brand new installation of Ubuntu some libraries is not installed by default, so you need to install them by your own hands (use synaptic to do that), here is the list of these libraries: libgtk2.0-dev libjpeg62-dev zlib1g-dev libpng12-dev libtiff4-dev libjasper-dev libgst-dev libgstreamer0.10-dev If you already have some of those libraries installed, make sure that is the DEV version. After installing those libraries you can download the stable OpenCV version here. Install it following the procedure below: 1 - untar the opencv package tar -xvzf opencv-1.1pre1.tar.gz  2 - change to OpenCV folder cd opencv-1.1.0  3 - configure the installation enabling gstreamer and letting to compile demo apps later ./configure --with-gstreamer --disable-apps You will get the following results: General configuration ================================================       Compiler:                         g++       CXXFLAGS:       DEF_CXXFLAGS:             -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer       PY_CXXFLAGS:               -Wall -pipe -O3 -fomit-frame-pointer       OCT_CXXFLAGS:             -fno-strict-aliasing -Wall -Wno-uninitialized -pipe -O3 -fomit-frame-pointer        Install path:                      /usr/local  HighGUI configuration ================================================       Windowing system --------------       Use Carbon / Mac OS X:        no       Use gtk+ 2.x:                        yes       Use gthread:                         yes       Image I/O ---------------------       Use ImageIO / Mac OS X:       no       Use libjpeg:                            yes       Use zlib:                                yes       Use libpng:                             yes       Use libtiff:                               yes       Use libjasper:                          yes       Use libIlmImf:                          no             Video I/O ---------------------       Use QuickTime / Mac OS X:     no       Use xine:                                no       Use gstreamer:                        yes       Use ffmpeg:                             no       Use dc1394 & raw1394:     no       Use v4l:                                   yes       Use v4l2:                                 yes       Use unicap:                             no     Wrappers for other languages =========================================       SWIG Python                          no       Octave                                    no       Additional build settings ============================================       Build demo apps                      no Now run make ... 4 - Build OpenCV ./make 5 - Install OpenCV ./sudo make install if all steps above were executed properly, now you can compile the sample applications: 1 - change to samples/c directory cd samples/c 2 - change the build_all script mode to +x chmod +x build_all.sh 3 - run the script ./build_all.sh Now you can test. The results below were taken from the Laplacian filter sample processing in real-time images grabbed from an USB camera: Laplacian filter with USB Camera capture device Also, you can see how is it performance on a 3 windowed application performing color conversion and canny edge detection at the same time: http://www.youtube.com/watch?v=w9yQgdABT7c EOF !
View full article
Using a USB Touchscreen on Ubuntu   This example uses a XENARC 706TSA monitor http://www.xenarc.com/product/706tsa.html To use a USB touchscreen on i.MX51 EVK, disable all touchscreen drivers on menuconfig and build the kernel: Device Drivers  --->        Input device support  --->        [ ]   Touchscreens  ---> Download xserver-xorg-input-evtouch (0.8.8-ubuntu3 version) from http://launchpadlibrarian.net/24760784/xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb. X crash is found if using latest 0.8.8-ubuntu6.1 version. For the details. See https://bugs.launchpad.net/ubuntu/+source/xf86-inputevtouch/+bug/511491 On MX51 EVK board, run “sudo dpkg –i xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb” to install debian package. Add fdi file by "sudo vi ./usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi": <?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2">    <device>       <match key="info.product" contains="eGalax">          <match key="info.capabilities" contains="input">             <merge key="input.x11_driver" type="string">evtouch</merge>             <merge key="input.x11_options.minx" type="string">130</merge>             <merge key="input.x11_options.miny" type="string">197</merge>             <merge key="input.x11_options.maxx" type="string">3945</merge>             <merge key="input.x11_options.maxy" type="string">3894</merge>             <merge key="input.x11_options.Rotate" type="string">CCW</merge>             <merge key="input.x11_options.Swapy" type="string">true</merge>             <merge key="input.x11_options.taptimer" type="string">30</merge>             <merge key="input.x11_options.longtouchtimer" type="string">750</merge>             <merge key="input.x11_options.longtouched_action" type="string">click</merge>             <merge key="input.x11_options.longtouched_button" type="string">3</merge>             <merge key="input.x11_options.oneandhalftap_button" type="string">2</merge>             <merge key="input.x11_options.movelimit" type="string">10</merge>             <merge key="input.x11_options.touched_drag" type="string">1</merge>             <merge key="input.x11_options.maybetapped_action" type="string">click</merge>             <merge key="input.x11_options.maybetapped_button" type="string">1</merge>          </match>       </match>    </device> </deviceinfo> Save above configuration. Calibrating Calibration in made by clicking on System -> Administration -> Calibrate Touchscreen Follow the on screen instructions and reboot the system. Calibrating using Xinput Calibrator Xinput_calibrator is another option to calibrate touchscreen. It can be downloaded at: http://www.freedesktop.org/wiki/Software/xinput_calibrator On i.MX5x Ubuntu, unpack the source code: tar -xzvf xinput_calibrator-0.7.5.tar.gz Install xorg-dev, it's required to build xinput_calibrator sudo apt-get install xorg-dev Configure, build and install xinput_calibrator ./configure ./make ./make install Execute xinput_calibrator. A four-point calibration screen will be shown. Follow the instructions on screen and after complete xinput_calibrator will return the calibration parameters. Replace the given calibration parameters on file /usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi and reboot the system.
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-341570 
View full article
This example uses the touchscreen that comes with i.MX51 EVK's parallel LCD Download xserver-xorg-input-evtouch (xserver-xorg-input-evtouch_0.8.8-3build1_armel.deb) from https://launchpad.net/ubuntu/lucid/armel/xserver-xorg-input-evtouch/0.8.8-3build1 On i.MX51 EVK board, run “sudo dpkg –i xserver-xorg-input-evtouch_0.8.8-3build1_armel.deb” to install debian package. Remove evdev config file: sudo rm /usr/lib/X11/xorg.conf.d/05-evdev.conf Change the content of 10-evtouch.conf to: sudo vi /usr/lib/X11/xorg.conf.d/10-evtouch.conf Section "InputClass"            Identifier "touchscreen catchall"            MatchIsTouchscreen "on"            Driver "evtouch"            Option "SwapY" "1"            Option "MinX" "32"            Option "MinY" "46"            Option "MaxX" "1001"            Option "MaxY" "967" EndSection   The MinX, MinY, MaxX and MaxY values can be changed to match the exact configuration of your touchscreen Save above configuration and reboot the system.
View full article
i.MX6DQ HDMI dongle board uses BCM4330 which is SDIO interface as wireless module. When we try to run Ubuntu oneiric on HDMI dongle board, after correctly insmod bcm4330.ko, we found Ubuntu NetworkManger can't recognize this interface: the /var/log/syslog shows the following error: Jan  1 00:01:08 linaro-ubuntu-desktop NetworkManager[4787]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/wlan0, iface: wlan0) Jan  1 00:01:08 linaro-ubuntu-desktop NetworkManager[4787]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/wlan0, iface: wlan0): no ifupdown configuration found. Jan  1 00:01:08 linaro-ubuntu-desktop NetworkManager[4787]: <warn> /sys/devices/virtual/net/wlan0: couldn't determine device driver; ignoring... After using Google search, we found /sys/devices/virtual/net/wlan0 directory dose not has directory "device", this "device" directory should be exist at network interface, without it, NetworkManager will get error "couldn't determine device driver; ignoring...",  the "device" is just this network interface come from, and it should link to the real device under one hardware bus. While the bcm4330 Linux driver from Broadcom does not setup network interface real "device" so we need add this real "device" before the driver registers a network interface. Refer to the attached diff file for this modification
View full article
The OpenSSL recipe halts saying it can't find find.pl . How to resolve this problem?   From the blog, linked below : create file find.pl in /etc/perl.   Missing find.pl compiling OE - Kemp's blog    "find.pl" content :   warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used  at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";   # This library is deprecated and unmaintained. It is included for # compatibility with Perl 4 scripts which may use it, but it will be # removed in a future version of Perl. Please use the File::Find module # instead.   # Usage: #              require "find.pl"; # #              &find('/foo','/bar'); # #              sub wanted { ... } #                            where wanted does whatever you want. $dir contains the #                            current directory name, and $_ the current filename within #                            that directory. $name contains "$dir/$_". You are cd'ed #                            to $dir when the function is called. The function may #                            set $prune to prune the tree. # # For example, # # find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune # # corresponds to this # #              sub wanted { #               /^\.nfs.*$/ && #               (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && #               int(-M _) > 7 && #               unlink($_) #               || #               ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && #               $dev < 0 && #               ($prune = 1); #              } # # Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.   use File::Find ();   *name                            = *File::Find::name; *prune                            = *File::Find::prune; *dir                            = *File::Find::dir; *topdir                            = *File::Find::topdir; *topdev                            = *File::Find::topdev; *topino                            = *File::Find::topino; *topmode              = *File::Find::topmode; *topnlink              = *File::Find::topnlink;   sub find {   &File::Find::find(\&wanted, @_); }   1;
View full article
On power-up of a system, the bootloader performs initial hardware configuration, and is responsible for loading the Linux kernel in memory. Several bootloaders are available which support i.MX SoCs: Barebox (http://www.barebox.org/) RedBoot (http://ecos.sourceware.org/redboot/) U-Boot (http://www.denx.de/wiki/U-Boot/) Qi (http://wiki.openmoko.org/wiki/Qi)
View full article
NXP i.MX 8 series of application processors support running ArmV8a 64-bit and ArmV7a 32-bit user space programs.  A Hello World program that prints the size of a long int is cross-compiled as 32-bit and as 64-bit from an Ubuntu host and then each is copied to MCIMX8MQ-EVK and run. Resources: Ubuntu 18.04 LTS Host i.MX 8M Evaluation Kit|NXP  MCIMX8MQ-EVK Linux Binary Demo Files - i.MX 8MQuad EVK L4.9.88_2.0.0_GA release Source Code: Create a file with contents below using your favorite editor, example name hello-sizeInt.c. #include <stdio.h> int main (int argc, char **argv) { printf ("Hello World, size of long int: %zd\n", sizeof (long int)); return 0; }‍‍‍‍‍‍‍ Ubuntu host packages: $ sudo apt-get install -y gcc-arm-linux-gnueabihf $ sudo apt-get install -y gcc-aarch64-linux-gnu‍‍‍‍ Line 1 installs the ArmV7a cross-compile tools: arm-linux-gnueabihf-gcc is used to cross compile on Ubuntu host Line 2 install the ArmV8a cross-compile tools: aarch64-linux-gnu-gcc is used to cross compile on Ubuntu host Create Linux User Space Applications Build each application and use the static option to gcc to include run time libraries. Build ArmV7a 32-bit application: $ arm-linux-gnueabihf-gcc -static hello-sizeInt.c -o hello-armv7a‍-static‍‍ Build ArmV8a 64-bit application: $ aarch64-linux-gnu-gcc -static  hello-sizeInt.c -o hello-armv8a‍-static‍‍ Copy Hello applications from Ubuntu host and run on MCIMX8MQ-EVK Using a SDCARD written with images from L4.9.88_2.0.0 Linux release (see resources for image link), power on EVK with Ethernet connected to network and Serial Console port which was connected to a windows 10 PC. Launched a terminal client (TeraTerm) to access console port. Login credentials: root and no password needed. Since Ethernet was connected a DHCP IP address was acquired, 192.168.1.241 on the EVK.  On the Ubuntu host, secure copy the hello applications to EVK: $ scp hello-armv7a-static root@192.168.1.241:~/ hello-armv7a-static                           100%  389KB   4.0MB/s   00:00    $ scp hello-armv8a-static root@192.168.1.241:~/ hello-armv8a-static                           100%  605KB   4.7MB/s   00:00 ‍‍‍‍‍‍‍‍‍‍ Run: root@imx8mqevk:~# ./hello-armv8a-static Hello World, sizeof long int: 8 root@imx8mqevk:~# ./hello-armv7a-static Hello World, sizeof long int: 4‍‍‍‍‍‍‍‍
View full article