You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently MicroPython is running version 1.18.0. I was previously able to upgrade to 1.19.x, but updating to 1.20.x is introducing some new challenges.
This issue is to track the progress of updating MicroPython to v1.20.0. Ultimately it may be used to produce a changelog of what needed to occur in the porting process.
While performing this work, there is a guiding principal:
Just keep in mind that we hope that badgepython will become usable on all the hardware we originally supported with the old platform thing, as long as that keeps working: great 😁👍
Currently opus is very out of date. This isn't a problem except for the fact that not updating is also failing to stand on the shoulders of improvements in https://gitlab.xiph.org/xiph/opus/
After an initial check, i just pulled in the repo as a submodule (components/libopus/opus) and replaced components/libopus/CMakeFiles.txt with the following content:
In a perfect world, we may even be able to integrate some of the dark witchery demonstrated here.
That example shows how (for better or for worse) the ESP-IDF handles it's own dependency management (🤮 ) . At the same time, the demonstration of some (slightly beyond basics) configuration examples resulting in static compilation with the final comment explaining how to then consume the whole component is quite nice.
It leaves me inspired as to building a much lighter shim layer for MicroPython as opposed to the current state (i.e. components/micropython/CMakeLists.txt is largely the contents of components/micropython/micropython/ports/esp32/main/CMakeLists.txt). Being able to stand on the shoulders of as much of the upstream maintenance would be ideal.
Update `components/driver_framebuffer`
Some "warnings now become errors" in driver_framebuffer:
[195/265] Building C object esp-idf/driver_framebuffer/CMakeFiles/__idf_driver_framebuffer.dir/png/deflate_reader.c.obj
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c: In function 'lib_deflate_get_huffman':
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:140:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 8: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:141:4: note: here
case 7: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:141:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:142:4: note: here
case 6: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:142:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 6: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:143:4: note: here
case 5: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:143:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 5: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:144:4: note: here
case 4: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:144:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 4: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:145:4: note: here
case 3: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:145:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 3: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:146:4: note: here
case 2: value <<= 1; value += res & 1; res >>= 1;
^~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:146:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 2: value <<= 1; value += res & 1; res >>= 1;
~~~~^~~~~
~/Projects/hardware/badgePython/components/driver_framebuffer/png/deflate_reader.c:147:4: note: here
case 1: value <<= 1; value += res;
^~~~
[198/265] Building C object esp-idf/driver_framebuffer/CMakeFiles/__idf_driver_framebuffer.dir/png/png_reader.c.obj
~/Projects/hardware/badgePython/components/driver_framebuffer/png/png_reader.c: In function 'lib_png_decode':
~/Projects/hardware/badgePython/components/driver_framebuffer/png/png_reader.c:292:13: warning: variable 'r' set but not used [-Wunused-but-set-variable]
uint16_t r=0, g=0, b=0, a=0;
^
Update buses component
[220/743] Building C object esp-idf/buses/CMakeFiles/__idf_buses.dir/buses.c.obj
~/Projects/hardware/badgePython/components/buses/buses.c: In function 'start_buses':
~/Projects/hardware/badgePython/components/buses/buses.c:30:15: warning: unused variable 'res' [-Wunused-variable]
esp_err_t res;
^~~
migrate from upip to mip
upip was finally nuked from MicroPython in commmit https://github.com/micropython/micropython/commit /924a3e03ec167c4417d89b531794c75ce5a631a3. As such, our various manifests will need to be updated. Of note, there's some new boilerplate here:
Migrate FAT build process
Presently the VFS_FAT module is vendored within this code base. The upstream has on pulled in not just vfs_fat, but now littlefs support.
We should validate that using the upstream filesystem semantics are sufficient.
Define boilerplate BADGEPYTHON board
Unlike when the original project launched, today the mechanism exists for defining the customizations to be layered on top of MicroPython in a way which doesn't require code generation, copying of files, and other hi-jinx.
I've begun researching how to do this in a minimalist way utilizing the MicroPython BOARD variable which would also make out of tree development easier.
Implement some type of static analysis (e.g. `cppcheck`)
A cursory run of cppcheck found a memory leak and some macro generation which should be fixed:
The general idea was that I can then reference this issue with relevant branches to make sure thorough testing occurs for hardware I don't possess or can't emulate.
#48 is a resolution for the buses component. Additionally, I'm eyeballing this issue on PPP and this PR I filed (micropython/micropython#11453) which is one minor blocker. In the end our BOARDS will be in our tree since this repository is the anchor of truth for gluing firmware together.
Presently MicroPython is running version 1.18.0. I was previously able to upgrade to 1.19.x, but updating to 1.20.x is introducing some new challenges.
This issue is to track the progress of updating MicroPython to v1.20.0. Ultimately it may be used to produce a changelog of what needed to occur in the porting process.
While performing this work, there is a guiding principal:
Errata:
${MICROPY_PORT_DIR}/network_ppp.c
incomponents/micropython/CMakeLists.txt
.Todo:
Update `components/libopus`
Currently opus is very out of date. This isn't a problem except for the fact that not updating is also failing to stand on the shoulders of improvements in https://gitlab.xiph.org/xiph/opus/
After an initial check, i just pulled in the repo as a submodule (
components/libopus/opus
) and replacedcomponents/libopus/CMakeFiles.txt
with the following content:In a perfect world, we may even be able to integrate some of the dark witchery demonstrated here.
That example shows how (for better or for worse) the ESP-IDF handles it's own dependency management (🤮 ) . At the same time, the demonstration of some (slightly beyond basics) configuration examples resulting in static compilation with the final comment explaining how to then consume the whole component is quite nice.
It leaves me inspired as to building a much lighter shim layer for MicroPython as opposed to the current state (i.e.
components/micropython/CMakeLists.txt
is largely the contents ofcomponents/micropython/micropython/ports/esp32/main/CMakeLists.txt
). Being able to stand on the shoulders of as much of the upstream maintenance would be ideal.Update `components/driver_framebuffer`
Some "warnings now become errors" in
driver_framebuffer
:Update buses component
migrate from upip to mip
upip was finally nuked from MicroPython in commmit https://github.com/micropython/micropython/commit /924a3e03ec167c4417d89b531794c75ce5a631a3. As such, our various manifests will need to be updated. Of note, there's some new boilerplate here:
https://github.com/micropython/micropython/blob/924a3e03ec167c4417d89b531794c75ce5a631a3/ports/esp32/boards/manifest.py#L1-L15
Migrate FAT build process
Presently the VFS_FAT module is vendored within this code base. The upstream has on pulled in not just vfs_fat, but now littlefs support.We should validate that using the upstream filesystem semantics are sufficient.
Define boilerplate BADGEPYTHON board
Unlike when the original project launched, today the mechanism exists for defining the customizations to be layered on top of MicroPython in a way which doesn't require code generation, copying of files, and other hi-jinx.I've begun researching how to do this in a minimalist way utilizing the MicroPython
BOARD
variable which would also make out of tree development easier.Implement some type of static analysis (e.g. `cppcheck`)
A cursory run of
cppcheck
found a memory leak and some macro generation which should be fixed:The text was updated successfully, but these errors were encountered: