@kennethlimcp, I just read the Spark CLI flash documentation and it is all over the place. It suggests you can flash files to your core that are not .bin! It also seems to suggest that you can flash a directory of files implying it will compile them but a little further down in the text it does say to use spark compile!
I tried "flashing" a directory of files but it does not compile them first. So I am not sure where that description came from and it needs to be rewritten.
spark flash
Sends a firmware binary, a source file, or a directory of source files, or a known app to your core.
Flashing a directory
You can setup a directory of source files and libraries for your project, and the CLI will use those when compiling remotely. You can also create spark.include and / or a spark.ignore file in that directory that will tell the CLI specifically which files to use or ignore.
Flashing one or more source files
The first part, IMO, is incorrect and should only say "firmware binary and a known app". The second part is garbage and only applies to the spark compile command. The last part is like the second and not applicable. Any thoughts?
@kennethlimcp, with --usb, it doesn’t send the files for compiling. With core-id, it does so ya, it seems a bit broken. What the documentation does NOT say is that any file other than .bin will be compiled and NOT sent raw to the core.
Hmm, that looks like a bug, you should be able to flash via USB DFU source files, that are compiled first, then downloaded, and then flashed locally. I’d rather fix the bug than change the documentation to cover up the bug, so I’ll jump on this as soon as I get a chance.