Commit Graph

92 Commits

Author SHA1 Message Date
Damien George
6771adc75f esp8266/mpconfigport.h: Enable help('modules') feature. 2017-02-24 18:26:51 +11:00
Damien George
0bd61d23b9 extmod/vfs_fat: Remove MICROPY_FATFS_OO config option.
Everyone should now be using the new ooFatFs library.  The old one is no
longer supported and will be removed.
2017-01-30 12:26:07 +11:00
Damien George
c95c583857 esp8266/mpconfigport.h: Remove obsolete MICROPY_FATFS_VOLUMES config. 2017-01-30 12:26:07 +11:00
Damien George
f9ecd484bb esp8266: Change to use new generic VFS sub-system.
The VFS sub-system supports mounting of an arbitrary number of devices
(limited only by available RAM).  The internal flash is now mounted at
"/flash".
2017-01-27 17:21:45 +11:00
Damien George
8d5c6332c0 esp8266: Switch to use OO version of FatFs library. 2017-01-27 13:19:11 +11:00
Damien George
4ccd899e65 esp8266: Convert to use builtin help function. 2017-01-22 11:56:16 +11:00
Paul Sokolovsky
1328833663 stmhal, esp8266: Enable utimeq module. 2016-12-23 14:49:13 +03:00
Damien George
48d81c6900 esp8266: Use core-provided keyboard exception object. 2016-12-15 15:52:47 +11:00
Damien George
3a4ebf5768 esp8266: Enable inline Xtensa assembler.
With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
2016-12-09 17:13:00 +11:00
Damien George
45a6156dfd esp8266: Enable native emitter for Xtensa arch.
This patch allows esp8266 to use @micropython.native and
@micropython.viper function decorators.  By default the executable machine
code is written to the space at the end of the iram1 region.  The user can
call esp.set_native_code_location() to make the code go to flash instead.
2016-12-09 16:51:49 +11:00
Damien George
ad166857bc esp8266: Refactor to use extmod implementation of software SPI class. 2016-12-08 14:41:58 +11:00
Damien George
e50cb73b7a esp8266: Enable uselect module.
Select and poll will now work on socket objects.
2016-12-02 16:44:31 +11:00
Damien George
e5ef15a9d7 py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.
If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then
lexer.c now provides an implementation of mp_lexer_new_from_file using
the mp_reader_new_file function.
2016-11-16 18:13:51 +11:00
Damien George
6b239c271c py: Factor out persistent-code reader into separate files.
Implementations of persistent-code reader are provided for POSIX systems
and systems using FatFS.  Macros to use these are MICROPY_READER_POSIX and
MICROPY_READER_FATFS respectively.  If an alternative implementation is
needed then a port can define the function mp_reader_new_file.
2016-11-16 18:13:50 +11:00
Paul Sokolovsky
9514d847fe esp8266: Add MP_FASTCODE modifier to put a function to iRAM.
It can be used in the following manner:

void MP_FASTCODE(foo)(int arg) { ... }
2016-10-19 00:20:10 +03:00
Paul Sokolovsky
a97284423e extmod/utime_mphal: Factor out implementations in terms of mp_hal_* for reuse.
As long as a port implement mp_hal_sleep_ms(), mp_hal_ticks_ms(), etc.
functions, it can just use standard implementations of utime.sleel_ms(),
utime.ticks_ms(), etc. Python-level functions.
2016-10-14 20:14:01 +03:00
Damien George
ed878275b0 esp8266: Enable micropython.alloc_emergency_exception_buf(). 2016-10-14 01:27:53 +11:00
Damien George
af8d791bd0 esp8266: Enable importing of precompiled .mpy files. 2016-10-12 11:03:58 +11:00
Damien George
11fc6553e8 esp8266: Enable sys.{stdin,stdout,stderr}.buffer for raw serial access. 2016-10-12 11:03:58 +11:00
Radomir Dopieralski
db4e009217 esp8266/mpconfigport: Enable MICROPY_PY_BUILTINS_SLICE_ATTRS 2016-10-11 12:22:36 +02:00
Paul Sokolovsky
3b3612c65b esp8266: Make neopixel support configurable.
To save iRAM.
2016-10-09 00:56:46 +03:00
Damien George
056da75a8a esp8266: Make PY_UHASHLIB_SHA1 config depend on PY_USSL and SSL_AXTLS.
SHA1 can only be supported if ussl module is compiled in, and it uses
axtls.
2016-10-06 12:28:28 +11:00
Damien George
5863e15a23 esp8266/modpybspi: Use generic SPI helper methods to implement SPI. 2016-09-01 16:39:42 +10:00
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.
2016-08-15 11:02:59 +10:00
Paul Sokolovsky
9cf2949356 esp8266/mpconfigport.h: Enable support for all special methods. 2016-08-14 01:02:35 +03:00
Paul Sokolovsky
0e4cae5212 esp8266: Make APA102 driver inclusion configurable. 2016-08-01 00:03:55 +03:00
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.
2016-07-30 20:05:56 +03:00
Paul Sokolovsky
ba2c503541 esp8266/mpconfigport.h: Include sys/types.h for POSIX types definitions.
As required for related functions in stream.h.
2016-07-30 17:46:36 +03:00
Paul Sokolovsky
40214b9e26 esp8266: Enable MICROPY_PY_STR_BYTES_CMP_WARN. 2016-07-22 00:57:55 +03:00
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.
2016-06-29 13:59:19 +01:00
Paul Sokolovsky
15eb1ce52d esp8266: Enable MICROPY_PY_IO_FILEIO to get compliant text/binary streams. 2016-05-31 21:46:02 +03:00
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.
2016-05-31 14:25:19 +01:00
Paul Sokolovsky
9c2217a165 esp8266: Enable collections.OrderedDict. 2016-05-22 02:57:33 +03:00
Damien George
0d6d315ba6 esp8266: Change to use internal errno's. 2016-05-12 12:49:36 +01:00
Damien George
7e1f580910 esp8266: Enable uerrno module, weak linked also as errno. 2016-05-10 23:30:39 +01:00
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.
2016-05-10 23:30:39 +01:00
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
2016-05-10 15:38:31 +03:00
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.
2016-05-02 18:54:46 +01:00
Paul Sokolovsky
adae53d522 esp8266: Enable webrepl module. 2016-04-29 19:38:21 +03:00
Paul Sokolovsky
f8170db390 esp8266: Enable WebREPL file transfer rate limiting. 2016-04-29 19:15:26 +03:00
Paul Sokolovsky
b639ce27c7 esp8266/help: Implement help() builtin. 2016-04-29 00:17:11 +03:00
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.
2016-04-28 12:23:55 +01:00
Paul Sokolovsky
4f811d0e4c esp8266: Enable input() builtin. 2016-04-15 00:08:39 +03:00
Paul Sokolovsky
9b0714b24c py: Declare help, input, open builtins in core.
These are *defined* per-port, but why redeclare them again and again.
2016-04-15 00:07:56 +03:00
Damien George
674bf1bc81 esp8266: Add hard IRQ callbacks for pin change on GPIO0-15. 2016-04-14 12:44:26 +01:00
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).
2016-04-13 16:07:47 +01:00
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.
2016-04-13 11:53:12 +03:00
Damien George
e813ea1070 esp8266: Enable framebuf module. 2016-04-12 14:06:54 +01:00
Damien George
a525493e40 esp8266: Switch from using custom I2C driver to generic extmod one. 2016-04-12 14:06:54 +01:00
Paul Sokolovsky
f49d63a75c esp8266: Enable websocket module. 2016-04-11 21:25:43 +03:00