summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/main.c
Commit message (Collapse)AuthorAge
* esp8266: Change to use new generic VFS sub-system.Damien George2017-01-27
| | | | | | 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".
* esp8266: Use core-provided keyboard exception object.Damien George2016-12-15
|
* py/runtime: Zero out fs_user_mount array in mp_init.Damien George2016-12-14
| | | | | There's no need to force ports to copy-and-paste this initialisation code. If FSUSERMOUNT is enabled then this zeroing out must be done.
* esp8266: Enable inline Xtensa assembler.Damien George2016-12-09
| | | | With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
* esp8266: Enable native emitter for Xtensa arch.Damien George2016-12-09
| | | | | | | 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.
* py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George2016-11-16
| | | | | | 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.
* esp8266/main: Bump heap size to 36K.Paul Sokolovsky2016-11-02
| | | | | | | ESP8266 SDK2.0 fixes (at least, I can't reproduce it) an infamous bug with crash during scan. 36K seams to be a safe value based on a download test (test_dl.py), over 1GB was downloaded. More testing is needed, but let's have other people participate by committing it now.
* esp8266/main: Mark nlr_jump_fail() as MP_FASTCODE.Paul Sokolovsky2016-10-19
| | | | | It's probably not strictly needed so far, but serves as an example of MP_FASTCODE use and may be helpful in the future.
* esp8266/main: Put /lib before / in sys.path.Paul Sokolovsky2016-10-05
| | | | | upip will use first non-empty component in sys.path as an install path (if MICROPYPATH envvar is not set, like it will be for baremetal targets).
* lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.Paul Sokolovsky2016-09-29
| | | | | Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports.
* esp8266: dupterm_task_init() should be called before running _boot.py, etc.Paul Sokolovsky2016-07-23
| | | | Because they may use dupterm functionality (e.g. WebREPL running on boot).
* esp8266/main: Init recently added dupterm_arr_obj port state var.Paul Sokolovsky2016-07-04
|
* esp8266/main.c: Clear the command line history when (re)booting.Robert HH2016-06-26
| | | | | Not clearing the command line history sometimes results in strange output when going back after a reset.
* esp8266/main: Update _boot module loading for recent frozen modules refactors.Paul Sokolovsky2016-05-22
|
* esp8266/main: Bump heap size to 28K.Paul Sokolovsky2016-05-09
| | | | | | This is kind of compensation for 4K FatFs buffer size which is eaten away from it on FS mount. This should still leave enough of networking ("OS") heap.
* esp8266/main: Set sys.path to ["", "/", "/lib"].Paul Sokolovsky2016-05-03
|
* esp8266: Add hard IRQ callbacks for pin change on GPIO0-15.Damien George2016-04-14
|
* esp8266/main: mp_builtin_open(): Implement, using vfs_proxy_call().Paul Sokolovsky2016-04-10
|
* esp8266: Implement multistage bootstrap sequence.Damien George2016-04-10
| | | | | | | | | | | | | Upon start-up, _boot module is executed from frozen files to do early initialization, e.g. create and mount the flash filesystem. Then "boot.py" is executed if it exists in the filesystem. Finally, "main.py" is executed if exists to allow start-on-boot user applications. This allows a user to make a custom boot file or startup application without recompiling the firmware, while letting to do early initialization in Python code. Based on RFC https://github.com/micropython/micropython/issues/1955.
* esp8266: Bump heap size to 24k.Paul Sokolovsky2016-04-03
|
* esp8266: Support dedicated REPL loop (aka pull-style).Paul Sokolovsky2016-04-01
| | | | | | | | Event-driven loop (push-style) is still supported and default (controlled by MICROPY_REPL_EVENT_DRIVEN setting, as expected). Dedicated loop worked even without adding ets_loop_iter(), though that needs to be revisited later.
* esp8266: Reset term_obj on reboot.Damien George2016-03-31
| | | | | Also, term_obj can be NULL if socket enables REPL duplication signalling before os.dupterm is called, so it should be checked.
* esp8266: Implement input part of dupterm handling.Paul Sokolovsky2016-03-31
| | | | | | | | The idea is following: underlying interrupt-driven or push-style data source signals that more data is available for dupterm processing via call to mp_hal_signal_dupterm_input(). This triggers a task which pumps data between actual dupterm object (which may perform additional processing on data from low-level data source) and input ring buffer.
* esp8266: Reduce heap size for now to avoid random segfaults on WiFi connect.Paul Sokolovsky2016-03-29
|
* esp8266: Allow to build without FatFs support again.Paul Sokolovsky2016-03-28
|
* esp8266: Support importing modules from filesystem.Paul Sokolovsky2016-03-28
|
* esp8266: Zero out fs_user_mount state on (soft) reset.Damien George2016-03-28
| | | | | Otherwise device stays mounted on soft reset and leads to corruption (since block device object is now gone).
* esp8266: Set up UART handling task soon into init process.Paul Sokolovsky2016-03-27
| | | | | Otherwise, events may be posted to non-initialized task, which leads to segfaults.
* esp8266/main: Module to run on boot is "boot", not "main".Paul Sokolovsky2016-03-08
|
* esp8266: Enable stack overflow checking.Paul Sokolovsky2016-03-07
|
* esp8266: Support raising KeyboardInterrupt on Ctrl+C.Paul Sokolovsky2016-03-05
|
* esp8266: Change "soft reboot" message to work with pyboard.py.Damien George2016-03-02
|
* lib/utils: Add pyexec_frozen_module to load and execute frozen module.Damien George2015-12-26
| | | | | | This is a convenience function similar to pyexec_file. It should be used instead of raw mp_parse_compile_execute because the latter does not catch and report exceptions.
* lib/pyexec: Move header pyexec.h from stmhal directory.Damien George2015-11-09
|
* all: Add py/mphal.h and use it in all ports.Damien George2015-10-31
| | | | | | py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
* esp8266: Switch to standard mp_hal_delay_us() MPHAL function.Paul Sokolovsky2015-10-29
|
* esp8266: Move initialization to system_init_done_cbJosef Gajdusek2015-05-26
| | | | | Initializing too early caused some of the API functions (wifi_*) to fail when called in main.py
* esp8266: Add support for frozen modulesJosef Gajdusek2015-05-06
|
* esp8266: Fix garbage collector by hard-coding stack end address.Josef Gajdusek2015-05-06
| | | | | | | As user_init() is not a true main functions, the stack pointer captured within is not pointing at the base of the stack. This caused gc_collect being called with sp being higher than stack_end, causing integer overflow and crashing as gc tried to scan almost the entire address space.
* pyexec: Make raw REPL work with event-driven version of pyexec.Damien George2015-05-06
| | | | | | | esp8266 port now has working raw and friendly REPL, as well as working soft reset (CTRL-D at REPL, or raise SystemExit). tools/pyboard.py now works with esp8266 port.
* py: Protect mp_parse and mp_compile with nlr push/pop block.Damien George2015-02-07
| | | | | | | | | | To enable parsing constants more efficiently, mp_parse should be allowed to raise an exception, and mp_compile can already raise a MemoryError. So these functions need to be protected by an nlr push/pop block. This patch adds that feature in all places. This allows to simplify how mp_parse and mp_compile are called: they now raise an exception if they have an error and so explicit checking is not needed anymore.
* esp8266: Implement task-based, event-driven interface with UART.Paul Sokolovsky2015-01-16
| | | | | | This enables proper interfacing with underlying OS - MicroPython doesn't run the main loop, OS does, MicroPython just gets called when some event takes place.
* esp8266: Use dedicated heap allocated as static array.Paul Sokolovsky2015-01-15
| | | | | We cannot assume that all memory belongs to us - it actually belongs to ESP8266 OS.
* py: Put all global state together in state structures.Damien George2015-01-07
| | | | | | This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
* esp8266: Prefix includes with py/; remove need for -I../py.Damien George2015-01-01
|
* esp8266: Change bignum from mpz to longlong; move some rodata to iram.Damien George2014-11-28
| | | | | | Some rodata items can go in iram/irom segment, but not others. With this patch ESP now has 24256 bytes of heap ram. It passes 228 out of 248 tests from tests/basics directory.
* esp8266: New port of Micro Python to ESP8266 wifi module.Damien George2014-11-27