Encoding can't be debugged, debugging can't be broken

Summary: Encoding can't be debugged, debugging can't be without breakpoints. The breakpoint is a very important function of the emulator, and the user can hardly break the breakpoint during the simulation process.

There are many types of breakpoints, which are roughly divided into simple breakpoints and complex breakpoints. Different emulators have different types of breakpoints, and generally support simple program breakpoints, which are also breakpoints that users often use. High-end simulators support a wide variety of breakpoints, such as time breakpoints, variable operation breakpoints, and so on. By operating a breakpoint, the user can control the emulator to stop running at a specified location, then analyze the current operating state, determine possible problems in the program, or debug the hardware of the entire system. The following describes the commonly used breakpoints, I hope to help you when debugging.

Encoding can't be debugged, debugging can't be broken

Figure 1 breakpoint debugging

1. Use mouse to set settings and delete breakpoints

In the program window (including C language, assembly and disassembly window), double-click the program line that needs to set the breakpoint, then the red breakpoint mark appears in the status bar on the left side of the window as shown in Figure 2. Click the operation. Double-click the program line again with the mouse, and the red breakpoint flag on the left side of the window disappears, which is to delete the breakpoint operation.

Encoding can't be debugged, debugging can't be broken

Figure 2 simple breakpoint

2. Time breakpoint

The time break function, when the running time is the same as the time set by the time breakpoint, the program stops running. As shown in Figure 3, you can see Tbreak below the runtime, which is the time breakpoint. The user can set the value of Tbreak according to the actual observation needs. Note that the unit is ns. When the program runtime accumulates to the value of Tbreak, the program stops running.

Encoding can't be debugged, debugging can't be broken

Figure 3 time breakpoint

3. Variable operation breakpoints

Variable operation breakpoints. When a variable is read or written, the program is stopped by setting the variable read and write operation breakpoint.

In the Keil MDK environment, after entering the simulation state, open the [Breakpoints] option under the [Debug] menu. Variable operation breakpoints can be defined in the Breakpoints window.

The specific definition method: enter the address of the variable in the Expression, then select the read and write attributes, and correctly set the byte range, and finally click Define. For example, at the beginning of address 0x20004000, the 16-byte range defines the read-write breakpoint operation. The specific setting method is shown in Figure 4.

Encoding can't be debugged, debugging can't be broken

Figure 4 defines read and write operations breakpoints

After clicking Define in Figure 4, the breakpoint can be set successfully, as shown in Figure 5. Four types of breakpoints are defined in Figure 5. The specific meaning is as follows:

n Breakpoint 1: Indicates that the read or write operation occurs at the beginning of address 0x20004000 and within 16 bytes.

n Breakpoint 2: Indicates that the operation starts when the address 0x20004100 starts and the 8-byte range occurs.

n Breakpoint 3: Indicates that the write operation starts at address 0x20004200 and is interrupted within 4 bytes.

n Breakpoint 4: Indicates that the read or write operation occurs at the beginning of address 0x20004300, and the operation is interrupted.

Encoding can't be debugged, debugging can't be broken

Figure 5 Breakpoints define breakpoint window

Note: len indicates that the breakpoint is valid in an address range, and len must be incremented by 1, 2, 4, 8, 16, 32 by 2, and the address must be at the beginning of len. For example, len=16, the address must be 0x10 byte aligned, 0x40000010 is a valid starting address, and the address 0x40000018 is invalid and will be forcibly corrected to 0x40000010 by the system.

4. Summary

The above briefly introduces the setting method of three kinds of breakpoints. Simple breakpoints are the most frequently used in engineer debuggers, and the setup method is simple. The AK100Pro emulator supports Flash unlimited breakpoints, but some chips are subject to their own limitations, such as the LPC1766 chip, which only supports up to six hardware breakpoints. Time breakpoint, this is unique to some chips, such as the Cotex-M3, 8051 core chip. Variable breakpoints are used to observe the effect of changes in variables on the program. Learn to use breakpoints flexibly to help you quickly find bugs.

The industrial tablet computer is a tablet computer used in industrial control. The whole machine has perfect performance and has the performance of common commercial computers in the market. The difference from the civilian Tablet PC is the internal hardware. Most of the industrial product choices are industrial motherboards, and most of them are specially customized for the industrial control field. The wide temperature adaptability is good and can meet the needs of various harsh environments. It differs from commercial motherboards in that it is not mass-produced and the product model is relatively stable. It can also be seen that the price of industrial tablet computers is also higher than that of civilian tablet computers, and the other is the RISC architecture. The industrial requirements are relatively simple and simple, and the performance requirements are not high, but the stability is particularly good.

rugged tablet

rugged tablet pc,industrial tablet,rugged tablets,industry tablet,rugged tablet,rugged tablets uk

Shenzhen Hengstar Technology Co., Ltd. , https://www.angeltondal.com