I’m developing some native nodes, and repeatedly go through the cycle:
Edit my lib’s .xodp and .cpp
reload the project in XOD-desktop (two steps)
upload (no hotkey)
get gcc errors, or check the arduino serial-console
if gcc error, get the code (“show code for arduino”), and hunt for the line, and try to guess what gcc means
That’s tedious and slow.
I should be able to test my native-node libs by pushing one button, or using a command-line (command line preferred), and get the results without having to open panes/windows/modals (preferable via the terminal and file-system), so the edit/test cycle is faster/immediate. I have to setup a project that uses my native-node lib.
push one button, or using a command-line (command line preferred)
it does the equivalent of “reload”, using this project, but with the updated /lib
and compiles
and outputs the validation/gcc error (console preferred)
keep the generated code around (equivalent of “show arduino code”) as a file
enabling the various debug features (trace, and other suggested features like possibly #33, #780)
uploads to arduino (if it gets this far)
auto magically opening the equivalent of the serial-monitor (this would be real nice, but could be “later”)
integration with the command line is pretty important (makefiles, git, vi/emacs, etc.)
How to implement
Via the command line would be preferred (allows integration with editors, etc.)
Via a hot-key should also be supported.
nkrkv noted:
different possible solutions (upload with CLI, embedded C++ editor, manual project reload, hot reload, re-deploy menu item)
Other ideas on how to make this a more convenient cycle?
XOD has a command line interface for some tasks. Did you note it? There is a command to transpile a patch equivalent to “Deploy → Show Code for Arduino”:
$ xodc transpile ~/xod/project-name @/patch-name
I use a xodc from my development sandbox and to make it available system-wide I’ve created an alias. xodc is actually:
Or you could even use Platform IO CLI tools to do that.
All that are “pro” hacks that allow making things done. Ideally, we should provide a cleaner and more straightforward ways. Of all potential solutions mentioned the easiest to implement are:
Make something like xodc upload /path/to/your/patch for advanced users like you
Provide a UI right within XOD IDE to edit C++ implementations on fly for regular users who are familiar with Arduino but are not comfortable with CLI (most Windows arduiners)
All distributives (and .deb as well) are build by a beast called electron-builder. Its main purpose is to pack GUI applications. It is configurable but only to some degree. I guess including xodc for Linux along with the IDE in the same distro should not be a big deal. Will try it soon.