|
| 1 | +Micro Python port to ESP8266 |
| 2 | +============================ |
| 3 | + |
| 4 | +This is a port of Micro Python to the Espressif ESP8266 wifi module. |
| 5 | + |
| 6 | +Currently implemented features include: |
| 7 | +- REPL (Python prompt) over UART0. |
| 8 | +- 24k heap RAM available for Python code. |
| 9 | +- Garbage collector, exceptions. |
| 10 | +- Unicode support. |
| 11 | +- Builtin modules: gc, array, collections, io, struct, sys. |
| 12 | +- C long-long type used as bignum implementation (gives 64 signed ints). |
| 13 | + |
| 14 | +Note that floating-point numbers are not supported. |
| 15 | + |
| 16 | +On the TODO list: |
| 17 | +- Wifi support. |
| 18 | +- GPIO support. |
| 19 | +- Internal filesystem using the flash. |
| 20 | +- ... |
| 21 | + |
| 22 | +Build instructions |
| 23 | +------------------ |
| 24 | + |
| 25 | +The tool chain required for the build is the OpenSource ESP SDK, which can be |
| 26 | +found at <https://github.com/pfalcon/esp-open-sdk>. Clone this repository and |
| 27 | +run `make` in it's directory to build and install the SDK locally. T |
| 28 | + |
| 29 | +Then, to build Micro Python for the ESP8266, just run: |
| 30 | +```bash |
| 31 | +$ make |
| 32 | +``` |
| 33 | +This should produce binary images in the `build/` subdirectory. To flash them |
| 34 | +to your ESP8266, use: |
| 35 | +```bash |
| 36 | +$ make deploy |
| 37 | +``` |
| 38 | +This will use the `esptool.py` script to download the images. You must have |
| 39 | +your ESP module in the bootloader, and connected to a serial port on your PC. |
| 40 | +The default serial port is `/dev/ttyACM0`. To specify another, use, eg: |
| 41 | +```bash |
| 42 | +$ make PORT=/dev/ttyUSB0 deploy |
| 43 | +``` |
| 44 | + |
| 45 | +The images that are built are: |
| 46 | +- `firmware.elf-0x00000.bin`: to be flashed at 0x00000 |
| 47 | +- `firmware.elf-0x10000.bin`: to be flashed at 0x10000 |
| 48 | + |
| 49 | +There is also a combined image, made up of the above 2 binary files with the |
| 50 | +appropriate padding: |
| 51 | +- `firmware-combined.bin`: to be flashed at 0x00000 |
0 commit comments