diff options
author | Jenna Fox <a@creativepony.com> | 2012-09-27 01:39:34 +1000 |
---|---|---|
committer | Jenna Fox <a@creativepony.com> | 2012-09-27 01:39:34 +1000 |
commit | 97b381f5d755080539776e59ba5e6887092cad41 (patch) | |
tree | c8c72bc8085fcbd043fefa3845780f677e7c4ab5 /firmware/upload.rb | |
parent | 070eab5ba108ae53d999d0366e16224b89ac0c2b (diff) | |
download | micronucleus-97b381f5d755080539776e59ba5e6887092cad41.tar.gz micronucleus-97b381f5d755080539776e59ba5e6887092cad41.tar.bz2 micronucleus-97b381f5d755080539776e59ba5e6887092cad41.zip |
Fixed severe bug in microboot.rb where final 64 byte chunk of user program wouldn't upload correctly
Diffstat (limited to 'firmware/upload.rb')
-rw-r--r-- | firmware/upload.rb | 16 |
1 files changed, 9 insertions, 7 deletions
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!" |