6 Replies Latest reply on Jan 15, 2015 7:23 AM by ersic_282706

    What are DLD files and how do you disassemble them?

       So I have a hex file that starts with 








      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.

        • 1. Re: What are DLD files and how do you disassemble them?

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





          • 2. Re: What are DLD files and how do you disassemble them?

             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.

            • 3. Re: What are DLD files and how do you disassemble them?





              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

              • 4. Re: What are DLD files and how do you disassemble them?

                 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:




                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.



                • 5. Re: What are DLD files and how do you disassemble them?

                   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












                  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?

                  • 6. Re: What are DLD files and how do you disassemble them?

                     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.