micropython/ports/esp8266/boards/GENERIC_1M/mpconfigboard.mk

6 wiersze
97 B
Makefile
Czysty Zwykły widok Historia

esp8266: Change from FAT to littlefs v2 as default filesystem. This commit changes the esp8266 boards to use littlefs v2 as the filesystem, rather than FAT. Since the esp8266 doesn't expose the filesystem to the PC over USB there's no strong reason to keep it as FAT. Littlefs is smaller in code size, is more efficient in use of flash to store data, is resilient over power failure, and using it saves about 4k of heap RAM, which can now be used for other things. This is a backwards incompatible change because all existing esp8266 boards will need to update their filesystem after installing new firmware (eg backup old files, install firmware, restore files to new filesystem). As part of this commit the memory layout of the default board (GENERIC) has changed. It now allocates all 1M of memory-mapped flash to the firmware, so the filesystem area starts at the 2M point. This is done to allow more frozen bytecode to be stored in the 1M of memory-mapped flash. This requires an esp8266 module with 2M or more of flash to work, so a new board called GENERIC_1M is added which has the old memory-mapping (but still changed to use littlefs for the filesystem). In summary there are now 3 esp8266 board definitions: - GENERIC_512K: for 512k modules, doesn't have a filesystem. - GENERIC_1M: for 1M modules, 572k for firmware+frozen code, 396k for filesystem (littlefs). - GENERIC: for 2M (or greater) modules, 968k for firmware+frozen code, 1M+ for filesystem (littlefs), FAT driver also included in firmware for use on, eg, external SD cards.
2020-03-26 11:35:32 +00:00
LD_FILES = boards/esp8266_1m.ld
esp32,esp8266: Add support for the Espressif ESP-NOW protocol. ESP-NOW is a proprietary wireless communication protocol which supports connectionless communication between ESP32 and ESP8266 devices, using vendor specific WiFi frames. This commit adds support for this protocol through a new `espnow` module. This commit builds on original work done by @nickzoic, @shawwwn and with contributions from @zoland. Features include: - Use of (extended) ring buffers in py/ringbuf.[ch] for robust IO. - Signal strength (RSSI) monitoring. - Core support in `_espnow` C module, extended by `espnow.py` module. - Asyncio support via `aioespnow.py` module (separate to this commit). - Docs provided at `docs/library/espnow.rst`. Methods available in espnow.ESPNow class are: - active(True/False) - config(): set rx buffer size, read timeout and tx rate - recv()/irecv()/recvinto() to read incoming messages from peers - send() to send messages to peer devices - any() to test if a message is ready to read - irq() to set callback for received messages - stats() returns transfer stats: (tx_pkts, tx_pkt_responses, tx_failures, rx_pkts, lost_rx_pkts) - add_peer(mac, ...) registers a peer before sending messages - get_peer(mac) returns peer info: (mac, lmk, channel, ifidx, encrypt) - mod_peer(mac, ...) changes peer info parameters - get_peers() returns all peer info tuples - peers_table supports RSSI signal monitoring for received messages: {peer1: [rssi, time_ms], peer2: [rssi, time_ms], ...} ESP8266 is a pared down version of the ESP32 ESPNow support due to code size restrictions and differences in the low-level API. See docs for details. Also included is a test suite in tests/multi_espnow. This tests basic espnow data transfer, multiple transfers, various message sizes, encrypted messages (pmk and lmk), and asyncio support. Initial work is from https://github.com/micropython/micropython/pull/4115. Initial import of code is from: https://github.com/nickzoic/micropython/tree/espnow-4115.
2020-09-24 05:37:04 +00:00
MICROPY_ESPNOW ?= 1
MICROPY_PY_BTREE ?= 1
MICROPY_VFS_LFS2 ?= 1