QNX SDP 7.1 BSP release for Nitrogen93 SMARC
QNX SDP 7.1 BSP release for Nitrogen93 SMARC
We are proud to present our latest QNX SDP 7.1 BSP for our Nitrogen93 SMARC board.
For the impatient
You can download the BSP below:
Changelog v1.0 to v1.1:
- add LVDS display support
- add RTC support
- add CAN driver support
- fix UART driver build issue
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_ezurio-imx93-nitrogen-smarc-sdp710-jbn6-v1.1.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.
Nitrogen93 SMARC BSP features
This section will detail all the currently supported features of the BSP.
Network support
Both gigabit Ethernet ports (ETH0
& ETH1
) are supported:
ETH0
interface is calleddwc0
# 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:00:82:17
media: Ethernet autoselect (1000baseT full-duplex,flowcontrol)
status: active
inet 192.168.1.73 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::219:b8ff:fe00:8217%dwc0 prefixlen 64 scopeid 0x11
# ping google.com
PING google.com (142.250.201.174): 56 data bytes
64 bytes from 142.250.201.174: icmp_seq=0 ttl=116 time=3 ms
64 bytes from 142.250.201.174: icmp_seq=1 ttl=116 time=3 ms
64 bytes from 142.250.201.174: icmp_seq=2 ttl=116 time=3 ms
64 bytes from 142.250.201.174: icmp_seq=3 ttl=116 time=3 ms
----google.com PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 3/3/3 ms variance = 0 ms
ETH1
interface is calledfec0
# SOCK=/alt ifconfig fec0
fec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:19:b8:00:82:16
media: Ethernet autoselect (1000baseT full-duplex,flowcontrol)
status: active
inet 192.168.1.72 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::219:b8ff:fe00:8216%fec0 prefixlen 64 scopeid 0x11
# SOCK=/alt ping google.com
PING google.com (142.250.201.174): 56 data bytes
64 bytes from 142.250.201.174: icmp_seq=0 ttl=116 time=4 ms
64 bytes from 142.250.201.174: icmp_seq=1 ttl=116 time=4 ms
64 bytes from 142.250.201.174: icmp_seq=2 ttl=116 time=4 ms
64 bytes from 142.250.201.174: 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/4 ms variance = 0 ms
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/emmc6
/dev/emmc0t12 /dev/emmc3 /dev/emmc7
/dev/emmc0t179 /dev/emmc4 /dev/sd0
/dev/emmc1 /dev/emmc5 /dev/sd0t131
# mount -t dos -o exe=all /dev/emmc0t12 /emmc-fat/
# ls -l /emmc-fat/
total 17885
-rwxrwxrwx 1 root root 198 Jun 21 2024 boot.scr
-rwxrwxrwx 1 root root 9156408 Jun 28 2024 qnx-ifs
# mount -t qnx6 /dev/emmc0t179 /emmc-qnx/
# ls -l /emmc-qnx/
total 24
drwxrwxr-x 3 root root 4096 Jun 28 2024 etc
drwxrwxr-x 2 root root 4096 Jun 28 2024 scripts
drwxrwxr-x 3 root root 4096 Jun 28 2024 var
USB Host support
All the USB Host ports of the Nitrogen93 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 /dev/ser2 /dev/ser6 /dev/ser8
# ls /dev/i2c*
/dev/i2c1 /dev/i2c2 /dev/i2c3
# ls /dev/spi*
/dev/spi1 /dev/spi3
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
We also provide a similar approach for the PCAL6534 GPIO expander that is present on the SMARC in order to easily set/clear pins connected to it:
# use gpio-pcal6534
gpio-pcal6534 - Utility for the PCAL6534 GPIO expander
Usage:
gpio-pcal6534 -a i2c_addr -b i2c_bus -p pin [options]
Options:
-a i2c_addr Set the PCAL6534 I2C address
-b i2c_bus Set the PCAL6534 I2C bus index
-p pin Set the GPIO pin number being accessed
-i Configure the specified GPIO pin as an input
-o Configure the specified GPIO pin as output and set its state
-w state Set the output state of the specified GPIO pin
Examples:
- Configure GPB7 as an input
gpio-pcal6534 -a 0x20 -b 6 -p 15 -i
- Configure GPA6 as an output high
gpio-pcal6534 -a 0x20 -b 6 -p 6 -o1
- Print the state of GPA6
gpio-pcal6534 -a 0x20 -b 6 -p 6
CAN support
The BSP includes the CAN driver for the i.MX 93 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
Display support
The BSP supports LVDS output which can be tested using the sw-vsync
application using either our BD070LIC3 or BD101LIC3:
# sw-vsync
sw-vsync self layout 0
319 frames in 5.000 seconds = 63.800 FPS
319 frames in 5.012 seconds = 63.647 FPS
During that test, your display should look like below:
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 which allows to boot from either SD or eMMC.
You can flash it using fastboot
:
fastboot flash bootloader images/ipl-nitrogen93-smarc.imx
Then the boot log should look like the following:
Boot device: eMMC chip
NOTICE: BL31: v2.6(release):android-13.0.0_1.0.0-rc2-0-g80f5da009
NOTICE: BL31: Built : 13:30:26, Dec 1 2022
Welcome to QNX Neutrino Initial Program Loader for Ezurio Nitrogen93 SMARC
ATF commit: 80f5da0
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'.
eMMC download...
load image done.
Found image @ 0x88000FA0
Jumping to startup @ 0x80801800
board_smp_num_cpu: 2 cores
board_smp_num_cpu: 2 cores
board_smp_num_cpu: 2 cores
board_smp_num_cpu: 2 cores
Welcome to QNX Neutrino 7.1.0 on the Ezurio Nitrogen93 SMARC board
...
QNX Momentics IDE integration
This BSP can be imported by the QNX Momentics IDE:
Then the BSP can be modified and built as needed:
Finally, the IDE brings many tools that can be used to profile the system while it is running:
DDR variants
This BSP can be built for Nitrogen93 SMARC platforms with either 1GB or 2GB of LPDDR4.
By default, the build considers 1GB of LPDDR4, in order to change to 2GB you need to set an environment variable to build the BSP:
$ source /opt/qnx710/qnxsdp-env.sh
$ DDR_SIZE=2048 make
Or if you use the IDE, you can add a build variable in the project properties as shown below: