def hexFileToArr(filename): log.i("filename " + filename) ih = IntelHex(filename) buf = ih.tobinarray() log.d("End and start of the binary: " + str(ih._get_start_end())) return buf