Sha256: 5441ed998ef1b0ac9d007ff1526c1a837e5274d58f1723d5f852b74baf099e39
Contents?: true
Size: 967 Bytes
Versions: 2
Compression:
Stored size: 967 Bytes
Contents
require "ceedling" Ceedling.load_project task :default => %w[ test:all release ] # Dummy task to ensure that the SERIAL_PORT environment variable is set. # It can be set on the command line as follows: # $ rake SERIAL_PORT=[serial port name] task :serial_port do unless ENV['SERIAL_PORT'] raise "SERIAL_PORT is not defined in the environment!" end end desc "Convert the output binary to a hex file for programming to the Arduino" task :convert => :release do bin_file = "build/release/#{RELEASE_BUILD_OUTPUT}.bin" hex_file = "build/release/#{RELEASE_BUILD_OUTPUT}.hex" cmd = "#{ENV['OBJCOPY']} -O ihex -R .eeprom #{bin_file} #{hex_file}" puts cmd sh cmd end desc "Program the Arduino over the serial port." task :program => [:convert, :serial_port] do hex_file = "build/release/#{RELEASE_BUILD_OUTPUT}.hex" cmd = "avrdude -F -V -c arduino -p #{ENV['MCU']} -P #{ENV['SERIAL_PORT']} -b 115200 -U flash:w:#{hex_file}" puts cmd sh cmd end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ceedling-0.31.1 | examples/blinky/rakefile.rb |
ceedling-0.31.0 | examples/blinky/rakefile.rb |