Page 1 of 1

micropython framework

Posted: Mon Nov 20, 2017 10:02 pm
by OutoftheBOTS_
First of all thanks to everyone that is donating their time to make micropython a reality.

Ok I am new to micropython coming from Raspberry pi. One of the reasons for my learning about micropython (mainly for the ESP chips) is to get around the real time problems that RPi has due to the operating system. I am just starting to understand how micropython works. Comparing micropython to say ardunio bootloader, Ardunio IDE percomiles the program and bootloader is more just and uploader system. I understand micropython has the interpreter on board. When I execute a script on micropython does it them compile the script to a machine code then execute it as machine code so that it runs in real time or doe it execute it as a python script having to interpret each line of code as it executes the script meaning it won't execute in the same number of CPU clock cycles as a compiled program??

Re: micropython framework

Posted: Mon Nov 20, 2017 11:21 pm
by dhylands
MicroPython compiles the script into bytecodes and then executes the bytecodes.

There are also code emitters which can generate assembly directly. See: https://docs.micropython.org/en/latest/ ... ython.html

Re: micropython framework

Posted: Tue Nov 21, 2017 1:52 am
by OutoftheBOTS_
Thanks :)