EmbeddedRelated.com
Forums
The 2026 Embedded Online Conference

Mecrisp on the TI Stellaris Launchpad

Started by rickman April 2, 2015
In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote:
> 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?
AIUI if you ask stty for speed, unless you give it a device name it'll return the speed of the terminal you're typing in at the moment. Terminal speed is, I think, supposed to be a hint to programs how much data they're likely to be able to output before the serial port gets congested. If connect to your Unix timesharing system via a VT100 then termcap will say it's at 9600 baud - not only do you need to configure the serial port but it could cause programs to adapt to the speed. This is all water under the 1970s bridge, so I'd imagine 'speed 0' means 'I don't care about that stuff any more'.
> Even when I run microcom the target does not respond. I have to reboot > which resets the target too. :(
Is it anything to do with CTS/RTS/DSR/DTR? A slow serial line getting wedged isn't uncommon if you're lacking flow control and doing bulk downloads. Theo
On 2015-05-10, rickman <gnuarm@gmail.com> wrote:
> > 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; >
If you are checking it after exit, that means nothing as the program could be saving the current settings on entry and restoring them on exit. Try using stty from another terminal while the program is running to see what the terminal settings have been set to by the program.
> 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. :( >
Check the flow control is what you would expect; incompatible flow control settings could _easily_ cause this. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
On 10.5.15 12:32, Theo Markettos wrote:
> In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote: >> 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? > > AIUI if you ask stty for speed, unless you give it a device name it'll > return the speed of the terminal you're typing in at the moment. Terminal > speed is, I think, supposed to be a hint to programs how much data they're > likely to be able to output before the serial port gets congested. If > connect to your Unix timesharing system via a VT100 then termcap will say > it's at 9600 baud - not only do you need to configure the serial port but it > could cause programs to adapt to the speed. This is all water under the > 1970s bridge, so I'd imagine 'speed 0' means 'I don't care about that > stuff any more'. > >> Even when I run microcom the target does not respond. I have to reboot >> which resets the target too. :( > > Is it anything to do with CTS/RTS/DSR/DTR? A slow serial line getting > wedged isn't uncommon if you're lacking flow control and doing bulk > downloads. > > Theo
It could be software flow control, X-on, X-off getting wedged. -- -TV
In article <min1oo$lv5$1@dont-email.me>, rickman  <gnuarm@gmail.com> wrote:
>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. :(
If you use serial over USB, the port settings like speed are virtually meaningless.
> >-- > >Rick
Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
On 5/10/2015 5:32 AM, Theo Markettos wrote:
> In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote: >> 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? > > AIUI if you ask stty for speed, unless you give it a device name it'll > return the speed of the terminal you're typing in at the moment. Terminal > speed is, I think, supposed to be a hint to programs how much data they're > likely to be able to output before the serial port gets congested. If > connect to your Unix timesharing system via a VT100 then termcap will say > it's at 9600 baud - not only do you need to configure the serial port but it > could cause programs to adapt to the speed. This is all water under the > 1970s bridge, so I'd imagine 'speed 0' means 'I don't care about that > stuff any more'. > >> Even when I run microcom the target does not respond. I have to reboot >> which resets the target too. :( > > Is it anything to do with CTS/RTS/DSR/DTR? A slow serial line getting > wedged isn't uncommon if you're lacking flow control and doing bulk > downloads.
It appeared to be the speed. It seems there is some different handling of the tty settings in the two programs, microcom and e4thcom so that e4thcom leaves the port is a state that disrupts microcom. I set the data rate from stty and got microcom to work again. But now something else is messed up and even rebooting and cycling power won't fix it. I can get microcom to work, but the target won't respond unless I hit enter twice rapidly. 8-* This is getting to be rather frustrating. -- Rick
On 10/05/15 15:48, rickman wrote:
> On 5/10/2015 5:32 AM, Theo Markettos wrote: >> In comp.sys.raspberry-pi rickman <gnuarm@gmail.com> wrote: >>> 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? >> >> AIUI if you ask stty for speed, unless you give it a device name it'll >> return the speed of the terminal you're typing in at the moment. >> Terminal >> speed is, I think, supposed to be a hint to programs how much data >> they're >> likely to be able to output before the serial port gets congested. If >> connect to your Unix timesharing system via a VT100 then termcap will say >> it's at 9600 baud - not only do you need to configure the serial port >> but it >> could cause programs to adapt to the speed. This is all water under the >> 1970s bridge, so I'd imagine 'speed 0' means 'I don't care about that >> stuff any more'. >> >>> Even when I run microcom the target does not respond. I have to reboot >>> which resets the target too. :( >> >> Is it anything to do with CTS/RTS/DSR/DTR? A slow serial line getting >> wedged isn't uncommon if you're lacking flow control and doing bulk >> downloads. > > It appeared to be the speed. It seems there is some different handling > of the tty settings in the two programs, microcom and e4thcom so that > e4thcom leaves the port is a state that disrupts microcom. I set the > data rate from stty and got microcom to work again. But now something > else is messed up and even rebooting and cycling power won't fix it. I > can get microcom to work, but the target won't respond unless I hit > enter twice rapidly. 8-* > > This is getting to be rather frustrating. >
We;come to the wonderful world of serial comms. I am SO glad is almost like a horse and cart,. There, but no one uses it -- Everything you read in newspapers is absolutely true, except for the rare story of which you happen to have first-hand knowledge. &ndash; Erwin Knoll
On 5/10/2015 5:37 AM, Simon Clubley wrote:
> On 2015-05-10, rickman <gnuarm@gmail.com> wrote: >> >> 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; >> > > If you are checking it after exit, that means nothing as the program > could be saving the current settings on entry and restoring them on > exit. > > Try using stty from another terminal while the program is running to > see what the terminal settings have been set to by the program. > >> 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. :( >> > > Check the flow control is what you would expect; incompatible flow > control settings could _easily_ cause this.
What should it be set to??? -- Rick
In comp.sys.raspberry-pi Albert van der Horst <albert@spenarnc.xs4all.nl> wrote:
> If you use serial over USB, the port settings like speed are virtually > meaningless.
Only if it's emulated serial, for instance a 3G dongle pretending to be a modem. If it ever goes into real serial (eg a USB-RS232 adaptor) then the settings matter. Theo
On 5/10/2015 11:56 AM, Theo Markettos wrote:
> In comp.sys.raspberry-pi Albert van der Horst <albert@spenarnc.xs4all.nl> wrote: >> If you use serial over USB, the port settings like speed are virtually >> meaningless. > > Only if it's emulated serial, for instance a 3G dongle pretending to be a > modem. If it ever goes into real serial (eg a USB-RS232 adaptor) then the > settings matter.
In this case there is a real serial port between the two chips on the launchpad. No handshakes though. -- Rick
On 2015-05-10, rickman <gnuarm@gmail.com> wrote:
> > It appeared to be the speed. It seems there is some different handling > of the tty settings in the two programs, microcom and e4thcom so that > e4thcom leaves the port is a state that disrupts microcom. I set the > data rate from stty and got microcom to work again. But now something > else is messed up and even rebooting and cycling power won't fix it. I > can get microcom to work, but the target won't respond unless I hit > enter twice rapidly. 8-* >
It sounds to me like you have managed to configure the target to autobaud mode. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
The 2026 Embedded Online Conference