Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between ARM-Linux development and MCU development

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how ARM-Linux development and MCU development are different. The content of the article is of high quality, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.

ARM-Linux program development is divided into three categories: application development, driver development and system kernel development. Different types of software development have different characteristics. Today we'll look at the differences between ARM-Linux development and MCU development, as well as the basic ARM-Linux development environment.

1. ARM-Linux application development and MCU development are different

Here we must first make a note, for ARM application development there are two main ways: one is directly on the ARM chip application development, do not use the operating system, also known as bare metal programming, this development method is mainly applied to some low-end ARM chip, its development process is very similar to the microcontroller, here is not much description. Another is to run the operating system on the ARM chip, for the operation of the hardware needs to write the corresponding driver, application development is based on the operating system, this way of embedded application development and MCU development is quite different. ARM-Linux application development and MCU development mainly have the following differences:

(1) Different hardware devices in application development environment

SCM: development board, simulator (debugger), USB line;

ARM-Linux: development board, network cable, serial cable, SD card;

For ARM-Linux development, there is usually no hardware debugger, especially in the process of application development, hardware debugger is rarely used, and debugging of programs is mainly through serial port; however, it should be noted that there is also a hardware emulator for ARM chips, but it is usually used for bare metal development.

(2) Different download methods

MCU: emulator (debugger) download, or serial port download;

ARM-Linux: serial port download, tftp network download, or directly read and write SD, MMC card and other storage devices, to achieve program download;

This is directly related to the hardware equipment of the development environment. Since there is no hardware emulator, ARM-Linux development usually does not use emulator download; this seems inconvenient, but actually provides more download methods for ARM-Linux application development.

(3) Different hardware resources of chips

MCU: usually a complete computer system, including on-chip RAM, on-chip FLASH, and UART, I2C, AD, DA and other peripherals;

ARM: usually only CPU, need external circuit to provide RAM for ARM normal operation, external circuit to provide FLASH, SD card and other storage system images, and through external circuits to achieve various peripheral functions. Because ARM chip processing ability is very strong, through the external circuit can achieve a variety of complex functions, its function is far stronger than the microcontroller.

(4) Different storage locations of firmware

MCU: usually has on-chip flash memory, firmware program is usually stored in this area, if the firmware is larger, it is necessary to design an external flash for storing firmware through an external circuit.

ARM-Linux: Since it has no on-chip flash and needs to run the operating system, the entire system image is usually large, so the operating system image and application developed by ARM-Linux are usually stored on an external MMC, SD card, or SATA device.

(5) Different starting methods

MCU: its structure is simple, internal integration flash, usually chip manufacturers in the program when the power-on fixed jump instructions, directly jump to the program entry (usually in flash); the development of the application program compiled by the compiler, using a dedicated download tool directly downloaded to the corresponding address space; so the system after power-on directly run to the corresponding program entry, to achieve system startup.

ARM-Linux: Due to the use of ARM chips, high execution efficiency, powerful functions, relatively rich peripherals, is a powerful computer system, and needs to run the operating system, so its startup mode and MCU have a big difference, but and home computer startup mode is basically the same. Its startup generally includes BIOS, bootloader, kernel startup, application startup and so on.

(a)Boot BIOS: BIOS is the corresponding boot information set by the device manufacturer (chip or circuit board manufacturer). After the device is powered on, it will read the corresponding hardware device information, initialize the hardware device, and then jump to the location of the bootloader (this location is a fixed location and is set by BIOS). (According to personal understanding, BIOS startup is similar to MCU startup, and it is necessary to use the corresponding hardware debugger to write firmware, store it in a certain flash space, and read the instructions of flash space after the device is powered on to start the BIOS program.)

(b)Boot loader: This part is already part of embedded Linux software development, you can customize the corresponding bootloader program through code modification, bootloader download is usually directly read and write SD card and other ways. That is, write a customized bootloader, compile and generate a bootloader image file, and download it to the MBR area of the SD card (usually the first sector of the storage area) using a tool (dedicated or general). At this time, you need to set it in BIOS, or select the loading position of bootloader through the hardware circuit setting of the circuit board; if the BIOS is set to boot from SD card, after BIOS initialization, it will jump to the position of SD card to execute bootloader, so as to realize the boot of bootloader.

Bootloader is mainly used to initialize the necessary hardware devices, create some information needed by the kernel and transfer these information to the kernel through relevant mechanisms, so as to bring the software and hardware environment of the system to a suitable state, and finally call the operating system kernel, which really plays the role of booting and loading the kernel.

(c)Boot kernel: After bootloader startup completes initialization and other related work, the kernel startup program will be called. This will enter the actual operating system related content startup, including the corresponding hardware configuration, task management, resource management and other kernel programs startup.

(d)Start the application: After the operating system kernel is started, you can start the required application to complete the real business operation.

2. Arm-Linux Basic Development Environment

In front of the introduction of ARM-Linux application development and MCU development differences, I believe you have a basic understanding of ARM-Linux application development, the following will introduce ARM-Linux basic development environment. It mainly includes two parts: hardware environment and software environment. Here, iMX53 and Ubuntu are taken as examples to explain.

(1) Hardware environment

Development board: ARM hardware environment, or ARM circuit board of corresponding project;

Computer: used as a development host with Linux installed (e.g. Ubuntu), or virtual machine with Ubuntu installed;

Serial port line: used for serial port debugging or downloading programs using terminals in the development process;

Network cable: used to connect arm-board and development host, realize tftp download kernel (program, etc.), run program through network nfs, etc.

SD card (and card reader) or other storage device: used to store bootloader, kernel image, etc., and the storage of the final software system; during development, it is usually used to save bootloader and boot the system.

(2) Software environment

Ubuntu: As an operating system, it is the carrier of the entire software development environment, and the corresponding development tools are arranged in this system.

LTIB: This is a compilation tool chain provided by freescale, which can easily compile source code files into suitable program code and debug programs; users can also build their own compilation tool chain by downloading source code.

tftp: Used to download kernel files, application files, etc. from the development host Ubuntu to arm-board.

nfs network file system: used to establish a network nfs file root system on the development host, arm-board reads the virtual root file system on the development host through the nfs network file system to complete the system startup; convenient system development and debugging.

minicom: serial debugging tool, used to communicate with arm-board on the development host, to achieve the operation and debugging of arm-board applications;

Eclipse: Integrated development environment, mainly convenient code editing, compilation, etc., can also be used DS5, RealView, etc.; or use gedit to edit, compile and manage through LTIB. What is the difference between ARM-Linux development and MCU development is shared here. I hope the above content can be helpful to everyone and learn more. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report