diff options
| -rw-r--r-- | Readme.txt | 8 | ||||
| -rw-r--r-- | firmware/micronucleus.rb (renamed from firmware/microboot.rb) | 8 | ||||
| -rw-r--r-- | firmware/upload.rb | 12 | 
3 files changed, 15 insertions, 13 deletions
| @@ -1,9 +1,11 @@ -microBoot tiny85 Note -===================== +micronucleus tiny85 Note +========================  This is a brand new project by bluebie, which merges code from embedded-creations'  wonderful USBaspLoader-tiny85 project with bits from obdev's bootloadHID and bits  of my own invention to create a minimalist bootloader for tiny85 chips. It's hot -off the presses, and so this readme and everything else is already way out of date +off the presses, and so this readme and everything else is already way out of date. +During it's early development it was called 'µBoot-t85', and the name has since +changed to avoid conflict with a similarly named ARM bootloader of no relation.  Some quick notes:  The stuff in commandline is a slightly modified version of bootloadHID's commandline diff --git a/firmware/microboot.rb b/firmware/micronucleus.rb index a0450dc..3211d84 100644 --- a/firmware/microboot.rb +++ b/firmware/micronucleus.rb @@ -1,7 +1,7 @@  require 'libusb' -# Abstracts access to uBoot avr tiny85 bootloader - can be used only to upload bytes -class MicroBoot +# Abstracts access to micronucleus avr tiny85 bootloader - can be used only to erase and upload bytes +class Micronucleus    Functions = [      :get_info,      :write_page, @@ -9,11 +9,11 @@ class MicroBoot      :run_program    ] -  # return all thinklets +  # return all micronucleus devices connected to computer    def self.all      usb = LIBUSB::Context.new      usb.devices.select { |device| -      device.idVendor == 0x16d0 && device.idProduct == 0x0753 #&& device.product == "\xB5B" +      device.idVendor == 0x16d0 && device.idProduct == 0x0753      }.map { |device|        self.new(device)      } diff --git a/firmware/upload.rb b/firmware/upload.rb index b2537d8..32aefa9 100644 --- a/firmware/upload.rb +++ b/firmware/upload.rb @@ -1,4 +1,4 @@ -require_relative './microboot' +require_relative './micronucleus'  if ARGV[0]    if ARGV[0].end_with? '.hex' @@ -15,19 +15,19 @@ end  #test_data += ("\xFF" * 64)  puts "Plug in programmable device now: (waiting)" -sleep 0.25 while MicroBoot.all.length == 0 +sleep 0.25 while Micronucleus.all.length == 0 -ubootable = MicroBoot.all.first -puts "Attached to device: #{ubootable.inspect}" +nucleus = Micronucleus.all.first +puts "Attached to device: #{nucleus.inspect}"  #puts "Attempting to write '#{test_data.inspect}' to first thinklet's program memory"  #puts "Bytes: #{test_data.bytes.to_a.inspect}"  sleep(0.25) # some time to think?  puts "Attempting to write supplied program in to device's memory" -ubootable.program = test_data +nucleus.program = test_data  puts "Great! Starting program..." -ubootable.finished # let thinklet know it can go do other things now if it likes +nucleus.finished # let thinklet know it can go do other things now if it likes  puts "All done!" | 
