MaixPy-v1
MaixPy-v1 copied to clipboard
upgrade to latest lvgl, micropython, ulab
I upgraded the micropython submodule to the latest commit. I had to change somes files due to some renaming in micropython 1.12, upgrade ulab and lvgl. For lvgl I also had to change some more files.
I have tested the changes on a Maixduino.
I had to remove and re add the lv_bindings submodules because it was upgraded (mp_instance_cast_to_native_base -> mp_obj_cast_to_native_base)
I haven't fully tested the PR but it did fix issue in ulab.
in current maixpy, the dot product is not calculated correctly.
m = np.array([[1, 2, 3], [4, 5, 6], [7, 10, 9]], dtype=np.float)
n = np.array([[1], [4], [7]], dtype=np.float)
print(m.shape(),n.shape())
print("m dot n = ", np.dot(m, n))
I get
(3, 3) (3, 1)
m dot n = array([30.0, 0.0, 0.0], dtype=float)
This PR contains a commit that fixed the issue. Although the new ulab version changed the structure a little bit.
Teachable machine from DeqingSun does not work with recent Maixpy firmware:"maixpy_v0.5.0_95_g05c4e70_minimum_with_ide_support.bin"
https://github.com/DeqingSun/Teachable-Machine-on-K210
line 122 in teachablemachine.py: result = np.linalg.dot(parameterList,data).flatten()
throws error
Error:
File "
Have still to use instead the supplied "firmwareWithWorkingulab.bin"
Do you have news concerning this pull request? I have made local changes this week to once again upgrade to latest lvgl, micropython and ulab, and would have prefer to merge before.
you did great work, thanks! but change submodule is a huge change, so we didnt merge, but it may useful some one else need this feature, so we just keep this open
~~This PR adds micropython native mods (http://docs.micropython.org/en/latest/develop/natmod.html), which sounds really sweet. I haven't got to testing native mods but~~ I can confirm that this PR boots without issues on Maix Bit. SD, SPI, and GPIO also seems to work with no problems. Looks like I got excited to quickly without doing proper research, micropython native mods don't currently support RISK V ...
I have updated spiffs, micropython, ulab, and lv_bindings to latest versions.
Bump. @Neutree I think it's a good idea to conduct a proper review and unit tests and then merge? Currently ulab in MaixPy is ancient version 0.262, while current version (and the documentation for it) is 1.7.2. The fact that 0.262 has no documentation basically makes it unusable. Same issue with LVGL - Maixpy has LVGL 0.6 and current LVGL stable is 0.7 - it had a lot of API changes and there are a lot of examples missing for Micropython in 0.6 LVGL documentation. Basically right now using LVGL and ulab in MaixPy is huge PITA.
Noting here in case others are interested... fork with MicroPython versions v1.15 through v1.18.
I've made a fork including branches with MicroPython updated to v1.15 through v1.18. I started with the most recent commit on JishinMaster:master, merged in the latest commit on sipeed:master, updated micropython to each version and then implemented some fixes/workarounds to bring it up. I have not yet done any testing beyond basic boot and trying to properly import MicroPython's uasyncio extmod package.
On MicroPython v1.16+, disabled the core 1 task (appears to be a no-op) to avoid a core dump on boot.
MicroPython v1.15: comes up cleanly.
MicroPython v1.16: comes up cleanly.
MicroPython v1.17: I disabled some error handling in machine_uart.c to get it to compile.
MicroPython v1.18: comes up without the MaixPy builtin modules in components/micropython/port/builtin_py being available to import, since "Support for FROZEN_DIR and FROZEN_MPY_DIR... was finally removed in this release" (Ref)