NXP i.MX 8 series of application processors support running ArmV8a 64-bit and ArmV7a 32-bit user space programs. A Hello World program that prints the size of a long int is cross-compiled as 32-bit and as 64-bit from an Ubuntu host and then each is copied to MCIMX8MQ-EVK and run. Resources: Ubuntu 18.04 LTS Host i.MX 8M Evaluation Kit|NXP MCIMX8MQ-EVK Linux Binary Demo Files - i.MX 8MQuad EVK L4.9.88_2.0.0_GA release Source Code: Create a file with contents below using your favorite editor, example name hello-sizeInt.c. #include <stdio.h>
int main ( int argc , char * * argv )
printf ( "Hello World, size of long int: %zd\n" , sizeof ( long int ) ) ;
return 0 ;
} Ubuntu host packages: $ sudo apt - get install - y gcc - arm - linux - gnueabihf
$ sudo apt - get install - y gcc - aarch64 - linux - gnu Line 1 installs the ArmV7a cross-compile tools: arm-linux-gnueabihf-gcc is used to cross compile on Ubuntu host Line 2 install the ArmV8a cross-compile tools: aarch64-linux-gnu-gcc is used to cross compile on Ubuntu host Create Linux User Space Applications Build each application and use the static option to gcc to include run time libraries. Build ArmV7a 32-bit application: $ arm - linux - gnueabihf - gcc - static hello - sizeInt . c - o hello - armv7a - static Build ArmV8a 64-bit application: $ aarch64 - linux - gnu - gcc - static hello - sizeInt . c - o hello - armv8a - static Copy Hello applications from Ubuntu host and run on MCIMX8MQ-EVK Using a SDCARD written with images from L4.9.88_2.0.0 Linux release (see resources for image link), power on EVK with Ethernet connected to network and Serial Console port which was connected to a windows 10 PC. Launched a terminal client (TeraTerm) to access console port. Login credentials: root and no password needed. Since Ethernet was connected a DHCP IP address was acquired, 192.168.1.241 on the EVK. On the Ubuntu host, secure copy the hello applications to EVK: $ scp hello - armv7a - static root@ 192.168 . 1.241 : ~ /
hello - armv7a - static 100 % 389KB 4 . 0MB / s 00 : 00
$ scp hello - armv8a - static root@ 192.168 . 1.241 : ~ /
hello - armv8a - static 100 % 605KB 4 . 7MB / s 00 : 00 Run: root @imx8mqevk : ~ # ./hello-armv8a-static
Hello World , sizeof long int : 8
root @imx8mqevk : ~ # ./hello-armv7a-static
Hello World , sizeof long int : 4
Some customer need to know how to add support RS485 mode half duplex? Here give some recommends. About i.MX6 UART to RS485 applications 1. Using RS485 mode of UART directly. On hardware, you should use UART_CTS_B to control RX & TX. On software, The link for you reference: Does UART in RS485 mode support only 9 Bit mode for i.MX6 ? 2. Sensing IO direction Automatically via hardware, don't need to tune software. For i.MX8QXP As the linux BSP for i.MX8QXP do not support RS 485 mode, so for the RS 485 using you can use the Sensing IO direction Automatically via hardware, don't need to tune software. As the above i.MX6 design.
For IMX8QM and iMX8QXP, the DDR config is in SCFW porting kit with DDR script. After boot, for iMX8QM, the LPDDR4 clock is set to 1.6GHz, and for iMX8QXP, after boot, the LPDDR4 clock is set to 1.2GHz. Their clock source is a HPPLL (High Performance PLL) , the HPPLL work frequency range is 1.25GHz to 2.5GHz. But for some product, due to some EMC signal test requirement, sometimes we need adjust the DDR clock a little, the attached patches can be used as reference to do such test. iMX8QM: HPPLL = 1600MHz, DRC clock = 800MHz, DDR clock = 1600MHz. iMX8QXP: HPPLL = 2400MHz, DRC clock = 600MHz, DDR clock = 1200MHz. After applied attached two reference patches in SCFW porting kit, they will be: iMX8QM: HPPLL = 1584MHz, DRC clock = 792MHz, DDR clock = 1584MHz. iMX8QXP: HPPLL = 2388MHz, DRC clock = 597MHz, DDR clock = 1194MHz. If you want to try set other clock frequency for iMX8QM, you can change the followed lines: ...... uint32_t rate2 = SC_792MHZ; /* DRC clock */ ...... DSC_AIRegisterWrite(0x12,0,4,0x00000084); /* DRC_0: (24M*0x84/2) = 1584M, valid dividder: 0x68~0xD0 */ //This is the HPPLL frequency ...... DSC_AIRegisterWrite(0x28,0,4,0x00000084); /* DRC_1: (24M*0x84/2) = 1584M, valid dividder: 0x68~0xD0 */ //This is the HPPLL frequency ...... If you want to try set other clock frequency for iMX8QXP, you can change the followed lines: ...... uint32_t rate2 = 597000000U; /* DRC clock */ ...... DSC_AIRegisterWrite(0x24,0,4,0x000000C7); /* DRC_0: (24M*0xC7/2) = 2388M, valid dividder: 0x68~0xD0 */ //This is the HPPLL frequency ......