Code: Select all
$ for m in `cat common.mod`; do webrepl_client.py -p abcd -r 192.168.4.1 < <(sleep 1 && echo -e "import $m\nhelp($m)\nexit"); done > esp8266.detail
$ for m in `cat common.mod`; do webrepl_client.py -p abcd -r 192.168.4.1 < <(sleep 1 && echo -e "import $m\nhelp($m)\nexit"); done > esp32.detail
$
Code: Select all
$ cat norm.sed
s/^\(.*v1.9.4\).*$/\1/g
s/\(0x[0-9a-f]\{8,8\}\)/0x00000000/g
s/\(at [0-9a-f]\{8,8\}\)/at 0x00000000/g
s/^.*### closed ###.*$//g
$
diffs.txt file is in attachment as well as here:
Code: Select all
$ diff --side-by-side <(sed -f norm.sed esp8266.detail) <(sed -f norm.sed esp32.detail) > diffs.txt
$
Some analysis, there are 51 line differences, 121 entries for esp32 only, 51-13=38 entries for esp8266 only:
Code: Select all
$ grep " |" diffs.txt | wc --lines
51
$ grep " >" diffs.txt | wc --lines
121
$ grep " <" diffs.txt | wc --lines
51
$ grep " [<>]" diffs.txt | grep "^[ ]*[<>][ ]*$" | wc --lines
13
$ grep " [<>]" diffs.txt | grep "^[ ]*[<][ ]*$" | wc --lines
13
$
binascii module only has "crc32" function in addition to esp8266 for esp32:
Code: Select all
>>> >>>
MicroPython v1.9.4 MicroPython v1.9.4
Type "help()" for more information. Type "help()" for more information.
>>> import binascii >>> import binascii
>>> help(binascii) >>> help(binascii)
object <module 'ubinascii'> is of type module object <module 'ubinascii'> is of type module
__name__ -- ubinascii __name__ -- ubinascii
hexlify -- <function> hexlify -- <function>
unhexlify -- <function> unhexlify -- <function>
a2b_base64 -- <function> a2b_base64 -- <function>
b2a_base64 -- <function> b2a_base64 -- <function>
> crc32 -- <function>
>>> exit >>> exit
In math module constants have different resolution (at lest in help display), expm1 is only available for esp32:
Code: Select all
>>> >>>
MicroPython v1.9.4 MicroPython v1.9.4
Type "help()" for more information. Type "help()" for more information.
>>> import math >>> import math
>>> help(math) >>> help(math)
object <module 'math'> is of type module object <module 'math'> is of type module
__name__ -- math __name__ -- math
e -- 2.71828 | e -- 2.718282
pi -- 3.14159 | pi -- 3.141593
sqrt -- <function> sqrt -- <function>
pow -- <function> pow -- <function>
exp -- <function> exp -- <function>
> expm1 -- <function>
log -- <function> log -- <function>
...
There are false positives, mostly because "diff" cannot resolve different module feature orderings, sometimes because constants have different values (eg. SOL_SOCKET in socket module). But overall diffs.txt gives a good overview of the differences between esp8266 and esp32 MicroPython common module features.