Damien George
2c407bcf20
esp8266: Switch from terse error messages to normal ones.
...
Adds 2k to the code size.
2016-04-07 00:38:08 +03:00
Paul Sokolovsky
d85439fd19
esp8266/README: Add short troubleshooting section.
2016-04-07 00:21:04 +03:00
Damien George
1a0a323ca8
esp8266: Add initial implementation of machine.UART.
...
Currently UART(0) and UART(1) are exposed and only uart.write works.
2016-04-06 19:45:52 +03:00
Paul Sokolovsky
4e51a3038c
cc3200/mods/modwlan: Include stream.h after recent refactor.
2016-04-06 01:18:39 +03:00
Damien George
96eca22322
esp8266: Make destination for vendor OS debug output soft-configurable.
...
Use esp.osdebug(None) to disable, or esp.osdebug(uart_id) to send output
to a UART.
2016-04-06 00:12:58 +03:00
Paul Sokolovsky
e6a4d4e23c
py: Move stream-related declarations from obj.h to stream.h.
2016-04-05 22:06:52 +03:00
Paul Sokolovsky
e4cb7c6158
docs/esp8266/quickref: Add note about physical vs logical pin numbers.
2016-04-05 16:30:51 +03:00
Paul Sokolovsky
2c8356c482
esp8266/modnetwork: require_if(): Report the actual interface required.
2016-04-05 16:09:03 +03:00
Paul Sokolovsky
f81ea6307c
docs/ubinascii: Document a2b_base64(), b2a_base64().
2016-04-05 14:00:12 +03:00
Paul Sokolovsky
de12502d89
esp8266: Move pyb.unique_id() to machine.unique_id().
2016-04-05 00:57:49 +03:00
Paul Sokolovsky
81fd5685fc
esp8266: Move pyb.hard_reset() to machine.reset().
2016-04-05 00:20:25 +03:00
Paul Sokolovsky
1b811b946e
unix/modsocket: Use mp_const_empty_map instead of creating empty map.
2016-04-04 23:43:16 +03:00
Paul Sokolovsky
069654f2be
py/obj.h: Add comment why mp_fun_kw_t takes non-const mp_map_t*.
...
mp_fun_kw_t takes mp_map_t* (and not const mp_map_t*) to ease passing
this arg to mp_map_lookup(), which may modify its arg, depending on
flags.
2016-04-04 15:37:19 +03:00
pohmelie
cee888255b
unix: djgpp errno.h have no ENOTSUP, so define it to Linux value.
2016-04-03 23:23:01 +03:00
Paul Sokolovsky
28d4b94dce
docs/machine: Change wording to be a bit more port-neutral.
2016-04-03 20:49:29 +03:00
Paul Sokolovsky
69b702276b
docs/os: Change wording to be a bit more port-neutral.
2016-04-03 20:49:25 +03:00
Paul Sokolovsky
e24674d44e
docs: esp8266: esp.socket is deprecated, remove from docs.
2016-04-03 20:19:39 +03:00
Paul Sokolovsky
69256ac0b1
esp8266: Bump heap size to 24k.
2016-04-03 19:55:45 +03:00
Paul Sokolovsky
debbaac1bd
esp8266: Update flashing instructions in README.
2016-04-03 16:04:18 +03:00
Paul Sokolovsky
919b70b7ec
esp8266: Switch back to flashing combined firmware (single file).
...
With gap between segments minimized, there's not much padding to flash,
so no big speed overhead.
2016-04-03 15:48:46 +03:00
Paul Sokolovsky
8d2bcaf3cd
esp8266: Minimize gap between Inst/DataRAM segments and FlashROM segment.
...
With .rodata being in FlashROM now, gap can be much smaller now. InstRAM
can be max 32K, and with segment headers, that already makes it more than
32K. Then there's some .data still, and the next Flash page boundary is
0x9000. That figure should be more or less future-proof.
TODO: Refactor makeimg to take FlashROM segment offset from file name.
2016-04-03 15:45:14 +03:00
Paul Sokolovsky
9698a60591
esp8266/ets_alt_task: Comment out debug output.
2016-04-03 01:04:01 +03:00
Paul Sokolovsky
fcd6862597
esp8266: Bump iROM size to 512k.
...
Needed for frozen scripts, and for future growth of binary.
2016-04-03 00:57:27 +03:00
Paul Sokolovsky
ef0c5db2ed
esp8266: Move .rodata where it belongs with -mforce-l32 help.
2016-04-03 00:51:51 +03:00
Paul Sokolovsky
254a5646c1
docs: Update copyright notice.
2016-04-03 00:05:23 +03:00
Paul Sokolovsky
333a63efaa
esp8266/README: Add link to docs.
2016-04-03 00:01:31 +03:00
Paul Sokolovsky
4f2d59e82f
examples/http_client_ssl.py: HTTPS client example.
2016-04-02 23:19:03 +03:00
Paul Sokolovsky
ec5f8db49d
examples/http_server.py: Bind to 0.0.0.0, to be accessible from other hosts.
...
This is helpful when running on deeply embedded targets, but may be
"security risk". Caveat emptor.
2016-04-02 23:14:19 +03:00
Paul Sokolovsky
c07a03a36d
examples/http_server.py: Introduce main() function.
...
Allows to re-run code if it was imported as a module (e.g., on bare-metal
ports).
2016-04-02 20:57:58 +03:00
Paul Sokolovsky
aa3fb7b387
examples/http_server.py: Refactor/simplify for Python 3.5.
2016-04-02 20:53:29 +03:00
Paul Sokolovsky
fd2b71f972
examples/http_client.py: Introduce main() function.
...
Allows to re-run code if it was imported as a module (e.g., on bare-metal
ports).
2016-04-02 19:13:39 +03:00
Paul Sokolovsky
a5d07c3aba
examples/http_client.py: Improve CPython compatibility in stream mode.
2016-04-02 17:28:42 +03:00
Paul Sokolovsky
a5d2af7949
unix/file: "encoding" arg to open() isn't kw-only.
...
And with "buffering" arg introduced, it's non possible to make it
non-kwonly.
2016-04-02 17:23:51 +03:00
Paul Sokolovsky
e5fa163a4c
unix/file: Parse "buffering" argument of open() builtin.
...
It's ignored (unbuffered, raw I/O is used), but least makes it compatible
with CPython.
2016-04-02 17:23:46 +03:00
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.
2016-04-02 01:34:32 +03:00
Paul Sokolovsky
cef073877b
example/http_client.py: Remove unused code.
2016-04-01 21:10:06 +03:00
Paul Sokolovsky
cf4b72bf13
examples: http_client.py, http_server.py aren't just unix, move to network/.
2016-04-01 20:53:23 +03:00
Stephen Kyle
b475327ffa
py/map: Prevent map resize failure from destroying map.
2016-04-01 16:36:00 +03:00
Damien George
6a051a8e0b
esp8266/uart: Get ctrl-C working now that event-based REPL is disabled.
2016-04-01 14:53:01 +03:00
Damien George
fb6cc96951
esp8266/uart: Comment out old, unused rx buffering code.
...
This was originally used for non-event based REPL processing. Then it
was unused when event-based processing was activated. But now that event
based is disabled, and non-event based is back, there has been new ring
buffer code to process the chars.
2016-04-01 14:30:47 +03:00
Paul Sokolovsky
fc4c43a72e
esp8266: Switch to non event-driven REPL to support paste mode.
2016-04-01 14:22:28 +03:00
Paul Sokolovsky
785cf9a61f
esp8266: Support dedicated REPL loop (aka pull-style).
...
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.
2016-04-01 14:02:36 +03:00
Paul Sokolovsky
777232c9a5
esp8266: Disallow recursive calls to REPL.
...
Before this change, if REPL blocked executing some code, it was possible
to still input new statememts and excuting them, all leading to weird,
and portentially dangerous interaction.
TODO: Current implementation may have issues processing input accumulated
while REPL was blocked.
2016-04-01 12:53:50 +03:00
Pavol Rusnak
3d4a535208
unix: implement -i option (inspect - start REPL after script is finished)
2016-04-01 12:35:45 +03:00
Paul Sokolovsky
5531437941
esp8266: Move PHY mode constants from modesp to modnetwork.
2016-04-01 12:10:11 +03:00
Damien George
4b597a1c1a
esp8266: Reset term_obj on reboot.
...
Also, term_obj can be NULL if socket enables REPL duplication signalling
before os.dupterm is called, so it should be checked.
2016-03-31 19:56:52 +03:00
Paul Sokolovsky
98af891610
esp8266: Implement input part of dupterm handling.
...
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.
2016-03-31 19:49:55 +03:00
Paul Sokolovsky
61fa7c8152
esp8266: Switch back to accumulating input data via ring buffer.
...
But now it's generic ring buffer implemented via ringbuf.h, and is intended
for any type of input, including dupterm's, not just UART. The general
process work like this: an interrupt-driven input source puts data into
input_buf, and then signals new data available via call to
mp_hal_signal_input().
2016-03-30 18:50:38 +03:00
Paul Sokolovsky
2e75a17bab
esp8266: Fix issue when current repl line was garbage-collected.
...
Reference it from root pointers section.
2016-03-30 18:13:03 +03:00
Paul Sokolovsky
b1dfdaf6cb
py/ringbuf.h: Add reusable ring buffer class.
...
Features inline get/put operations for the highest performance. Locking
is not part of implementation, operation should be wrapped with locking
externally as needed.
2016-03-30 14:48:31 +03:00