mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2025-10-10 23:22:35 +02:00
[FL-2052] New build system based on scons (#1269)
This commit is contained in:
@@ -149,8 +149,10 @@ class Main(App):
|
||||
self.logger.info(f"Generating OTP")
|
||||
self._processFirstArgs()
|
||||
self._processSecondArgs()
|
||||
open(f"{self.args.file}_first.bin", "wb").write(self._packFirst())
|
||||
open(f"{self.args.file}_second.bin", "wb").write(self._packSecond())
|
||||
with open(f"{self.args.file}_first.bin", "wb") as file:
|
||||
file.write(self._packFirst())
|
||||
with open(f"{self.args.file}_second.bin", "wb") as file:
|
||||
file.write(self._packSecond())
|
||||
self.logger.info(
|
||||
f"Generated files: {self.args.file}_first.bin and {self.args.file}_second.bin"
|
||||
)
|
||||
@@ -166,9 +168,9 @@ class Main(App):
|
||||
|
||||
try:
|
||||
self.logger.info(f"Packing binary data")
|
||||
file = open(filename, "wb")
|
||||
file.write(self._packFirst())
|
||||
file.close()
|
||||
with open(filename, "wb") as file:
|
||||
file.write(self._packFirst())
|
||||
|
||||
self.logger.info(f"Flashing OTP")
|
||||
cp = CubeProgrammer(self._getCubeParams())
|
||||
cp.flashBin("0x1FFF7000", filename)
|
||||
@@ -190,9 +192,9 @@ class Main(App):
|
||||
|
||||
try:
|
||||
self.logger.info(f"Packing binary data")
|
||||
file = open(filename, "wb")
|
||||
file.write(self._packSecond())
|
||||
file.close()
|
||||
with open(filename, "wb") as file:
|
||||
file.write(self._packSecond())
|
||||
|
||||
self.logger.info(f"Flashing OTP")
|
||||
cp = CubeProgrammer(self._getCubeParams())
|
||||
cp.flashBin("0x1FFF7010", filename)
|
||||
@@ -215,10 +217,10 @@ class Main(App):
|
||||
|
||||
try:
|
||||
self.logger.info(f"Packing binary data")
|
||||
file = open(filename, "wb")
|
||||
file.write(self._packFirst())
|
||||
file.write(self._packSecond())
|
||||
file.close()
|
||||
with open(filename, "wb") as file:
|
||||
file.write(self._packFirst())
|
||||
file.write(self._packSecond())
|
||||
|
||||
self.logger.info(f"Flashing OTP")
|
||||
cp = CubeProgrammer(self._getCubeParams())
|
||||
cp.flashBin("0x1FFF7000", filename)
|
||||
|
Reference in New Issue
Block a user