Paul Sokolovsky
978a429aaa
esp8266: Set suitable values for axtls's RT_MAX_PLAIN_LENGTH & RT_EXTRA.
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
0785040593
esp8266/Makefile: Enable "ussl" module.
axTLS should be built first using "make axtls".
9 years ago
Paul Sokolovsky
941ddfe559
esp8266/Makefile: Support linking with axTLS built from source.
9 years ago
Paul Sokolovsky
dc2c8f0b1a
esp8266/axtls_helpers: Helper/wrapper functions for axTLS.
9 years ago
Paul Sokolovsky
648333d2d5
esp8266/Makefile: Override abort() when building axtls.
abort() is a special function known to compiler as no-return.
9 years ago
Paul Sokolovsky
6149ce01f8
esp8266/Makefile: Add target to build axTLS.
9 years ago
Paul Sokolovsky
6d103b6548
py: Move call_function_*_protected() functions to py/ for reuse.
They almost certainly needed by any C code which calls Python callbacks.
9 years ago
Damien George
73ccb3fc5b
esp8266: Adapt port to use new auto-qstr generation.
9 years ago
Paul Sokolovsky
4f811d0e4c
esp8266: Enable input() builtin.
9 years ago
Damien George
df3b1741b6
esp8266: Separate 1-wire timing funcs from Python module to save iRAM.
esponewire.c contains low-level timing-critical functions that go in
iRAM. modonewire.c contains Python wrapper code.
9 years ago
Damien George
674bf1bc81
esp8266: Add hard IRQ callbacks for pin change on GPIO0-15.
9 years ago
Damien George
a525493e40
esp8266: Switch from using custom I2C driver to generic extmod one.
9 years ago
Damien George
1a0a323ca8
esp8266: Add initial implementation of machine.UART.
Currently UART(0) and UART(1) are exposed and only uart.write works.
9 years ago
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.
9 years ago
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.
9 years ago
Paul Sokolovsky
ef0c5db2ed
esp8266: Move .rodata where it belongs with -mforce-l32 help.
9 years ago
Paul Sokolovsky
c4506ed869
esp8266: Let esp8266 "os" messages go to standard (REPL) UART.
That's definitely helpful for debugging.
9 years ago
Paul Sokolovsky
b01a373adb
esp8266: deploy: Use --flash_size=8m option to esptool.py.
Most esp8266 modules have at least 1MB (8Mbit) of flash. If not set, vendor
functions allow to access only first 512K.
9 years ago
Paul Sokolovsky
374654f2b8
esp8266: Enable FatFs support.
9 years ago
Damien George
3962766be0
esp8266: Add esp.neopixel_write function to bit-bang WS2812 data.
9 years ago
Damien George
632d8efa05
esp8266: Add PWM support.
PWM implementation uses a timer and interrupts (FRC1), taken from
Espressif's/NodeMCU's implementation and adapted for our use.
8 channels are supported, on pins 0, 2, 4, 5, 12, 13, 14, 15.
Usage:
import machine
pwm0 = machine.PWM(machine.Pin(0))
pwm0.freq(1000)
pwm0.duty(500)
Frequency is shared (ie the same) for all channels. Frequency is
between 1 and 1000. Duty is between 0 and 1023.
9 years ago
Damien George
82b95f625e
esp8266: Implement software SPI class.
Supports speeds up to 500k baud, polarity=0/1, phase=0/1, and using any
pins. Only supports MSB output at the moment.
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
Damien George
dd32f02cc3
esp8266: Add basic I2C driver, with init and writeto methods.
Tested and working with SSD1306 I2C display.
9 years ago
Paul Sokolovsky
9d7b871f58
esp8266: Store frozen modules in FlashROM.
Requires special lexer to access their contents.
9 years ago
Paul Sokolovsky
e5c39a3a9e
esp8266: Switch to lwIP built from source.
Using https://github.com/pfalcon/esp-open-lwip project.
9 years ago
Damien George
932f07ccf5
esp8266: Rejig Makefile so extmod/modlwip.o is placed under build/.
9 years ago
Paul Sokolovsky
6e5c31c947
esp8266: Be sure to build ets_alt_task.
9 years ago
Paul Sokolovsky
d684f872bd
esp8266/Makefile: Add define for ESP8266 lwIP.
9 years ago
Damien George
05dda0ee9e
esp8266: Enable modlwip.
9 years ago
Damien George
52d7685d9a
esp8266: Allow Makefile's BAUD variable to be overridden.
9 years ago
Paul Sokolovsky
4284b3811f
esp8266: Enable modmachine.
9 years ago
Paul Sokolovsky
7480ee5892
esp8266: Enable uhashlib module.
9 years ago
Damien George
d083d7d610
esp8266: Allow Makefile's PORT variable to be overridden.
9 years ago
Damien George
6f4357c28e
esp8266: Enable math module.
9 years ago
Damien George
6d0629bddc
esp8266: Enable float support, using 30-bit stuffed floats.
No complex numbers though.
9 years ago
Paul Sokolovsky
adfe4ff72a
esp8266: Support CFLAGS_EXTRA.
9 years ago
Paul Sokolovsky
73ff0687f2
lib/utils/printf: Move from stmhal/ .
This file contains various MicroPython-specific helper functions, so isn't
good fit for lib/libc/.
9 years ago
Paul Sokolovsky
0ec51441de
stmhal: pyexec.c is common module, move to lib/utils/ .
9 years ago
Paul Sokolovsky
0dbd928cee
Makefiles: Remove duplicate object files when linking.
Scenario: module1 depends on some common file from lib/, so specifies it
in its SRC_MOD, and the same situation with module2, then common file
from lib/ eventually ends up listed twice in $(OBJ), which leads to link
errors.
Make is equipped to deal with such situation easily, quoting the manual:
"The value of $^ omits duplicate prerequisites, while $+ retains them and
preserves their order." So, just use $^ consistently in all link targets.
9 years ago
Paul Sokolovsky
e0f5df579b
all: Make netutils.h available to all ports by default.
Generally, ports should inherit INC from py.mk, append to it, not
overwrite it. TODO: Likely should do the same for other vars too.
9 years ago
Damien George
229b908d2e
esp8266: Remove "time" command from deploy target.
9 years ago
Paul Sokolovsky
b19d273beb
esp8266: Allow to easily override programming baudrate.
9 years ago
Paul Sokolovsky
ee3fec3167
esp8266: Add skeleton "network" module.
MicroPython "network" module interface requires it to contains classes
to instantiate. But as we have a static network interace, make WLAN()
"constructor" just return module itself, and just make all methods
module-global functions.
10 years ago
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
10 years ago
Josef Gajdusek
59610c4004
esp8266: Add uos module
Currently implements only .uname()
10 years ago
Josef Gajdusek
1c132c8587
esp8266: Add configuration option for redirecting the built-in OS output
10 years ago
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
10 years ago
Josef Gajdusek
bda7041294
esp8266: Add support for frozen modules
10 years ago