Add all python code run on the device to the manifest.py to freeze
it. This has two benefits:
- It precompiles the bytecode, so it is smaller and faster
- All code (C and python) is now in the firmware image, leaving the
littlefs filesystem on the flash free for user settings.
This requires changing the way the hardware variants are handled. There
is now only one _filesystem_ image, but instead there are different
_firmware_ images for each variant.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
Move hardware-specifics (pin assignments, power management) to
hwconfig_*.py.
The build system will build a firmware image
firmware-filesystem-$variant.uf2 for all variants for which a
hwconfig_$variant.py file exits. Inside the filesystem image, the
selected variants hwconfig_$variant.py file will always be named
hwconfig.py.
At runtime, main.py will attempt to import hwconfig which will load the
configuration for the correct variant.
Currently, the hwconfig_* modules are expected to define the pin mapping
and implement a board_init method.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
The python and C modules that are supposed to be built into the firmware
image (i.e. those that are in manifest.py or in USER_C_MODULES) have
been moved to the software/modules directory.
The software/src directory should now only contain python scripts and
other files that should be installed to the Picos flash filesystem. The
idea is that these should be those scripts that implement the
application behaviour, as these are the ones that a user who does not
want to build the whole firmware themself wants to modify.
The builtin micropython SD card driver using the default micropython SPI
implementation suffered from very low read speeds. Add an optimized SD
card driver using rp2 PIO and DMA. Currently read only, write support to
be added later.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This is the skeleton of the code that will run on core1 to perform the
audio decoding and output. In this initial commit, the module
infrastructure, starting code on core1, and the I2S audio driver with
DMA are implemented.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>