Sha256: b258fa077d4941600e9db91dbcd053b73af1223560d14abcedee4854352bdc71

Contents?: true

Size: 1 KB

Versions: 20

Compression:

Stored size: 1 KB

Contents

PROJECT_CEEDLING_ROOT = "vendor/ceedling"
load "#{PROJECT_CEEDLING_ROOT}/lib/ceedling/rakefile.rb"

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

20 entries across 20 versions & 1 rubygems

Version Path
ceedling-0.28.2 examples/blinky/rakefile.rb
ceedling-0.28.1 examples/blinky/rakefile.rb
ceedling-0.27.0 examples/blinky/rakefile.rb
ceedling-0.25.0 examples/blinky/rakefile.rb
ceedling-0.24.0 examples/blinky/rakefile.rb
ceedling-0.22.0 examples/blinky/rakefile.rb
ceedling-0.21.0 examples/blinky/rakefile.rb
ceedling-0.20.3 examples/blinky/rakefile.rb
ceedling-0.20.2 examples/blinky/rakefile.rb
ceedling-0.19.0 examples/blinky/rakefile.rb
ceedling-0.18.0 examples/blinky/rakefile.rb
ceedling-0.17.0 examples/blinky/rakefile.rb
ceedling-0.16.0 examples/blinky/rakefile.rb
ceedling-0.15.6 examples/blinky/rakefile.rb
ceedling-0.15.5 examples/blinky/rakefile.rb
ceedling-0.15.4 examples/blinky/rakefile.rb
ceedling-0.15.3 examples/blinky/rakefile.rb
ceedling-0.15.2 examples/blinky/rakefile.rb
ceedling-0.15.1 examples/blinky/rakefile.rb
ceedling-0.15.0 examples/blinky/rakefile.rb