micropython with BeagleBone Black

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
nirinA
Posts: 2
Joined: Wed Jun 04, 2014 1:26 am

micropython with BeagleBone Black

Post by nirinA » Wed Jun 04, 2014 1:59 am

i can build micropython with MICROPY_ENABLE_GC disabled, but get the error below when this variable is enabled:

Code: Select all

CC gccollect.c
gccollect.c: In function 'gc_collect':
gccollect.c:129:5: error: unknown type name 'regs_t'
gccollect.c:130:5: error: implicit declaration of function 'gc_helper_get_regs' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [build/gccollect.o] Error 1
any hint for defining these data type and function on BeagleBone Black?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython with BeagleBone Black

Post by pfalcon » Wed Jun 04, 2014 7:29 pm

You should compile for Thumb2 command encoding (for now). More info can be found in https://github.com/micropython/micropython/issues/448
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

nirinA
Posts: 2
Joined: Wed Jun 04, 2014 1:26 am

Re: micropython with BeagleBone Black

Post by nirinA » Fri Jun 06, 2014 1:43 pm

i tried the patch on issue#448, and the compilation succeeded.
all generic tests passed:

Code: Select all

260 tests performed (8850 individual testcases)
260 tests passed
and below the result of the bytecode tests:

Code: Select all

Testing directory mp-tests...

assert1             :     17 lines, 100.0% correct
assign1             :     38 lines, 100.0% correct
assign2             :     92 lines, 100.0% correct
augassign1          :     37 lines, 100.0% correct
call1               :     13 lines, 100.0% correct
class1              :     28 lines, 100.0% correct
class2              :     34 lines, 100.0% correct
class3              :     83 lines, 100.0% correct
class4              :     67 lines, 100.0% correct
class5              :     86 lines, 100.0% correct
class6              :     73 lines, 100.0% correct
class7              :     42 lines, 100.0% correct
closure1            :      7 lines, 100.0% correct
closure2            :     40 lines, 100.0% correct
closure3            :     56 lines, 100.0% correct
closure4            :     61 lines, 100.0% correct
compare1            :     75 lines,  98.7% correct
const1              :     17 lines,  94.1% correct
continue1           :    151 lines,  94.7% correct
decorate1           :     87 lines, 100.0% correct
del1                :     54 lines, 100.0% correct
del2                :     28 lines, 100.0% correct
dict1               :     22 lines, 100.0% correct
dictcomp1           :     53 lines, 100.0% correct
docstring1          :     49 lines, 100.0% correct
docstring2          :      9 lines, 100.0% correct
fun1                :     22 lines, 100.0% correct
fun2                :    134 lines, 100.0% correct
fun3                :     43 lines, 100.0% correct
fun4                :     30 lines, 100.0% correct
if1                 :     70 lines, 100.0% correct
if2                 :     60 lines, 100.0% correct
if3                 :     33 lines,  93.9% correct, 1 bad 3-field
if4                 :     40 lines,  97.5% correct
ifexpr1             :     13 lines, 100.0% correct
import1             :     32 lines, 100.0% correct
import2             :     13 lines, 100.0% correct
import3             :     47 lines, 100.0% correct
import4             :     22 lines, 100.0% correct
import5             :     33 lines, 100.0% correct
import6             :     91 lines, 100.0% correct
lambda1             :     31 lines, 100.0% correct
lambda2             :     18 lines, 100.0% correct
list1               :     41 lines, 100.0% correct
list2               :     39 lines, 100.0% correct
listcomp1           :     79 lines, 100.0% correct
listcomp2           :     29 lines, 100.0% correct
listcomp3           :     60 lines, 100.0% correct
listcomp4           :     44 lines, 100.0% correct
listcomp5           :    186 lines, 100.0% correct
locals1             :     91 lines, 100.0% correct
ptex                :   1083 lines,  97.9% correct, 1 bad 3-field
raise1              :     70 lines,  98.6% correct
scope0              :     30 lines, 100.0% correct
scope1              :     43 lines, 100.0% correct
scope2              :     52 lines, 100.0% correct
scope3              :     58 lines, 100.0% correct
scope4              :     45 lines, 100.0% correct
scope5              :     56 lines, 100.0% correct
scope6              :     48 lines, 100.0% correct
scope7              :     78 lines, 100.0% correct
set1                :     29 lines, 100.0% correct
setcomp1            :     53 lines, 100.0% correct
slice1              :     95 lines, 100.0% correct
slice2              :     19 lines, 100.0% correct
string1             :     23 lines, 100.0% correct
string2             :     49 lines, 100.0% correct
super1              :    137 lines, 100.0% correct
try1                :     85 lines,  98.8% correct
try2                :     28 lines,  96.4% correct
try3                :     66 lines,  98.5% correct
try4                :    118 lines,  99.2% correct
try5                :     52 lines,  98.1% correct
try6                :     50 lines,  98.0% correct
tuple1              :     73 lines, 100.0% correct
tuple2              :     73 lines, 100.0% correct
tuple3              :     35 lines, 100.0% correct
with1               :     61 lines,  98.4% correct
yield1              :     69 lines, 100.0% correct
yield2              :     67 lines, 100.0% correct


Testing directory pylib-tests...

_compat_pickle      :    252 lines,  99.6% correct
_threading_local    :    445 lines,  99.1% correct, 1 bad 3-field
_weakrefset         :   1115 lines,  99.3% correct
abc                 :    605 lines,  98.7% correct, 1 bad 3-field
aifc                :   3295 lines,  98.7% correct, 5 bad 3-field
antigravity         :     95 lines, 100.0% correct
base64              :   1407 lines,  99.4% correct
bdb                 :   2537 lines,  98.4% correct, 7 bad 3-field
binhex              :   2012 lines,  99.4% correct, 5 bad 3-field
bisect              :    270 lines,  98.1% correct
bz2                 :   1552 lines,  99.3% correct, 2 bad 3-field
cProfile            :    673 lines,  98.7% correct
chunk               :    499 lines,  98.4% correct
code                :    696 lines,  98.7% correct
compileall          : mismatch in number of lines
contextlib          :    736 lines,  97.6% correct, 11 bad 3-field
crypt               :    220 lines,  98.2% correct
dummy_threading     :    138 lines,  99.3% correct
fnmatch             :    361 lines,  97.2% correct
genericpath         :    319 lines,  98.4% correct
getopt              :    766 lines,  98.4% correct
hashlib             :    302 lines,  97.4% correct
heapq               :   1146 lines,  99.0% correct
keyword             :    232 lines,  97.4% correct, 1 bad 3-field
macurl2path         :    390 lines,  98.5% correct
mimetypes           :   1544 lines,  98.7% correct
modulefinder        :   3033 lines,  98.1% correct
nturl2path          :    267 lines,  97.8% correct
opcode              :    724 lines, 100.0% correct
pipes               :    905 lines,  99.3% correct
poplib              :   1022 lines,  99.7% correct, 1 bad 3-field
pty                 :    666 lines,  98.2% correct
reprlib             :    859 lines,  98.3% correct, 10 bad 3-field
rlcompleter         :    438 lines,  96.6% correct
runpy               :    958 lines,  99.0% correct
sched               :    532 lines,  99.6% correct
shelve              :    779 lines,  99.5% correct
socket              :   1315 lines,  98.3% correct, 1 bad 3-field
socketserver        :   1697 lines,  98.5% correct, 8 bad 3-field
sre_constants       :    557 lines, 100.0% correct
stat                :    367 lines,  99.5% correct
struct              :     32 lines, 100.0% correct
sunau               :   1718 lines,  99.2% correct, 3 bad 3-field
symbol              :    249 lines,  99.2% correct
tabnanny            :   1177 lines,  97.9% correct, 3 bad 3-field
tempfile            :   2260 lines,  98.5% correct
this                :     76 lines, 100.0% correct
timeit              :    912 lines,  97.9% correct, 10 bad 3-field
tty                 :    170 lines, 100.0% correct
types               :    325 lines,  99.7% correct
uu                  :    695 lines,  97.8% correct, 2 bad 3-field
wave                :   1756 lines,  99.4% correct, 1 bad 3-field
weakref             :   1547 lines,  97.8% correct
xdrlib              :   1060 lines,  96.1% correct, 39 bad 3-field
thanks you very much for your help,
nirinA

Post Reply