Differences Between MCU Development and ARM-Linux Development

Differences Between MCU Development and ARM-Linux Development

For ARM-Linux program development, it is mainly divided into three categories: application development, driver development, and system kernel development. Each type of software development has its own characteristics.Today, we will look at the differences between ARM-Linux development and MCU development, as well as the basic development environment for ARM-Linux.1. Differences Between ARM-Linux Application Development and MCU DevelopmentFirst, it should be noted that there are mainly two ways to develop applications for ARM: one is to develop applications directly on the ARM chip without using an operating system, also known as bare-metal programming. This development method is mainly applied to some low-end ARM chips and is very similar to MCU development, so it will not be elaborated here.The other method is to run an operating system on the ARM chip, where hardware operations require writing corresponding driver programs, and application development is based on the operating system. This method of embedded application development is quite different from MCU development. The main differences between ARM-Linux application development and MCU development are as follows:(1) Different Hardware Devices for Application Development EnvironmentMCU:Development board, emulator (debugger), USB cable;ARM-Linux:Development board, network cable, serial cable, SD card;For ARM-Linux development, there is usually no hardware debugger, especially during application development, where hardware debuggers are rarely used. Program debugging is mainly done through the serial port; however, it should be noted that there are hardware emulators for ARM chips, but they are usually used for bare-metal development.(2) Different Program Download MethodsMCU:Downloaded via emulator (debugger) or serial port;ARM-Linux: Download via serial port, tftp network download, or directly read/write SD, MMC cards, etc., to achieve program download;This is directly related to the hardware devices in the development environment. Due to the lack of hardware emulators, ARM-Linux development usually does not use emulator downloads; while this may seem inconvenient, it actually provides more download methods for ARM-Linux application development.(3) Different Hardware Resources of ChipsMCU:Typically a complete computer system, including on-chip RAM, on-chip FLASH, and various peripherals such as UART, I2C, AD, DA;ARM:Typically only the CPU, requiring external circuits to provide RAM for the ARM to operate normally, with external circuits providing FLASH, SD cards, and other storage systems, and implementing various peripheral functions through external circuits. Due to the strong processing capability of ARM chips, various complex functions can be implemented through external circuits, far surpassing those of MCUs.(4) Different Storage Locations for FirmwareMCU:Typically equipped with on-chip flash memory, where firmware programs are usually stored. If the firmware is large, external circuits need to be designed to use external flash for firmware storage.ARM-Linux:Due to the lack of on-chip flash and the need to run an operating system, the entire system image is usually large, so the operating system image and applications for ARM-Linux development are typically stored on external MMC, SD cards, or using SATA devices, etc.(5) Different Boot MethodsMCU:Its structure is simple, with internal flash integrated. Typically, the chip manufacturer adds fixed jump instructions to the program upon power-up, directly jumping to the program entry (usually in flash); the developed application program is compiled and directly downloaded to the corresponding address space using a dedicated download tool; thus, after powering on, the system directly runs to the corresponding program entry, achieving system startup.ARM-Linux:Due to the use of ARM chips, which have high execution efficiency and powerful functions, and relatively rich peripherals, it is a powerful computer system that requires running an operating system. Therefore, its boot method is quite different from that of MCUs, but is basically the same as that of home computers. Its startup generally includes stages such as BIOS, bootloader, kernel startup, and application startup;(a) Boot BIOS:BIOS is the corresponding startup information set by the device manufacturer (chip or circuit board manufacturer). After the device is powered on, it reads the corresponding hardware device information, initializes the hardware devices, and then jumps to the location of the bootloader (this location is a fixed position set by the BIOS). (Based on personal understanding, the BIOS startup is similar to that of MCUs, requiring the use of corresponding hardware debuggers to write firmware, stored in a certain flash space. After the device is powered on, it reads the instructions from the flash space to start the BIOS program.)(b) Boot Bootloader:This part belongs to the embedded Linux software development section, where the corresponding bootloader program can be customized by modifying the code. The bootloader is usually downloaded using direct read/write methods to the SD card. That is, after writing a customized bootloader and compiling it to generate the bootloader image file, tools (dedicated or general) are used to download it to the MBR area of the SD card (usually the first sector of the storage area). At this point, it is necessary to set in the BIOS or through the hardware circuit of the circuit board to select the loading position of the bootloader; if the BIOS is set to boot from the SD card, then after the BIOS initialization is complete, it will jump to the SD card location to execute the bootloader, thus achieving the bootloader startup.The main function of the bootloader is to initialize the necessary hardware devices, create some information needed by the kernel, and pass this information to the kernel through relevant mechanisms, thereby bringing the system’s software and hardware environment to a suitable state, ultimately calling the operating system kernel, effectively booting and loading the kernel.(c) Boot Kernel:After the bootloader completes the initialization and related work, it will call the kernel startup program. This enters the actual startup of the operating system-related content, including the startup of the corresponding hardware configuration, task management, resource management, and other kernel programs.(d) Boot Application:After the operating system kernel starts, the required applications can be started to complete the actual business operations.2. Basic Development Environment for ARM-LinuxHaving introduced the differences between ARM-Linux application development and MCU development, you should now have a basic understanding of ARM-Linux application development. Next, we will introduce the basic development environment for ARM-Linux, which mainly includes hardware and software environments, using iMX53 and Ubuntu as examples.(1) Hardware EnvironmentDevelopment Board:The hardware environment running ARM, or the corresponding ARM circuit board for the project;Computer:Used as the development host, installing Linux (such as Ubuntu), or using a virtual machine to install Ubuntu;Serial Cable:Used for terminal serial debugging or program downloading during development;Network Cable:Used to connect the ARM board and the development host, enabling tftp download of the kernel (programs, etc.), and running programs via the network nfs.SD Card (and Card Reader) or Other Storage Devices:Used to store bootloader, kernel images, etc., as well as the final software system storage; during development, it is usually used to save the bootloader and boot the system.(2) Software EnvironmentUbuntu:As the operating system, it serves as the carrier for the entire software development environment, where the corresponding development tools are set up.LTIB:This is a compilation toolchain provided by Freescale, which can conveniently compile source code files into suitable program code and debug the programs; users can also download the source code to build their own compilation toolchain.tftp:Used to download kernel files, application files, etc., from the development host Ubuntu to the ARM board.nfs Network File System:Used to establish a network nfs root file system on the development host, allowing the ARM board to read the virtual root file system on the development host via the nfs network file system, completing system startup; facilitating system development and debugging.minicom:A serial debugging tool used to communicate with the ARM board on the development host, enabling operations and debugging of applications on the ARM board;Eclipse:An integrated development environment, mainly facilitating code editing, compilation, etc. DS5, RealView, or gedit can also be used for editing, with compilation and management done through LTIB.

Differences Between MCU Development and ARM-Linux Development

Differences Between MCU Development and ARM-Linux Development

Screenshots of Some E-books

Differences Between MCU Development and ARM-Linux Development

【Complete Set of Hardware Learning Materials Collection】

Differences Between MCU Development and ARM-Linux Development

Leave a Comment