Class: EmbedUtils::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- EmbedUtils::RakeTask
- Defined in:
- lib/embed_utils/rake_task.rb
Constant Summary collapse
- BUILD_DIR =
'build'- HEX_FILE =
"#{BUILD_DIR}/main.hex"- ELF_FILE =
"#{BUILD_DIR}/main.elf"- LIBS_ARCHIVE =
"#{BUILD_DIR}/libcore.a"- LIBRARIES =
%w[arduino]- LIBRARIES_DIR =
'libraries'- SRC_DIR =
'src'- ARDUINO_DIR =
'/usr/local/arduino'- CC =
'avr-gcc'- CXX =
'avr-g++'- AR =
'avr-ar'- OBJCOPY =
'avr-objcopy'- SIZE =
'avr-size'- CXXFLAGS =
%w[ -std=c++11 -fno-exceptions -fno-threadsafe-statics ]- PORT =
FIXME: for default one, sort /dev/cuaU? by date and pick last one
ENV.fetch 'PORT', '/dev/cuaU1'
Instance Attribute Summary collapse
-
#arduino_dir ⇒ Object
Returns the value of attribute arduino_dir.
-
#board ⇒ Object
Returns the value of attribute board.
-
#libraries ⇒ Object
Returns the value of attribute libraries.
-
#libs_archive ⇒ Object
Returns the value of attribute libs_archive.
-
#options ⇒ Object
Returns the value of attribute options.
-
#src_dir ⇒ Object
Returns the value of attribute src_dir.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/embed_utils/rake_task.rb', line 37 def initialize @board = Board[:uno] @libs_archive = LIBS_ARCHIVE @libraries = LIBRARIES @src_dir = SRC_DIR @arduino_dir = ARDUINO_DIR = [*ENV['OPTIONS']&.split].compact yield self if block_given? define end |
Instance Attribute Details
#arduino_dir ⇒ Object
Returns the value of attribute arduino_dir.
35 36 37 |
# File 'lib/embed_utils/rake_task.rb', line 35 def arduino_dir @arduino_dir end |
#board ⇒ Object
Returns the value of attribute board.
34 35 36 |
# File 'lib/embed_utils/rake_task.rb', line 34 def board @board end |
#libraries ⇒ Object
Returns the value of attribute libraries.
35 36 37 |
# File 'lib/embed_utils/rake_task.rb', line 35 def libraries @libraries end |
#libs_archive ⇒ Object
Returns the value of attribute libs_archive.
35 36 37 |
# File 'lib/embed_utils/rake_task.rb', line 35 def libs_archive @libs_archive end |
#options ⇒ Object
Returns the value of attribute options.
35 36 37 |
# File 'lib/embed_utils/rake_task.rb', line 35 def end |
#src_dir ⇒ Object
Returns the value of attribute src_dir.
35 36 37 |
# File 'lib/embed_utils/rake_task.rb', line 35 def src_dir @src_dir end |