Great! I'm just getting started with python, and have done a few real simple python serial connections to an Arduino board and a few simple python connections using a python FTDI library (that I compiled from source) to an FT245 interface to 12 and 16-bit A/D converters. Going the other way by having python running on the Arduino mega sounds like "just the ticket."
So...
I downloaded pymite-08.tar.gz, verified the sha1sum, and unzipped it on my Centos 5.5 Linux system.
Then I did a "make" to get the workstation version compiled for testing. (GNU gcc version 4.1.2). The build process was uneventful, so I did "make check" to make sure it could work as advertised on the workstation before trying the cross compile.
Well, it got through all of the unit tests OK, but...
When it got to src/tests/system/t047, here's the message
../../tools/pmImgCreator.py -c -u -o t047_img.c --native-file=t047_nat.c t047.py
cc -Os -Wall -Wstrict-prototypes -Werror -I../../vm -I/home/dave/cprogs/pymite/pymite-08/src/tests/system -o t047.out t047_nat.c t047_img.c t047.c plat.o ../../vm/libpmvm_desktop.a
./t047.out
Error: 0xE5
Release: 0x08
FileId: 0x00
LineNum: 0
Traceback (top first):
t047()
<module>.
I looked at src/tests/system/t047.py and found the line line that (I think) caused it to choke. Here's line 55:
assert string.count("","") == 0
I ran the following line through python 2.4 and python 2.6 on the workstation.
>>> import string
>>> print 'string.count("","") =', string.count("","")
string.count("","") = 1
The lines 55-60 in t047.py look like this:
assert string.count("","") == 0
assert string.count("","a") == 0
assert string.count("a","") == 0
assert string.count("","\0") == 0
assert string.count("\0","\0") == 0
assert string.count("\0","") == 0
So I created a little python program to show the values of the counts
import string
print ' 1: string.count("","") =', string.count("","")
print ' 2: string.count("","a") =', string.count("","a")
print ' 3: string.count("a","") =', string.count("a","")
print ' 4: string.count("","\\0") =', string.count("","\0")
print ' 5: string.count("\\0","\\0") =', string.count("\0","\0")
print ' 6: string.count("\\0","") =', string.count("\0","")
Here's what I got with python 2.4 and python 2.6:
1: string.count("","") = 1
2: string.count("","a") = 0
3: string.count("a","") = 2
4: string.count("","\0") = 0
5: string.count("\0","\0") = 1
6: string.count("\0","") = 2
Since I am a novice in python, I didn't want to change anything in t047.py to try to "get it to work" because I wanted to ask the questions:
Have you verified that the tarball is valid for building and testing?
What should the count values be? Are they really all supposed to be zero?
What version of python is it supposed to be compatible with?
Have you run "make check" on your workstation?
What is your workstation operating system?
What version of python is on your workstation?
Regards,
Dave
Footnote:
When I bypassed t047, I got errors from other files (t102, t110, t136 and t160), but I didn't want to go any farther without getting some understanding of what went wrong with the first one.