Skip to content

Commit

Permalink
Further bug fixing and refinements:
Browse files Browse the repository at this point in the history
- Refined R43 and R45 SMC.BIN creation in python.
- Fixed status logic in case SMC is equal to SMC.BIN.
- Fixed status logic in case ROM is equal to ROM.BIN.
- Fixed status logic in case both SMC.BIN and ROM.BIN are not present.
- Fixed status logic in case no component has been updated.
  • Loading branch information
FlightControl-User committed Oct 8, 2023
1 parent 81884a4 commit 06d5a21
Show file tree
Hide file tree
Showing 24 changed files with 6,959 additions and 6,876 deletions.
445 changes: 445 additions & 0 deletions arduino/x16-smc-r43.0.0.hex

Large diffs are not rendered by default.

File renamed without changes.
Binary file added bin/SMC-HEADER-R43.0.0.BIN
Binary file not shown.
File renamed without changes.
Binary file renamed target/src/SMC-R43.BIN → bin/SMC-R43.0.0.BIN
Binary file not shown.
File renamed without changes.
23 changes: 23 additions & 0 deletions bin/smc-bin-43.0.0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from intelhex import IntelHex

version = "R43.0.0"

src1 = IntelHex()

src1.fromfile("bin/x16-smc-header-" + version + ".hex", format="hex")
src1.tofile("bin/SMC-HEADER-" + version + ".BIN", format="bin")

src2 = IntelHex()

src2.fromfile("arduino/x16-smc-" + version + ".hex", format="hex")
src2.tofile("bin/SMC-" + version + ".BIN", format="bin")

# Try reading the file in binary mode and writing it back in binary
# mode. By default it reads files in text mode
input1 = open("bin/SMC-HEADER-" + version + ".BIN", "rb").read()
input2 = open("bin/SMC-" + version + ".BIN", "rb").read()

input1 += input2

with open("bin/SMC-" + version + ".BIN", "wb") as fp:
fp.write(input1)
23 changes: 23 additions & 0 deletions bin/smc-bin-45.1.0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from intelhex import IntelHex

version = "R45.1.0"

src1 = IntelHex()

src1.fromfile("bin/x16-smc-header-" + version + ".hex", format="hex")
src1.tofile("bin/SMC-HEADER-" + version + ".BIN", format="bin")

src2 = IntelHex()

src2.fromfile("arduino/x16-smc-" + version + ".hex", format="hex")
src2.tofile("bin/SMC-" + version + ".BIN", format="bin")

# Try reading the file in binary mode and writing it back in binary
# mode. By default it reads files in text mode
input1 = open("bin/SMC-HEADER-" + version + ".BIN", "rb").read()
input2 = open("bin/SMC-" + version + ".BIN", "rb").read()

input1 += input2

with open("bin/SMC-" + version + ".BIN", "wb") as fp:
fp.write(input1)
3 changes: 3 additions & 0 deletions bin/x16-smc-header-R43.0.0.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:100000002B000000000000000000000000000000C5
:100010000000000000000000000000000000002BB5
:00000001FF
File renamed without changes.
Binary file removed python/SMC-R45.1.0.BIN
Binary file not shown.
23 changes: 0 additions & 23 deletions python/smc_convert.py

This file was deleted.

Loading

0 comments on commit 06d5a21

Please sign in to comment.