Damien George
5863e15a23
esp8266/modpybspi: Use generic SPI helper methods to implement SPI.
8 years ago
Damien George
675d1c9c60
ports: Remove typedef of machine_ptr_t, it's no longer needed.
This type was used only for the typedef of mp_obj_t, which is now defined
by the object representation. So we can now remove this unused typedef,
to simplify the mpconfigport.h file.
8 years ago
Paul Sokolovsky
9cf2949356
esp8266/mpconfigport.h: Enable support for all special methods.
8 years ago
Paul Sokolovsky
0e4cae5212
esp8266: Make APA102 driver inclusion configurable.
8 years ago
Paul Sokolovsky
61e77a4e88
py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.
To filter out even prototypes of mp_stream_posix_*() functions, which
require POSIX types like ssize_t & off_t, which may be not available in
some ports.
8 years ago
Paul Sokolovsky
ba2c503541
esp8266/mpconfigport.h: Include sys/types.h for POSIX types definitions.
As required for related functions in stream.h.
8 years ago
Paul Sokolovsky
40214b9e26
esp8266: Enable MICROPY_PY_STR_BYTES_CMP_WARN.
8 years ago
Damien George
db80c0ed46
esp8266: Enable frozen bytecode, with scripts in modules/ subdir.
To start with, the critical scripts _boot.py and flashbdev.py are frozen
to improve performance and reduce RAM consumption.
Saves about 1000 bytes of heap RAM for a bare boot with filesystem.
9 years ago
Paul Sokolovsky
15eb1ce52d
esp8266: Enable MICROPY_PY_IO_FILEIO to get compliant text/binary streams.
9 years ago
Damien George
33168081f4
extmod/machine: Add MICROPY_PY_MACHINE_PULSE config for time_pulse_us.
Since not all ports that enable the machine module have the pin HAL
functions.
9 years ago
Paul Sokolovsky
9c2217a165
esp8266: Enable collections.OrderedDict.
9 years ago
Damien George
0d6d315ba6
esp8266: Change to use internal errno's.
9 years ago
Damien George
7e1f580910
esp8266: Enable uerrno module, weak linked also as errno.
9 years ago
Damien George
4f2ba9fbdc
esp8266: Convert to use new MP_Exxx errno symbols.
These symbols are still defined in terms of the system Exxx symbols, and
can be switched to internal numeric definitions at a later stage.
Note that extmod/modlwip still uses many system Exxx symbols.
9 years ago
Paul Sokolovsky
f16bec6bc9
esp8266/mpconfigport: Reduce various parser-related allocation params.
This gives noticeable result for parsing simple input (modelled on 32-bit
unix port):
Before:
>>> micropython.mem_total()
3360
>>> micropython.mem_total()
4472
After:
>>> micropython.mem_total()
3072
>>> micropython.mem_total()
4052
However, effect on parsing large input is much less conclusive, e.g.:
Before:
>>> micropython.mem_total()
3376
>>> import pystone_lowmem
>>> micropython.mem_total()
33006
delta=29630
After:
>>> micropython.mem_total()
3091
>>> import pystone_lowmem
>>> micropython.mem_total()
32509
delta=29418
9 years ago
Damien George
9215cdc7fd
esp8266: Change platform name from ESP8266 to esp8266.
The port name is lowercase, and this change is made for consistency with
the docs and other ports.
9 years ago
Paul Sokolovsky
adae53d522
esp8266: Enable webrepl module.
9 years ago
Paul Sokolovsky
f8170db390
esp8266: Enable WebREPL file transfer rate limiting.
9 years ago
Paul Sokolovsky
b639ce27c7
esp8266/help: Implement help() builtin.
9 years ago
Damien George
a6aa35af09
esp8266: Move pyb.info() function to esp module and remove pyb module.
All functionality of the pyb module is available in other modules, like
time, machine and os. The only outstanding function, info(), is
(temporarily) moved to the esp module and the pyb module is removed.
9 years ago
Paul Sokolovsky
4f811d0e4c
esp8266: Enable input() builtin.
9 years ago
Paul Sokolovsky
9b0714b24c
py: Declare help, input, open builtins in core.
These are *defined* per-port, but why redeclare them again and again.
9 years ago
Damien George
674bf1bc81
esp8266: Add hard IRQ callbacks for pin change on GPIO0-15.
9 years ago
Damien George
0a2e9650f5
py: Add ability to have frozen persistent bytecode from .mpy files.
The config variable MICROPY_MODULE_FROZEN is now made of two separate
parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This
allows to have none, either or both of frozen strings and frozen mpy
files (aka frozen bytecode).
9 years ago
Paul Sokolovsky
47442d9f52
lib/utils/printf: Rework overriding printer of DEBUG_printf().
By default it uses mp_plat_print, but a port may override it to another
value with MICROPY_DEBUG_PRINTER_DEST.
9 years ago
Damien George
e813ea1070
esp8266: Enable framebuf module.
9 years ago
Damien George
a525493e40
esp8266: Switch from using custom I2C driver to generic extmod one.
9 years ago
Paul Sokolovsky
f49d63a75c
esp8266: Enable websocket module.
9 years ago
Damien George
2c407bcf20
esp8266: Switch from terse error messages to normal ones.
Adds 2k to the code size.
9 years ago
Damien George
a0cb4eda9a
esp8266: Use VM_HOOK to call ets_loop_iter within the VM.
Starting with a divisor of 10, pystone_lowmem gives a score of 256.
9 years ago
Paul Sokolovsky
fc4c43a72e
esp8266: Switch to non event-driven REPL to support paste mode.
9 years ago
Paul Sokolovsky
2e75a17bab
esp8266: Fix issue when current repl line was garbage-collected.
Reference it from root pointers section.
9 years ago
Damien George
9475cc59e6
esp8266: Support synchronous wifi scanning.
That is: aps = if0.scan()
TODO: make sure that returned list has tuple with values in "standard"
order (whatever that standard is).
9 years ago
Paul Sokolovsky
c961889e34
esp8266: Add basic support for duplicating REPL output.
9 years ago
Paul Sokolovsky
374654f2b8
esp8266: Enable FatFs support.
9 years ago
Damien George
78d0dde562
esp8266: Add onewire helper functions as C module.
Includes functions to read and write bits and bytes.
9 years ago
Paul Sokolovsky
a1d072df81
esp8266: Enable auto-indent in REPL.
9 years ago
Paul Sokolovsky
df1f6783f2
esp8266: Add "socket" and "usocket" aliases for lwip module.
9 years ago
Paul Sokolovsky
494aea3e86
esp8266: Enable non-blocking stream support.
9 years ago
Damien George
5bc9398d9d
esp8266: Enable more extmod's: uheapq, ure, uzlib.
9 years ago
Damien George
8000d51b68
esp8266: Add module weak link from json to ujson.
9 years ago
Paul Sokolovsky
1a0adf49df
esp8266: Enable urandom module.
9 years ago
Paul Sokolovsky
9d7b871f58
esp8266: Store frozen modules in FlashROM.
Requires special lexer to access their contents.
9 years ago
Paul Sokolovsky
4c2cb7e384
esp8266: Define MICROPY_EVENT_POLL_HOOK for the port.
9 years ago
Damien George
05dda0ee9e
esp8266: Enable modlwip.
9 years ago
Paul Sokolovsky
db984b73f3
esp8266: Enable stack overflow checking.
9 years ago
Paul Sokolovsky
d3a4d39687
esp8266: Support raising KeyboardInterrupt on Ctrl+C.
9 years ago
Paul Sokolovsky
8ab16b6af0
esp8266: Add custom _assert() function.
Enabling standard assert() (by removing -DNDEBUG) produces non-bootable
binary (because all messages go to .rodata which silently overflows).
So, for once-off debugging, have a custom _assert().
9 years ago
Paul Sokolovsky
4284b3811f
esp8266: Enable modmachine.
9 years ago
Damien George
f70873db23
esp8266: Enable more features in mpconfigport.h.
This is to get the test suite running and passing.
9 years ago