Skip to content

Commit 476c120

Browse files
authored
Merge pull request #2275 from armwaheed/linux-nxp-board
Adding learning path for Linux on an NXP board
2 parents 9525c4b + 5dcb87d commit 476c120

12 files changed

Lines changed: 550 additions & 0 deletions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Overview
3+
weight: 2
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Hardware Overview - NXP's FRDM i.MX 93 Board
10+
11+
Selecting the best hardware for machine learning (ML) models depends on effective tools. You can visualize ML performance early in the development cycle by using NXP's [FRDM i.MX 93](https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93) board.
12+
13+
<center>
14+
<iframe src='//players.brightcove.net/4089003392001/Sk5u9ln3l_default/index.html?videoId=6366294691112' allowfullscreen frameborder=0 width="800" height="400"></iframe>
15+
16+
*Unboxing NXP's FRDM i.MX 93 board*
17+
</center>
18+
19+
![NXP FRDM i.MX 93 Board SoC Highlighted alt-text#center](./nxp-frdm-imx93-board-soc-highlighted.png "Arm Ethos-U65 NPU location")
20+
21+
### NXP's FRDM i.MX 93 Processor Decoded
22+
23+
![i.MX 93 Processor SoC alt-text#center](./imx93-application-processor-soc.png "NXP's FRDM i.MX 93 processor")
24+
25+
**NXP's Processor Labeling Convention:**
26+
|Line|Meaning|
27+
|----|-------|
28+
|MIMX9352|• MI – Microcontroller IC<br>• MX93 – i.MX 93 family<br>• 52 – Variant:<br>• Dual-core Arm Cortex-A55<br> • Single Cortex-M33<br>• Includes **Ethos-U65 NPU**|
29+
|CVVXMAB|• C - Commercial temperature grade (0°C to 95°C)<br>• VVX - Indicates package type and pinout (BGA, pitch, etc.)<br>• MAB - Specific configuration (e.g., NPU present, security level, memory interfaces)
30+
|
31+
|1P87F|• Silicon mask set identifier|
32+
|SBBM2410E|• NXP traceability code|
33+
34+
## Benefits and applications
35+
36+
NPUs, like Arm's [Ethos-U65](https://www.arm.com/products/silicon-ip-cpu/ethos/ethos-u65) NPU are available on physical devices specifically made for developers. Development boards like NXP's [FRDM i.MX 93](https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93) also connect to displays via a HDMI cable. Additionally the board accepts video inputs. This is useful for for ML performance visualization due to:
37+
- visual confirmation that your ML model is running on the physical device,
38+
- image and video inputs for computer vision models running on the device,
39+
- clearly indicated instruction counts,
40+
- confirmation of total execution time and
41+
- visually appealing output for prototypes and demos.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
# User change
3+
title: "Boot the NXP FRDM i.MX 93 Board"
4+
5+
weight: 3
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
In this section, you will prepare the NXP [FRDM i.MX 93](https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93) board for ML development.
12+
13+
## Unbox the NXP Board
14+
15+
Follow NXP's getting started instructions: [Getting Started with FRDM-IMX93](https://www.nxp.com/document/guide/getting-started-with-frdm-imx93:GS-FRDM-IMX93):
16+
* Stop when you complete section "1.6 Connect Power Supply"
17+
18+
## Connect to the NXP Board
19+
20+
Prior to logging in to the NXP board, you need to configure `picocom`. This allows you to connect to the board using a USB cable.
21+
22+
{{% notice macOS %}}
23+
24+
1. Install the Silicon Labs driver:
25+
26+
https://www.silabs.com/developer-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads
27+
28+
2. Install [picocom](https://github.com/npat-efault/picocom):
29+
```bash
30+
brew install picocom
31+
```
32+
33+
3. Establish a USB-to-UART (serial) connection:
34+
- Connect the board's "DEBUG" USB-C connector to your Mac
35+
- Find the NXP board's USB connections in your computer's terminal:
36+
```bash { output_lines = "2-7" }
37+
ls /dev/tty.*
38+
# output lines
39+
...
40+
/dev/tty.debug-console
41+
/dev/tty.usbmodem56D70442811
42+
/dev/tty.usbmodem56D70442813
43+
...
44+
```
45+
46+
- Connect to the NXP board:
47+
```bash { output_lines = "2-5" }
48+
sudo picocom -b 115200 /dev/tty.usbmodem56D70442811
49+
# output lines
50+
picocom v3.1
51+
...
52+
Terminal ready
53+
```
54+
55+
4. Go straight to step 2, in the below instructions
56+
57+
{{% /notice %}}
58+
59+
1. Establish a USB-to-UART (serial) connection:
60+
- Connect the board's "DEBUG" USB-C connector to your Linux machine
61+
- Find the NXP board's USB connections in your computer's terminal:
62+
```bash { output_lines = "2-3" }
63+
ls /dev/ttyUSB* /dev/ttyACM* 2>/dev/null
64+
# output lines
65+
/dev/ttyACM0 /dev/ttyACM1
66+
```
67+
68+
- Connect to the NXP board:
69+
```bash { output_lines = "2-5" }
70+
sudo picocom -b 115200 /dev/ttyACM0
71+
# output lines
72+
picocom v3.1
73+
...
74+
Terminal ready
75+
```
76+
2. Log in to Linux on the NXP board:
77+
- Connect the board's "POWER" USB-C connector to your laptop
78+
- At this point you should see one red and one white light on the board
79+
- Next you should see scrolling text in your `picocom` window, as the NXP board boots
80+
- The last line should say `login:`
81+
```bash { output_lines = "1-9" }
82+
# output lines
83+
...
84+
[ OK ] Reached target Graphical Interface.
85+
Starting Record Runlevel Change in UTMP...
86+
[ OK ] Finished Record Runlevel Change in UTMP.
87+
88+
NXP i.MX Release Distro 6.6-scarthgap imx93frdm ttyLP0
89+
90+
imx93frdm login:
91+
```
92+
3. Type `root` to log in as root. There is no password
93+
94+
### Troubleshooting
95+
* Restart the NXP board, to get to the `login:` prompt:
96+
* Hold the NXP board's power button for 2-seconds, until the lights turn off
97+
* Hold the NXP board's power button again for 2-seconds, until the lights turn on
98+
99+
## [Optional] Run the Built-In NXP Demos
100+
* Connect the NXP board to a monitor via HDMI
101+
* Connect a mouse to the NXP board's USB-A port
102+
103+
![NXP board built-in ML demos alt-text#center](./nxp-board-built-in-ml-demos.png "NXP board built-in ML demos")
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# User change
3+
title: "Create a Linux Super User"
4+
5+
weight: 4
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
On the NXP board, create a non-root super user (if you do not already have one):
12+
13+
1. While [logged in as root]( {{< relref "2-boot-nxp.md" >}} ):
14+
15+
* Enable super user privileges:
16+
```bash
17+
sudo visudo
18+
```
19+
* In the vi editor that opens up, uncomment the below line:
20+
```bash { output_lines = "1" }
21+
%wheel ALL=(ALL:ALL) ALL # uncomment this line
22+
```
23+
24+
2. Add a super user:
25+
```bash
26+
sudo adduser testuser
27+
sudo usermod -aG wheel testuser
28+
```
29+
30+
3. While still logged in as root, confirm successful super user creation:
31+
```bash
32+
su - testuser
33+
sudo whoami # should return "root"
34+
```
35+
36+
4. Log out of the NXP board and log back in to Linux as the super user
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
# User change
3+
title: "Enable WiFi"
4+
5+
weight: 5 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
{{% notice Note %}}
12+
13+
* WiFi network connectivity **does not persist** on NXP board reboot
14+
* It **does persist** on logging out and then logging back in as the same Linux user
15+
16+
{{% /notice %}}
17+
18+
1. [Log in to Linux]( {{< relref "2-boot-nxp.md" >}} ) on the board, as a [super user]( {{< relref "3-create-super-user" >}} )
19+
20+
2. Run the below terminal commands:
21+
```bash
22+
sudo /usr/sbin/modprobe moal mod_para=nxp/wifi_mod_para.conf
23+
sudo connmanctl
24+
```
25+
26+
3. The prompt will change to `connmanctl>`, where you will enter the following commands:
27+
28+
```bash
29+
enable wifi
30+
scan wifi
31+
services
32+
```
33+
34+
4. Your available WiFi networks will be listed in the following form:
35+
36+
```bash { output_lines = "1-3" }
37+
<SSID> wifi_0123456789ab_cdef0123456789_managed_psk
38+
<SSID> wifi_abcdef012345_6789abcdef0123_managed_psk
39+
<SSID> wifi_fedcba987654_3210fedcba9876_managed_psk
40+
```
41+
42+
{{% notice Note %}}
43+
44+
Duplicate SSIDs may appear, so you will have to experiment with the different `wifi_..._managed_psk` names, when you try to connect in the next step
45+
46+
{{% /notice %}}
47+
48+
5. Still within the `connmanctl>` prompt, enter the following commands:
49+
50+
```bash
51+
agent on
52+
connect wifi_0123456789ab_cdef0123456789_managed_psk # Your wifi_..._managed_ps name will be different
53+
Agent RequestInput wifi_0123456789ab_cdef0123456789_managed_psk
54+
Passphrase = [ Type=psk, Requirement=mandatory ]
55+
Passphrase? # Enter your WiFi password
56+
connmanctl> quit
57+
```
58+
59+
6. Assuming your WiFi network is connected to the Internet, test connectivity:
60+
61+
```bash
62+
curl -I http://www.example.com
63+
```
64+
65+
If WiFi is configured correctly, you will see the example.com web page load:
66+
67+
```bash { output_lines = "1-2" }
68+
HTTP/1.1 200 OK
69+
...
70+
```
71+
72+
7. [optional] If your WiFi network is not connected to the internet, test connectivity this way:
73+
74+
```bash
75+
ifconfig | grep RUNNING -A 1
76+
```
77+
78+
If WiFi is configured correctly, you will see a list of `RUNNING` network adapters:
79+
* one for `127.0.0.1` (`localhost`) and
80+
* a second for the NXP board's assigned IP address on the WiFi network
81+
* Example output, where `192.168.1.89` is the NXP board's successfully assigned IP address:
82+
```bash { output_lines = "1-5" }
83+
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
84+
inet 127.0.0.1 netmask 255.0.0.0
85+
--
86+
mlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
87+
inet 192.168.1.89 netmask 255.255.255.0 broadcast 192.168.1.255
88+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
# User change
3+
title: "Transfer Files Over WiFi"
4+
5+
weight: 6 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
1. [Log in to Linux]( {{< relref "2-boot-nxp.md" >}} ) on the board, as a [super user]( {{< relref "3-create-super-user" >}} )
12+
13+
2. [Enable Wifi]( {{< relref "4-enable-wifi.md" >}} ) on the NXP board
14+
15+
3. Note down the NXP board's IP address on your WiFi network:
16+
```bash
17+
ifconfig | grep RUNNING -A 1
18+
```
19+
20+
4. Open a terminal window on the machine with the source file
21+
22+
5. Navigate to the source file directory and copy the file to the NXP board's destination directory:
23+
```bash
24+
# On your machine, in the source file directory
25+
scp <source_file> <nxp_user>@<nxp_ip_address>:/home/nxp_user/path/to/destination/directory/
26+
```
27+
Example:
28+
```bash { output_lines = "1" }
29+
scp install.sh testuser@192.168.1.1:/home/testuser/apps/test_app/
30+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# User change
3+
title: "Transfer Files Over USB"
4+
5+
weight: 7 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
1. [Log in to Linux]( {{< relref "2-boot-nxp.md" >}} ) on the board, as a [super user]( {{< relref "3-create-super-user" >}} )
12+
13+
2. On your machine with the source file, copy the source file to a USB-A thumb drive:
14+
15+
3. Insert the thumb drive into the NXP board's USB-A port
16+
17+
4. Mount the thumb drive and then copy the files to the board:
18+
```bash { output_lines = "1" }
19+
# Execute these commands on the board
20+
mount /dev/sda1 /mnt
21+
cp /mnt/<source_file> /path/to/destination/directory/
22+
```
23+
24+
Example:
25+
```bash { output_lines = "1" }
26+
cp /mnt/install.sh ./apps/test_app/
27+
```
28+
29+
5. [optional] Unmount the thumbdrive and then remove it from the NXP board
30+
```bash
31+
umount /mnt
32+
```

0 commit comments

Comments
 (0)