You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ It generates a json file in `extra/` folder that contains information regarding
7
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.
8
8
Please use a version of the arduino CLI that has [this](https://github.com/arduino/arduino-cli/pull/1608) change (version > 0.20.2).
9
9
10
-
Another requirement is o have [`gcc-ar`](https://sourceware.org/binutils/docs/binutils/ar.html) (installable with `apt-get install gcc`) in your `$PATH`.
10
+
Another requirement is [`gcc-ar`](https://sourceware.org/binutils/docs/binutils/ar.html) (installable with `apt-get install gcc`) in your `$PATH`.
11
11
12
12
## Build it
13
13
In order to build `cslt-tool` just use `go build`
@@ -80,9 +80,9 @@ And the content of `libsketch/extra/result.json` is:
80
80
## How to compile the precompiled sketch
81
81
In order to compile the sketch you have first to install manually the libraries and the core listed in the `<libsketch>/extra/result.json` file.
82
82
83
-
You can install a library with `arduino-cli lib install LIBRARY[@VERSION_NUMBER]`.
83
+
You can install a library with [`arduino-cli lib install LIBRARY[@VERSION_NUMBER]`](https://arduino.github.io/arduino-cli/0.20/commands/arduino-cli_lib_install/).
84
84
85
-
You can install a core with `arduino-cli core install PACKAGER:ARCH[@VERSION]`.
85
+
You can install a core with [`arduino-cli core install PACKAGER:ARCH[@VERSION]`](https://arduino.github.io/arduino-cli/0.20/commands/arduino-cli_core_install/).
86
86
87
87
After completing that operation you can compile it with:
// createMainCpp function, as the name suggests. will create a main.cpp file inside inoPath
210
210
// we do this because setup() and loop() functions will be replaced inside the ino file, in order to allow the linking afterwards
211
211
// creating this file is mandatory, we include also Arduino.h because it's a step done by the builder during the building phase, but only for ino files
212
-
funccreateMainCpp(inoPath paths.Path) {
212
+
funccreateMainCpp(inoPath*paths.Path) {
213
213
// the main.cpp contains the following:
214
214
mainCpp:=`#include "Arduino.h"
215
215
void _setup();
@@ -223,13 +223,13 @@ void loop() {
223
223
_loop();
224
224
}`
225
225
mainCppPath:=inoPath.Parent().Join("main.cpp")
226
-
createFile(*mainCppPath, mainCpp)
226
+
createFile(mainCppPath, mainCpp)
227
227
}
228
228
229
229
// removeMainCpp function, as the name suggests. will remove a main.cpp file inside inoPath
230
230
// we do this after the compile has been completed, this way we can rerun cslt-tool again.
231
231
// 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
// run gcc-ar to create an archive containing all the object files except the main.cpp.o (we don't need it because we have created a substitute of it before ⬆️)
356
356
// we exclude the main.cpp.o because we are going to link the archive libsketch.a against sketchName.ino
@@ -382,7 +382,7 @@ void loop() {
382
382
// it takes filePath and fileContent as arguments,
383
383
// filePath points to the location where to save the file
384
384
// fileContent,as the name suggests, include the content of the file
0 commit comments