Download Flasher ARM User Guide
Transcript
38 2.6 CHAPTER 2 Working with Flasher Patch file support In stand-alone mode Flasher supports patch files which allows to patch the content of the data to be programmed. Before starting programming process in stand-alone mode, Flasher will look for a file named Patches.txt being present on the Flasher. This file includes the patches. If this file is present, the number in Serial.txt describes the line number of the Patches.txt that will be used for the current cycle (line counting starts at 0). Each line in the Patches.txt can hold up to 4 patches, where each patch can be up to 32 bytes in length. Syntax The syntax for <NumPatches>==4 is as follows: <NumPatches>,<Addr>,<NumBytes>,<Data>,<Addr>,<NumBytes>,<Data>,<Addr>, <NumBytes>,<Data>,<Addr>,<NumBytes>:<Data>\r\n Each patch-line containts describes each parameter. Parameter <NumPatches> <Addr> <NumBytes> <Data> Note: <Addr>,<NumBytes>:<Data>. Find below a table which Description Describes the number of patches in this patch line. Max. value is 4. Describes the address to be patched. Value is expected in hex. Number of bytes for the current patch. Max. value is 20h (32 in decimal). Describes the data to be patched. <Data> is always expected as 2 characters per byte. All values are expected in hexadecimal format (hex). <Data> section is always preceeded by ":", not ",". Example Please find below a sample sequence which clarifies the usage of patch files. Patches.txt, which is located on the Flasher, contains the following line: 3,100025,3,AABBCC,100063,2,DDEE,100078,1,FF Serial.txt contains a "0" which force the Flasher to use line 0 from Patches.txt. After starting the programming cycle, the following data will be patched: Addr 0x100025: 3 byte 0xAA 0xBB 0xCC Addr 0x100063: 2 byte 0xDD 0xEE Addr 0x100078: 1 byte 0xFF Single patch via RS232 Alternatively, you can start a programming cycle with patch data that is only valid for this one cycle (no need for a Patches.txt file): Send the #AUTO PATCH <NumPatches>,<Addr>,<NumBytes>:<Data> command via Flasher ASCII interface. The parameters have the same function as described in the table above. Flasher User Guide (UM08022) © 2004-2013 SEGGER Microcontroller GmbH & Co. KG