Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to latest lvgl, micropython, ulab #232

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JishinMaster
Copy link

@JishinMaster JishinMaster commented Apr 20, 2020

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)

@DeqingSun
Copy link

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.

@Createyouraccount-alt
Copy link

Createyouraccount-alt commented Jun 30, 2020

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 "", line 122, in
AttributeError: 'module' object has no attribute 'linalg'

Have still to use instead the supplied "firmwareWithWorkingulab.bin"

@JishinMaster
Copy link
Author

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.

@Neutree
Copy link
Member

Neutree commented Nov 23, 2020

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

@Neutree Neutree force-pushed the master branch 3 times, most recently from f67d221 to 88bfd01 Compare December 16, 2020 02:04
@rcmz
Copy link

rcmz commented Dec 16, 2020

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 ...

@JishinMaster
Copy link
Author

I have updated spiffs, micropython, ulab, and lv_bindings to latest versions.

@AIWintermuteAI
Copy link

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.

@JeffreyUrban
Copy link

JeffreyUrban commented Jan 26, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants