arduino_sketch_builder 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.gitmodules +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +71 -0
- data/Rakefile +5 -0
- data/arduino-cmake/cmake/ArduinoToolchain.cmake +75 -0
- data/arduino-cmake/cmake/Platform/Arduino.cmake +1846 -0
- data/arduino_sketch_builder.gemspec +22 -0
- data/lib/arduino_sketch_builder.rb +8 -0
- data/lib/arduino_sketch_builder/arduino_cmake_build.rb +52 -0
- data/lib/arduino_sketch_builder/c_make_lists_file_generator.rb +34 -0
- data/lib/arduino_sketch_builder/setup.rb +46 -0
- data/lib/arduino_sketch_builder/version.rb +3 -0
- data/lib/arduino_sketches/CMakeLists.txt +20 -0
- data/lib/arduino_sketches/src/BlinkCustomized/BlinkCustomized.ino +19 -0
- data/lib/arduino_sketches/src/CMakeLists.txt +14 -0
- data/spec/arduino_sketch_builder/arduino_cmake_build_spec.rb +105 -0
- data/spec/arduino_sketch_builder/c_make_lists_file_generator_spec.rb +35 -0
- data/spec/arduino_sketch_builder/setup_spec.rb +86 -0
- data/spec/arduino_sketches_fixture/CMakeLists.txt +20 -0
- data/spec/arduino_sketches_fixture/build/.gitkeep +0 -0
- data/spec/arduino_sketches_fixture/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino +19 -0
- data/spec/arduino_sketches_fixture/src/CMakeLists.txt +16 -0
- data/spec/fixtures/CMakeListsForTestSketch.txt +10 -0
- data/spec/fixtures/MainCMakeLists.txt +22 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/temp/blink_customized_for_test/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino +19 -0
- data/spec/temp/blink_customized_for_test/src/CMakeLists.txt +10 -0
- data/templates/MainCMakeListsTemplate.txt.erb +22 -0
- data/templates/SourceCMakeListsTemplate.txt.erb +10 -0
- data/templates/gitkeep_template +0 -0
- data/templates/root_gitignore_template +2 -0
- metadata +117 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
#=============================================================================#
|
2
|
+
# Author: Tadatoshi Takahashi #
|
3
|
+
# Date: 30.01.2013 #
|
4
|
+
# #
|
5
|
+
# Description: Arduino CMake for arduino_sketch_builder for testing #
|
6
|
+
# #
|
7
|
+
#=============================================================================#
|
8
|
+
set(CMAKE_TOOLCHAIN_FILE ../../arduino-cmake/cmake/ArduinoToolchain.cmake) # Arduino Toolchain
|
9
|
+
|
10
|
+
|
11
|
+
cmake_minimum_required(VERSION 2.8)
|
12
|
+
#====================================================================#
|
13
|
+
# Setup Project #
|
14
|
+
#====================================================================#
|
15
|
+
project(ArduinoSketchBuilder C CXX)
|
16
|
+
|
17
|
+
print_board_list()
|
18
|
+
print_programmer_list()
|
19
|
+
|
20
|
+
add_subdirectory(src) #add the src directory (spec/arduino_sketches_fixture/src) into build
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/*
|
2
|
+
BlinkCustomizedForTest
|
3
|
+
Turns on an LED on for two second, then off for two second, repeatedly.
|
4
|
+
|
5
|
+
This code is used for testing arduino_sketch_builder gem.
|
6
|
+
*/
|
7
|
+
|
8
|
+
void setup() {
|
9
|
+
// initialize the digital pin as an output.
|
10
|
+
// Pin 13 has an LED connected on most Arduino boards:
|
11
|
+
pinMode(13, OUTPUT);
|
12
|
+
}
|
13
|
+
|
14
|
+
void loop() {
|
15
|
+
digitalWrite(13, HIGH); // set the LED on
|
16
|
+
delay(2000); // wait for a second
|
17
|
+
digitalWrite(13, LOW); // set the LED off
|
18
|
+
delay(2000); // wait for a second
|
19
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This configuration file outlines some of the ways Arduino CMake
|
2
|
+
# can be used. For a detailed explenation of all the options please
|
3
|
+
# reade README.rst.
|
4
|
+
#
|
5
|
+
# This file is for testing.
|
6
|
+
|
7
|
+
set(ARDUINO_DEFAULT_BOARD uno) # Default Board ID, when not specified
|
8
|
+
set(ARDUINO_DEFAULT_PORT /dev/tty.usbmodem411) # Default Port, when not specified
|
9
|
+
|
10
|
+
#====================================================================#
|
11
|
+
# BlinkCustomized
|
12
|
+
#====================================================================#
|
13
|
+
generate_arduino_firmware(blink_customized_for_test
|
14
|
+
SKETCH BlinkCustomizedForTest
|
15
|
+
PROGRAMMER tadatoshi
|
16
|
+
NO_AUTOLIBS)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
set(ARDUINO_DEFAULT_BOARD uno) # Default Board ID, when not specified
|
2
|
+
set(ARDUINO_DEFAULT_PORT /dev/tty.usbmodem411) # Default Port, when not specified
|
3
|
+
|
4
|
+
#====================================================================#
|
5
|
+
# TestSketch
|
6
|
+
#====================================================================#
|
7
|
+
generate_arduino_firmware(test_sketch
|
8
|
+
SKETCH TestSketch
|
9
|
+
PROGRAMMER arduino_sketch_builder
|
10
|
+
NO_AUTOLIBS)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#=============================================================================#
|
2
|
+
# Author: Tadatoshi Takahashi #
|
3
|
+
# Date: 30.01.2013 #
|
4
|
+
# #
|
5
|
+
# Description: Arduino CMake for arduino_sketch_builder #
|
6
|
+
# #
|
7
|
+
#=============================================================================#
|
8
|
+
set(CMAKE_TOOLCHAIN_FILE ~/temp/cmake/ArduinoToolchain.cmake) # Arduino Toolchain
|
9
|
+
|
10
|
+
|
11
|
+
cmake_minimum_required(VERSION 2.8)
|
12
|
+
#====================================================================#
|
13
|
+
# Setup Project #
|
14
|
+
#====================================================================#
|
15
|
+
project(ArduinoSketchBuilder C CXX)
|
16
|
+
|
17
|
+
print_board_list()
|
18
|
+
print_programmer_list()
|
19
|
+
|
20
|
+
add_subdirectory(src) #add the src directory into build
|
21
|
+
|
22
|
+
link_directories(~/temp/libraries)
|
data/spec/spec_helper.rb
ADDED
data/spec/temp/blink_customized_for_test/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
/*
|
2
|
+
BlinkCustomizedForTest
|
3
|
+
Turns on an LED on for two second, then off for two second, repeatedly.
|
4
|
+
|
5
|
+
This code is used for testing arduino_sketch_builder gem.
|
6
|
+
*/
|
7
|
+
|
8
|
+
void setup() {
|
9
|
+
// initialize the digital pin as an output.
|
10
|
+
// Pin 13 has an LED connected on most Arduino boards:
|
11
|
+
pinMode(13, OUTPUT);
|
12
|
+
}
|
13
|
+
|
14
|
+
void loop() {
|
15
|
+
digitalWrite(13, HIGH); // set the LED on
|
16
|
+
delay(2000); // wait for a second
|
17
|
+
digitalWrite(13, LOW); // set the LED off
|
18
|
+
delay(2000); // wait for a second
|
19
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
set(ARDUINO_DEFAULT_BOARD uno) # Default Board ID, when not specified
|
2
|
+
set(ARDUINO_DEFAULT_PORT /dev/tty.usbmodem411) # Default Port, when not specified
|
3
|
+
|
4
|
+
#====================================================================#
|
5
|
+
# BlinkCustomizedForTest
|
6
|
+
#====================================================================#
|
7
|
+
generate_arduino_firmware(blink_customized_for_test
|
8
|
+
SKETCH BlinkCustomizedForTest
|
9
|
+
PROGRAMMER arduino_sketch_builder
|
10
|
+
NO_AUTOLIBS)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#=============================================================================#
|
2
|
+
# Author: Tadatoshi Takahashi #
|
3
|
+
# Date: 30.01.2013 #
|
4
|
+
# #
|
5
|
+
# Description: Arduino CMake for arduino_sketch_builder #
|
6
|
+
# #
|
7
|
+
#=============================================================================#
|
8
|
+
set(CMAKE_TOOLCHAIN_FILE <%= root_directory %>/cmake/ArduinoToolchain.cmake) # Arduino Toolchain
|
9
|
+
|
10
|
+
|
11
|
+
cmake_minimum_required(VERSION 2.8)
|
12
|
+
#====================================================================#
|
13
|
+
# Setup Project #
|
14
|
+
#====================================================================#
|
15
|
+
project(ArduinoSketchBuilder C CXX)
|
16
|
+
|
17
|
+
print_board_list()
|
18
|
+
print_programmer_list()
|
19
|
+
|
20
|
+
add_subdirectory(src) #add the src directory into build
|
21
|
+
|
22
|
+
link_directories(<%= root_directory %>/libraries)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
set(ARDUINO_DEFAULT_BOARD uno) # Default Board ID, when not specified
|
2
|
+
set(ARDUINO_DEFAULT_PORT /dev/tty.usbmodem411) # Default Port, when not specified
|
3
|
+
|
4
|
+
#====================================================================#
|
5
|
+
# <%= sketch_name %>
|
6
|
+
#====================================================================#
|
7
|
+
generate_arduino_firmware(<%= sketch_name.underscore %>
|
8
|
+
SKETCH <%= sketch_name %>
|
9
|
+
PROGRAMMER arduino_sketch_builder
|
10
|
+
NO_AUTOLIBS)
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arduino_sketch_builder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tadatoshi Takahashi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Builds Arduino sketch
|
42
|
+
email:
|
43
|
+
- tadatoshi@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- .gitmodules
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- arduino-cmake/cmake/ArduinoToolchain.cmake
|
55
|
+
- arduino-cmake/cmake/Platform/Arduino.cmake
|
56
|
+
- arduino_sketch_builder.gemspec
|
57
|
+
- lib/arduino_sketch_builder.rb
|
58
|
+
- lib/arduino_sketch_builder/arduino_cmake_build.rb
|
59
|
+
- lib/arduino_sketch_builder/c_make_lists_file_generator.rb
|
60
|
+
- lib/arduino_sketch_builder/setup.rb
|
61
|
+
- lib/arduino_sketch_builder/version.rb
|
62
|
+
- lib/arduino_sketches/CMakeLists.txt
|
63
|
+
- lib/arduino_sketches/src/BlinkCustomized/BlinkCustomized.ino
|
64
|
+
- lib/arduino_sketches/src/CMakeLists.txt
|
65
|
+
- spec/arduino_sketch_builder/arduino_cmake_build_spec.rb
|
66
|
+
- spec/arduino_sketch_builder/c_make_lists_file_generator_spec.rb
|
67
|
+
- spec/arduino_sketch_builder/setup_spec.rb
|
68
|
+
- spec/arduino_sketches_fixture/CMakeLists.txt
|
69
|
+
- spec/arduino_sketches_fixture/build/.gitkeep
|
70
|
+
- spec/arduino_sketches_fixture/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino
|
71
|
+
- spec/arduino_sketches_fixture/src/CMakeLists.txt
|
72
|
+
- spec/fixtures/CMakeListsForTestSketch.txt
|
73
|
+
- spec/fixtures/MainCMakeLists.txt
|
74
|
+
- spec/spec_helper.rb
|
75
|
+
- spec/temp/blink_customized_for_test/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino
|
76
|
+
- spec/temp/blink_customized_for_test/src/CMakeLists.txt
|
77
|
+
- templates/MainCMakeListsTemplate.txt.erb
|
78
|
+
- templates/SourceCMakeListsTemplate.txt.erb
|
79
|
+
- templates/gitkeep_template
|
80
|
+
- templates/root_gitignore_template
|
81
|
+
homepage: https://github.com/tadatoshi/arduino_sketch_builder
|
82
|
+
licenses: []
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.0.0
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: Performs calling the code to compile Arduino sketch and upload it to Arduino
|
104
|
+
by Ruby, instead of using Arduino IDE.
|
105
|
+
test_files:
|
106
|
+
- spec/arduino_sketch_builder/arduino_cmake_build_spec.rb
|
107
|
+
- spec/arduino_sketch_builder/c_make_lists_file_generator_spec.rb
|
108
|
+
- spec/arduino_sketch_builder/setup_spec.rb
|
109
|
+
- spec/arduino_sketches_fixture/CMakeLists.txt
|
110
|
+
- spec/arduino_sketches_fixture/build/.gitkeep
|
111
|
+
- spec/arduino_sketches_fixture/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino
|
112
|
+
- spec/arduino_sketches_fixture/src/CMakeLists.txt
|
113
|
+
- spec/fixtures/CMakeListsForTestSketch.txt
|
114
|
+
- spec/fixtures/MainCMakeLists.txt
|
115
|
+
- spec/spec_helper.rb
|
116
|
+
- spec/temp/blink_customized_for_test/src/BlinkCustomizedForTest/BlinkCustomizedForTest.ino
|
117
|
+
- spec/temp/blink_customized_for_test/src/CMakeLists.txt
|