From 97b381f5d755080539776e59ba5e6887092cad41 Mon Sep 17 00:00:00 2001 From: Jenna Fox Date: Thu, 27 Sep 2012 01:39:34 +1000 Subject: Fixed severe bug in microboot.rb where final 64 byte chunk of user program wouldn't upload correctly --- firmware/upload.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'firmware/upload.rb') diff --git a/firmware/upload.rb b/firmware/upload.rb index 705f7de..b2537d8 100644 --- a/firmware/upload.rb +++ b/firmware/upload.rb @@ -12,20 +12,22 @@ else raise "Pass intel hex or raw binary as argument to script" end +#test_data += ("\xFF" * 64) + puts "Plug in programmable device now: (waiting)" -sleep 0.5 while MicroBoot.all.length == 0 +sleep 0.25 while MicroBoot.all.length == 0 -thinklet = MicroBoot.all.first -puts "Attached to device: #{thinklet.inspect}" +ubootable = MicroBoot.all.first +puts "Attached to device: #{ubootable.inspect}" #puts "Attempting to write '#{test_data.inspect}' to first thinklet's program memory" #puts "Bytes: #{test_data.bytes.to_a.inspect}" -sleep(0.1) # some time to think? +sleep(0.25) # some time to think? puts "Attempting to write supplied program in to device's memory" -thinklet.program = test_data +ubootable.program = test_data -puts "That seems to have gone well! Telling thinklet to run program..." +puts "Great! Starting program..." -thinklet.finished # let thinklet know it can go do other things now if it likes +ubootable.finished # let thinklet know it can go do other things now if it likes puts "All done!" -- cgit v1.2.3