QNX SDP 8.0 BSP release for Nitrogen93 SMARC QNX SDP 8.0 BSP release for Nitrogen93 SMARC We are proud to present our latest QNX SDP 8.0 BSP for our Nitrogen93 SMARC board. For the impatient You can download the BSP below: BSP_ezurio-nitrogen93-smarc_br-hw-rel_be-800-v1.0.zip If you wish to test a pre-built binary before checking the BSP source code, here it is: BSP_ezurio-nitrogen93-smarc_br-hw-rel_be-800-v1.0.img.gz 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-nitrogen93-smarc_br-hw-rel_be-800-v1.0.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 QNX8.0. 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 called dwceqos0 # ifconfig dwceqos0 dwceqos0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 00:19:b8:00:82:17 inet6 fe80::23b5:a602:e9b6:d991%dwceqos0 prefixlen 64 scopeid 0x6 inet6 2001:861:3201:3d10:adc0:2a86:90ff:ee7a prefixlen 64 autoconf inet 192.168.1.76 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active nd6 options=1<PERFORMNUD> ETH1 interface is called ffec0 # ifconfig ffec0 ffec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 00:19:b8:00:82:16 inet6 fe80::9295:e517:2f09:1e59%ffec0 prefixlen 64 scopeid 0x5 inet6 2001:861:3201:3d10:cf77:4f74:bcde:b5a0 prefixlen 64 autoconf inet 192.168.1.72 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=1<PERFORMNUD> 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 13368 -rwxrwxrwx 1 root root 275 2024-10-15 16:34 boot.scr -rwxrwxrwx 1 root root 49411 2024-10-17 14:38 imx-dtb -rwxrwxrwx 1 root root 13639372 2024-10-17 15:07 qnx-ifs The QNX6 partition is mounted automatically at bootup: # mount /dev/emmc0t179 on / type qnx6 ifs on / type ifs /dev/shmem on /dev/shmem type shmem 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 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/io-spi/ spi3 All the above nodes can be accessed from your application using QNX API: UART API I2C API SPI 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: 128 Wait queue size: 16 Mode: IO Bitrate: 250000 Baud Bitrate prescaler: 20 Sync jump width: 1 Time segment 1: 7 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 The prebuilt image also includes the NXP Smart Appliance demo: # /demo/SmartAppliance 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_a1.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 OS IPL for Ezurio Nitrogen93 SMARC Board (ARM Cortex-A55) 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 Loading FDT @ 0x80600000 Jumping to startup @ 0x80801800 board_smp_num_cpu: 2 cores board_smp_num_cpu: 2 cores board_smp_num_cpu: 2 cores Welcome to QNX 8.0.0 on 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/qnx800/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: