diff python/zcc.py @ 237:81752b0f85a5

Added burn led test program
author Windel Bouwman
date Wed, 17 Jul 2013 22:31:54 +0200
parents 1fa3e0050b49
children 90637d1bbfad
line wrap: on
line diff
--- a/python/zcc.py	Mon Jul 15 20:15:31 2013 +0200
+++ b/python/zcc.py	Wed Jul 17 22:31:54 2013 +0200
@@ -41,12 +41,14 @@
     if args.dumpir:
         outs.dump()
 
+    code_bytes = outs.sections['code'].to_bytes()
+    print('bytes:', code_bytes)
     if args.output:
         output_filename = args.output
     else:
-        output_filename = 'lc.output'
-
-    # TODO: store data
+        output_filename = 'b.output'
+    with open(output_filename, 'wb') as f:
+        f.write(code_bytes)
 
 if __name__ == '__main__':
     arguments = parser.parse_args()