Introduction: Hardware is the skeleton, software is the soul
The ECK20-6Y28C core board runs a complete Linux system, and software developers can perform full-stack development from the low-level drivers to the upper-layer applications based on it. This article introduces the software development process based on this core board.
II. Development environment and resources
The software resources of the ECK20-6Y28C are very rich. Its base system is based on:
- Operating system: Ubuntu 20.04
- U-Boot: 2020.04
- Linux kernel: 5.10.9
- Build system: Yocto gatesgarth
Developers can compile code on a PC using the cross-compilation toolchain, and then use the flashing tool uuu to burn the image to the core board. In addition, the Config Tools for i.MX V15 can be used to graphically configure I/O pins.
Boot flow and configuration
- Boot ROM: After power-on, the processor first executes the internal Boot ROM program.
- BOOT_MODE: The BOOT_MODE0/1 pins determine the boot mode by their level (usually set to Internal Boot).
- Boot device: The CPU reads the level states of the LCD_DATA0-23 pins to decide from which device to boot (such as eMMC, NAND, or SD card). The core board has already added pull-down resistors internally to the LCD_DATA pins; the carrier board only needs to configure a few individual pins.
Key drivers and functional development
- Storage driver: The drivers for eMMC or NAND Flash are integrated in the kernel. Note that for the eMMC scheme, the USDHC2 interface only supports a maximum clock frequency of 50 MHz, which needs to be correctly configured in software.
- Network driver: The core board brings out 2 channels of Ethernet MAC; the RMII interface needs to be configured in the carrier board PHY chip driver.
- Display driver: It supports a parallel LCD with a resolution of up to 1366×768. The LCD timing needs to be configured according to the screen parameters.
- Watchdog: It supports the on-chip watchdog. When it times out, it can produce a low-level pulse of about 1.6 ms on the RESETN pin, causing a system reset.
- RTC: It supports the on-chip RTC, but NXP recommends using an external RTC circuit to extend battery life.
Application development example: building a simple data collector
Objective: read sensor data through UART and upload it to a cloud platform through Ethernet.
Steps:
- Design an RS485 interface on the carrier board and connect the sensor.
- Write a C program in Linux and use the
open()function to open the UART device file. - Read the sensor data and parse it.
- Use libcurl or the MQTT library to package the data into JSON format and send it to the server through Ethernet.
- After compilation and cross-compilation, copy the executable to the core board and run it.
Based on the ECK20-6Y28C, the software development process is clear and the resources are rich. Developers can get started quickly and build a complete embedded system from low-level boot to upper-layer application.
Leave a comment