Skip to content

Commit edf7683

Browse files
authored
rename cslt-tool to arduino-cslt (#13)
1 parent 1ea44ce commit edf7683

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
cslt-tool
1+
arduino-cslt
22
.vscode
33
lib*

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# cslt-tool
1+
# arduino-cslt
22

3-
`cslt-tool` is a convenient wrapper of [arduino-cli](https://github.com/arduino/arduino-cli), it compiles Arduino sketches outputting a precompiled library in the current working directory.
3+
`arduino-cslt` is a convenient wrapper of [arduino-cli](https://github.com/arduino/arduino-cli), it compiles Arduino sketches outputting a precompiled library in the current working directory.
44
It generates a json file in the `extras/` folder that contains information regarding libraries and core to use in order to build the sketch. The result is achieved by parsing the verbose output of `arduino-cli` and by using [GNU ar](https://sourceware.org/binutils/docs/binutils/ar.html) to generate an archive of the object files.
55

66
## Prequisites
7-
In order to run this tool you have to install first the [Arduino CLI](https://github.com/arduino/arduino-cli) and have `arduino-cli` binary in your `$PATH`, otherwise `cslt-tool` won't work.
7+
In order to run this tool you have to install first the [Arduino CLI](https://github.com/arduino/arduino-cli) and have `arduino-cli` binary in your `$PATH`, otherwise `arduino-cslt` won't work.
88
Please use a version of the Arduino CLI that has [this](https://github.com/arduino/arduino-cli/pull/1608) change (version > 0.20.2).
99

1010
Another requirement is [`gcc-ar`](https://sourceware.org/binutils/docs/binutils/ar.html) (installable with `apt-get install gcc`) in your `$PATH`.
1111

1212
## Build it
13-
In order to build `cslt-tool` just use `go build`
13+
In order to build `arduino-cslt` just use `go build`
1414

1515
## Usage
16-
`./cslt-tool compile -b <fqbn> <sketch_path>`
16+
`./arduino-cslt compile -b <fqbn> <sketch_path>`
1717

1818
[![asciicast](https://asciinema.org/a/463342.svg)](https://asciinema.org/a/463342)
1919

20-
For example, running `./cslt-tool compile -b arduino:samd:mkrwifi1010 sketch/sketch.ino` should produce a library with the following structure, in the current working directory:
20+
For example, running `./arduino-cslt compile -b arduino:samd:mkrwifi1010 sketch/sketch.ino` should produce a library with the following structure, in the current working directory:
2121
```
2222
libsketch/
2323
├── examples
@@ -34,7 +34,7 @@ libsketch/
3434

3535
This is an example execution:
3636
```
37-
$ ./cslt-tool compile -b arduino:samd:mkrwifi1010 sketch/sketch.ino
37+
$ ./arduino-cslt compile -b arduino:samd:mkrwifi1010 sketch/sketch.ino
3838
INFO[0000] arduino-cli version: git-snapshot
3939
INFO[0000] GNU ar (GNU Binutils) 2.37
4040
INFO[0000] the ino file path is sketch/sketch.ino
@@ -90,7 +90,7 @@ After completing that operation you can compile it with:
9090

9191
`arduino-cli compile -b <fqbn> <libsketch>/examples/sketch/sketch.ino --library <libsketch>`.
9292

93-
It's important to use the `--library` flag to include the precompiled library generated with cslt-tool otherwise the Arduino CLI won't find it.
93+
It's important to use the `--library` flag to include the precompiled library generated with arduino-cslt otherwise the Arduino CLI won't find it.
9494

9595
For example a legit execution looks like this:
9696
```

cmd/compile.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func compileSketch(cmd *cobra.Command, args []string) {
123123
// remove main.cpp file, we don't need it anymore
124124
removeMainCpp(inoPath)
125125

126-
// restore the sketch content, this allows us to rerun cslt-tool if we want without breaking the compile process
126+
// restore the sketch content, this allows us to rerun arduino-cslt if we want without breaking the compile process
127127
createFile(inoPath, string(oldSketchContent))
128128
logrus.Infof("restored %s", inoPath.String())
129129

@@ -227,7 +227,7 @@ _loop();
227227
}
228228

229229
// removeMainCpp function, as the name suggests. will remove a main.cpp file inside inoPath
230-
// we do this after the compile has been completed, this way we can rerun cslt-tool again.
230+
// we do this after the compile has been completed, this way we can rerun arduino-cslt again.
231231
// If we do not remove this file and run the compile again it will fail because a main.cpp file with the same definitions is already present
232232
func removeMainCpp(inoPath *paths.Path) {
233233
mainCppPath := inoPath.Parent().Join("main.cpp")
@@ -316,7 +316,7 @@ author=TODO
316316
maintainer=TODO
317317
sentence=This technically is not a library but a precompiled sketch. The result is produced using ` + os.Args[0] + `
318318
paragraph=
319-
url=https://github.com/arduino/cslt-tool
319+
url=https://github.com/arduino/arduino-cslt
320320
version=1.0.0
321321
precompiled=true`
322322

cmd/root.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212

1313
// rootCmd represents the base command when called without any subcommands
1414
var rootCmd = &cobra.Command{
15-
Use: "cslt-tool",
16-
Short: "cslt-tool is a command-line tool that uses the Arduino CLI to generate objectfiles and a json file with info regarding core and libraries used",
15+
Use: "arduino-cslt",
16+
Short: "arduino-cslt is a command-line tool that uses the Arduino CLI to generate objectfiles and a json file with info regarding core and libraries used",
1717
}
1818

1919
// Execute adds all child commands to the root command and sets flags appropriately.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module cslt-tool
1+
module arduino-cslt
22

33
go 1.17
44

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright © 2021 NAME HERE <EMAIL ADDRESS>
44
*/
55
package main
66

7-
import "cslt-tool/cmd"
7+
import "arduino-cslt/cmd"
88

99
func main() {
1010
cmd.Execute()

0 commit comments

Comments
 (0)