QNX SDP 7.1 BSP release for Nitrogen8M Plus SMARC

Blackberry_QNX

We are proud to present our latest QNX SDP 7.1 BSP for our Nitrogen8M Plus SMARC board.

For the impatient

You can download the BSP below:

Changelog v1.2 to v1.3:

  • add RTC support
  • add support for 4GB DDR
  • add qnx6 filesystem automount

Changelog v1.1 to v1.2:

  • add can driver support
  • fix uart3/4 initialization
  • fix mcp23018 gpio expander tool
  • enable SMARC i2c CSI1/2 busses (i2c6)

Changelog v1.0 to v1.1:

  • add disk image creation with qnx6 partition
  • fix i2c muxing issues when booting from ipl
  • fix possible graphics bug when booting from u-boot

If you wish to test a pre-built binary before checking the BSP source code, here it is:

This latter can be programmed in different ways:

  • One can follow our programming eMMC guide
  • One can use Balena Etcher to program its SD card or USB drive
  • Linux users can also program it to SD Card or USB Stick using zcat and dd:
    ~$ zcat BSP_boundary-imx8mp-nitrogen-smarc-sdp710-jbn7-v1.3.img.gz | sudo dd of=/dev/sdX bs=1M
    

We also recommend reading our QNX Getting Started Guide article to learn about building/debugging QNX apps. Although this article has been written for QNX6.6, the info still applies for QNX7.1.

Nitrogen8M Plus SMARC BSP features

This section will detail all the currently supported features of the BSP.

Display support

The BSP supports both LVDS and HDMI output which can be tested using the OpenGL-ES gears demo application.

Here is an example for HDMI:

# gles2-gears -display=3
300 frames in  5.004 seconds = 59.952 FPS

During that test, your display should look like below: gles2-gears

If you want to use the LVDS output, you need either our BD070LIC3 or BD101LIC3 LVDS display:

# gles2-gears -display=2
297 frames in  5.002 seconds = 59.376 FPS

Network support

Both gigabit Ethernet ports (ETH0 & ETH1) are supported:

  • ETH0 interface is called dwc0
# ifconfig dwc0
dwc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=1f<IP4CSUM,TCP4CSUM,UDP4CSUM,TCP6CSUM,UDP6CSUM>
        enabled=0
        address: 00:19:b8:0e:d1:c5
        media: Ethernet autoselect (1000baseT full-duplex,flowcontrol)
        status: active
        inet 192.168.1.187 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::219:b8ff:fe0e:d1c5%dwc0 prefixlen 64 scopeid 0x11
# ping google.com
PING google.com (142.250.178.142): 56 data bytes
64 bytes from 142.250.178.142: icmp_seq=0 ttl=116 time=4 ms
64 bytes from 142.250.178.142: icmp_seq=1 ttl=116 time=5 ms
64 bytes from 142.250.178.142: icmp_seq=2 ttl=116 time=4 ms
64 bytes from 142.250.178.142: icmp_seq=3 ttl=116 time=4 ms

----google.com PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 4/4/5 ms   variance = 3 ms^2
  • ETH1 interface is called fec0
# SOCK=/alt ifconfig fec0
fec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:19:b8:0e:d1:c4
        media: Ethernet autoselect (1000baseT full-duplex,flowcontrol)
        status: active
        inet 192.168.1.188 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::219:b8ff:fe0e:d1c4%fec0 prefixlen 64 scopeid 0x11

SD / eMMC support

Both SD card (on carrier board) and eMMC (on module) are supported:

# ls /dev/sd* /dev/emmc*
/dev/emmc0         /dev/emmc2         /dev/emmc5         /dev/sd0
/dev/emmc0t131     /dev/emmc3         /dev/emmc6         /dev/sd0t11
/dev/emmc1         /dev/emmc4         /dev/emmc7
# mount -t dos -o exe=all /dev/sd0t11  /mnt/
# ls -l /mnt/
total 41673
-rwxrwxrwx   1 root      root            199 Mar 11  2024 boot.scr
-rwxrwxrwx   1 root      root       21335588 Mar 11  2024 qnx-ifs

USB Host support

All the USB Host ports of the Nitrogen8M Plus SMARC device are supported.

# ls /dev/umass0*
/dev/umass0        /dev/umass0t131
# mount -t dos -o exe=all /dev/umass0t131 /mnt
# ls /mnt/
song.wav

Audio support

This BSP includes support for our WM8962 codec which can be used as follows:

# wave /mnt/song.wav

You can control the volume thanks to the mix_ctl tool:

# mix_ctl group "Headphone",0 mute=on

GPIO / UART / I2C / SPI support

The BSP does support all the standard embedded IPs such as UART / I2C / SPI / GPIO of the i.MX 8M Plus.

Here is a list of the exposed IPs:

# ls /dev/ser*
/dev/ser1
# ls /dev/i2c*
/dev/i2c1    /dev/i2c2    /dev/i2c3    /dev/i2c4    /dev/i2c6
# ls /dev/spi*
/dev/spi1    /dev/spi2

All the above nodes can be accessed from your application using QNX API:

The GPIO node however should be used via the gpio-test binary:

# use gpio-test
gpio-test - Utility for the GPIO Resource Manager

Usage:
gpio-test -b bank -p pin [options]

Note:
- This utility does *not* configure the IOMUXC.
  The IOMUXC pin muxing may need to be configured separately.

Options:
-b bank         Set the GPIO bank number
-p pin          Set the GPIO pin number being accessed
-i              Configure the specified GPIO pin as an input
-o state        Configure the specified GPIO pin as output and set its state
-w state        Set the output state of the specified GPIO pin
-N path         Specify the location of the GPIO resource manger to attach to
                The default path is /dev/gpio

CAN support

The BSP includes the CAN driver for the i.MX 8MP that can be used with canctl:

# canctl -u1,rx0 -i
Message queue size: 100
Wait queue size:    16
Mode:               IO
Bitrate:            250000 Baud
Bitrate prescaler:  20
Sync jump width:    1
Time segment 1:     8
Time segment 2:     2
TX mailboxes:       32
RX mailboxes:       32
Loopback:           NONE
Autobus:            OFF
Silent mode:        OFF
# canctl -u1,rx0 -M
GET_MID = 0x100C0000
# canctl -u1,rx0 -M
GET_MID = 0x100C0000
# canctl -u1,rx0 -r
READ_CANMSG_EXT 1:
   mid = 0x100C0000
   timestamp = 0xC25A
   dat len = 4
   dat =  de ad be ef
          ....
# echo test > /dev/can1/tx32

IPL bootloader

Our BSP currently works if U-Boot is your main bootloader. U-Boot offers many features like boot from network, USB, display splash screen etc… However, U-Boot is GPL licensed, which can be inconvenient for some customers.

That is why we offer IPL support, for modules with 2GB or 4GB of LPDDR4, which allows to boot from either SD or eMMC.

You can flash it using fastboot:

fastboot flash bootloader images/ipl-nitrogen8mp-smarc.imx

Then the boot log should look like the following:

Boot device: eMMC chip
NOTICE:  BL31: v2.6(release):lf-5.15.32-2.0.0-rc1-0-g47baad824-dirty
NOTICE:  BL31: Built : 11:27:11, May 24 2022

Welcome to QNX Neutrino IPL for Boundary Devices Nitrogen8MP SMARC
ATF commit: 47baad8
Command:
Press 'D' for serial download, using the 'sendnto' utility
Press 'M' for SDMMC download, IFS filename MUST be 'QNX-IFS'.
Press 'E' for eMMC download, IFS filename MUST be 'QNX-IFS'.
SDMMC download...
load image done.
Found image               @ 0x48000FA0
Jumping to startup        @ 0x40801800

board_smp_num_cpu: 4 cores
board_smp_num_cpu: 4 cores
board_smp_num_cpu: 4 cores
board_smp_num_cpu: 4 cores
Welcome to QNX Neutrino 7.1.0 on the Boundary Devices Nitrogen8MP SMARC

QNX Momentics IDE integration

This BSP can be imported by the QNX Momentics IDE:

qde-import

Then the BSP can be modified and built as needed: qde-bsp-view

Finally, the IDE brings many tools that can be used to profile the system while it is running: qde-sys-info

DDR variants

This BSP can be built for Nitrogen8MP SMARC platforms with either 2GB or 4GB of LPDDR4.

By default, the build considers 2GB of LPDDR4, in order to change to 4GB you need to set an environment variable to build the BSP:

$ source /opt/qnx710/qnxsdp-env.sh
$ DDR_SIZE=4096 make

Or if you use the IDE, you can add a build variable in the project properties as shown below: qde-build-variable