-
Cross-compilation generally refers to compiling ** that runs on a non-local machine.
In layman's terms, it is to compile the ** running on other machines, and the CPU instruction set of those machines is different from that of the compilation machine, so the compiled ** cannot be run directly on the compiler.
The compilation machine generally requires the help of a virtual machine to run the compiled **;
The most common cross-compilation is to develop mobile apps on PC, and the CPU and operating system used by the mobile phone are generally different from the root compiler. There is no shortage of mobile apps that we have compiled that can run directly under Windows or Linux, and can only be run through a virtual machine installed on a PC.
-
The concept of cross-compilation (from the encyclopedia):
To put it simply, it is to generate executable on one platform on another. The same architecture can run different operating systems; Similarly, the same operating system can run on different architectures. For example, the X86 Linux platform, which I often misjudge, is actually a collective term for the Intel x86 architecture and the Linux for x86 operating system; The x86 winnt platform is actually an abbreviation for Intel x86 architecture and Windows NT for x86 operating system.
For example, a C program written on a Linux system such as Ubuntu can run perfectly on a Windows system.
-
Compiling executable ** on one platform architecture is cross-compilation.
For example, compile an executable program for an ARM embedded device on an x86 PC.
Cross-compilation is necessary, first of all, when the system of the target device has not been booted, the bootloader of the target platform can be compiled, and obviously it can only be cross-compiled.
Also, because the target device is often too low to install the compiler, or barely installed, it is also slow like a snail.
-
The emergence and popularity of the concept of cross-compilation coincided with the widespread development of embedded systems. The computer software we commonly use needs to be compiled by compiling the ** (such as C**) written in a high-level computer language into a binary ** that the computer can recognize and execute. For example, on the Windows platform, we can use the Visual C++ development environment to write programs and compile them into executable programs.
In this way, we use Windows tools on the PC platform to develop executable programs for Windows itself, this compilation process is called native compilation, which can be understood as native compilation in Chinese.
However, when developing embedded systems, the target platform for running the program usually has limited storage space and computing power, such as the common ARM platform, which generally has a static storage space of about 16 to 32MB, while the CPU clock speed is about 100MHz to 500MHz. In this case, native compilation on the ARM platform is not possible, as the general compilation tool chain requires a lot of storage space and requires a lot of CPU computing power.
To solve this problem, cross-compilation tools came into being. Through the cross-compilation tool, we can compile executable programs for other platforms on a host platform with strong CPU power and sufficient storage space (such as a PC).
To cross-compile, we need to install the corresponding cross compilation tool chain on the host platform, and then use this cross-compilation toolchain to compile our source **, and finally generate ** that can be run on the target platform.
-
Cross-compilation.
1. On Windows PC, using ADS (ARM development environment) and ARMC compiler, you can compile executable ** for ARM CPU.
2. On the Linux PC, the arm-linux-gcc compiler can be used to compile the executable ** for the Linux ARM platform.
3. On Windows PC, use the cygwin environment to run the arm-elf-gcc compiler to compile the executable ** for the arm CPU.
4. On the Windows system, the program running on the 89C51 microcontroller was developed by using the Keil Uvison tool.
5. On the Windows system, use the CodeWarrior IDE tool to develop a program running on the Freescale XS128 microcontroller.
The meaning of this phrase is:
unknown control or wrong parameter (independent variable)". >>>More
I am also an electronics professional, the control of some hardware circuits around the periphery must be according to the underlying template program of the chip, just like the regulations must be done like that, but the underlying program must be connected by itself, which is good for the flexible application of the program, there are still more talents in this area, but there are not many people who are proficient, and there are more contacts with the writing of large programs, and program algorithms, the prospects are still good, come on!!
The serial port of 51 machine is below the low level, the high level is below 5V, the serial port of the PC is low level -12V, the high level is +12V, and the serial port communication between the 51 machine and the PC machine should add the level conversion IC >>>More
You use a P1 port to control the dynamic scanning of 8 digital tubes, and the dynamic scanning display of digital tubes needs to be blanked. >>>More
The microcontroller is composed of three modules: combinator, controller and main register. >>>More