Issue 175 - fixed 2 ipm issues

109 views
Skip to first unread message

Dean Hall

unread,
Dec 19, 2010, 10:18:58 AM12/19/10
to python-o...@googlegroups.com
I just pushed fixes for Issue 175 to the mainline.
http://code.google.com/p/python-on-a-chip/issues/detail?id=175

This fixes 2 things:

Interactive mode (ipm) now prints characters as they arrive from the
target VM rather than collecting them and waiting until the
REPLY_TERMINATOR is received. For example, the following will print
in real time (without timing out):

ipm> import sys
ipm> for i in range(5):
.... sys.wait(5000)
.... print i
....
0
1
2
3
4

I also fixed the case where an embedded '0x04', which is the reply
terminator, would cause a disruption in the print stream.

BEFORE:
ipm> print "test\x04this"
testipm>

AFTER:
ipm> print "test\x04this"
testthis
ipm>


share and enjoy,

!!Dean

Bryan A. Jones

unread,
Dec 28, 2010, 10:50:04 AM12/28/10
to python-on-a-chip
This is a very good thing for embedded applications, since most have a main loop which never terminates. I had hacked up something in ipm.py earlier to overcome this, but your solution is *much* better. Thanks!


--
You are subscribed to the "python-on-a-chip"  (or p14p for short) Google Group.
Site: http://groups.google.com/group/python-on-a-chip



--
Bryan A. Jones, Ph.D.
Assistant Professor
Department of Electrical and Computer Engineering
231 Simrall / PO Box 9571
Mississippi State University
Mississippi state, MS 39762
http://www.ece.msstate.edu/~bjones
bjones AT ece DOT msstate DOT edu
voice 662-325-3149
fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on
time, his arrival guaranteed by the Blessed and Undisputed Ruler,
High King, High God.
- 1 Tim. 6:14b-15 (The Message)

jani basha

unread,
Aug 12, 2014, 9:38:40 AM8/12/14
to python-o...@googlegroups.com
Hi Bryan,

I have some issue with ipm >> can you please suggest me the workaround for the following issue 

When i load my sample script(test.py and the size is ~2KB only) from ipm prompt for multiple times( about 3 times), i am getting the following error.

Traceback (most recent call first):
  File "../lib/ipm.py", line 97, in ipm
  File "main.py", line 19, in main
MemoryError detected by heap.c:444

Can you please suggest me the workaround for this. 

Regards,
Jani Basha Shaik

Bryan A. Jones

unread,
Aug 15, 2014, 10:39:20 PM8/15/14
to python-o...@googlegroups.com
Jani,

I'd guess you're running out of memory -- what does the source code say for line 444 of heap.c? One fix: reset your micro before running you sample script each time. The size of your script doesn't say how much memory it needs: a line like x = "bop" * 100 will take a lot of RAM!

Bryan


On Tue, Aug 12, 2014 at 8:38 AM, jani basha <jani...@gmail.com> wrote:
Hi Bryan,

I have some issue with ipm >> can you please suggest me the workaround for the following issue 

When i load my sample script(test.py and the size is ~2KB only) from ipm prompt for multiple times( about 3 times), i am getting the following error.

Traceback (most recent call first):
  File "../lib/ipm.py", line 97, in ipm
  File "main.py", line 19, in main
MemoryError detected by heap.c:444

Can you please suggest me the workaround for this. 

Regards,
Jani Basha Shaik


 

On Tuesday, 28 December 2010 21:20:04 UTC+5:30, Bryan a. Jones wrote:

--
--
You are subscribed to the "python-on-a-chip" (or p14p for short) Google Group.
Site: http://groups.google.com/group/python-on-a-chip

---
You received this message because you are subscribed to the Google Groups "python-on-a-chip" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-on-a-ch...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Bryan A. Jones, Ph.D.
Associate Professor
Reply all
Reply to author
Forward
0 new messages