What the heck are these files?




Hex File

This is the file that actually contains the firmware data. It is a text file in a special format called "Intel Hex" format. (There is another commonly used hex format called "Motorola S-Record" format.)

You need to use the hex loader (NewHexLoad.exe) to read the data from the hex file and store it into a Hardware Controller 3 (including the Avionics Stack motherboard). Instructions are here.

Because it is all in text you can view a hex file in a text editor such as Notepad. You'll see something like this:

:021020000000CE
:0E1022000201A2511200D9CFE6FFE1CFD9FFA3
:10103000040EE126FA0EDB501C6AA30F1B6E020E93
:101040001C22020E1BC0DBFF030E1CC0DBFF020EC6
:10105000DBCFE9FF030EDBCFEAFFEFCF1FF0206A03
:101060001FBE2068FD0EDB501F241D6EFE0EDB50E0
:1010700020201E6EFB0EDB501D5C1B6EFC0EDB5039
:101080001E581C6E1BC0DEFFDD6EDECF1BF0DDCFF9
:101090001CF0800E1C140DE1DECF1BF0DDCF1CF028
:1010A000D8901C5004E6140E1B5C000E1C5816E26F
:1010B0000BD0DECF1BF0DDCF1CF01C3404E31B5043
:1010C000EC08FF0E1C540AE2020EDBCFE9FF030E10
:1010D000DBCFEAFFDFCFEFFF000E08D0020EDBCF41


It's meaningless to you and me but NewHexLoad knows what to do with it.

In the case of Cypress devices the Hex file can only be used with a special device, the PSoC Programmer. Instead of the Hex file you need to use the DLD file (below).


DLD File

This is the file that actually contains the firmware data. It is a text file in a special hex format used by Cypress.

You need to use the Cypress Loader to read the data from the DLD file and store it into the hardware. Instructions are here.

Because it is all in text you can view a DLD file in a text editor such as Notepad. You'll see something like this:

FF380001020304050607
FF390001020304050607005330303030307E30307E3030307E3030307E30303030303030303030307E3030307D17BF7E7D1B067E7D1AEB7E7D1B077E3030303030303030303030303030303090C7
FF39000102030405060700547D1B487E7D1B777E7D03C77E7D1B087E7D1B187E7D1B287E7D1B387E7D1B787E303030307E3030307F3030307F3030301C5A7F30174B7F30170D7F307D1CF37F16D4
FF390001020304050607005650005300520055005400D600B000B100B200B3C3B403B522B6224A004B004C00FF2C312D1A2E40243125112645281629052A7420302106224061006900600062BA1E
FF390001020304050607005700673368006300660064006400FD80C400C500C600C700D100D300D000D200E159E200DF07DE02DD00D800D900DA00DB00EC00ED00E700C100FF71106200FF625555
FF3900010203040506070058010F70EF6203206202F0711062020062030070EF62010071106204FF62050170EF6207FE620600711062060062070070EF62050071106208FF62090070EF620B09BE
FF3900010203040506070059FF620A007110620A00620B0070EF6209007110620CFF620DFF70EF620F00620E007110620E00620F0070EF620D0071106210FF6211FF70EF621300621200711088BD
FF390001020304050607005A62120062130070EF62110071106214FF6215FF70EF621700621600711062160062170070EF6215007110621C81621D0070EF621F81621E007110621E00621F0021F0
FF390001020304050607005B70EF621D0070EF7F239C0201000801000000DE010011010800A9DE010015011900ACDE03010008012E0000DE01000801360000DE010008013E0000DE01000B012B05
FF390001020304050607005C4600AFDE0001000801510000DE011712174201171D17171721172C172380007F7F1735000000091BB10000DE000000921BC80000DE0416CA000016E3000017046F8E
FF390001020304050607005D0000000000291B9F0000DE000000121B8D0000DE55A60055A70055A8007C17647C15FA7F1070EF500067501557407C177F500167501557A17C177F70EF207F38DF6F


It's meaningless to you and me but the Cypress Loader knows what to do with it.


Batch File

This is a short script that executes NewHexLoad.exe with the correct parameters to load the associated hex file. If you didn't have the script you'd have to:

  1. Memorize a bunch of special parameters to type, like "NewHexLoad.exe -e -t=18f4550 -r=1000:5FBF -r=6040:7FFF C2Pro_CarbHeat.hex"
  2. Open a command line window in the appropriate directory.
  3. Type the whole command line with different values depending on the processor, the model and release version. Get it right the first time.

Instead I give you a batch file with a name like "NewHexLoad C2Pro_CarbHeat.hex.bat" that you can double-click. It contains all you should need to load in the hex file that has the same name that's in the batch file name.

NewHexLoad.exe and the hex file should both be in the same directory as the batch file. I've tried to arrange things so that one batch file can be used for all versions of a hex file, the version information is now stored in the hex file.

The batch file ties together NewHexLoad.exe, the hex file, and the simulator.


NewHexLoad

This is the actual program used to load the hex file into the HWC3-based simulator. The simulator of course must be in bootloader mode (see instructions here). Use the batch file to execute NewHexLoad with the correct parameters to load the correct hex file.


Cypress Loader

This is the actual program used to load the hex file into certain Cypress-based devices. The device must of course be in bootloader mode (see instructions here).


MD5, PAR2 and ZIP files

As of February, 2017 we have started including files that will allow data check and recovery of downloaded files. When you click the "Output file directory" link on the wiki page you may see some extra files with the same name as the HEX (and DLD) files. They will look something like this:

DCX_CB_PANEL_v3.01.dld DCX_CB_PANEL_v3.01.hex DCX_CB_PANEL_v3.01.md5 DCX_CB_PANEL_v3.01.vol0+19.par2 DCX_CB_PANEL_v3.01.zip

The filenames will be identical to the associated HEX file (and, if present, the DLD file), with different extensions.

We will also be using PAR2 and/or MD5 files to verify the integrity of other files or directories (such as PFCTools).

MD5 files

MD5 is an industry standard method of checking the integrity of a file.
Microsoft provides a MD5 checker and generator, though it requires manual installation. Multipar can also test against an MD5 (see the section on PAR2, below). Other utilities are available as well, and can be found via web search.

PAR2 files

PAR2 is a method of providing testing and recovery for one or more files. More information and a (non-exhaustive) list of available utilities are available on the Wikipedia article for Parchive.
Multipar is our utility of choice for both MD5 and PAR2.

Short-version instructions for installing and using Multipar:
  1. Download and install Multipar.
  2. The first time you run Multipar, it will open an Options window.
  3. Make sure "Associate with PAR2 recover files" is checked. It should be checked by default, and may be greyed out so that you cannot uncheck it.
  4. Check "Associate with SFV/MD5 checksum files" unless you intend to use a different program to check MD5 files.
  5. Recommended: check "Integrate Multipar into shell". This will allow you to use Windows' context menu to generate PAR2 files.
  6. Click "OK" and close the program.
  7. Now double-click the PAR2 (or MD5) file associated with the file or files you want to check. Multipar will run and automatically check the files' integrity. If you checked using the PAR2 (not the MD5) file, and the target files are damaged, you may be given an opportunity to repair the files.
Repair depends on the extent of the damage. The PAR2 files we provide contain enough data to completely re-create a HEX file, even if the HEX file is destroyed or missing altogether. However, if the PAR2 file is also damaged or incomplete, unless enough of the HEX file data are present and intact, Multipar will not have enough data to recover.

In the case of collections of files, such as PFCTools, the PAR2 file may only include enough data to recover one or two files and not the entire collection. Again, recovery depends on having enough intact data amongst all the files. If there are more data damaged than are available in the PAR2 files, recovery will not be possible.

ZIP files

ZIP files are archive files that contain other files as their content. Since the ZIP file is considered a binary file, it is possible to download the file without using the right-click/save as method required for HEX files. ZIP is a defacto standard that is built directly into Windows 7 and newer, and many utilities are available for creating the files and extracting content. In addition, ZIP files include their own integrity checking.
The associated ZIP file will contain the following:
  • The HEX file, the EXE file, and/or other files depending on the intended target files.
  • The PAR2 file, if available
  • The MD5 file, if available
We are providing the ZIP file as a handy and, hopefully, robust way to obtain not only the target files, but also the associated data recovery file(s).