micropython framework

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

micropython framework

Post by OutoftheBOTS_ » Mon Nov 20, 2017 10:02 pm

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??

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: micropython framework

Post by dhylands » Mon Nov 20, 2017 11:21 pm

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

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: micropython framework

Post by OutoftheBOTS_ » Tue Nov 21, 2017 1:52 am

Thanks :)

Post Reply