kopia lustrzana https://github.com/micropython/micropython
3a8f8db38d
To make use of it, as demonstrated in the embedding-full example: - Include the word(s) "littlefs1" and/or "littlefs2" in EMBED_EXTRA in micropython_embed.mk. - Enable the desired MICROPY_*VFS* features in mpconfigport.h. - Add include path "$(EMBED_DIR)/lib/littlefs" to your application build system. For demonstration, a block device implementation containing a small read-only littlefs2 image is added to the embedding-full example. The block device could have been written in C and interface to some external, possibly writable storage medium, but was written in Python and frozen for simplicity. What makes this a bit awkward is the fact that the littlefs sources are located in lib/ and do need to be compiled into the application, unlike all previous .c files from lib/ that are #included by other C files and must not be compiled separately. Therefore, introduce a new directory 'libsrc' in the embed build output that contains these files and can be added to the application build system as usual, while 'lib' can remain excluded. The headers need to stay in 'lib' because vfs_lfs.c refers to them under that path. I am also not entirely happy about having to add an additional include path to the application build, but see no way around that as long as vfs_lfs.c refers to "lib/littlefs/lfs2.h" while lfs2.c refers to "lfs2.h". Signed-off-by: Christian Walther <cwalther@gmx.ch> |
||
---|---|---|
.. | ||
bare-arm | ||
cc3200 | ||
embed | ||
esp32 | ||
esp8266 | ||
mimxrt | ||
minimal | ||
nrf | ||
pic16bit | ||
powerpc | ||
qemu-arm | ||
renesas-ra | ||
rp2 | ||
samd | ||
stm32 | ||
unix | ||
webassembly | ||
windows | ||
zephyr |