(path, binary1)
| 135 | |
| 136 | # Write the binary as cyacd file. Can only hold one firmware image per file |
| 137 | def write_cyacd(path, binary1): |
| 138 | with open(path, "w") as f: |
| 139 | # CYACD Header |
| 140 | # Si ID ######## |
| 141 | # Si Rev ## |
| 142 | # Checksum Type ## |
| 143 | f.write("1D0011AD0000\n") |
| 144 | |
| 145 | for (addr, row) in binary1[0:-1]: |
| 146 | write_cyacd_row(f, addr, row) |
| 147 | |
| 148 | write_cyacd_row(f, binary1[-1][0], binary1[-1][1]) |
| 149 | |
| 150 | # Just concatenate both firmware binaries |
| 151 | def write_bin(path, binary1, binary2): |
no test coverage detected