scripts gdb to download and run code on the target
gdb is a pretty powerful debugger. I've used its Python (gasp!) interface for pretty-printing and complex data structure tracking and visualization; it all started
here.
I'm becoming cranky too. Too many posters appear (to me, naturally) that they would score poorly on a "critical thinking analysis" type test in a job interview.
I don't know if you think I belong to that set, but nevertheless, I do agree.
A quick recap of how I saw the most interesting bits in this thread:
nctnico first described the rough idea of using a query-response interface or a scripting language for the high-level logic only, in
#5. Picuino's post
#6 describes their initial intended use cases –– roughly,
learning and exploration, not to avoid using a proper debugger. In
#17 rstofer outlined how they used a higher-level language (TinyBasic) for "testing" 8085 projects.
Next, tellurium brought up doing initial embedded environment on a desktop machine in
#24, with others (nctnico in
#25, tggzzz in
#26, etc.) describing positive experiences doing that. In
#30, I roughly sketch how one can use Gtk in Linux for much easier embedded user interface development.
SiliconWizard pointed out in
#38 that a better approach would be to look at ones
needs, and starting from there instead.
In
#52, nctnico suggested a command-line interface for Picuino's use cases.
In
#64, I mentioned that my own use cases vary from experimentation to debugging. I didn't think to mention that I don't use it to debug the code on the microcontroller itself, but other things connected to the microcontroller. (I once even used a pair of Teensys connected via UART (very short wires), so that I could use one to "pose" as a completely different USB device (a vinyl cutter), "playing back" captured USB data, but under the control of the other Teensy, and that other one controller by my program. I could have used a kernel driver to skip the entire USB hardware loop, but this was easier.)
I spent most of the message trying to show that one doesn't really need a full programming language for this kind of stuff, as a very simple query-response or command line interpreter will do just fine.
In
#86, I show the key snippets I use, and finally describe my own uses, like experimenting with external actuator parameters for optimal responses, plus this:
In a design sense, this is very close to attaching a debugger to your microcontroller, and using it to modify the RAM state or execute specific functions.
For playing with controlling external devices, I like this approach better than a debugger, because this way the microcontroller firmware runs normally and is always in full control, instead of being under the debugger control. This minimizes the differences between "normal operation" and "exploring settings", and thus ensures the results found via such exploration are consistent even when used with this machinery later on.
Others described similar use cases (nctnico
#101, slugrustle
#128 and
#136): that use case pattern seems to be quite old and well known.
In
#161, Picuino brought up AVRShell. I consider it an excellent
educational tool, for someone learning embedded development. The way you can easily add your own C code "programs" to be multitasked, and with a few commands explore the entire state while the device is running, is definitely useful as a learning tool.
The key here is possibly nctnico's post
#170:
IMHO you should see a debugger and command line interface as complementary.
Exactly. I myself use the query-response/command interfaces in microcontrollers I use as tools. I can see very interesting educational/teaching possibilities with AVRShell. Having a simple, robust way to check the internal state of a running system (already in production) is certainly useful. These are all use cases where you really don't want to have to use a debugger instead. (And in cases like production systems, it may not be at all feasible to provide a debugger to the end user anyway.)
Getting bogged down with someone not understanding and utterly ignoring all other uses except for debugging code in a product, is .. well, so frustrating that I ended up writing this post.
