errors_proprocess = pinguino.get_errors_preprocess() if errors_proprocess: for error in errors_proprocess["preprocess"]: printb(error, bcolors.Red) errors_c = pinguino.get_errors_compiling_c() if errors_c: printb(errors_c["complete_message"], bcolors.Red) errors_asm = pinguino.get_errors_compiling_asm() if errors_asm: for error in errors_asm["error_symbols"]: printb(error, bcolors.Red) errors_link = pinguino.get_errors_linking() if errors_link: for error in errors_link["linking"]: printb(error, bcolors.Red) sys.exit() else: result = pinguino.get_result() printb("compilation time: %s" % result["time"], bcolors.Yellow) printb("compiled to: %s" % result["hex_file"], bcolors.Yellow) if parser.hex_file: hex_file = open(result["hex_file"], "r")
if not pinguino.compiled(): print("\nERROR: no compiled\n") errors_proprocess = pinguino.get_errors_preprocess() if errors_proprocess: for error in errors_proprocess["preprocess"]: print(error) errors_c = pinguino.get_errors_compiling_c() if errors_c: print(errors_c["complete_message"]) errors_asm = pinguino.get_errors_compiling_asm() if errors_asm: for error in errors_asm["error_symbols"]: print(error) errors_link = pinguino.get_errors_linking() if errors_link: for error in errors_link["linking"]: print(error) sys.exit() else: result = pinguino.get_result() print("compilation time: %s" % result["time"]) print("compiled to: %s" % result["hex_file"]) if parser.hex_file: hex_file = open(result["hex_file"], "r") content_hex = hex_file.readlines() hex_file.close() print("\n" + "*" * 70)