Quantcast
Channel: Boundary Devices
Viewing all 391 articles
Browse latest View live

Android Tools for Nitrogen Platforms on Windows10

$
0
0

Android DeveloperIt has been a long time since our last post about Android Tools support on Windows. Since then most people have moved to Windows 10 which is more secure and therefore doesn’t allow us to install unsigned drivers easily.

This blog will provide a simpler method to install those tools on the latest Microsoft OS.

Android Tools installation

First, here is a quick reminder what the Android tools are about:

  • fastboot is a tool used to flash an OS into your device
    • Requires the platform to be in fastboot mode
    • That fastboot mode is available from U-Boot in our case
    • It can flash any type of OS (not only Android)
    • The platform must be connected to your PC via a USB cable
  • adb (Android Debug Bridge) is a tool to access/debug your OS
    • Adb access is available on all our Android images
    • It is also accessible in our Buildroot images
    • The tool can be used to get to the device terminal, push/pull files or even debug your app
    • The platform must be connected to your PC via a USB cable

Get and install latest tools from Google

Download the latest Platform Tools that Google provides:

Once downloaded, you can extract the archive to the path of your choosing, for this blog it will be located inside C:\Android\platform-tools.

Update the PATH environment variable

After the previous section, you should already be able to start adb.exe and fastboot.exe.

However this requires you to type the full path every time (C:\Android\platform-tools) which isn’t convenient.

Fortunately, Windows allows you to update the PATH environment variable to add this folder to it:

Once the C:\Android\platform-tools path has been added, you will be able to call adb or fastboot from any folder in the Windows Command Prompt (cmd).

Fastboot driver installation

Now that the tool is installed, let’s take a look at the driver needed for Windows to recognize the platform.

Get your platform into Fastboot mode

Some platforms, like Nitrogen8M or Nitrogen8MP, have a button labeled “Fastboot” which you can simply press while powering up the platform to enter the fastboot mode. Otherwise, in the U-Boot prompt, you can enter:

=> fastboot 0

At this stage you can connect your platform to your Windows machine with a USB cable.

Install Google ADB driver (optional)

You can get the latest driver directly from Google:

Unzip this archive to the location of your choice, for this post it will be under C:\Android\usb_driver\.

Then go to that folder, select android_winusb.inf and do righ-click > Install, then select Install again.

Select the driver in Device Manager

Go into your Windows Device Manager, you should see an unrecognized device named “USB download gadget“.

Right-click on it and select “Update Driver“.

Next, select “Browse my computer for driver software“.

At this point, click on “Let me pick from a list of available drivers on my computer“.

If it asks for the type of device you are installing, select “Universal Serial Bus devices“.

Finally, select the following driver: “WinUsb Device” / “ADB Device” and accept the warning that the driver originally doesn’t recognize this device (due to different PID).

At this stage, the device should appear as properly installed, still as “USB download gadget“.

All set, you can now use fastboot from a command prompt!

Use Fastboot to flash your device

First make sure that the tool recognizes your device using Windows Command Prompt (cmd):

Then, if you want to flash Android for instance, you can execute the .bat file provided in our release archive:

ADB driver installation

Now that your device is flashed, you can try accessing its terminal using ADB.

Select the driver in Device Manager

Just like for fastboot, go into your Windows Device Manager, you should see the device already appearing as recognized platform.

Or as:

If not, please make sure to do the same procedure as fastboot above:

  1. Right-click on it and select “Update Driver“.
  2. Select “Browse my computer for driver software“.
  3. Click on “Let me pick from a list of available drivers on my computer“.
  4. If it asks for the type of device you are installing, select “Universal Serial Bus devices“.
  5. Select the following driver: “WinUsb Device” / “ADB Device” and accept the warning

 

Use ADB to access your device

Still using the standard Windows Command Prompt (cmd):

That’s it! You can now enjoy accessing / debugging your platform using Android Tools from your Windows machine.

The post Android Tools for Nitrogen Platforms on Windows10 appeared first on Boundary Devices.


Yocto Gatesgarth Release for i.MX8 Platforms

$
0
0

We are pleased to announce a new Yocto release Gatesgarth for our Nitrogen8 family of SBCs and SOMs based on i.MX8 processors. This release includes our latest 5.4 kernel. Below you will find download links for the images as well as detailed instructions for building including a features set.

For the Impatient

You can download the Yocto images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher 

Build procedure

This image uses the gatesgarth branch of our boundary-bsp-platform repository. 

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/gatesgarth && cd gatesgarth
~/gatesgarth$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b gatesgarth
~/gatesgarth$ repo sync

Next, setup the environment for building. For this image we will be building our boundary-xwayland distro for the target machine

~/gatesgarth$ MACHINE=<MACHINE> DISTRO=boundary-xwayland . setup-environment build

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/gatesgarth/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • Linux kernel 5.4.x_2.3.0
  • U-Boot 2020.10
  • Weston 8.0.0 for i.MX
  • GStreamer 1.16 for i.MX
  • GPU Vivante libraries 6.4.3p1.0
  • VPU Hantro libraries v1.19.0
  • ISP VVCAM v4.2.2.2
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.55 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

Display support

Please make sure your platform includes the latest U-Boot:

This version of U-Boot supports the display configuration, allowing to use any of the following displays:

GPU acceleration

As usual, in order to test the GPU you can use the example apps provided by Vivante:

root@<MACHINE>:~# /opt/imx-gpu-sdk/GLES2/Blur/GLES2.Blur_Wayland -d

Camera input

Camera MIPI-CSI input can be checked using our OV5640 MIPI with GStreamer:

root@<MACHINE>:~# gst-launch-1.0 v4l2src device=/dev/video0 ! \
    video/x-raw,width=1280,height=720 ! waylandsink

nitrogen8m-camera

Basler camera input

This build fully supports the Basler daA3840 8MP camera from Basler when using our Nitrogen 8M Plus which is part of our Evaluation Kit:

The isp-vvcam driver and imx8-isp service are loaded automatically when the camera is detected.

From there a simple GStreamer pipeline will allow you to see the stream:

root@nitrogen8mp:~# gst-launch-1.0 -v v4l2src device=/dev/video0 ! waylandsink
...
[  352.348796] wdr3 res: 1920 1080 
[  352.352471] enter isp_mi_start
[  357.581179] ###### 62.42 fps ######
[  362.771924] ###### 62.42 fps ######

Ethernet

Once the eth0 interface is up, you can use iperf3 to check Ethernet performances:

root@<MACHINE>:~# iperf3 -c 192.168.1.60                                                                                                                         
Connecting to host 192.168.1.60, port 5201
[  5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  1.09 GBytes   932 Mbits/sec                  receiver

Wi-Fi

Same goes for the Wi-Fi that can be tested just as easily:

root@<MACHINE>:~# nmcli d wifi connect <network_name> password <password>
root@<MACHINE>:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@<MACHINE>:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

For products with a Silex bluetooth module, you’ll be able to connect using our handy silex-uart script with the following commands:

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found
root@<MACHINE>:~# hciconfig hci0 up
root@<MACHINE>:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device

VPU decoding

If your platform supports VPU decoding, here is an example on how to test it using the gplay tool:

root@<MACHINE>:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov
root@<MACHINE>:~# gst-launch-1.0 playbin uri=file:///home/root/Hobbit-1080p.mov video-sink=autovideosink

VPU encoding

Here is a simple example that shows how to encode a video stream from the camera into H.264 using the VPU encoder:

root@<MACHINE>:~# gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! 'video/x-raw,width=1920,height=1080' \
                    ! vpuenc_h264 ! filesink location=test.h264
^C
root@<MACHINE>:~# gst-launch-1.0 filesrc location=test.h264 typefind=true ! 'video/x-h264' ! \
                    h264parse ! vpudec ! waylandsink

CAN

For platforms with CAN, you’ll be able to bring up the interface(s) using this following command:

root@<MACHINE>:~# ip link set can0 up type can bitrate 500000

From this point, you can use commands such as cansend and candump to send or display messages on the bus respectively.

 

NPU support

NPU support is fully integrated into this build when using our Nitrogen 8M Plus with TensorFlowLite and ARMNN support of the NPU.

Various demos to test this can be found here:

IMX-MACHINE-LEARNING-UG.pdf

We can run a TensorFlowLite demo from section 5.3.3 of the document:

root@nitrogen8mp:~/ArmnnTests# /usr/bin/TfLiteInceptionV3Quantized-Armnn --data-dir=/home/root/ArmnnTests/data --model-dir=/home/root/ArmnnTests/models
Info: ArmNN v20200200

Info: = Prediction values for test #0
Info: Top(1) prediction is 209 with value: 8.43322
Info: Top(2) prediction is 208 with value: 7.74945
Info: Top(3) prediction is 223 with value: 4.17862
Info: Top(4) prediction is 853 with value: 3.6468
Info: Top(5) prediction is 160 with value: 3.41887
Info: = Prediction values for test #1
Info: Top(1) prediction is 283 with value: 8.73712
Info: Top(2) prediction is 282 with value: 7.21762
Info: Top(3) prediction is 286 with value: 6.6858
Info: Top(4) prediction is 288 with value: 3.49485
Info: Top(5) prediction is 754 with value: 2.27925
Info: = Prediction values for test #2
Info: Top(1) prediction is 3 with value: 11.8521
Info: Top(2) prediction is 148 with value: 4.33057
Info: Top(3) prediction is 234 with value: 3.11497
Info: Top(4) prediction is 149 with value: 2.96302
Info: Top(5) prediction is 4 with value: 2.35522
Info: Total time for 3 test cases: 1.385 seconds
Info: Average time per test case: 461.587 ms
Info: Overall accuracy: 1.000

 

If you have any issues, please email support@boundarydevices.com

The post Yocto Gatesgarth Release for i.MX8 Platforms appeared first on Boundary Devices.

Yocto Gatesgarth Release for i.MX6/i.MX7 Platforms

$
0
0

We are pleased to announce a new Yocto release Gatesgarth for our Nitrogen6/7 family of SBCs and SOMs based on i.MX6/7 processors. This release includes our latest 5.4 kernel. Below you will find download links for the images as well as detailed instructions for building including a features set.

For the Impatient

You can download the Yocto images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher 

Build procedure

This image uses the gatesgarth branch of our boundary-bsp-platform repository. 

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/gatesgarth && cd gatesgarth
~/gatesgarth$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b gatesgarth
~/gatesgarth$ repo sync

Next, setup the environment for building. For this image we will be building our boundary-xwayland distro for the target machine

~/gatesgarth$ MACHINE=<MACHINE> DISTRO=boundary-xwayland . setup-environment build

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/gatesgarth/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • Linux kernel 5.4.x_2.3.0
  • U-Boot 2020.10
  • Weston 8.0.0 for i.MX
  • GStreamer1.0 1.16.3
  • GPU Vivante libraries 6.4.3p1.0
  • VPU libraries 5.4.39.2
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.55 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

GPU acceleration

As usual, in order to test the GPU you can use the example apps provided by Vivante:

root@<MACHINE>:~# /opt/imx-gpu-sdk/GLES2/Blur/GLES2.Blur_Wayland -d

Camera input

Camera MIPI-CSI input can be checked using our Nit6X_5MP_MIPI with GStreamer:

root@<MACHINE>:~# gst-launch-1.0 imxv4l2videosrc device=/dev/video1 ! autovideosink;

nitrogen8m-camera

VPU decoding

Here is an example using GPlay tool:

root@<MACHINE>:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov
root@<MACHINE>:~# gst-launch-1.0 playbin uri=file:///home/root/Hobbit-1080p.mov video-sink=imxipuvideosink

VPU encoding

Here is an example using gstreamer:

root@<MACHINE>:~# gst-launch-1.0 imxv4l2videosrc device=/dev/video1 ! imxvpuenc_h264 bitrate=10000 ! filesink location=test.mp4

Ethernet

Once the eth0 interface is up, you can use iperf3 to check Ethernet performances:

root@<MACHINE>:~# iperf3 -c 192.168.1.60                                                                                                                         
Connecting to host 192.168.1.60, port 5201
[  5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  1.09 GBytes   932 Mbits/sec                  receiver

Wi-Fi

Same goes for the Wi-Fi that can be tested just as easily:

root@<MACHINE>:~# nmcli d wifi connect <network_name> password <password>
root@<MACHINE>:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@nitrogen8mm:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

For products with a Silex bluetooth module, you’ll be able to connect using our handy silex-uart script with the following commands:

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found
root@<MACHINE>:~# hciconfig hci0 up
root@<MACHINE>:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device

CAN

CAN is supported on Nitrogen6 MAX. You’ll be able to bring up the interface using these commands:

root@<MACHINE>:~# ip link set can0 up type can bitrate 500000

From this point, you can use commands such as cansend and candump to send or display messages on the bus respectively.

 

If you have any issues, please email support@boundarydevices.com

The post Yocto Gatesgarth Release for i.MX6/i.MX7 Platforms appeared first on Boundary Devices.

Driving 3 Displays with Boundary Devices Nitrogen8M Plus SOM

$
0
0

Watch & learn as NXP’s i.MX 8M Plus flexes in our latest demo!

This video shows the Nitrogen8M Plus SOM driving 3 different displays independently using MIPI-DSI, HDMI, and LVDS. The displays used are from our  Touchscreen Display offering allowing our customers to prototype quickly. For production, customers can select a display of their choosing and we will integrate both hardware and software using our Display Integration Service.

All running concurrently we demonstrate:

  1. NPU – performing Machine Learning by analyzing a video stream using a demo from NXP’s eIQ Framework
  2. VPU – highlighting 1080p Video Decode with Big Buck Bunny
  3. GPU – rendering a 3D GPU application leveraging the Vivante GC7000UL 

Your use case may not require all 3 but the video provides an idea of some possibilities, there are many more!

Please reach out to info@boundarydevices.com to ask how we can enable your use case.

 

The post Driving 3 Displays with Boundary Devices Nitrogen8M Plus SOM appeared first on Boundary Devices.

Ubuntu Focal 20.04 unified image for Nitrogen8 boards

$
0
0

 

Ubuntu 20.04 LTS Weston Compositor

Ubuntu 20.04 LTS Weston/Wayland Compositor

Boundary Devices is proud to release our new Ubuntu Focal image for all our Nitrogen8 boards!

This image uses Weston which is the reference Wayland compositor.

This image boots up the Weston compositor at start. This can be changed by disabling the service autostart, as described later in this post.

This system contains NXP licensed content, so you will need to register on our website and log in before you can accept the license agreement and download the Ubuntu Focal images for Nitrogen8 from here:

For Nitrogen8M, Nitrogen8M SOM, Nitrogen8M Mini, Nitrogen8M Mini SOM, Nitrogen8M NanoNitrogen8M Nano SOM, Nitrogen8M Plus SOM

This is a unified image for the aforementioned boards, there is no need for board specific images anymore. At the first start it will detect the board type run a configuration script. Finally, it will set all board specific parameters and apt repositories.

Important!

Before installing this image please check your U-Boot version, as it requires U-Boot version 2020.10  to be used.

Make sure to visit our wiki if you need to upgrade:

You can find the bootscript in the /boot sub-directory now, its named boot.scr. The partition labels are set if you use dd or Balena Etcher to flash the image.

If you use your own method please check the boot partition labels because the fstab boots by label (LABEL=sys-15h for example) now.  You can use e2label to modify partition label.

Programming the image

As usual, we recommend using the Balena Etcher tool to flash your SD Card / eMMC:

The uncompressed image size is slightly bigger than 5GB, you’ll need at least 8GB eMMC storage to install it.

Please watch this video for the detailed instructions:


Usernames and passwords

We predefined two users for use on the system: ubuntu and root. The password for each is Boundary (capital B). The user ubuntu has administrator rights, but you don’t need to enter password at sudo command.

We wanted to make your life easier at the cost of some security, but if you want to change that please type:

ubuntu@focal-dev64:~$ sudo visudo

Then comment out or delete the last line with “ubuntu” and “NOPASSWD:”

An ssh server is running on the system, though it does not allow password-based authentication for user root.

User ubuntu has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so :

ubuntu@focal-dev64:~$ sudo mkdir /root/.ssh
ubuntu@focal-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported?

Since the images above include our stable 5.4.x kernel, essentially everything is supported, including:

  • Vivante GPU accelerations for Wayland
  • The Hantro Video Processing Unit supports the following decoders:
    • video/x-h265
    • video/x-vp9
    • video/x-h264
    • video/x-vp8
    • video/x-vp6-flash
    • video/mpeg
    • video/x-h263
    • video/x-flash-video
    • video/x-divx
    • video/x-xvid
    • video/x-cavs
    • video/x-wmv
    • video/x-pn-realvideo
    • video/x-raw
  • BD-SDMAC WiFi/BT modules support
  • All kind of storage devices , eMMC, SATA hdd (via USB3-SATA adapter), USB3.0/2.0 pen drives, mini PCIe devices, cell modems
  • All of our supported touch panels

The packaging (including kernel) is done in the normal ubuntu way, so apt-get update/dist-upgrade will keep your image up and running as the latest as patches come out.

What’s new in this release?

The Linux kernel was upgraded to 5.4.x_2.3.0 branch ( meta-package name: linux-boundary-18f ).
GPU driver was upgraded to Vivante 6.4.3p1.0 ( meta-package name: imx-gpu-viv-f18-… ).
The built-in galcore module has been removed (CONFIG_MXC_GPU_VIV) and we use an external galcore kernel module. This change makes the graphics system modular and more upgradeable, at the price of longer kernel upgrading time. Upgrading kernel takes about 3-4 minutes now, instead of 30 seconds, because every kernel upgrade rebuilds the galcore driver from sources, as it’s a DKMS module.
The NXP/Vivante GPU SDK was upgraded to imx-gpu-sdk 5.7.0 . You can get the source with the usual apt-get source command. The SDK has many new demos, for example OpenCL, OpenVG, and for OpenVX and Vulkan.
The distribution is Focal 20.04 LTS . Here are some main component versions of these Ubuntu Focal images for Nitrogen8:

  • Xorg server 1.20.8-2ubuntu2.7
  • gstreamer1.0 1.16.2
  • bluez 5.53-1ubuntu3
  • Qt 5.12.8
  • apt 2.0.4
  • dpkg 1.19.7ubuntu3.1
  • gcc/g++ 9.3.0-17ubuntu1~20.04
  • libwayland 1.18.0
  • weston 9.0.0-2
  • the image supports the Silex WiFi / Bluetooth module

CPU-specific package selection

This is our first unified image for the entire i.MX 8M family of processors. Since each CPU has its own specific features the OS must adapt to each platform.

That is why, during the first boot, a new selecthw service has been created to take care of selecting the proper packages needed for your platform.

For instance, for the Nitrogen8MP platform, the OS makes sure VPU encode/decode is enabled, NPU packages are added as well as the ISP service to manage the Basler daA3840 camera.

After that setup, the platform will need to reboot for those changes to be taken into account.

Thankfully, you can see the progress of that process on the display as shown below:

Network Manager

This Ubuntu Focal image comes with Network Manager by default in order to ease the Wi-Fi setup.

ubuntu@focal-dev64mp:~$ nmcli radio wifi on
ubuntu@focal-dev64mp:~$ nmcli d wifi list
IN-USE  BSSID              SSID             MODE   CHAN  RATE        SIGNAL  BA>
        A4:3E:51:08:54:F5  Jabu             Infra  1     130 Mbit/s  62      ▂▄>
        A4:3E:51:08:54:F6  Jabu_5GHz        Infra  36    405 Mbit/s  57      ▂▄>

ubuntu@focal-dev64mp:~$ sudo nmcli d wifi connect Jabu_5GHz password XXXXXX
Device 'wlan0' successfully activated with '4ed596ea-9f8c-48ea-8e0e-5e190e2fecc9'.
ubuntu@focal-dev64mp:~$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.61  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2ae4:f7d2:3cc1:486d  prefixlen 64  scopeid 0x20
        inet6 2a01:cb00:f55:7f00:3122:4891:67c4:faa7  prefixlen 64  scopeid 0x0
        inet6 2a01:cb00:f55:7f00:6c92:60ad:c2ad:68cc  prefixlen 64  scopeid 0x0
        ether 08:3a:88:20:78:cc  txqueuelen 3000  (Ethernet)
        RX packets 67  bytes 7854 (7.8 KB)
        RX errors 0  dropped 9  overruns 0  frame 0
        TX packets 69  bytes 7666 (7.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This allows you to use Wi-Fi right out of the box without any extra setup required.

i.MX 8M Plus support

This is the first Ubuntu Focal image to officially support the i.MX 8M Plus CPU and therefore our Nitrogen8MP SOM.

The support includes:

  • VPU decode/encode
  • GPU 3D & 2D support
  • NPU integration (TFLite & ARMNN)
  • ISP + Basler daA3840 support


Nitrogen 8M Mini board GPU SDK demo.


Nitrogen8M Plus board runs Vulkan Gears 3D demo


Nitrogen8M Mini board is streaming a video from YouTube

As I mentioned before, the system boots to Weston compositor.

If you don’t want to start Weston at boot automatically, you have to disable the service, you have to type the following:

ubuntu@focal-dev64:~$ sudo systemctl disable weston.service
ubuntu@focal-dev64:~$ sudo systemctl mask weston.service 

If you want to enable the autostart again you need to type:

ubuntu@focal-dev64:~$ sudo systemctl unmask weston.service
ubuntu@focal-dev64:~$ sudo systemctl enable weston.service

You can find the weston.ini file in the /etc/xdg/weston directory. Please type:

ubuntu@focal-dev64:~$ man weston.ini

Check the options and feel free to modify it to suit your needs.


Weston keyboard bindings

The Weston desktop shell has a number of keyboard shortcuts. They are listed here.

Almost all keyboard shortcuts for Weston include a specified modifier mod key which is determined in the file weston.ini (5):

binding-modifier={none | ctrl | alt | super}

The mod key is the same as the super key by default.

The super key is in between <Left Ctrl> and <Left Alt>, usually a <Windows> key.

mod + Shift + F
Make active window fullscreen

mod + K
Kill active window

mod + Shift + M
Maximize active window

mod + PageUp, mod + PageDown
Zoom desktop in (or out)

mod + Tab
Switch active window

mod + Up, mod + Down
Increment/decrement active workspace number, if there are multiple

mod + Shift + Up, mod + Shift + Down
Move active window to the succeeding/preceding workspace, if possible

mod + F1/F2/F3/F4/F5/F6
Jump to the numbered workspace, if it exists

Ctrl + Alt + Backspace
If supported, terminate Weston. (Note this combination often is used to hard restart Xorg.)

Ctrl + Alt + F
Toggle if Weston is fullscreen; only works when nested under a Wayland compositor

Ctrl + Alt + S
Share output screen, if possible

Ctrl + Alt + F1/F2/F3/F4/F5/F6/F7/F8
Switch virtual terminal, if possible

super + S
Make a screenshot of the desktop

super + R
Start or stop recording video of the desktop

Weston touch / mouse bindings

There are also a number of bindings involving a mouse:

<Touch>, <Left button>, <Right button>
Activate clicked window

super + Alt + <Vertical scroll>
Change the opacity of a window

mod + <Vertical scroll>
Zoom/magnify the visible desktop

mod + <Left button>
Click and drag to move a window

mod + Shift + <Left button>,  mod + <Right button>,  mod + <Touch>
Click and drag to resize a window

mod + <Middle button>
Rotate the window (if supported)


As always, please share your feedback and let us know how things work for you.

The post Ubuntu Focal 20.04 unified image for Nitrogen8 boards appeared first on Boundary Devices.

QNX 7.0 BSP release for Nitrogen8M Mini

$
0
0

We are excited to announce DirectInsight release of QNX 7.0 BSP for the Nitrogen8M Mini SBC.

For the impatient

You can download either prebuilt binaries or the QNX BSP source code from DirectInsight:

Along with the BSP comes a BSP Quick Start Guide as well as a Test Plan.

We also strongly recommend reading our QNX Getting Started Guide article to learn about building/debugging QNX.

QNX 7.0 features

QNX 7.0 Software Development Platform (SDP) provides a comprehensive, multi-level, policy-driven security model incorporating best-in-class security technologies from BlackBerry.

Here is a short list of new features:

  • High performance: Full 64-bit and 32-bit support for ARMv7, ARMv8.
  • Complete hardware optimization: NXP i.MX platforms.
  • Standards-based tools: Eclipse-based IDE with C++14 support.
  • Safety certified pedigree: ISO 26262 ASIL D for automotive, IEC 61508 SIL3 for industrial and IEC 62304 for medical.

Another noticeable change is the use of the QNX Software Center which is now necessary to install the QNX base OS. It will also allow easy installation of OS updates and new components.

Here is a full list of features from this OS update:

Also, the online documentation is as usual very well-written and detail-oriented:

For instance, there’s a migrating guide that can be useful for your existing applications:

Nitrogen8M Mini BSP features

The Nitrogen8M Mini BSP supports the following peripherals:

  • I2C
  • SPI
  • Serial
  • RTC
  • Watchdog
  • Ethernet
  • SD/MMC
  • Audio
  • USB Host

As for the bootloader, you can either use QNX IPL (without TF-A) or U-Boot (with TF-A).

Display support isn’t available at this stage but is currently in the works so stay tuned for an update on that front.

Note that this release can be built and debugged using QNX Momentics IDE:

QNX Nitrogen8MM Build

QNX Nitrogen8MM Perf Analysis

As usual, feel free to contact us for more information!

The post QNX 7.0 BSP release for Nitrogen8M Mini appeared first on Boundary Devices.

Temperature Monitoring on i.MX platforms

$
0
0

We have received many requests about temperature monitoring on our NXP i.MX based Nitrogen platforms.

This blog post aims to answer the most common questions and help you get the most out of your Nitrogen device.

Temperature Monitoring principle

All the i.MX processors come with an integrated IP capable of providing the internal temperature of the SoC.

i.MX 8M Plus block diagram

That temperature monitoring IP is not the same across all i.MX CPUs. The older i.MX 6 & 7 used to rely on the TEMPMON IP whereas the newer i.MX 8M (Quad, Mini, Nano & Plus) use the TMU.

How do you read the temperature?

The good news is that no matter which platform you use, the way to read the temperature is always the same:

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
37000

The above means my platform temperature is currently 37 degrees Celsius as the unit is millidegree as described in the kernel documentation:

Behind the scenes, as the IP differs between CPUs, different kernel drivers can be in use:

How accurate is the measurement?

Some of you have tried to compare a case temperature measurement against the one read by the IP which isn’t a fair comparison.

First, the internal temperature monitor measures die temp (also called junction temp), with an accuracy of +5C.

Second, the difference between junction and case temperature is linear to the wattage of your platform, so it increases the more power you draw.

In other words the die temperature is what should be used to avoid damaging your platform.

Is there a safety mechanism?

The first question often is: “how do I make sure not to damage my platform in case it gets hot?”

The safety mechanism for that defines 2 thresholds:

  • Passive trip point: when reached, the CPU/GPU/VPU throttles to try to reduce the temperature
  • Active trip point: when reached, the board reboots immediately to avoid damaging the SoC

Those thresholds are usually 10C apart, like the default values on our 8MP SOM like this:

# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
85000
95000

How to modify the thresholds?

Depending on the exact version of the CPU you are using, you might need to change the default thresholds.

This is not necessary for i.MX 6 & 7 as the driver checks the temperature grade and adapts temperatures automatically:

For the other processors, like an industrial version of the i.MX 8M Mini CPU that can go from -40C to 105C, you need to update the trip points as follows:

# echo 105000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_1_temp 
# echo 95000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
95000
105000

Note that setting those thresholds this way is not persistent across reboot, so you have 2 solutions:

  1. Modify the device tree directly to have your own values
  2. Create an init script for your OS to do that at bootup

The post Temperature Monitoring on i.MX platforms appeared first on Boundary Devices.

Esper.io solution on i.MX Nitrogen platforms

$
0
0

We are pleased to present the esper.io solution on our i.MX-based Nitrogen platforms to provision and manage your fleet of devices!

What is esper.io?

In the past, many customers asked us for a turn-key solution for them to control their fleet with requirements like:

  • We need to have only one application accessible to the user
  • We have to be able to update our application easily
  • We’d like to know the state of our fleet in real-time

It is with those questions in mind that we discovered esper.io and we are happy to say it solves them perfectly.

Esper’s solution includes the following features (among others):

  • Device Management
    • Dashboard UI via esper.io website
    • Events, Monitoring, Logs
    • Remote Control
    • System OTA Updates
  • App Management
    • App update scheduling possible
  • Device Groups
    • Managing devices per-site / per-IP / per-country etc…
  • Kiosk Mode
    • Allowing only 1 app to run
  • AOSP & GMS devices
    • Seamless provisioning

What about an example?

As a demo is worth a thousand words, we decided to go ahead and try it on our own.

Template creation

Once you have an esper.io account, the first step is to create your template.

It will include all the parameters you want for your specific devices.

After choosing the name for your template, you will have to set the Compliance Policy which includes many options like whether or not the screen is lockable or if the Notificaiton bar should be present.

Next is the Apps step which allows you to upload one or several applications you want included in your system. You can also select whether or not you want the device in Kiosk Mode (1 app only).

During the Settings step, you will select the connectivity you want enabled (WiFi/BT/GPS) as well as branding or any other options normally set in the Settings application.

Finally, you can create and/or assign a Group of devices to that template.

That’s it, your template should be complete. Know that you can also update it later via the esper dashboard.

Device Provisioning

There are several methods to provision your devices. This section will cover the usage of the esper provisioning tool:

This is available on all OSes (Windows, MAC OS, Linux).

The first step is to provide your esper.io login for the tool to retrieve your templates.

The next steps are simply for you to select the application to download and select the device(s) to provision.

Then the installation 1st step will happen on the device.

Once this step is complete, you should reboot the platform for the 2nd step of provisioning to kick in automatically:

Next, your application, which in our case is KioskApp which is a very simple full screen, which should be started in Kiosk mode:

At this point, your device is fully provisioned and can be managed through the esper website.

Another option is seamless provisioning which requires integrating esper applications into the AOSP build tree. For that approach, you should contact the esper team directly.

Device Management

Here is what the Dashboard should look like:

From there you have access to a lot of information:

  • Memory usage
  • Storage usage
  • Battery info
  • Temperature
  • Firmware details (fingerprint)
  • App details
  • Retrieving logs

As explained in the introduction, esper.io is a very complete solution and this blog post didn’t even scratch the surface of all the possibilities. We hope that this gives you a good overview and we highly recommend giving it a try to better manage your production devices.

The post Esper.io solution on i.MX Nitrogen platforms appeared first on Boundary Devices.


Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms

$
0
0

We are excited to announce the EC25 modem is now fully supported in our Android 10 BSP for all our Nitrogen8 family of platforms.

EC25 modem details

The Quectel EC25 mPCIe Modem is a series of LTE category 4 modules adopting standard PCIe Mini Card form factor.

It is optimized for M2M and IoT applications, and delivers 150 Mbps downlink and 50 Mbps uplink data rates.

Here is the full datasheet:

This modem has several possible configurations depending on region of use (EMEA, Americas, Asia).

Boundary Devices has been offering this modem as an accessory since it was fully supported in Linux:

Android support

RIL integration

Luckily for us, Quectel provides great support to integrate their solution in Android.

Their package is now part of our default BSP tree in order to ease our customers life.

The integration was done for our upcoming i.MX 8M Mini-based Tablet design which incorporates the modem. Here is what it looks like when running the Android OS:

LTE Web Browsing

Settings SIM Status

Note that the Access Point Names (APN) xml file was taken from Google AOSP repository:

However, in case one of the settings is not correct or up-to-date, you can change the APN from the Settings application:

APN Settings

Build instructions

As the previous section mentions, this integration already exists for our Nitrogen8MM Tablet target.

If you’re new to Android on our platform, we strongly recommend reading our latest release post:

Once you are setup, you can try these commands:

$ source build/envsetup.sh
$ lunch nitrogen8mm_tab-userdebug
$ ./imx-make.sh -j10

Or if you want to integrate the modem to another platform, we recommend looking here for inspiration:

In case you have troubles integrating those patches for another Nitrogen platform, feel free to contact us.

When everything goes according to plan, you should see the following on your console

nitrogen8mm_tab:/ # getprop | grep -iE 'gsm|ril'
[gsm.current.phone-type]: [1]
[gsm.defaultpdpcontext.active]: [true]
[gsm.network.type]: [LTE]
[gsm.operator.alpha]: [F-Bouygues Telecom Bouygues Telecom]
[gsm.operator.iso-country]: [fr]
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: [20820]
[gsm.sim.operator.alpha]: [Bouygues Telecom]
[gsm.sim.operator.iso-country]: [fr]
[gsm.sim.operator.numeric]: [20820]
[gsm.sim.state]: [LOADED]
[gsm.version.baseband]: [EC25EUGAR06A03M4G]
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.2.2]
[init.svc.ril-daemon]: [running]
[ro.boottime.ril-daemon]: [8981753125]
[ro.ril.wake_lock_timeout]: [300]

 That’s it! You should now be able to fully use the modem under Android!

The post Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms appeared first on Boundary Devices.

Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display

$
0
0

Check out our newest demo video!

 This video shows the i.MX8M Nano based Nitrogen8M Nano SBC running Ubuntu Focal 20.04 on a 7″ Display. The Nano CPU only supports MIPI DSI output so we have a daughter board that converts MIPI DSI to LVDS to drive the 7″ 1280×800 LVDS display. The i.MX8M Nano SBC has dual Ethernet, WiFi+BT, Audio, Can bus, and a host of other features that allow for use in industrial environments. Contact us for specific questions or concerns.

The post Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display appeared first on Boundary Devices.

U-Boot 2020.10 for i.MX platforms

$
0
0

Boundary Devices is happy to release the latest U-Boot 2020.10 with support for all our Nitrogen Families of SBCs and SOMs.

For the impatient

Our build server automatically generates and uploads all the latest binaries to this address:

The README file contains the exact commit ID of this build images.

The latest upgrade.scr U-Boot script is included so it can be copied alongside the U-Boot binary above to the root of your media storage (formatted in FAT or ext2/3/4).

Then, once the media is inserted into the board, you can simply run the following command from U-Boot prompt:

=> run upgradeu

If unsure about this shorten procedure, please make sure to read the flashing procedure section.

What’s new?

i.MX 8M Plus support

The big news of this release is that it supports all our boards including the i.MX 8M Plus based Nitrogen8MP.

Fastboot bootloader flashing support

This unfortunately only applies to 8M* platforms as fastboot can only access eMMC at this point.

So for any platform of the Nitrogen8 family, you can now update its bootloader with Fastboot!

On the target, either press the Fastboot button if present or type this in U-Boot:

=> fastboot 0

On the Host PC you can then simply enter:

$ fastboot flash bootloader flash.bin
$ fastboot reboot

Display configuration support

Just like previous U-Boot version, this one supports display configuration for i.MX boards.

As a reminder, you can list all the displays supported by your platform with a simple command:

=> fbpanel

Here is an example on how to set up the board to use our BD080MCC1 MIPI display in case it isn’t recognized automatically:

=> setenv fb_mipi ltk080a60a004t
=> savee
=> reset

Driver improvements

Although we won’t list all the changes between 2018.07 and 2020.10, we know many drivers have been improved.

As mentioned in U-Boot 2020.10 release announcement, people can check the changelog:

$ git log --oneline --no-merges v2018.07..v2020.10

Build instructions

Getting the source code

First, clone our U-Boot git repository. This is the branch you’ll need to compile and install to work with the new kernel.

~$ git clone https://github.com/boundarydevices/u-boot-imx6 \
    -b boundary-v2020.10
~$ cd u-boot-imx6
~$ sudo apt-get install device-tree-compiler

Choosing the proper defconfig

Here you’ll need to find and make the relevant defconfig for your board.

If you have the board running U-Boot already, you can type the following to see which defconfig you should build.

=> printenv uboot_defconfig

Otherwise, to see all the defconfigs, use this command and pick the one that is right for you.

~/u-boot-imx6$ find configs/ -name "nit*defconfig"
configs/nit6xlite_defconfig
configs/nitrogen6_max_defconfig
configs/nitrogen6q_defconfig
configs/nitrogen6q_som2_1g_defconfig
configs/nitrogen6sx_defconfig
configs/nitrogen6_vm_defconfig
configs/nitrogen7_defconfig
configs/nitrogen8m_defconfig
...

Building for i.MX6/7

Now compile that defconfig. For 32-bit platforms, we’ll use nitrogen6q_defconfig as an example:

~/u-boot-imx6$ sudo apt-get install crossbuild-essential-armhf
~/u-boot-imx6$ export ARCH=arm
~/u-boot-imx6$ export CROSS_COMPILE=arm-linux-gnueabihf-
~/u-boot-imx6$ make nitrogen6q_defconfig
~/u-boot-imx6$ make -j2

Building for i.MX8

For 64-bit platforms, we’ll use nitrogen8m_defconfig as an example:

~$ sudo apt-get install crossbuild-essential-arm64
~$ export ARCH=arm64
~$ export CROSS_COMPILE=aarch64-linux-gnu-
~$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.bin
~$ chmod +x firmware-imx-8.10.bin
~$ ./firmware-imx-8.10.bin
~$ cp firmware-imx-8.10/firmware/hdmi/cadence/signed_*.bin u-boot-imx6/
~$ cp firmware-imx-8.10/firmware/ddr/synopsys/lpddr4*.bin u-boot-imx6/
~$ cd u-boot-imx6
~/u-boot-imx6$ make nitrogen8m_defconfig
~/u-boot-imx6$ make flash.bin -j4

At this point, you can rename the bootable image from flash.bin to u-boot.${uboot_defconfig}

~/u-boot-imx6$ cp flash.bin u-boot.nitrogen8m

Flashing procedure

For Nitrogen8 devices, you can use the fastboot procedure explained above.

If you have built your own binary, you can use the copy_upgrade.sh script to copy the bootable binary and the upgrade script to the root folder of your media (SD Card / USB / SATA drive).

~/u-boot-imx6/$ ./copy_upgrade.sh <storage_mount_point>/

If you haven’t built your own binary, you can copy upgrade.scr and the U-Boot binary matching your platform manually into your storage.

However, if you are unsure about which file to copy, we’ve created an image for you that you simply need to flash onto either your SD-Card or USB drive:

Plug your media to the platform, power up the board and interrupt u-boot to run the commands below (via the serial terminal).

Hit any key to stop autoboot:  0
=> run upgradeu

This will run the upgrade.scr script and look for a file u-boot.${uboot_defconfig} and burn it.

At this point it might be worth while to clear your environment variables after the first reboot.

This will set you up with the default environment variables and no more.

Hit any key to stop autoboot:  0 
=> env default -a
=> savee

Then, as a final note, if you’ve bricked your board through this process and need help, please go through the recovery blog post.

The post U-Boot 2020.10 for i.MX platforms appeared first on i.MX6 and i.MX8 Single Board Computers and System-on-Modules.

ML – Facemask Detection i.MX 8M Plus NPU Demo

$
0
0

This blog post will detail how Boundary Devices created its Facemask Detection app for the i.MX 8M Plus-based Nitrogen8MP and its NPU!

It was done as part of our i.MX 8M Plus Machine Learning webinar which you can see here:

Facemask Detection app details

History

We decided to create a demo leveraging the i.MX 8M Plus NPU when COVID was spreading worldwide. So it became obvious that an application detecting whether or not a person is wearing a mask was a great example.

Not only does it show how machine learning can be used to track and recognize a face, a model can be created to learn if the detected face has a specific attribute, like a mask.

Hardware setup

For this demo, we used our Nitrogen8M Plus Evaluation Kit Bundle which includes:

Software details

Overall architecture

After some investigation, we decided to use the following:

  • OS: Android 10 (BSP 2.5.0)
    • Pre-built images available here
    • Plenty of examples apps available
    • NNAPI supported by NXP
  • Inference Engine: TensorFlow Lite
    • Using existing example to build demo
    • Customized model for face mask detection

Leveraging existing projects

This application was possible thanks to several other projects:

Credit: Esteban Uri (Medium article)

Demo

Here is a snippet of our webinar showing the Facemask Detection app which can be downloaded here.

 

As always, let us know if you have any questions or feedback!

 

The post ML – Facemask Detection i.MX 8M Plus NPU Demo appeared first on i.MX6 and i.MX8 Single Board Computers and System-on-Modules.

FreeRTOS SDK v2.9 release for i.MX 8M platforms

$
0
0

One of the many advantages of developing with NXP’s i.MX 8M Family of application processors is the ability to utilize both the Cortex-A53 as well as the Cortex-M core. This blog post will first present the architecture of the i.MX 8M heterogeneous processors as a starting point for the discussion, and then explain how to build and run the FreeRTOS SDK v2.9 on its MCU.

The i.MX 8MQ and i.MX 8M Mini processors are coupling a Cortex-A53 cluster (4 cores) alongside a Cortex-M4 whereas the i.MX 8M Nano and i.MX 8M Plus are using a Cortex-M7.

For the impatient

You can download any of our currently available OS images for our i.MX 8M platforms:

Note that you can find pre-built binaries of the examples here for each CPU variant:

There are 3 examples for each variant:

  • hello_world.bin
    • simple application printing “hello world” on the M-core serial port
  • rpmsg_lite_pingpong_rtos_linux_remote.bin
    • ping pong examples between both CPU clusters using RPMSG
  • rpmsg_lite_str_echo_rtos.bin
    • TTY example showing serial communication between CPU clusters using RPMSG

You can then start your first Hello World application on the Cortex-M manually (after copying one of the binary above to your storage):

=> load mmc 0 $m4loadaddr hello_world.bin
=> bootaux $m4loadaddr

Note that all the U-Boot variables are named ‘m4x‘ for legacy reasons, but those still apply for platforms with an M7 core.

On the second serial port (UART4 for 8M Mini/Nano/Plus, UART2 for 8M Quad), you should see the following output:

Hello World!

Architecture

As an introduction, here is the definition of terms that will be used throughout the post:

  • MCU: Microcontroller Unit such as the ARM Cortex-M series, here referring to the Cortex-M4 or M7
  • MPU: Microprocessor Unit such as the ARM Cortex-A series, here referring to the Cortex-A53
  • RTOS: Real-Time Operating System such as FreeRTOS or MQX

The i.MX 8M processors are Heterogeneous Multicore Processors as they offer an MCU and a MPU in the same chip.

How it works?

The first thing to know is that one of the cores is the “master”, meaning that it is in charge to boot the other core which otherwise will stay in reset.

The BootROM will always boot the Cortex-A core first. In this article, it is assumed that U-Boot is the bootloader used by your system. The reason is that U-Boot provides a bootaux command which allows the Cortex-M to start.

Once started, both CPU clusters are on their own, executing different instructions at different speeds.

Where is the code running from?

It actually depends on the application linker script used. When GCC is linking your application into an ELF executable file, it needs to know the code location in memory.

There are several options in both processors, code can be located in one of the following:

  • TCM (Tightly Coupled Memory): 128kB available
  • DDR: up to 1MB available (can be increased, set in the device tree)

External memories, such as the DDR, offer more space but are also much slower to access.

In this article, every application runs from the TCM as it is the option offering the best performance.

When is the MCU useful?

The MCU is perfect for all the real-time tasks whereas the MPU can provide a great UI experience with non real-time OS such as GNU/Linux.

It is understood that the  Linux kernel is not real-time, not deterministic whereas FreeRTOS on Cortex-M is.

Also, since its firmware is pretty small and fast to load, the MCU can be fully operating within a few hundred milliseconds whereas it usually takes Linux OS much longer to be operational.

Examples of applications where the MCU has proven to be useful:

  • Motor control: DC motors only perform well in a real-time environment since feedback response time is crucial
  • Automotive: the MCU can handle CAN messages and be operational at a very early stage

Resource Domain Controller (RDC)

Since both cores can access the same peripherals, a mechanism has been created to avoid concurrent access, allowing to ensure a program’s behavior on one core does not depend on what is executed/accessed on the other core.

This mechanism is the RDC which grants peripheral and memory access permissions to each core.

The examples and demo applications in the FreeRTOS BSP use RDC to allocate peripheral access permission. When running the ARM Cortex-A application with the FreeRTOS BSP example/demo, it is important to respect the reserved peripheral.

The FreeRTOS BSP application has reserved peripherals that are used only by ARM Cortex-M, and any access from ARM Cortex-A core on those peripherals may cause the program to hang.

The default RDC settings are:

  • The ARM Cortex-M core is assigned to RDC domain 1, and ARM Cortex-A core and other bus masters use the default assignment (RDC domain 0).
  • Every example/demo has its specific RDC setting in its board.c (see BOARD_RdcInit() function).

The user of this package can remove or change the RDC settings in the example/demo or in his application. It is recommended to limit the access of a peripheral to the only core using it when possible.

Also, in order for a peripheral not to show up as available in Linux, it is mandatory to disable it in the device, which is why a specific device tree is used when using the MCU:

The memory declaration is also modified in the device tree above in order to reserve some areas for FreeRTOS and/or shared memory.

Remote Processor Messaging (RPMsg)

The Remote Processor Messaging (RPMsg) is a virtio-based messaging bus that allows Inter Processor Communications (IPC) between independent software contexts running on homogeneous or heterogeneous cores present in an Asymmetric Multi Processing (AMP) system.

The RPMsg API is compliant with the RPMsg bus infrastructure present in upstream Linux 3.4.x kernel onward.

This API offers the following advantages:

  • No data processing in the interrupt context
  • Blocking receive API
  • Zero-copy send and receive API
  • Receive with timeout provided by RTOS

Note that RPMsg uses the DDR by default to exchange messages between cores.

Where can I find more documentation?

The BSP comes with some documentation which we recommend reading in order to know more on the subject:

Build instructions

Development environment setup

In order to build the FreeRTOS BSP, you first need to download and install a toolchain for ARM Cortex-M processors.

~$ cd && mkdir toolchains && cd toolchains
~/toolchains$ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
~/toolchains$ tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
~/toolchains$ rm gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2

FreeRTOS relies on cmake to build, so you also need to make sure the following packages are installed on your machine:

~$ sudo apt-get install make cmake

Download the BSP

The FreeRTOS SDK v2.9 is available from our GitHub freertos-boundary repository.

~$ git clone https://github.com/boundarydevices/freertos-boundary.git freertos
~$ cd freertos
~/freertos$ git checkout <branch_name>

You need to use the proper branch_name for your platform:

Finally, you need to export the ARMGCC_DIR variable so FreeRTOS knows your toolchain location.

~/freertos$ export ARMGCC_DIR=~/toolchains/gcc-arm-none-eabi-7-2017-q4-major
~/freertos$ export PATH=$PATH:~/toolchains/gcc-arm-none-eabi-7-2017-q4-major/bin

Build the FreeRTOS apps

All the applications are located under the boards/ folder:

~/freertos$ tree boards/evk*/ -L 1
boards/evk*/
├── cmsis_driver_examples
├── demo_apps
├── driver_examples
├── multicore_examples
├── project_template
└── rtos_examples

As an example, we will build the helloworld application:

~/freertos$ cd boards/evk*/demo_apps/hello_world/armgcc/
~/freertos/boards/evk*/demo_apps/hello_world/armgcc$ ./build_release.sh
~/freertos/boards/evk*/demo_apps/hello_world/armgcc$ ls release/
hello_world.bin  hello_world.elf

You can then copy that hello_world.bin firmware to the root of the eMMC or any other storage you use.

Run the demo apps

Basic setup

By default, U-Boot loads the firmware from eMMC to TCM.

Before going any further, make sure to hook up the second serial port to your machine as the one marked as “console” will be used for U-Boot and the other one will display data coming from the MCU.

This blog post only considers the firmware file is named m4_fw.bin, if you wish to use another name, you need to set the m4image variable:

=> setenv m4image hello_world.bin
=> saveenv

If you want to load the MCU fimware manually from eMMC, here is the procedure:

=> load mmc 0 $m4loadaddr $m4image
=> bootaux $m4loadaddr

If you want to load the MCU fimware from TFTP:

=> dhcp $m4loadaddr 192.168.1.60:$m4image
=> bootaux $m4loadaddr

In order to start the MCU automatically at boot up, we need to set a variable that will tell the boot.scr to load the firmware.

To do so, make sure to save this variable.

=> setenv m4enabled 1
=> saveenv

Hello World app

The Hello World project is a simple demonstration program that uses the BSP software. It prints the “Hello World” message to the ARM Cortex-M terminal using the BSP UART drivers.

The purpose of this demo is to show how to use the UART and to provide a simple project for debugging and further development.

In U-Boot, type the following:

=> setenv m4image hello_world.bin
=> load mmc 0 $m4loadaddr $m4image
=> bootaux $m4loadaddr

On the second serial port, you should see the following output:

Hello World!

You can then type anything in that terminal, it will be echoed back to the serial port as you can see in the source code.

RPMsg TTY demo

This demo application demonstrates the RPMsg remote peer stack. It works with Linux RPMsg master peer to transfer string content back and forth. The Linux driver creates a tty node to which you can write to. The MCU displays the data and echoes back the same message as an acknowledgement. The tty reader on ARM Cortex-A core can get the message, and start another transaction. The demo demonstrates RPMsg’s ability to send arbitrary content back and forth.

In U-Boot, type the following in order to boot the OS automatically while loading the M core:

=> setenv m4image rpmsg_lite_str_echo_rtos.bin
=> setenv m4enabled 1
=> boot

On the second serial port, you should see the following output:

RPMSG String Echo FreeRTOS RTOS API Demo...

Once Linux has booted up, you need to load the RPMsg module so the communication between the two cores can start.

# modprobe imx_rpmsg_tty
# echo "this is a test" > /dev/ttyRPMSG30

The last command above writes into the tty node, which means that the Cortex-M should have received data as it can be seen on the second serial port.

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]
Get Message From Master Side : "this is a test" [len : 14]
Get New Line From Master Side

RPMsg Ping Pong demo

Same as previous demo, this one demonstrates the RPMsg communication. After the communication channels are created, Linux OS transfers the first integer to FreeRTOS OS. The receiving peer adds 1 to the integer and transfers it back, a hundred times and then stops.

In U-Boot, type the following:

=> setenv m4image rpmsg_lite_pingpong_rtos_linux_remote.bin
=> setenv m4enabled 1
=> boot

On the second serial port, you should see the following output:

RPMSG Ping-Pong FreeRTOS RTOS API Demo...

Once Linux has booted up, you need to load the RPMsg module so the communication between the two cores can start.

# modprobe imx_rpmsg_pingpong
[   30.501148] get 1 (src: 0x1e)
[   30.506527] get 3 (src: 0x1e)
...
[   30.730958] get 101 (src: 0x1e)
[   30.734104] imx_rpmsg_pingpong virtio0.rpmsg-openamp-demo-channel.-1.30: goodbye!

While you can send the received data from the MCU on the main serial port, you can also see the data received from the MPU on the secondary serial port.

RPMSG Share Base Addr is 0xb8000000
Link is up!
Nameservice announce sent.
Waiting for ping...
Sending pong...
...
Waiting for ping...
Sending pong...
Ping pong done, deinitializing...
Looping forever...

 

That’s it, you should now be able to build, modify, run and debug

The post FreeRTOS SDK v2.9 release for i.MX 8M platforms appeared first on i.MX6 and i.MX8 Single Board Computers and System-on-Modules.

Mender support on i.MX8 platforms

$
0
0

We are pleased to announce a partnership with Mender and provide support for Mender on our Nitrogen8M and Nitrogen8M Mini platforms based on i.MX8 processors! We also plan to support Nitrogen8M Nano and Nitrogen8M Plus in the near future.

What is Mender?

Mender.io is a secure, robust and efficient end-to-end over-the-air (OTA) software update manager for embedded devices. It is open source with an active community supporting a large number of different hardware and operating systems.

Visit Mender.io and Mender Hub community to learn more.

How to Use Mender with Nitrogen8M

In this post, we will be using Mender in conjunction with Yocto to demonstrate a simple OTA update on our Nitrogen8M platform.  We will be using Nitrogen8M as an example, but the same applies for Nitrogen8M Mini.

1- Setup Mender trial server on hosted.mender.io

Sign up for a trial here

2- Grab Organization token

After signing up and logging in, click your email at the top right and then “My organization”:

Then click “COPY TO CLIPBOARD” next to Organization token. Temporarily copy this somewhere, as we will be using it in next step:

3- Build Procedure

We will be using the dunfell branch of our boundary-bsp-platform repository.

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/yocto-mender && cd yocto-mender
~/yocto-mender$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform.git -m mender.xml -b dunfell
~/yocto-mender$ repo sync

Next, setup the environment for building.

~/yocto-dunfell$ source setup-environment-mender nxp

Now we need to define a few things in local.conf.

First, we need to specify our MACHINE and DISTRO in local.conf.  For this image we will be building our boundary-wayland distro for the nitrogen8m

MACHINE ?= "nitrogen8m"

DISTRO ?= "boundary-wayland"

NOTE: There will be an existing MACHINE and DISTRO defined by default in local.conf. Please replace these definitions.

Next, we need to copy the Organization token from the step above to local.conf. Copy the following to local.conf:

MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<token_from_above_step>"

Then, we need to define what Uboot binary to build. You can find out what Uboot needs to go on your board by seeing what “uboot_defconfig” is defined as in you board’s uboot:

=> print uboot_defconfig 
uboot_defconfig=nitrogen8m

In this case, we are building for nitrogen8m so define the following in local.conf:

UBOOT_DTB_NAME = "imx8mq-nitrogen8m.dtb"
BOUNDARY_DEVICES_UBOOT_DEFCONFIG = "nitrogen8m"

NOTE: In this case, the MACHINE conf (nitrogen8m.conf) will specify to build this binary by default. However, there are several board variants one can build for, so the above variable definitions are required.

Lastly, we need to accept the Freescale EULA located in “sources/meta-freescale/EULA’. Please read it and accept by adding the following to local.conf:

ACCEPT_FSL_EULA = "1"

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/yocto-mender/build$ bitbake boundary-image-multimedia-full

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.sdimg

4- Flash image

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ sudo dd if=*boundary-image*.sdimg of=/dev/sdX bs=1M && sync

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher

5- Boot device and upgrade uboot

The boot partition of the image will contain both the uboot binary and the upgrade.scr script required for updating the uboot. We will upgrade the uboot with “run upgradeu”:

=> ls mmc 0
28801536 Image
4665 boot.scr
55674 imx8mq-nitrogen8m-edp.dtb
55803 imx8mq-nitrogen8m-m4.dtb
55722 imx8mq-nitrogen8m-tc358743.dtb
55670 imx8mq-nitrogen8m.dtb
51571 imx8mq-nitrogen8m_som-m4.dtb
51438 imx8mq-nitrogen8m_som.dtb
1278752 u-boot.nitrogen8m
5732 upgrade.scr

10 file(s), 0 dir(s)
=> run upgradeu
starting USB...
Bus usb@38100000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@38200000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@38100000 for devices... 1 USB Device(s) found
scanning bus usb@38200000 for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 0 Ethernet Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /upgrade.scr
5732 bytes read in 12 ms (465.8 KiB/s)
## Executing script at 40480000
cpu2=8M
cpu3=8MQ
1278752 bytes read in 20 ms (61 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC read: dev # 0, block # 66, count 2498 ... 2498 blocks read: OK
byte at 0x42000400 (0xd1) != byte at 0x42400400 (0x0)
Total of 0 byte(s) were the same
Need U-Boot upgrade
Program in 5 seconds
5
4
3
2
1

MMC write: dev # 0, block # 66, count 2498 ... 2498 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
---- U-Boot upgraded. The board will now reset.
resetting ...

after the board resets, reset the environment variables to default and reboot:

=> env default -a
## Resetting to default environment
=> savee
Saving Environment to MMC... Writing to redundant MMC(0)... OK
=> reset

6- Accept Pending device in Mender Dashboard

After booting, make sure your device is connected to the internet. Now, it will show up as a Pending device in the Dashboard:

Click the “+” icon under “Pending devices”, then select your device and click the “+” icon in the lower right corner and accept:

Now your device will show up in the Dashboard:

7- Prepare a release artifact

We are now ready to test a rootfs update. First, we need to prepare a release artifact in the yocto build. As a test, we can simply just increment the release number, but keep the same rootfs. We do this in local.conf. You will notice that the starting image has a software version name “release-1”. Lets bump up to “release-2” by modifying the following line in local.conf:

MENDER_ARTIFACT_NAME = "release-2"

Now we can rebuild the image

~/yocto-mender/build$ bitbake boundary-image-multimedia-full

The mender release artifact will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.mender

8- Upload release artifact

Now let’s take the release artifact from step 7 and upload to the Mender server. Navigate to the “Releases” tab and click “Upload”

Select the artifact from step 7 and upload:

9- Deploy release artifact

Now let’s deploy the release artifact to the Nitrogen8M. After the upload completes, it will show up as “release-2” under “Releases”. We can now click “Create Deployment With This Release”:

Select “All devices” in the drop-down and click “Next”.

Click “Next” again then click “Create”:

The board will now being to update:

Click on “View details” to see the update status:

If the update was successful, you will see the following success output:

Success! Now if we navigate to the “Devices” tab, we can see the Nitrogen8M is running software “release-2”:

There you have it! You can now integrate Mender into your Yocto BSP to perform seamless software updates.

 

If you have any issues, please email support@boundarydevices.com

The post Mender support on i.MX8 platforms appeared first on i.MX6 and i.MX8 Single Board Computers and System-on-Modules.

Ubuntu Focal 20.04 unified image for Nitrogen8 boards

$
0
0

 

Ubuntu 20.04 LTS Weston Compositor
Ubuntu 20.04 LTS Weston/Wayland Compositor

Boundary Devices is proud to release our new Ubuntu Focal image for all our Nitrogen8 boards!

This image uses Weston which is the reference Wayland compositor.

This image boots up the Weston compositor at start. This can be changed by disabling the service autostart, as described later in this post.

This system contains NXP licensed content, so you will need to register on our website and log in before you can accept the license agreement and download the Ubuntu Focal images for Nitrogen8 from here:

For Nitrogen8M, Nitrogen8M SOM, Nitrogen8M Mini, Nitrogen8M Mini SOM, Nitrogen8M NanoNitrogen8M Nano SOM, Nitrogen8M Plus SOM

This is a unified image for the aforementioned boards, there is no need for board specific images anymore. At the first start it will detect the board type run a configuration script. Finally, it will set all board specific parameters and apt repositories.

Important!

Before installing this image please check your U-Boot version, as it requires U-Boot version 2020.10  to be used.

Make sure to visit our wiki if you need to upgrade:

You can find the bootscript in the /boot sub-directory now, its named boot.scr. The partition labels are set if you use dd or Balena Etcher to flash the image.

If you use your own method please check the boot partition labels because the fstab boots by label (LABEL=sys-15h for example) now.  You can use e2label to modify partition label.

Programming the image

As usual, we recommend using the Balena Etcher tool to flash your SD Card / eMMC:

The uncompressed image size is slightly bigger than 5GB, you’ll need at least 8GB eMMC storage to install it.

Please watch this video for the detailed instructions:


Usernames and passwords

We predefined two users for use on the system: ubuntu and root. The password for each is Boundary (capital B). The user ubuntu has administrator rights, but you don’t need to enter password at sudo command.

We wanted to make your life easier at the cost of some security, but if you want to change that please type:

ubuntu@focal-dev64:~$ sudo visudo

Then comment out or delete the last line with “ubuntu” and “NOPASSWD:”

An ssh server is running on the system, though it does not allow password-based authentication for user root.

User ubuntu has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so :

ubuntu@focal-dev64:~$ sudo mkdir /root/.ssh
ubuntu@focal-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported?

Since the images above include our stable 5.4.x kernel, essentially everything is supported, including:

  • Vivante GPU accelerations for Wayland
  • The Hantro Video Processing Unit supports the following decoders:
    • video/x-h265
    • video/x-vp9
    • video/x-h264
    • video/x-vp8
    • video/x-vp6-flash
    • video/mpeg
    • video/x-h263
    • video/x-flash-video
    • video/x-divx
    • video/x-xvid
    • video/x-cavs
    • video/x-wmv
    • video/x-pn-realvideo
    • video/x-raw
  • BD-SDMAC WiFi/BT modules support
  • All kind of storage devices , eMMC, SATA hdd (via USB3-SATA adapter), USB3.0/2.0 pen drives, mini PCIe devices, cell modems
  • All of our supported touch panels

The packaging (including kernel) is done in the normal ubuntu way, so apt-get update/dist-upgrade will keep your image up and running as the latest as patches come out.

What’s new in this release?

The Linux kernel was upgraded to 5.4.x_2.3.0 branch ( meta-package name: linux-boundary-18f ).
GPU driver was upgraded to Vivante 6.4.3p1.0 ( meta-package name: imx-gpu-viv-f18-… ).
The built-in galcore module has been removed (CONFIG_MXC_GPU_VIV) and we use an external galcore kernel module. This change makes the graphics system modular and more upgradeable, at the price of longer kernel upgrading time. Upgrading kernel takes about 3-4 minutes now, instead of 30 seconds, because every kernel upgrade rebuilds the galcore driver from sources, as it’s a DKMS module.
The NXP/Vivante GPU SDK was upgraded to imx-gpu-sdk 5.7.0 . You can get the source with the usual apt-get source command. The SDK has many new demos, for example OpenCL, OpenVG, and for OpenVX and Vulkan.
The distribution is Focal 20.04 LTS . Here are some main component versions of these Ubuntu Focal images for Nitrogen8:

  • Xorg server 1.20.8-2ubuntu2.7
  • gstreamer1.0 1.16.2
  • bluez 5.53-1ubuntu3
  • Qt 5.12.8
  • apt 2.0.4
  • dpkg 1.19.7ubuntu3.1
  • gcc/g++ 9.3.0-17ubuntu1~20.04
  • libwayland 1.18.0
  • weston 9.0.0-2
  • the image supports the Silex WiFi / Bluetooth module

CPU-specific package selection

This is our first unified image for the entire i.MX 8M family of processors. Since each CPU has its own specific features the OS must adapt to each platform.

That is why, during the first boot, a new selecthw service has been created to take care of selecting the proper packages needed for your platform.

For instance, for the Nitrogen8MP platform, the OS makes sure VPU encode/decode is enabled, NPU packages are added as well as the ISP service to manage the Basler daA3840 camera.

After that setup, the platform will need to reboot for those changes to be taken into account.

Thankfully, you can see the progress of that process on the display as shown below:


Network Manager

This Ubuntu Focal image comes with Network Manager by default in order to ease the Wi-Fi setup.

ubuntu@focal-dev64mp:~$ nmcli radio wifi on
ubuntu@focal-dev64mp:~$ nmcli d wifi list
IN-USE  BSSID              SSID             MODE   CHAN  RATE        SIGNAL  BA>
        A4:3E:51:08:54:F5  Jabu             Infra  1     130 Mbit/s  62      ▂▄>
        A4:3E:51:08:54:F6  Jabu_5GHz        Infra  36    405 Mbit/s  57      ▂▄>

ubuntu@focal-dev64mp:~$ sudo nmcli d wifi connect Jabu_5GHz password XXXXXX
Device 'wlan0' successfully activated with '4ed596ea-9f8c-48ea-8e0e-5e190e2fecc9'.
ubuntu@focal-dev64mp:~$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.61  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2ae4:f7d2:3cc1:486d  prefixlen 64  scopeid 0x20
        inet6 2a01:cb00:f55:7f00:3122:4891:67c4:faa7  prefixlen 64  scopeid 0x0
        inet6 2a01:cb00:f55:7f00:6c92:60ad:c2ad:68cc  prefixlen 64  scopeid 0x0
        ether 08:3a:88:20:78:cc  txqueuelen 3000  (Ethernet)
        RX packets 67  bytes 7854 (7.8 KB)
        RX errors 0  dropped 9  overruns 0  frame 0
        TX packets 69  bytes 7666 (7.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This allows you to use Wi-Fi right out of the box without any extra setup required.

i.MX 8M Plus support

This is the first Ubuntu Focal image to officially support the i.MX 8M Plus CPU and therefore our Nitrogen8MP SOM.

The support includes:

  • VPU decode/encode
  • GPU 3D & 2D support
  • NPU integration (TFLite & ARMNN)
  • ISP + Basler daA3840 support


Nitrogen 8M Mini board GPU SDK demo.

Nitrogen8M Plus board runs Vulkan Gears 3D demo

Nitrogen8M Mini board is streaming a video from YouTube

As I mentioned before, the system boots to Weston compositor.

If you don’t want to start Weston at boot automatically, you have to disable the service, you have to type the following:

ubuntu@focal-dev64:~$ sudo systemctl disable weston.service
ubuntu@focal-dev64:~$ sudo systemctl mask weston.service 

If you want to enable the autostart again you need to type:

ubuntu@focal-dev64:~$ sudo systemctl unmask weston.service
ubuntu@focal-dev64:~$ sudo systemctl enable weston.service

You can find the weston.ini file in the /etc/xdg/weston directory. Please type:

ubuntu@focal-dev64:~$ man weston.ini

Check the options and feel free to modify it to suit your needs.


Weston keyboard bindings

The Weston desktop shell has a number of keyboard shortcuts. They are listed here.

Almost all keyboard shortcuts for Weston include a specified modifier mod key which is determined in the file weston.ini (5):
[shell] binding-modifier={none | ctrl | alt | super}

The mod key is the same as the super key by default.

The super key is in between <Left Ctrl> and <Left Alt>, usually a <Windows> key.

mod + Shift + F
Make active window fullscreen

mod + K
Kill active window

mod + Shift + M
Maximize active window

mod + PageUp, mod + PageDown
Zoom desktop in (or out)

mod + Tab
Switch active window

mod + Up, mod + Down
Increment/decrement active workspace number, if there are multiple

mod + Shift + Up, mod + Shift + Down
Move active window to the succeeding/preceding workspace, if possible

mod + F1/F2/F3/F4/F5/F6
Jump to the numbered workspace, if it exists

Ctrl + Alt + Backspace
If supported, terminate Weston. (Note this combination often is used to hard restart Xorg.)

Ctrl + Alt + F
Toggle if Weston is fullscreen; only works when nested under a Wayland compositor

Ctrl + Alt + S
Share output screen, if possible

Ctrl + Alt + F1/F2/F3/F4/F5/F6/F7/F8
Switch virtual terminal, if possible

super + S
Make a screenshot of the desktop

super + R
Start or stop recording video of the desktop

Weston touch / mouse bindings

There are also a number of bindings involving a mouse:

<Touch>, <Left button>, <Right button>
Activate clicked window

super + Alt + <Vertical scroll>
Change the opacity of a window

mod + <Vertical scroll>
Zoom/magnify the visible desktop

mod + <Left button>
Click and drag to move a window

mod + Shift + <Left button>,  mod + <Right button>,  mod + <Touch>
Click and drag to resize a window

mod + <Middle button>
Rotate the window (if supported)


As always, please share your feedback and let us know how things work for you.

The post Ubuntu Focal 20.04 unified image for Nitrogen8 boards appeared first on Boundary Devices.


QNX 7.0 BSP release for Nitrogen8M Mini

$
0
0

We are excited to announce DirectInsight release of QNX 7.0 BSP for the Nitrogen8M Mini SBC.

For the impatient

You can download either prebuilt binaries or the QNX BSP source code from DirectInsight:

Along with the BSP comes a BSP Quick Start Guide as well as a Test Plan.

We also strongly recommend reading our QNX Getting Started Guide article to learn about building/debugging QNX.

QNX 7.0 features

QNX 7.0 Software Development Platform (SDP) provides a comprehensive, multi-level, policy-driven security model incorporating best-in-class security technologies from BlackBerry.

Here is a short list of new features:

  • High performance: Full 64-bit and 32-bit support for ARMv7, ARMv8.
  • Complete hardware optimization: NXP i.MX platforms.
  • Standards-based tools: Eclipse-based IDE with C++14 support.
  • Safety certified pedigree: ISO 26262 ASIL D for automotive, IEC 61508 SIL3 for industrial and IEC 62304 for medical.

Another noticeable change is the use of the QNX Software Center which is now necessary to install the QNX base OS. It will also allow easy installation of OS updates and new components.

Here is a full list of features from this OS update:

Also, the online documentation is as usual very well-written and detail-oriented:

For instance, there’s a migrating guide that can be useful for your existing applications:

Nitrogen8M Mini BSP features

The Nitrogen8M Mini BSP supports the following peripherals:

  • I2C
  • SPI
  • Serial
  • RTC
  • Watchdog
  • Ethernet
  • SD/MMC
  • Audio
  • USB Host

As for the bootloader, you can either use QNX IPL (without TF-A) or U-Boot (with TF-A).

Display support isn’t available at this stage but is currently in the works so stay tuned for an update on that front.

Note that this release can be built and debugged using QNX Momentics IDE:

QNX Nitrogen8MM Build
QNX Nitrogen8MM Perf Analysis

As usual, feel free to contact us for more information!

The post QNX 7.0 BSP release for Nitrogen8M Mini appeared first on Boundary Devices.

Temperature Monitoring on i.MX platforms

$
0
0

We have received many requests about temperature monitoring on our NXP i.MX based Nitrogen platforms.

This blog post aims to answer the most common questions and help you get the most out of your Nitrogen device.

Temperature Monitoring principle

All the i.MX processors come with an integrated IP capable of providing the internal temperature of the SoC.

i.MX 8M Plus block diagram

That temperature monitoring IP is not the same across all i.MX CPUs. The older i.MX 6 & 7 used to rely on the TEMPMON IP whereas the newer i.MX 8M (Quad, Mini, Nano & Plus) use the TMU.

How do you read the temperature?

The good news is that no matter which platform you use, the way to read the temperature is always the same:

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
37000

The above means my platform temperature is currently 37 degrees Celsius as the unit is millidegree as described in the kernel documentation:

Behind the scenes, as the IP differs between CPUs, different kernel drivers can be in use:

How accurate is the measurement?

Some of you have tried to compare a case temperature measurement against the one read by the IP which isn’t a fair comparison.

First, the internal temperature monitor measures die temp (also called junction temp), with an accuracy of +5C.

Second, the difference between junction and case temperature is linear to the wattage of your platform, so it increases the more power you draw.

In other words the die temperature is what should be used to avoid damaging your platform.

Is there a safety mechanism?

The first question often is: “how do I make sure not to damage my platform in case it gets hot?”

The safety mechanism for that defines 2 thresholds:

  • Passive trip point: when reached, the CPU/GPU/VPU throttles to try to reduce the temperature
  • Active trip point: when reached, the board reboots immediately to avoid damaging the SoC

Those thresholds are usually 10C apart, like the default values on our 8MP SOM like this:

# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
85000
95000

How to modify the thresholds?

Depending on the exact version of the CPU you are using, you might need to change the default thresholds.

This is not necessary for i.MX 6 & 7 as the driver checks the temperature grade and adapts temperatures automatically:

For the other processors, like an industrial version of the i.MX 8M Mini CPU that can go from -40C to 105C, you need to update the trip points as follows:

# echo 105000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_1_temp 
# echo 95000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
95000
105000

Note that setting those thresholds this way is not persistent across reboot, so you have 2 solutions:

  1. Modify the device tree directly to have your own values
  2. Create an init script for your OS to do that at bootup

The post Temperature Monitoring on i.MX platforms appeared first on Boundary Devices.

Esper.io solution on i.MX Nitrogen platforms

$
0
0

We are pleased to present the esper.io solution on our i.MX-based Nitrogen platforms to provision and manage your fleet of devices!

What is esper.io?

In the past, many customers asked us for a turn-key solution for them to control their fleet with requirements like:

  • We need to have only one application accessible to the user
  • We have to be able to update our application easily
  • We’d like to know the state of our fleet in real-time

It is with those questions in mind that we discovered esper.io and we are happy to say it solves them perfectly.

Esper’s solution includes the following features (among others):

  • Device Management
    • Dashboard UI via esper.io website
    • Events, Monitoring, Logs
    • Remote Control
    • System OTA Updates
  • App Management
    • App update scheduling possible
  • Device Groups
    • Managing devices per-site / per-IP / per-country etc…
  • Kiosk Mode
    • Allowing only 1 app to run
  • AOSP & GMS devices
    • Seamless provisioning

What about an example?

As a demo is worth a thousand words, we decided to go ahead and try it on our own.

Template creation

Once you have an esper.io account, the first step is to create your template.

It will include all the parameters you want for your specific devices.

After choosing the name for your template, you will have to set the Compliance Policy which includes many options like whether or not the screen is lockable or if the Notificaiton bar should be present.

Next is the Apps step which allows you to upload one or several applications you want included in your system. You can also select whether or not you want the device in Kiosk Mode (1 app only).

During the Settings step, you will select the connectivity you want enabled (WiFi/BT/GPS) as well as branding or any other options normally set in the Settings application.

Finally, you can create and/or assign a Group of devices to that template.

That’s it, your template should be complete. Know that you can also update it later via the esper dashboard.

Device Provisioning

There are several methods to provision your devices. This section will cover the usage of the esper provisioning tool:

This is available on all OSes (Windows, MAC OS, Linux).

The first step is to provide your esper.io login for the tool to retrieve your templates.

The next steps are simply for you to select the application to download and select the device(s) to provision.

Then the installation 1st step will happen on the device.

Once this step is complete, you should reboot the platform for the 2nd step of provisioning to kick in automatically:

Next, your application, which in our case is KioskApp which is a very simple full screen, which should be started in Kiosk mode:

At this point, your device is fully provisioned and can be managed through the esper website.

Another option is seamless provisioning which requires integrating esper applications into the AOSP build tree. For that approach, you should contact the esper team directly.

Device Management

Here is what the Dashboard should look like:

From there you have access to a lot of information:

  • Memory usage
  • Storage usage
  • Battery info
  • Temperature
  • Firmware details (fingerprint)
  • App details
  • Retrieving logs

As explained in the introduction, esper.io is a very complete solution and this blog post didn’t even scratch the surface of all the possibilities. We hope that this gives you a good overview and we highly recommend giving it a try to better manage your production devices.

The post Esper.io solution on i.MX Nitrogen platforms appeared first on Boundary Devices.

Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms

$
0
0

We are excited to announce the EC25 modem is now fully supported in our Android 10 BSP for all our Nitrogen8 family of platforms.

EC25 modem details

The Quectel EC25 mPCIe Modem is a series of LTE category 4 modules adopting standard PCIe Mini Card form factor.

It is optimized for M2M and IoT applications, and delivers 150 Mbps downlink and 50 Mbps uplink data rates.

Here is the full datasheet:

This modem has several possible configurations depending on region of use (EMEA, Americas, Asia).

Boundary Devices has been offering this modem as an accessory since it was fully supported in Linux:

Android support

RIL integration

Luckily for us, Quectel provides great support to integrate their solution in Android.

Their package is now part of our default BSP tree in order to ease our customers life.

The integration was done for our upcoming i.MX 8M Mini-based Tablet design which incorporates the modem. Here is what it looks like when running the Android OS:

LTE Web Browsing
Settings SIM Status

Note that the Access Point Names (APN) xml file was taken from Google AOSP repository:

However, in case one of the settings is not correct or up-to-date, you can change the APN from the Settings application:

APN Settings

Build instructions

As the previous section mentions, this integration already exists for our Nitrogen8MM Tablet target.

If you’re new to Android on our platform, we strongly recommend reading our latest release post:

Once you are setup, you can try these commands:

$ source build/envsetup.sh
$ lunch nitrogen8mm_tab-userdebug
$ ./imx-make.sh -j10

Or if you want to integrate the modem to another platform, we recommend looking here for inspiration:

In case you have troubles integrating those patches for another Nitrogen platform, feel free to contact us.

When everything goes according to plan, you should see the following on your console

nitrogen8mm_tab:/ # getprop | grep -iE 'gsm|ril'
[gsm.current.phone-type]: [1]
[gsm.defaultpdpcontext.active]: [true]
[gsm.network.type]: [LTE]
[gsm.operator.alpha]: [F-Bouygues Telecom Bouygues Telecom]
[gsm.operator.iso-country]: [fr]
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: [20820]
[gsm.sim.operator.alpha]: [Bouygues Telecom]
[gsm.sim.operator.iso-country]: [fr]
[gsm.sim.operator.numeric]: [20820]
[gsm.sim.state]: [LOADED]
[gsm.version.baseband]: [EC25EUGAR06A03M4G]
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.2.2]
[init.svc.ril-daemon]: [running]
[ro.boottime.ril-daemon]: [8981753125]
[ro.ril.wake_lock_timeout]: [300]

 That’s it! You should now be able to fully use the modem under Android!

The post Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms appeared first on Boundary Devices.

Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display

$
0
0

Check out our newest demo video!

 This video shows the i.MX8M Nano based Nitrogen8M Nano SBC running Ubuntu Focal 20.04 on a 7″ Display. The Nano CPU only supports MIPI DSI output so we have a daughter board that converts MIPI DSI to LVDS to drive the 7″ 1280×800 LVDS display. The i.MX8M Nano SBC has dual Ethernet, WiFi+BT, Audio, Can bus, and a host of other features that allow for use in industrial environments. Contact us for specific questions or concerns.

The post Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live