-
-
Notifications
You must be signed in to change notification settings - Fork 398
/
Copy pathupload.proto
183 lines (167 loc) · 7.13 KB
/
upload.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// This file is part of arduino-cli.
//
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to [email protected].
syntax = "proto3";
package cc.arduino.cli.commands.v1;
option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands";
import "cc/arduino/cli/commands/v1/common.proto";
import "cc/arduino/cli/commands/v1/port.proto";
message UploadRequest {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1;
// Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
// If this field is not defined, the FQBN of the board attached to the sketch
// via the `BoardAttach` method is used.
string fqbn = 2;
// Path where the sketch to be uploaded is stored. Unless the `import_file`
// field is defined, the compiled binary is assumed to be at the location and
// filename under this path where it is saved by the `Compile` method.
string sketch_path = 3;
// The port of the board.
Port port = 4;
// Whether to turn on verbose output during the upload.
bool verbose = 5;
// After upload, verify that the contents of the memory on the board match the
// uploaded binary.
bool verify = 6;
// When `import_file` is specified, it overrides the `import_dir` and
// `sketch_path` params.
string import_file = 7;
// Custom path to a directory containing compiled files. When `import_dir` is
// not specified, the standard build directory under `sketch_path` is used.
string import_dir = 8;
// The programmer to use for upload. If set an UploadUsingProgrammer is
// triggered instead of a normal upload. The UploadUsingProgrammer call may
// also be used for explicit error check.
string programmer = 9;
// If set to true, the actual upload will not be performed but a trace output
// will be printed stdout. This is for debugging purposes.
bool dry_run = 10;
// User provided fields usually used by upload tools that need authentication
// or in any case fields that can be customized by the user at upload time
// and cannot be known previously.
// For more info:
// https://arduino.github.io/arduino-cli/latest/platform-specification/#user-provided-fields
map<string, string> user_fields = 11;
}
message UploadResponse {
// The output of the upload process.
bytes out_stream = 1;
// The error output of the upload process.
bytes err_stream = 2;
}
message ProgrammerIsRequiredForUploadError {}
message UploadUsingProgrammerRequest {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1;
// Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
// If this field is not defined, the FQBN of the board attached to the sketch
// via the `BoardAttach` method is used.
string fqbn = 2;
// Path where the sketch to be uploaded is stored. Unless the `import_file`
// field is defined, the compiled binary is assumed to be at the location and
// filename under this path where it is saved by the `Compile` method.
string sketch_path = 3;
// The port of the board.
Port port = 4;
// Whether to turn on verbose output during the upload.
bool verbose = 5;
// After upload, verify that the contents of the memory on the board match the
// uploaded binary.
bool verify = 6;
// When `import_file` is specified, it overrides the `import_dir` and
// `sketch_path` params.
string import_file = 7;
// Custom path to a directory containing compiled files. When `import_dir` is
// not specified, the standard build directory under `sketch_path` is used.
string import_dir = 8;
// The programmer to use for upload.
string programmer = 9;
// If set to true, the actual upload will not be performed but a trace output
// will be printed stdout. This is for debugging purposes.
bool dry_run = 10;
// User provided fields usually used by upload tools that need authentication
// or in any case fields that can be customized by the user at upload time
// and cannot be known previously.
// For more info:
// https://arduino.github.io/arduino-cli/latest/platform-specification/#user-provided-fields
map<string, string> user_fields = 11;
}
message UploadUsingProgrammerResponse {
// The output of the upload process.
bytes out_stream = 1;
// The error output of the upload process.
bytes err_stream = 2;
}
message BurnBootloaderRequest {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1;
// Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
string fqbn = 2;
// The port of the programmer used to program the bootloader.
Port port = 3;
// Whether to turn on verbose output during the programming.
bool verbose = 4;
// After programming, verify the contents of the memory on the board match the
// uploaded binary.
bool verify = 5;
// The programmer to use for burning bootloader.
string programmer = 6;
// If set to true, the actual upload will not be performed but a trace output
// will be printed stdout. This is for debugging purposes.
bool dry_run = 7;
// User provided fields usually used by upload tools that need authentication
// or in any case fields that can be customized by the user at upload time
// and cannot be known previously.
// For more info:
// https://arduino.github.io/arduino-cli/latest/platform-specification/#user-provided-fields
map<string, string> user_fields = 11;
}
message BurnBootloaderResponse {
// The output of the burn bootloader process.
bytes out_stream = 1;
// The error output of the burn bootloader process.
bytes err_stream = 2;
}
message ListProgrammersAvailableForUploadRequest {
Instance instance = 1;
string fqbn = 2;
}
message ListProgrammersAvailableForUploadResponse {
repeated Programmer programmers = 1;
}
message SupportedUserFieldsRequest {
Instance instance = 1;
string fqbn = 2;
// Protocol that will be used to upload, this information is
// necessary to pick the right upload tool for the board specified
// with the FQBN.
string protocol = 3;
}
message UserField {
// Id of the tool that supports this field
string tool_id = 1;
// Name used internally to store and retrieve this field
string name = 2;
// Label is the text shown to the user when they need to input this field
string label = 3;
// True if the value of the field must not be shown when typing, for example
// when the user inputs a network password
bool secret = 4;
}
message SupportedUserFieldsResponse {
// User fields supported by board specified in SupportedUserFieldsRequest.
// If board doesn't support any field it will be empty.
repeated UserField user_fields = 1;
}