propeller-load Does Not Return Control to Shell
Lombard
Posts: 30
I'm just getting started with the Propeller on Kubuntu 13.10. I've been setting up my workflow with propeller-elf-gcc and propeller-load, and everything is great (!) except for one thing. When I run propeller-load with the -t option so I can watch the printf's, etc, come back from the board, I cannot return control to my shell. I'm using zsh and bash.
When propeller-load starts, it says ...
[ Entering terminal mode. Type ESC or Control-C to exit. ]
... before executing the program. Unfortunately, this does not work for me. There seems to be no way to get back to my shell after executing a program. Do I need to do something in my C++ code to help propeller-load exit cleanly?
When propeller-load starts, it says ...
[ Entering terminal mode. Type ESC or Control-C to exit. ]
... before executing the program. Unfortunately, this does not work for me. There seems to be no way to get back to my shell after executing a program. Do I need to do something in my C++ code to help propeller-load exit cleanly?
Comments
Terminal mode is intended to be used interactively, not from a shell. You'll find similar behavior in other terminal emulators. You'll have to leave out the -t option. There are other ways to look at debugging information. For example, you could invest in a small 2x16 serial LCD and hook that to a spare I/O pin to display the output of printf's directed to that I/O pin. I tend to program mostly in Spin and there's a nice 1-pin Video Text display driver in the OBEX that only uses 1 I/O pin to display up to 80x25 on a TV attached to a single I/O pin. I don't know if that's been ported to the Propeller C library yet.
Actually, propeller-load has an option to allow for non-interactive mode: -q. From the --help:
libpropeller uses this feature to allow automatic running of unit tests.
It sounds like Lombard is having the problem of hitting CTRL+C, and nothing happening. I've never had this problem: propeller-load always exits cleanly on CTRL+C for me.
Just to be clear, CTRL+C does not halt execution on the chip. It just closes the terminal.
Ah, ok. So Ctrl-C is actually just freezing propeller-load for me. That seems like a reasonable diagnostic. I guess I will look into having a separate serial listener program for this job. I don't really need the interactivity (although it is a nicety).
Thanks,
David
And now that you mention it, if I do ESC first, it exits fine. If I type Ctrl-C first then ESC (and all other keystrokes) are ineffective. Thanks for taking interest!