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
// createMainCpp function, as the name suggests. will create a main.cpp file inside inoPath
221
+
// createMainCpp function will create a main.cpp file inside inoPath
221
222
// we do this because setup() and loop() functions will be replaced inside the ino file, in order to allow the linking afterwards
222
223
// 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
223
224
funccreateMainCpp(inoPath*paths.Path) {
@@ -237,7 +238,7 @@ _loop();
237
238
createFile(mainCppPath, mainCpp)
238
239
}
239
240
240
-
// removeMainCpp function, as the name suggests. will remove a main.cpp file inside inoPath
241
+
// removeMainCpp function will remove a main.cpp file inside inoPath
241
242
// we do this after the compile has been completed, this way we can rerun arduino-cslt again.
242
243
// 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
// This one will include the libsketch.h and basically is the replacement of main.cpp
366
392
// the sketch.ino contains the following:
367
393
sketchFile:=`#include <`+"lib"+sketchName+`.h>
@@ -373,13 +399,20 @@ void loop() {
373
399
}`
374
400
sketchFilePath:=sketchDir.Join(sketchName+".ino")
375
401
createFile(sketchFilePath, sketchFile)
402
+
returnsketchFilePath
403
+
}
376
404
405
+
// createReadmeMdFile is a helper function that is reposnible for the generation of the README.md file containing informations on how to reproduce the build environment
406
+
// it takes the resultJson and some paths.Paths as input to do the required calculations.. The name of the arguments should be sufficient to understand
@@ -397,8 +430,10 @@ The firmware contains additional code licensed with LGPL clause; in order to re-
397
430
398
431
readmeMdPath:=rootDir.Join("README.md")
399
432
createFile(readmeMdPath, readmeMd)
433
+
}
400
434
401
-
// 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 ⬆️)
435
+
// createArchiveFile function will 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: sketchfile.ino)
0 commit comments