summaryrefslogtreecommitdiffstats
path: root/firmware/upload.rb
diff options
context:
space:
mode:
authorJenna Fox <a@creativepony.com>2012-09-24 00:45:10 +1000
committerJenna Fox <a@creativepony.com>2012-09-24 00:45:10 +1000
commitd9ed646bd2495c6ab8524a35bd984f5526ee65ec (patch)
treeace1df8e7c74ecaed6a55132fbc9ccff3804d3fa /firmware/upload.rb
parente014795e2482dc53c04570917dfe69dcf48da463 (diff)
downloadmicronucleus-d9ed646bd2495c6ab8524a35bd984f5526ee65ec.tar.gz
micronucleus-d9ed646bd2495c6ab8524a35bd984f5526ee65ec.tar.bz2
micronucleus-d9ed646bd2495c6ab8524a35bd984f5526ee65ec.zip
It's uploading things properly! Stupid double increment bug. But I think it's failing to write tinyvector table
Diffstat (limited to 'firmware/upload.rb')
-rw-r--r--firmware/upload.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/upload.rb b/firmware/upload.rb
index c68b02c..171bdfa 100644
--- a/firmware/upload.rb
+++ b/firmware/upload.rb
@@ -98,8 +98,13 @@ thinklet = thinklets.first
puts "First thinklet: #{thinklet.info.inspect}"
-test_data = ("---- Hello World! ----" * 1).encode("BINARY")
-puts "Attempting to write '#{test_data}' to first thinklet's program memory"
+if ARGV.first
+ test_data = open(ARGV.first).read
+else
+ test_data = ("---- Hello World! ----" * 1).encode("BINARY")
+end
+puts "Attempting to write '#{test_data.inspect}' to first thinklet's program memory"
+puts "Bytes: #{test_data.bytes.to_a.inspect}"
thinklet.program = test_data
puts "That seems to have gone well! Telling thinklet to run program..."