tribble-control 0.4.4
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/DESIGN.md +871 -0
- data/LICENSE +21 -0
- data/README.md +541 -0
- data/examples/tribble.conf +208 -0
- data/examples/vbus-check +140 -0
- data/exe/tribble-control +14 -0
- data/lib/tribble-control/cli/connect.rb +282 -0
- data/lib/tribble-control/cli/flash.rb +102 -0
- data/lib/tribble-control/cli/reset.rb +39 -0
- data/lib/tribble-control/cli/serial.rb +60 -0
- data/lib/tribble-control/cli/usb.rb +104 -0
- data/lib/tribble-control/cli.rb +1230 -0
- data/lib/tribble-control/hub/exsys.rb +248 -0
- data/lib/tribble-control/hub/usb.rb +418 -0
- data/lib/tribble-control/hub.rb +115 -0
- data/lib/tribble-control/platform.rb +271 -0
- data/lib/tribble-control/tally.rb +91 -0
- data/lib/tribble-control/version.rb +8 -0
- data/lib/tribble-control.rb +32 -0
- data/man/man1/tribble-control.1 +1483 -0
- data/tribble-control.gemspec +99 -0
- metadata +192 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
require_relative 'lib/tribble-control/version'
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |spec|
|
|
4
|
+
spec.name = 'tribble-control'
|
|
5
|
+
spec.version = TribbleControl::VERSION
|
|
6
|
+
spec.authors = [ "Stephane D'Alu" ]
|
|
7
|
+
spec.email = [ 'sdalu@sdalu.com' ]
|
|
8
|
+
|
|
9
|
+
spec.summary = 'Power, flash and monitor the boards plugged' \
|
|
10
|
+
' into a switchable USB hub'
|
|
11
|
+
spec.description = <<~DESC
|
|
12
|
+
Switches the ports of a USB hub -- an ExSYS 16-port managed hub
|
|
13
|
+
over its internal FT232 line, or any hub that switches its own
|
|
14
|
+
ports, through hub-class requests (FreeBSD for now) -- and for
|
|
15
|
+
the boards on it speaks SWD through openocd and reads their
|
|
16
|
+
consoles over USB CDC. Which board sits on which port, and
|
|
17
|
+
which ports must never lose power, is read from a
|
|
18
|
+
configuration, so the tool switches the bench it is told about
|
|
19
|
+
and nothing else. What a console's lines mean is left to a
|
|
20
|
+
tally loaded at run time.
|
|
21
|
+
DESC
|
|
22
|
+
|
|
23
|
+
spec.license = 'MIT'
|
|
24
|
+
spec.homepage = 'https://github.com/sdalu/tribble-control'
|
|
25
|
+
|
|
26
|
+
# Published on rubygems.org, and only there. A version fetched from
|
|
27
|
+
# a registry names exactly one tree, which a checkout built under
|
|
28
|
+
# the last release's number does not. The cost is that a release
|
|
29
|
+
# cannot be taken back: a bad one is yanked, and its number is
|
|
30
|
+
# spent.
|
|
31
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
32
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
33
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
34
|
+
|
|
35
|
+
# Class#subclasses, which is how commands are discovered.
|
|
36
|
+
spec.required_ruby_version = '>= 3.1'
|
|
37
|
+
|
|
38
|
+
# The manifest is resolved against this file's directory, not the
|
|
39
|
+
# working one, so it says the same thing wherever it is read from.
|
|
40
|
+
#
|
|
41
|
+
# `gem build` must still run with the checkout as its working
|
|
42
|
+
# directory: RubyGems reads the listed paths relative to the cwd,
|
|
43
|
+
# not to the gemspec, so building from elsewhere fails however this
|
|
44
|
+
# list is written. What the chdir fixes is which failure you get.
|
|
45
|
+
# Without it the globs come back empty and the error names only the
|
|
46
|
+
# literal paths -- a message about README.md and LICENSE for a build
|
|
47
|
+
# that has quietly dropped the entire library. With it the error
|
|
48
|
+
# names every file, which reads as what it is.
|
|
49
|
+
#
|
|
50
|
+
# man/man1/ keeps its shape inside the installed gem, which makes
|
|
51
|
+
# the gem's man/ a usable MANPATH entry. See `rake man:install`.
|
|
52
|
+
spec.files = Dir.chdir(__dir__) {
|
|
53
|
+
Dir['lib/**/*.rb'] +
|
|
54
|
+
Dir['man/man1/*.1'] + Dir['examples/*'] +
|
|
55
|
+
[ 'README.md', 'DESIGN.md', 'LICENSE',
|
|
56
|
+
'tribble-control.gemspec' ]
|
|
57
|
+
}
|
|
58
|
+
spec.bindir = 'exe'
|
|
59
|
+
spec.executables = [ 'tribble-control' ]
|
|
60
|
+
|
|
61
|
+
# 1.2 or better, for what this tool relies on: an exclusive lock on
|
|
62
|
+
# the serial line across a whole read-modify-write, an empty port
|
|
63
|
+
# list refused rather than read as every port, `available` (how the
|
|
64
|
+
# hub is found and named, with the USB path --method usb builds on),
|
|
65
|
+
# and the FreeBSD discovery fix -- an adapter whose tty is not named
|
|
66
|
+
# yet must not be reported as '/dev/tty', or `usb off` would write
|
|
67
|
+
# SP frames at the operator's own terminal. 1.2 also bounds the walk
|
|
68
|
+
# up the sysctl tree and gives a silent line an error message.
|
|
69
|
+
#
|
|
70
|
+
# Pinned to the series for the reason given under ucl below -- the
|
|
71
|
+
# failure mode of a quiet change here is a port switched that
|
|
72
|
+
# should not be.
|
|
73
|
+
spec.add_dependency 'exsys', '~> 1.2' # the hub, over its FT232 line,
|
|
74
|
+
# and finding it on the host
|
|
75
|
+
# One openocd per board at a time, in threads (see each_device).
|
|
76
|
+
# Bounded like the others: 1.28 and 2.3 are the two the suite has
|
|
77
|
+
# run against, 1.x on the workstation and 2.x in the bench's bundle,
|
|
78
|
+
# and a 3.0 that changed what in_threads hands back would change
|
|
79
|
+
# what flash and reset report.
|
|
80
|
+
spec.add_dependency 'parallel', '>= 1.28', '< 3'
|
|
81
|
+
spec.add_dependency 'tty-logger'
|
|
82
|
+
spec.add_dependency 'uart' # board consoles, in `connect`
|
|
83
|
+
# ucl 0.2.0 vendors libucl 0.9.4 and builds it: no system libucl and
|
|
84
|
+
# no mini_portile2 to install on the bench. It also carries the
|
|
85
|
+
# use-after-free and parser-leak fixes.
|
|
86
|
+
#
|
|
87
|
+
# Pinned to the 0.2 series rather than '>= 0.2': the configuration
|
|
88
|
+
# layer depends on load_file handing back string keys, and a
|
|
89
|
+
# key-handling default that changed under a pre-1.0 minor bump
|
|
90
|
+
# would not fail -- it would quietly stop finding 'port' on every
|
|
91
|
+
# entry.
|
|
92
|
+
spec.add_dependency 'ucl', '~> 0.2.0' # the configuration format
|
|
93
|
+
|
|
94
|
+
# Pinned to 5: minitest 6 moved minitest/mock out into a gem of its
|
|
95
|
+
# own, which is a trap worth naming even though nothing here mocks.
|
|
96
|
+
spec.add_development_dependency 'minitest', '~> 5'
|
|
97
|
+
spec.add_development_dependency 'rake'
|
|
98
|
+
spec.add_development_dependency 'rubocop'
|
|
99
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: tribble-control
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.4.4
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Stephane D'Alu
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: exsys
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '1.2'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '1.2'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: parallel
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.28'
|
|
33
|
+
- - "<"
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '3'
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '1.28'
|
|
43
|
+
- - "<"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '3'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: tty-logger
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0'
|
|
53
|
+
type: :runtime
|
|
54
|
+
prerelease: false
|
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
+
requirements:
|
|
57
|
+
- - ">="
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: '0'
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: uart
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
- - ">="
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '0'
|
|
67
|
+
type: :runtime
|
|
68
|
+
prerelease: false
|
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '0'
|
|
74
|
+
- !ruby/object:Gem::Dependency
|
|
75
|
+
name: ucl
|
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - "~>"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: 0.2.0
|
|
81
|
+
type: :runtime
|
|
82
|
+
prerelease: false
|
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - "~>"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: 0.2.0
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: minitest
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '5'
|
|
95
|
+
type: :development
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '5'
|
|
102
|
+
- !ruby/object:Gem::Dependency
|
|
103
|
+
name: rake
|
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - ">="
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '0'
|
|
109
|
+
type: :development
|
|
110
|
+
prerelease: false
|
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
112
|
+
requirements:
|
|
113
|
+
- - ">="
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '0'
|
|
116
|
+
- !ruby/object:Gem::Dependency
|
|
117
|
+
name: rubocop
|
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
123
|
+
type: :development
|
|
124
|
+
prerelease: false
|
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
126
|
+
requirements:
|
|
127
|
+
- - ">="
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '0'
|
|
130
|
+
description: |
|
|
131
|
+
Switches the ports of a USB hub -- an ExSYS 16-port managed hub
|
|
132
|
+
over its internal FT232 line, or any hub that switches its own
|
|
133
|
+
ports, through hub-class requests (FreeBSD for now) -- and for
|
|
134
|
+
the boards on it speaks SWD through openocd and reads their
|
|
135
|
+
consoles over USB CDC. Which board sits on which port, and
|
|
136
|
+
which ports must never lose power, is read from a
|
|
137
|
+
configuration, so the tool switches the bench it is told about
|
|
138
|
+
and nothing else. What a console's lines mean is left to a
|
|
139
|
+
tally loaded at run time.
|
|
140
|
+
email:
|
|
141
|
+
- sdalu@sdalu.com
|
|
142
|
+
executables:
|
|
143
|
+
- tribble-control
|
|
144
|
+
extensions: []
|
|
145
|
+
extra_rdoc_files: []
|
|
146
|
+
files:
|
|
147
|
+
- DESIGN.md
|
|
148
|
+
- LICENSE
|
|
149
|
+
- README.md
|
|
150
|
+
- examples/tribble.conf
|
|
151
|
+
- examples/vbus-check
|
|
152
|
+
- exe/tribble-control
|
|
153
|
+
- lib/tribble-control.rb
|
|
154
|
+
- lib/tribble-control/cli.rb
|
|
155
|
+
- lib/tribble-control/cli/connect.rb
|
|
156
|
+
- lib/tribble-control/cli/flash.rb
|
|
157
|
+
- lib/tribble-control/cli/reset.rb
|
|
158
|
+
- lib/tribble-control/cli/serial.rb
|
|
159
|
+
- lib/tribble-control/cli/usb.rb
|
|
160
|
+
- lib/tribble-control/hub.rb
|
|
161
|
+
- lib/tribble-control/hub/exsys.rb
|
|
162
|
+
- lib/tribble-control/hub/usb.rb
|
|
163
|
+
- lib/tribble-control/platform.rb
|
|
164
|
+
- lib/tribble-control/tally.rb
|
|
165
|
+
- lib/tribble-control/version.rb
|
|
166
|
+
- man/man1/tribble-control.1
|
|
167
|
+
- tribble-control.gemspec
|
|
168
|
+
homepage: https://github.com/sdalu/tribble-control
|
|
169
|
+
licenses:
|
|
170
|
+
- MIT
|
|
171
|
+
metadata:
|
|
172
|
+
allowed_push_host: https://rubygems.org
|
|
173
|
+
source_code_uri: https://github.com/sdalu/tribble-control
|
|
174
|
+
rubygems_mfa_required: 'true'
|
|
175
|
+
rdoc_options: []
|
|
176
|
+
require_paths:
|
|
177
|
+
- lib
|
|
178
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
|
+
requirements:
|
|
180
|
+
- - ">="
|
|
181
|
+
- !ruby/object:Gem::Version
|
|
182
|
+
version: '3.1'
|
|
183
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
|
+
requirements:
|
|
185
|
+
- - ">="
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: '0'
|
|
188
|
+
requirements: []
|
|
189
|
+
rubygems_version: 4.0.16
|
|
190
|
+
specification_version: 4
|
|
191
|
+
summary: Power, flash and monitor the boards plugged into a switchable USB hub
|
|
192
|
+
test_files: []
|