You are currently viewing 干货分享 | TSMaster 中 Hex 文件编辑器使用详细教程

Sharing | Hex File Editor Tutorial in TSMaster

The Hex file editor of TSMaster software provides a file processing function, a feature that makes it easier for users of TSMaster software to work with Hex, bin, mot, s19 and tsbinary type files.

This article focuses on how to use the Hex file editor in TSMaster, which can split existing Hex, bin, mot, s19 and tsbinary files by address; and merge Hex, bin, mot, s19 and tsbinary files. Merge can be realized by merging data blocks of the same file, and also can be realized by merging across files. In this article, we use Hex type files as an example.

Keywords in this article: hex, bin, mot, s19, tsbinary, file editor, file split, file merge

Table of Contents for this article

1、How to load Hex, bin, mot, s19 and tsbinary files

In TSMaster click on Application Module, select Widgets and click on Hex File Editor. As shown in Figure 1:
Figure 1
In the Hex File Editor window, click the File button and click Load File to load the Hex file. This is shown in Figure 2:
Figure 2
After the Hex file is loaded, the upper half of the Hex file editor window displays the data block, start address, stop address, data length, checksum and mapping address of the Hex file, and the lower half displays the contents of the data block. This is shown in Figure 3:
Figure 3

2. Segmentation of documents

Hex file editor can split the loaded Hex, bin, mot, s19 and tsbinary type files. There are four data blocks in the currently loaded Hex file, as shown in Figure 4: Select data block 0, click the Edit button, select Save As Address Range, the Set Address Range window will pop up, set the start address of the split Hex file to 0x000000A3 and the end address to 0x000001F3, click OK. Set the start address of the split Hex file to 0x000000A3 and the end address to 0x000001F3, click OK.

Figure 4

Select a directory to save the split Hex file after setting the start address and end address. After successful saving, load the split Hex file. As shown in Figure 5, the start address of the split Hex file is 0x000000A3, and the stop address is 0x000001F3, which is the same as the address set during the splitting process.

Figure 5

Hex file editor splits the Hex file to keep the content of the data block unchanged, as shown in Figure 6, comparing the Hex file after splitting with the Hex file before splitting, you can find that the content of the data block in the same address area is the same.

Figure 6

3. Consolidation of documents

The Hex file editor can also merge loaded files of type Hex, bin, mot, s19 and tsbinary.

There are two ways to merge:

  1. Extract different data blocks within the same file to generate a new file;
  2. Cross-file merging.

3.1 Generation of new documents
Load a Hex file with multiple data blocks, check the data blocks to be extracted, click the right mouse button on the blank space and select Merge Selected Blocks To New File. As shown in Figure 7:

Figure 7
After successful saving, load the merged Hex file. As shown in Figure 8, the start and end addresses of the new Hex file are the same as those of the pre-merged Hex file, and the number of data blocks remains the same.
Figure 8

3.2 Cross-document merging
Load two different Hex files, select the blocks you want to merge, click the right mouse button on the blank space and select Merge Selected Blocks To New File. As shown in Figure 9:

Figure 9
After a successful save, the merged Hex file is loaded. As shown in Figure 10, the start and end addresses of the new Hex file are the same as those of the pre-merged Hex file, and the number of data blocks remains the same.
Figure 10

4. File saving type

For loaded files, whether Hex, bin, mot, s19 or tsbinary, you can choose the type of file you want to save when saving. As shown in Figure 11: Click the Edit button, select Save As, and in the Save As window, you can select to save as Hex, bin, mot, s19 or tsbinary.
Figure 11

发表回复