Setting Up and Configuring CM4Stack Environment
Before setting up CM4STACK, it's necessary to download the official Raspberry Pi Imager tool. You can download the Imager for your operating system version from the Raspberry Pi official website
https://www.raspberrypi.org/software/
. Install it according to your operating system type.
Downloading the M5stack Custom Image for CM4Stack
After downloading the
CM4Stack custom image
, unzip the image file and store it in a local directory.
Burning the CM4Stack Raspberry Pi Image
To burn the custom image onto CM4Stack, prepare the following:
Software
- Install the rpiboot program
- Formatting software SDFormatter
- Burning software Raspberry Pi Imager
Software needed for Windows
- Install
rpiboot
The sequence is used to turn the CM4 device into a computer disk. At this point the rpiboot installation is complete.
Software needed for Linux
- On Linux, some programming knowledge is required. Compile the
rpiboot
tool and the libusb development library using the following commands:
sudo apt install git libusb-1.0-0-dev pkg-config
git clone --depth=1 https:
cd usbboot
make
# sudo ./rpiboot
Starting the Burning Process
Windows Operation
- Step 1: Connect the device to the computer with a USB cable while holding down the BOOT button on the device.
- Step 2: find the rpiboot.exe program that has been installed on the computer and double-click to run it. aftercomputer
- Step 3: Open the SDFormatter software, select the drive, click on options to enable size adjustment, click OK, and then format. If it fails, repeat the process until successful.
- Step 4: Open the official Raspberry Pi Imager software, click on "CHOOSE OS" and select the custom image file you previously obtained. Select the disk to burn the image onto and start the burning process. Wait patiently for the burning to complete.
- Step 5: Power on the device again to boot into the system.
Linux Operation
- Step 1: Connect the device to the computer with a USB cable while holding down the BOOT button on the device.
- Step 2: The second step is to execute the rpiboot program in rpiboot, and then a disk device appears on the computer.
sudo ./rpiboot
- Step 3: Burn the system. You can use the official Raspberry Pi Imager to burn the image, similar to the process on Windows, or directly use the dd command for burning. The command below is for reference only; please replace the disk object before using.
gunzip 2023-03-08-CM4StackOS-canary-2023-02-21-raspios-bullseye-armhf.gz
# Unzip firmware
sudo dd if=./2023-03-08-CM4StackOS-canary-2023-02-21-raspios-bullseye-armhf of=/dev/sdx bs=1M status=progress oflag=dsync
# Firmware burning
- Step 4: Power on the device again to boot into the system.
Note: By this point, the CM4STACK should already have the image burned in from the factory. The above steps are for reference if you need to reflash the device. The device comes preloaded with the image from the factory, so if not needed
, you can skip these steps.
Introduction to CM4STACK Peripheral Interfaces
- 2.0-inch IPS-LCD capacitive touch screen with a resolution of 320x240
- USB3.2-A port (pcie+ASM3042)
- USB-C (2.0) port, supporting OTG and host power supply;
- HDMI port
- Gigabit Ethernet port (RJ45)
- DC-JACK for direct current power input (12V@3A)
- HY2.0-4P expansion port for I2C and UART interfaces
- Built-in 2W speaker
- Built-in active cooling fan and aluminum alloy heat dissipation frame
Booting CM4STACK and Initial Setup
After booting CM4STACK, the first-time login requires initial setup. You can operate through SSH or HDMI connection to set up the username, password, network connection, language, and other parameters. Once the initial setup is completed, you can start using CM4STACK.
- Step 1: Connect the power supply.
- Step 2: After the CM4STACK operating system starts, press confirm in the warning window.
- Step 3: Press "Next" in the start interface to begin the initial setup.
- Step 4: Select your country, language, time zone, and press "Next".
- Step 5: Change the password, then press "Next".
If you wish to keep the default password as "raspberry," you can leave it blank and click "Next".
Step 6: Set up the screen to fill the entire display, then click "Next".
Step 7: Configure WIFI, or add it later.
Step 8: Software update prompt, this step can be skipped.
Step 9: Finally, click Done to complete the setup.