This commit is contained in:
Willy-JL
2023-05-10 15:59:20 +01:00
78 changed files with 12623 additions and 1276 deletions

View File

@@ -62,7 +62,6 @@ class Main(App):
)
self.parser_copro.add_argument("cube_dir", help="Path to Cube folder")
self.parser_copro.add_argument("output_dir", help="Path to output folder")
self.parser_copro.add_argument("mcu", help="MCU series as in copro folder")
self.parser_copro.add_argument(
"--cube_ver", dest="cube_ver", help="Cube version", required=True
)
@@ -264,16 +263,20 @@ class Main(App):
from flipper.assets.copro import Copro
self.logger.info("Bundling coprocessor binaries")
copro = Copro(self.args.mcu)
self.logger.info("Loading CUBE info")
copro.loadCubeInfo(self.args.cube_dir, self.args.cube_ver)
self.logger.info("Bundling")
copro.bundle(
self.args.output_dir,
self.args.stack_file,
self.args.stack_type,
self.args.stack_addr,
)
copro = Copro()
try:
self.logger.info("Loading CUBE info")
copro.loadCubeInfo(self.args.cube_dir, self.args.cube_ver)
self.logger.info("Bundling")
copro.bundle(
self.args.output_dir,
self.args.stack_file,
self.args.stack_type,
self.args.stack_addr,
)
except Exception as e:
self.logger.error(f"Failed to bundle: {e}")
return 1
self.logger.info("Complete")
return 0