EmbeddedRelated.com
Forums
The 2026 Embedded Online Conference

Mecrisp on the TI Stellaris Launchpad

Started by rickman April 2, 2015
On 4/21/2015 12:34 PM, sbattazzo@gmail.com wrote:
> On Sunday, April 19, 2015 at 2:04:31 PM UTC-7, rickman wrote: >> On 4/18/2015 3:22 PM, Stephen Pelc wrote: >>> On Fri, 17 Apr 2015 00:19:42 -0400, rickman <gnuarm@gmail.com> wrote: >>> >>>> Seems they did a poor job on power distribution on the >>>> original design. The rPi 2 model B is supposed to be better. It can >>>> also be used for real PC work... like web browsing. >>> >>> The B2 is significantly faster than the B+, even for single core >>> apps. We are using Raspbian. >>> >>>> Now I have to figure out how to get a terminal emulator working on the >>>> rPi. Can't be too hard... I just have to research it on my laptop >>>> rather than on the rPi. >>> >>> The "standard" Linux terminal program is minicom. >>> >>> You will get far less noise in responses if you post the Linux >>> questions on a Raspberry Pi group. RPi respondes seem to be much >>> nicer than the average Lunux person. Similarly, I get much better >>> Google responses when Raspberry Pi is included in the search request. >> >> Thanks. I've been trying to get minicom installed and have not figured >> it out. I have crossposted to the rpi group, but some folks don't >> crosspost their replies which is ok with me. So I am discussing this >> there as well. >> >> -- >> >> Rick > > Rick, if you're using Debian or Ubuntu on the pi then you should be able to install minicom with apt-get install out of the box. Otherwise I think it can pretty easily be installed from source in exactly the same way as the lm4flash thing.. just grab the source off of sourceforge or github or wherever it's being hosted, type "make", and maybe "make install" if the Makefile has that option, and it will copy the executable and man files into the right path. > > However if you're using the monitor/keyboard/mouse on the pi, then I might recommend gtkterm instead as it has a graphical menu with drop-downs and pop up boxes, where as minicom requires you to use a bunch of shortcut keys to tweak the settings.. once again apt-get install should do the job. > Similarly I like gedit as a text editor, it's a bit notepad-like but has syntax highlighting and some other helpful features. Not the most full-featured, but at least it doesn't make you do keyboard commands to navigate through different modes to get things done. > > Getting the software tools you need on a Linux environment isn't all that bad, most of the time it's a matter of seeing if it's in the repositories, maybe adding a new repository to your sources list, or as a last resort downloading the source and installing. On something like Raspberry Pi the remaining issue is whether or not the software you want actually supports ARM, but with so many platforms being ARM based, I think that will continue to be less of an issue as time moves forward.
BTW, I am running Raspian out of the box. The whole rPi thing was given to me by a friend who got it from work when they decided it wasn't useful for them. Even if I don't use it for this project, I plan to return to the rPi and Linux on some other project. It can't really be all that hard to learn. -- Rick
In comp.lang.forth rickman <gnuarm@gmail.com> wrote:
> On 4/22/2015 3:10 PM, Waldek Hebisch wrote: > > I'm not using gdb, just a terminal interface to the Forth that should be > running on the target processor already. > > At this point the rPi is off the workbench and in a box. I'd be happy > to pull it back out if I had any confidence it is more likely to work > than the drivers for the STMdiscovery boards I've ordered, or if it > would save me the time. I don't expect them to be here before Friday at > the earliest. >
You wrote that you can not install a terminal emulator. What get wrong? For me apt-get install minicom worked as expected. Next minicom -b 115200 -o -D /dev/ttyACM0 connects me to mecrisp. All this on Banana Pi running Raspbian 7. There is a problem, namely mecrisp seem to emit lone linefeed at the end of line, while minicom expects to receive carrage return + linefeed pair. So one gets staicaise pattern on the screen. There is no obvious way to convince minicom to treat linefeed as line ending. I admit that I am surprised by this, I used minicom several times I never met such problem (apparently any other source emits carrage returns). -- Waldek Hebisch hebisch@math.uni.wroc.pl
In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote:
> On 4/18/2015 4:38 AM, Jan Coombs <Jan-54 wrote: > > On Fri, 17 Apr 2015 20:20:30 -0400 > > rickman <gnuarm@gmail.com> wrote: > > > >> Now I am a bit stuck trying to get a serial port terminal emulation > >> running. It would appear that miniterm is the right program to use, but > >> while dealing with the slowness of the rPi when web browsing I have yet > >> to find it exactly. I thought I had found it at a site called Py > >> Serial. But I think what I downloaded with some sort of python wrapper > >> for miniterm. I'm not sure really. > > > > gtkterm is simple and capable, but can't find rPi to check > > this :( To install, type at terminal: > > > > sudo apt-get install gtkterm > > Sounded good, but didn't work. I am familiar with the "sudo apt-get > install" thing. I think that was the first thing I learned a few weeks > ago (or was it months?) when I first powered up the rPi. This time it > says "Unable to locate package gtkterm".
I don't know gtkterm, but the 'canonical' package people often talk about is minicom (not miniterm as you mentioned). However it has an annoying 'curses' (DOS-style) GUI - I prefer picocom because it doesn't have menus on obscure keypresses to configure it, you just tell it the serial device on the command line and away you go: picocom -b 115200 /dev/ttyUSB0
> It would be so much easier if I could access newsgroups on the rPi. Oh > well...
So do that then ;-) sudo apt-get install tin NNTPSERVER=nntp.aioe.org tin -r then hit shift-S and type the name of a newsgroup you want to subscribe to. Navigate with the arrow keys. You can of course set it up with your newsserver and name etc (look in ~/.tin/), but the above should work directly. 'Other newsreaders are available', as they say.
> Now I just need to figure out my user name. I haven't logged into this > thing in months. I believe the default is raspberry.
The default username is 'pi' and the password 'raspberry'.
> I'm running Raspbian. I think I have all the pieces now except a > terminal emulator. When reading about miniterm it says it lets the > command window handle ANSI code formatting and that window is called > "terminal". I'm wondering if I need a terminal emulator at all. I > guess the "terminal emulator" reroutes the keystrokes to the serial port > output and the serial port input to the display. There would be no way > to do that with pipes or such. That would allow me to control the > command window from the serial port perhaps which is not what I need.
You don't need a terminal emulator as such - the window that displays your session is already a terminal emulator. If it's on the Pi display then that could be a program like xterm or gnome-terminal, if you're using SSH then it could be a Windows program like PuTTY. That provides the terminal-to-pixels conversion, and then all you need to do is ensure that character stream that reaches it is in the right format. Typically this is done by propagating a TERM environment variable around (which SSH will do for you but picocom won't), for example TERM=vt100, so as long as whatever is outputting text know it's aiming for a vt100 it'll generate the right characters for PuTTY or whatever, even if they pass through three machines on the way. Anyway, for simple stuff you probably don't need to tell your heating controller or whatever to output vt100 codes - ASCII works just fine, the terminal settings only matter for things like cursor movement and graphics. So all you need is a program to display the traffic on the serial port - picocom or minicom will do, but they aren't 'terminal emulators' as such. Theo
In comp.lang.forth Waldek Hebisch <hebisch@math.uni.wroc.pl> wrote:
> In comp.lang.forth rickman <gnuarm@gmail.com> wrote: > > On 4/22/2015 3:10 PM, Waldek Hebisch wrote: > > > > I'm not using gdb, just a terminal interface to the Forth that should be > > running on the target processor already. > > > > You wrote that you can not install a terminal emulator. What > get wrong? For me > > apt-get install minicom > > worked as expected. Next > > minicom -b 115200 -o -D /dev/ttyACM0 > > connects me to mecrisp. All this on Banana Pi running Raspbian 7. > > There is a problem, namely mecrisp seem to emit lone linefeed > at the end of line, while minicom expects to receive carrage > return + linefeed pair. So one gets staicaise pattern on the > screen. There is no obvious way to convince minicom to treat > linefeed as line ending. I admit that I am surprised by this, > I used minicom several times I never met such problem (apparently > any other source emits carrage returns). >
I tried another program, that is microcom: apt-get install microcom installs it, then microcom -p /dev/ttyACM0 connects me to mecrisp. It seems to work fine (unlike mincom there is no staircaise pattern). BTW: Both commands as root. To use as ordinary users one needs to set permissions as described in other posts. -- Waldek Hebisch hebisch@math.uni.wroc.pl
On 4/23/2015 2:59 AM, Theo Markettos wrote:
> In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote: >> On 4/18/2015 4:38 AM, Jan Coombs <Jan-54 wrote: >>> On Fri, 17 Apr 2015 20:20:30 -0400 >>> rickman <gnuarm@gmail.com> wrote: >>> >>>> Now I am a bit stuck trying to get a serial port terminal emulation >>>> running. It would appear that miniterm is the right program to use, but >>>> while dealing with the slowness of the rPi when web browsing I have yet >>>> to find it exactly. I thought I had found it at a site called Py >>>> Serial. But I think what I downloaded with some sort of python wrapper >>>> for miniterm. I'm not sure really. >>> >>> gtkterm is simple and capable, but can't find rPi to check >>> this :( To install, type at terminal: >>> >>> sudo apt-get install gtkterm >> >> Sounded good, but didn't work. I am familiar with the "sudo apt-get >> install" thing. I think that was the first thing I learned a few weeks >> ago (or was it months?) when I first powered up the rPi. This time it >> says "Unable to locate package gtkterm". > > I don't know gtkterm, but the 'canonical' package people often talk about is > minicom (not miniterm as you mentioned). However it has an annoying > 'curses' (DOS-style) GUI - I prefer picocom because it doesn't have menus on > obscure keypresses to configure it, you just tell it the > serial device on the command line and away you go: > picocom -b 115200 /dev/ttyUSB0 > >> It would be so much easier if I could access newsgroups on the rPi. Oh >> well... > > So do that then ;-) > > sudo apt-get install tin > NNTPSERVER=nntp.aioe.org tin -r > > then hit shift-S and type the name of a newsgroup you want to subscribe to. > Navigate with the arrow keys. You can of course set it up with your > newsserver and name etc (look in ~/.tin/), but the above should work > directly. > > 'Other newsreaders are available', as they say. > >> Now I just need to figure out my user name. I haven't logged into this >> thing in months. I believe the default is raspberry. > > The default username is 'pi' and the password 'raspberry'. > >> I'm running Raspbian. I think I have all the pieces now except a >> terminal emulator. When reading about miniterm it says it lets the >> command window handle ANSI code formatting and that window is called >> "terminal". I'm wondering if I need a terminal emulator at all. I >> guess the "terminal emulator" reroutes the keystrokes to the serial port >> output and the serial port input to the display. There would be no way >> to do that with pipes or such. That would allow me to control the >> command window from the serial port perhaps which is not what I need. > > You don't need a terminal emulator as such - the window that displays your > session is already a terminal emulator. If it's on the Pi display then that > could be a program like xterm or gnome-terminal, if you're using SSH then it > could be a Windows program like PuTTY. That provides the terminal-to-pixels > conversion, and then all you need to do is ensure that character stream that > reaches it is in the right format. Typically this is done by propagating a > TERM environment variable around (which SSH will do for you but picocom > won't), for example TERM=vt100, so as long as whatever is outputting text > know it's aiming for a vt100 it'll generate the right characters for PuTTY > or whatever, even if they pass through three machines on the way. > > Anyway, for simple stuff you probably don't need to tell your heating > controller or whatever to output vt100 codes - ASCII works just fine, the > terminal settings only matter for things like cursor movement and graphics. > > So all you need is a program to display the traffic on the serial port - > picocom or minicom will do, but they aren't 'terminal emulators' as such.
I got minicom up (I was calling it miniterm, lol) but it doesn't seem to have a setting for translating LF to CR/LF. The Mecrisp app on the launchpad only sends LF. I also tried setting the "implicit CR on LF" option in Putty which doesn't do the trick either. Just to recap, I have the rPi running headless with the command line on the PC through SSH using Putty. The launchpad running Mecrisp is ttyACM0 on the rPi. Through the Putty session I am running minicom to the launchpad. Mecrisp seems to return "ok.<LF>" which marches across the Putty window until it wraps at the right margin. Any suggestions? -- Rick
On 4/23/2015 10:52 PM, Waldek Hebisch wrote:
> In comp.lang.forth Waldek Hebisch <hebisch@math.uni.wroc.pl> wrote: >> In comp.lang.forth rickman <gnuarm@gmail.com> wrote: >>> On 4/22/2015 3:10 PM, Waldek Hebisch wrote: >>> >>> I'm not using gdb, just a terminal interface to the Forth that should be >>> running on the target processor already. >>> >> >> You wrote that you can not install a terminal emulator. What >> get wrong? For me >> >> apt-get install minicom >> >> worked as expected. Next >> >> minicom -b 115200 -o -D /dev/ttyACM0 >> >> connects me to mecrisp. All this on Banana Pi running Raspbian 7. >> >> There is a problem, namely mecrisp seem to emit lone linefeed >> at the end of line, while minicom expects to receive carrage >> return + linefeed pair. So one gets staicaise pattern on the >> screen. There is no obvious way to convince minicom to treat >> linefeed as line ending. I admit that I am surprised by this, >> I used minicom several times I never met such problem (apparently >> any other source emits carrage returns). >> > > I tried another program, that is microcom: > > apt-get install microcom > > installs it, then > > microcom -p /dev/ttyACM0 > > connects me to mecrisp. It seems to work fine (unlike mincom there > is no staircaise pattern). > > BTW: Both commands as root. To use as ordinary users one needs > to set permissions as described in other posts.
To answer your earlier question the problem was a short between the headphones. I was calling it miniterm rather than minicom. lol I reached the point you describe where Mecrisp is not sending a CR with the LF and minicom can't seem to deal with that or Putty either oddly enough. I guess there is something about an SSH session that interferes with this. I will try microcom (and not microterm, lol) -- Rick
On 4/25/2015 2:40 PM, rickman wrote:
> On 4/23/2015 10:52 PM, Waldek Hebisch wrote: >> In comp.lang.forth Waldek Hebisch <hebisch@math.uni.wroc.pl> wrote: >>> In comp.lang.forth rickman <gnuarm@gmail.com> wrote: >>>> On 4/22/2015 3:10 PM, Waldek Hebisch wrote: >>>> >>>> I'm not using gdb, just a terminal interface to the Forth that >>>> should be >>>> running on the target processor already. >>>> >>> >>> You wrote that you can not install a terminal emulator. What >>> get wrong? For me >>> >>> apt-get install minicom >>> >>> worked as expected. Next >>> >>> minicom -b 115200 -o -D /dev/ttyACM0 >>> >>> connects me to mecrisp. All this on Banana Pi running Raspbian 7. >>> >>> There is a problem, namely mecrisp seem to emit lone linefeed >>> at the end of line, while minicom expects to receive carrage >>> return + linefeed pair. So one gets staicaise pattern on the >>> screen. There is no obvious way to convince minicom to treat >>> linefeed as line ending. I admit that I am surprised by this, >>> I used minicom several times I never met such problem (apparently >>> any other source emits carrage returns). >>> >> >> I tried another program, that is microcom: >> >> apt-get install microcom >> >> installs it, then >> >> microcom -p /dev/ttyACM0 >> >> connects me to mecrisp. It seems to work fine (unlike mincom there >> is no staircaise pattern). >> >> BTW: Both commands as root. To use as ordinary users one needs >> to set permissions as described in other posts. > > To answer your earlier question the problem was a short between the > headphones. I was calling it miniterm rather than minicom. lol > > I reached the point you describe where Mecrisp is not sending a CR with > the LF and minicom can't seem to deal with that or Putty either oddly > enough. I guess there is something about an SSH session that interferes > with this. > > I will try microcom (and not microterm, lol)
Yep, that did the trick. Now I just need to learn Mecrisp. -- Rick
On 4/25/2015 2:35 PM, rickman wrote:
> On 4/23/2015 2:59 AM, Theo Markettos wrote: >> In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote: >>> On 4/18/2015 4:38 AM, Jan Coombs <Jan-54 wrote: >>>> On Fri, 17 Apr 2015 20:20:30 -0400 >>>> rickman <gnuarm@gmail.com> wrote: >>>> >>>>> Now I am a bit stuck trying to get a serial port terminal emulation >>>>> running. It would appear that miniterm is the right program to >>>>> use, but >>>>> while dealing with the slowness of the rPi when web browsing I have >>>>> yet >>>>> to find it exactly. I thought I had found it at a site called Py >>>>> Serial. But I think what I downloaded with some sort of python >>>>> wrapper >>>>> for miniterm. I'm not sure really. >>>> >>>> gtkterm is simple and capable, but can't find rPi to check >>>> this :( To install, type at terminal: >>>> >>>> sudo apt-get install gtkterm >>> >>> Sounded good, but didn't work. I am familiar with the "sudo apt-get >>> install" thing. I think that was the first thing I learned a few weeks >>> ago (or was it months?) when I first powered up the rPi. This time it >>> says "Unable to locate package gtkterm". >> >> I don't know gtkterm, but the 'canonical' package people often talk >> about is >> minicom (not miniterm as you mentioned). However it has an annoying >> 'curses' (DOS-style) GUI - I prefer picocom because it doesn't have >> menus on >> obscure keypresses to configure it, you just tell it the >> serial device on the command line and away you go: >> picocom -b 115200 /dev/ttyUSB0 >> >>> It would be so much easier if I could access newsgroups on the rPi. Oh >>> well... >> >> So do that then ;-) >> >> sudo apt-get install tin >> NNTPSERVER=nntp.aioe.org tin -r >> >> then hit shift-S and type the name of a newsgroup you want to >> subscribe to. >> Navigate with the arrow keys. You can of course set it up with your >> newsserver and name etc (look in ~/.tin/), but the above should work >> directly. >> >> 'Other newsreaders are available', as they say. >> >>> Now I just need to figure out my user name. I haven't logged into this >>> thing in months. I believe the default is raspberry. >> >> The default username is 'pi' and the password 'raspberry'. >> >>> I'm running Raspbian. I think I have all the pieces now except a >>> terminal emulator. When reading about miniterm it says it lets the >>> command window handle ANSI code formatting and that window is called >>> "terminal". I'm wondering if I need a terminal emulator at all. I >>> guess the "terminal emulator" reroutes the keystrokes to the serial port >>> output and the serial port input to the display. There would be no way >>> to do that with pipes or such. That would allow me to control the >>> command window from the serial port perhaps which is not what I need. >> >> You don't need a terminal emulator as such - the window that displays >> your >> session is already a terminal emulator. If it's on the Pi display >> then that >> could be a program like xterm or gnome-terminal, if you're using SSH >> then it >> could be a Windows program like PuTTY. That provides the >> terminal-to-pixels >> conversion, and then all you need to do is ensure that character >> stream that >> reaches it is in the right format. Typically this is done by >> propagating a >> TERM environment variable around (which SSH will do for you but picocom >> won't), for example TERM=vt100, so as long as whatever is outputting text >> know it's aiming for a vt100 it'll generate the right characters for >> PuTTY >> or whatever, even if they pass through three machines on the way. >> >> Anyway, for simple stuff you probably don't need to tell your heating >> controller or whatever to output vt100 codes - ASCII works just fine, the >> terminal settings only matter for things like cursor movement and >> graphics. >> >> So all you need is a program to display the traffic on the serial port - >> picocom or minicom will do, but they aren't 'terminal emulators' as such. > > I got minicom up (I was calling it miniterm, lol) but it doesn't seem to > have a setting for translating LF to CR/LF. The Mecrisp app on the > launchpad only sends LF. > > I also tried setting the "implicit CR on LF" option in Putty which > doesn't do the trick either. > > Just to recap, I have the rPi running headless with the command line on > the PC through SSH using Putty. The launchpad running Mecrisp is > ttyACM0 on the rPi. Through the Putty session I am running minicom to > the launchpad. Mecrisp seems to return "ok.<LF>" which marches across > the Putty window until it wraps at the right margin. > > Any suggestions?
Someone suggested using microcom which handles the LF with no CR issue and I am talking to Mecrisp finally. Now I just have to learn it. -- Rick
On 4/25/2015 3:44 PM, rickman wrote:
> On 4/25/2015 2:35 PM, rickman wrote: >> >> Just to recap, I have the rPi running headless with the command line on >> the PC through SSH using Putty. The launchpad running Mecrisp is >> ttyACM0 on the rPi. Through the Putty session I am running minicom to >> the launchpad. Mecrisp seems to return "ok.<LF>" which marches across >> the Putty window until it wraps at the right margin. >> >> Any suggestions? > > Someone suggested using microcom which handles the LF with no CR issue > and I am talking to Mecrisp finally. Now I just have to learn it.
A fair amount of water has fallen over the damn and I have made some progress on my project. The Forth compiler is installed on the target. Using microcom on the rPi and Extra-Putty on my PC I can talk to the Forth program from the PC. Microcom got me around the problem I had with minicom where I needed the LF from the target translated to CRLF. I have completed my hardware setup and have some software to test, but I can't figure out how to transmit a file to the target either from the rPi or from the PC. Microcom doesn't seem to have an option for sending a file to the target and Putty only seems to support X and Y modem, not a simple dump of a text file. I found picocom and installed it on the rPi, but when I run it I get the configuration info and "Terminal Ready", but none of the commands seem to work. The escape key is supposed to be Cntl-A but nothing I type gets a response. I have to kill the putty session. -- Rick
I took a few more steps today.  I found that Mecrisp will accept 
definitions spread over multiple lines and that Putty has an option that 
lets you drag and drop a file to send it to the target.  It doesn't work 
perfectly, but it works.  Now I can run some source and test it.

To get something working better I tried using e4thcom which knows about 
the command line prompt in mecrisp and can load a file to it.  e4thcom 
installed ok but when I run it I get no response from the target.  I am 
invoking with this command...

e4thcom -t mecrisp -d ttyACM0 -b B9600

It reports this...

/dev/ttyACM0 open, hdl=3 B9600 8N1 CLOCAL ONLCR

but when e4thcom is exited stty returns this...

speed 0 baud; rows 0; columns 0; line = 0;

among other things.  Why would the speed be set to zero?

Even when I run microcom the target does not respond.  I have to reboot 
which resets the target too.  :(

-- 

Rick
The 2026 Embedded Online Conference