Hi everybody
I need to understand micropython internal source code(especially the mechanism of VM working).
for this I have searched a lot about any documents that related to micropython internal working but the more I try the less I get result.
since I want to know is there any document about micropython internal or not? or how can i get some good information about micropython virtual machine?
thanks
Understanding Inside of Micropython
Re: Understanding Inside of Micropython
There is no document about internals.
The documentation for uPy is not even up to date.
You’re gonna have to read the code.
Sent from my iPhone using Tapatalk Pro
The documentation for uPy is not even up to date.
You’re gonna have to read the code.
Sent from my iPhone using Tapatalk Pro
Re: Understanding Inside of Micropython
MicroPython VM works in the same way as any other VM. And there're tons of documentation about how VMs work generated by this civilization. Once you know those, particular details are indeed can be looked up on spot in the source code.
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/
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/
Re: Understanding Inside of Micropython
hadi, I would agree with jickster and pfalcon - the surefire way to learn about uPython is to read the code. I'll add that if you're like me and tend to get caught up in the details that it is important to take it in small chunks. For example when you're trying to understand the garbage collector don't worry about what the bytes in the allocated blocks _mean_ but just what they do in C.
As for the VM itself I have yet to even find any definition of the bytecode that is used - I've felt that it's enough for me to assume that it 'is' CPython bytecode.
Here are some resources that I found helpful:
http://www.aosabook.org/en/500L/a-pytho ... ython.html
http://craftinginterpreters.com/
As a parting thought, why do you need to learn about the VM? If there's a specific reason then it might turn out that you can just leave it as a black box -- however if you're just curious then by all means dive in and see what it does!
As for the VM itself I have yet to even find any definition of the bytecode that is used - I've felt that it's enough for me to assume that it 'is' CPython bytecode.
Here are some resources that I found helpful:
http://www.aosabook.org/en/500L/a-pytho ... ython.html
http://craftinginterpreters.com/
As a parting thought, why do you need to learn about the VM? If there's a specific reason then it might turn out that you can just leave it as a black box -- however if you're just curious then by all means dive in and see what it does!