Embedded system designers must understand about arm simulator knowledge

An embedded system is a specialized computer system that is part of a device or device. Typically, an embedded system is an embedded processor control board in which the control program is stored in ROM. In fact, all devices with digital interfaces, such as watches, microwave ovens, video recorders, and automobiles, use embedded systems. Some embedded systems also include an operating system, but most embedded systems are implemented by a single program. Control logic.

The so-called ARM emulator, which is used to debug a hardware module based on the ARM core chip. ARM cores include ARM7, ARM9, ARM11, Cortex-A, Cortex-M, Cortex-R, etc., and chips based on these cores are more. Then there is a principle for these emulators. For low-end embedded microcontrollers, ULINK2 and ULINKPpro can be used to debug Cortex-M and Cortex-R chips. For high-end application processors ARM9, ARM11, Cortex-A, you need to use the DSTREAM emulator.

First, the development cycle of embedded products

The first phase of a typical embedded microcontroller development project uses the C compiler to generate object code from the source program. The generated object code will include the physical address and some debugging information. The current code can be executed and debugged using a software simulator, target monitor, or in-circuit emulator. The software simulator is on a PC or workstation platform, with its CPU (such as x86) and its system resources to simulate the target CPU (such as P51XA) and execute the user's target code; and the target monitor is to download the generated target code. Go to the program memory of the user target board, and add a Monitor task software to the downloaded code to monitor and control the execution of the user target code. The user uses the desktop computer through the serial port or other debug port on the target board. Debugger.

The debugging of the program is achieved by setting a breakpoint and stopping the program from running at the specified command position. When the program is aborted, the contents of the memory and registers are checked as a clue to the discovery of the program error.

After the program has been debugged and found all the errors, modify the source code, recompile, and generate the target code file in a standard format, such as Intel HEX. The target code will be stored in the non-volatile memory of the final product, such as EPROM or FLASH. .

Second, why do you need an emulator?

The software simulator and target monitor provide an economical debugging tool that is sufficient for many designs. But there are also many occasions where you need to use the emulator to find bugs. In either case, the simulator can reduce debugging time, simplify system integration, increase reliability, and optimize test steps to make it worthwhile. More often than not, engineers use both software simulators and simulators at different stages of the project, especially in large development projects.

The software simulator and software debugger provide only a few features beyond the breakpoint, such as display port content and code coverage. There is no means of detecting events and conditions, then reacting, there is no way to record the bus cycle of the MCU, and then determine what happened to the execution of the program. If your MCU has on-chip EPROM or FLASH memory and is running in monolithic mode, only the emulator can debug the system without seriously consuming and consuming MCU resources.

In-circuit emulators can do these things easily, and they can provide many other features. The simulator is the bridge between software and hardware. At some stage of the project, you must let the program run on the actual hardware. The emulator can easily help you understand how to get the most out of the emulator during the debugging phase.

3. What exactly is the simulator?

The emulator can replace the MCU in your target system and simulate its operation. The emulator runs the same as the actual target processor, but adds additional features that allow you to view programs and data in the MCU and control the operation of the MCU from a desktop computer or other debugging interface. The emulator is an economical and effective means of debugging embedded software. Nohau's EMUL51XA-PC emulator series is used to debug the Philips P51XA series MCUs, while the EMUL51-PC series emulators support the 8051 series of microcontrollers from many manufacturers.

Embedded system designers must understand about arm simulator knowledge

Fourth, internal and external modes

The internal mode means that the program and data are located inside the MCU chip and exist in the form of FLASH or EPROM. The address and data bus are not visible to the user, and the saved chip pins are provided to the user as I/O ports. The internal mode is also called the single-chip mode, and all program execution takes place in the internal ROM. In order to effectively simulate such a chip, the emulator is required to use a bondout or enhanced Hooks chip.

The external mode is when the program memory, and possibly some of the data memory, is located outside the MCU, and an address and data bus are required to access this part of the memory. The external mode is also called the extended mode. The user chip, bondout chip and enhanced hooks chip can generate this mode of operation. In this case, the chip's address and data bus pins cannot be used as general purpose I/O ports. Nohau's simulator uses these three chips for efficient program debugging.

Five, Bondut, enhanced Hooks chip and standard product chip

These nouns refer to the three emulation processors used by the emulator to replace the target MCU. Only the Bondout and Enhanced Hooks chips enable single-chip debugging, and standard product chips cannot. Compared with the standard product chip, the bondout chip has some added pins, which are connected to the circuit nodes of the chip's internal silicon chip, all of which are also called "super-foot chips". The P51XA series MCU emulators use the bondout chip, and the EMUL51XA-PC is A good example.

The enhanced Hooks chip utilizes machine cycles not available on various chip pins to provide address and data buses. Some 80C51 series emulators use enhanced Hooks chips. Interestingly, some of these enhanced Hooks chips are also standard product chips. Using the enhanced Hooks chip as the emulation CPU requires some extra special function circuits to decompose the address and data bus and some necessary control signals from the multiplexed chip pins. The user's target board does not have these circuits, all of which are still single. Slice mode of operation. The use of bondout chips and enhanced Hooks chips enables extremely accurate simulations, from function to chip power consumption.

Sixth, make the hardware work

The software simulator is good, but it can't take into account all the variables. Software simulator designers must take into account everything, especially those that only occur after the hardware is built up, such as capacitors, timing, inductance, chip versions, etc. As CPU speed increases, these become more The more important it is.

Target Monitor is much better compared to it because it runs on real hardware. But in order for the Monitor program to work, the target system must be a complete, working system. This is not the case with an emulator, which can be run if the target system hardware is incomplete or if there is no hardware at all. However, the target monitor can be installed in the final product program and can be activated at any time for debugging, so this has certain advantages for testing and maintenance.

72V Charger

72V Charger,Electric Bike Chargers,Smart Charger,72V Lithium Battery Charger

HuiZhou Superpower Technology Co.,Ltd. , https://www.spchargers.com

Posted on