Skip to content

[skip changelog] Add documentation for upload components of the gRPC interface #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rpc/commands/commands.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rpc/commands/commands.proto
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ service ArduinoCore {
// Upgrade an installed platform to the latest version.
rpc PlatformUpgrade(PlatformUpgradeReq) returns (stream PlatformUpgradeResp);

// Upload a compiled sketch to an Arduino board.
rpc Upload(UploadReq) returns (stream UploadResp);

// Search for a platform in the platforms indexes.
Expand Down
39 changes: 27 additions & 12 deletions rpc/commands/upload.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion rpc/commands/upload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,32 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands";
import "commands/common.proto";

message UploadReq {
// 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.
string 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;
string import_file = 7 [deprecated = true]; // DEPRECTAED: Use import_dir instead
string import_file = 7 [deprecated = true]; // DEPRECATED: Use import_dir instead
// 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;
}

message UploadResp {
// The output of the upload process.
bytes out_stream = 1;
// The error output of the upload process.
bytes err_stream = 2;
}