I am attempting to generate a BCH file from an SREC File for an S7G2-SK image for use with the boot loader code from s7_sk_ux_mass_host_boot_nano_1_2_0_wip.zip.
My command line is "python r_fl_mot_converter.py -i cell_A.srec -o cell_A.bch -m 1024 -f 256 -e 0x0040000 -l 0x0040800 -s 0x3c0000" for a small application that uses only the PMOD cell modem connected to the PMODA connector with code derived from the FWS example.
When I run the command, I get:
Traceback (most recent call last):
File "r_fl_mot_converter.py", line 803, in <module>
fl_m.Process()
File "r_fl_mot_converter.py", line 320, in Process
self.CRCTable.ProcessRecord(line)
File "r_fl_mot_converter.py", line 584, in ProcessRecord
self.ApplyData(address, data)
File "r_fl_mot_converter.py", line 592, in ApplyData
self.raw_data[address-self.slotAddress]=val
IndexError: list assignment index out of range
I did some debugging and this appears to be caused by entries at the end of the .srec file for the S7 internal RAM (obviously outside the length specified with the -s option):
S315000585D00000000000000000000000000000000090
S315000585E00000000000000000000000000000000080
S3151FFE000000000000000000000000000000000000CD
S3151FFE001000000000000000000000000000000000BD
S3151FFE002000000000000000000000000000000000AD
S3151FFE0030000000000000000000000000000000009D
S3151FFE0040000000000000000000000000000000008D
S3151FFE0050000000000000000000000000000000007D
S3151FFE0060000000000000000000000000000000006D
S3151FFE0070000000000000000000000000000000005D
S3151FFE0080000000000000000000000000000000004D
S3151FFE0090000000000000000000000000000000003D
S3151FFE00A0000000000000000000000000000000002D
S3151FFE00B0000000000000000000000000000000001D
S3151FFE00C0000000000000000000000000000000000D
S3151FFE00D000000000000000000000000000000000FD
S3151FFE00E000000000000000000000000000000000ED
S3151FFE00F000000000000000000000000000000000DD
S3151FFE010000000000000000000000000000000000CC
S3151FFE011000000000000000000000000000000000BC
S3151FFE012000000000000000000000000000000000AC
S3151FFE0130000000000000000000000000000000009C
S3151FFE0140000000000000000000000000000000008C
S3151FFE0150000000000000000000000000000000007C
S3151FFE0160000000000000000000000000000000006C
S3151FFE0170000000000000000000000000000000005C
S3151FFE0180000000000000000000000000000000004C
S3151FFE0190000000000000000000000000000000003C
S3151FFE01A0000000000000000000000000000000002C
S3151FFE01B0000000000000000000000000000000001C
S70500047CA1D9
How do I handle this?
I tried deleting the entries from the .srec file since they are just initializing the space to 0x00 and then I get:
Traceback (most recent call last):
File "r_fl_mot_converter.py", line 803, in <module>
fl_m.Process()
File "r_fl_mot_converter.py", line 401, in Process
self.write_block(out_file, cur_buffer, start_address)
File "r_fl_mot_converter.py", line 200, in write_block
block_data_crc.update(binascii.unhexlify(current_buffer))
TypeError: Odd-length string
thanks,
pete