What are DLD files and how do you disassemble them?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 So I have a hex file that starts with 

   

 

   

FF380001020304050607

   

 

   

has lots of hex like that and ends with FF3B0001020304050607.

   

 

   

I would like to know what this format is, and how to get some some meaningful output so I can modify it.

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

That dld-extension is probably not related to Cypress Designer. Best would be to start a google search with "DLD file"

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 It is related Cypress MCUs, apparently the ASCII HEX inside the file is something only the Cypress bootloader can understand.

   

If you look at this file you provide http://www.cypress.com/?id=4&rID=60862 (the zip archive) and browse it, you would see the DLD files in question.

   

My goal is to modify DLD files, not that particular one, but from different firmwares.

0 Likes
Anonymous
Not applicable

Hi,

   

 

   

The .dld and .txt files are output files generated by PSoC Designer for the purpose of bootloading. Please refer the BootloaderI2C user module datasheet( http://www.cypress.com/?docID=49203 ) for more information about these. Page 32 explains the record format, such as "FF38" being the bootloader command, "00010204050607" being the bootloader key etc.

   

 

   

But to change the .dld/.txt file, you need make the required changes the PSoC Designer project(code/user modules etc), and allow PSoC Designer to generate the new .dld/.txt files. Manually changing contents of these generated output files are not recommended, as there are consistency aspects like checksum that need to be taken care.

   

 

   

Thanks & Regards,

   

Prem Sai

0 Likes
Anonymous
Not applicable

 If you want to modify the file by hand, you need to make sure that the checksum remain the same.

   

We are doing it in one of our project. Our purpose is to modify calibration data stored at the end of the addressable area.

   

 

   

Let's say you want to modify this line:

   

FF39000102030405060701FF0109FEF60027F02F000001120027246100000127FFD80FD0FFFFFEEDFFD8DB9EFFFFFED8303030303030303030303030303030303030303030303030303030302EB0

   

Section in bold are not to be modified.

   

The highligthed portion will be modified.

   

In this example the sum of the first and third byte is 0xFF as is the sum of the second and the fourth byte, but it may be anything as long as the sum of the byte modified remains the same for the whole line.

   

So if I modify 0x01 by 0x35 then the complementary byte would be 0xFF - 0x35 = 0xCA.

   

FF39000102030405060701FF3509CAF60027F02F000001120027246100000127FFD80FD0FFFFFEEDFFD8DB9EFFFFFED8303030303030303030303030303030303030303030303030303030302EB0

0 Likes
Anonymous
Not applicable

 Sorry for the late late reply. I simply had other things at the time. But yeah the docs have given me a lot of information already, as did your post.

   

 

   

But I am still unclear on the payload

   

 

   

So here I have an excerpt from the .dld file in question

   

 

   

FF380001020304050607

   

FF390001020304050607006230303030307E30307E3030307E3030307D2D217E7D4BAE7E7D2D487E7E3030307E3030307D2B437E7E3030307D2BEA7E7D2C1F7E7D045A7E7D2B6A7E7D2B7A7E09C8

   

FF39000102030405060700637D2B8A7E7D2B9A7E7D2BAA7E7D2BBA7E7D2BCA7E7D2BDA7E7D2C287E7E30303030303030303030307F3030307F3030302A957F302A8C7F3029F57F307D2F7E7F545F

   

 

   

So black is bootloader command, 0xFF38 is bootloader enter, the blue part is the bootloader key, 0xFF39 is the write command, the part in purple is the block number(first byte + second byte = block) , the red part is the payload and the last two bytes in green is the checksum.

   

 

   

Now here is the weird part, the payload(in red) the 0x30 byte is repeated many times as is 0x7E which tells me it means something and I am not sure what it is. I am also not sure if these hex bytes are some encoding of the asm produced by the PSoC Designer OR it's actual assembly, and lastly the checksum bytes in green, how is it calculated?

0 Likes
Anonymous
Not applicable

 You should find the information you are looking for in the file BootLdrTools.js in this folder: C:\Program Files (x86)\Cypress\PSoC Designer\5.4\Common\CypressSemiDeviceEditor\Data\Stdum\BootLdrI2C\Ver_3_00\WIZARD or whatever location you have PSoC designer installed.

0 Likes