-
-
Notifications
You must be signed in to change notification settings - Fork 26
Add MIMXRT1010_EVK & SEEED_ARCH_MIX (mimxrt) v1.26.1 #853
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Andrew Leech <[email protected]>
Signed-off-by: Andrew Leech <[email protected]>
|
🥇for the first comple boards submitted. I'l review to verify if there are no merge surprises, but I don't expect any. After that Ill publish them for others to consume. Is there a board that you think is most complete or representative for the port? For instance for the RP2 port I have thus far used the rpi-pico_W as a superset of the pico |
The SEEED_ARCH_MIX is a bigger chip, bigger board. Has a fair few more features enabled (eg. networking, sdcard) so is broader in feature coverage for sure. |
|
I discovered a small thing missing from my stubs :-D micropython/micropython#18464 |
|
If the PR does not get merged, I can also add the stub to the reference stubs. That is my shortcut. Ref stubs can also add detailed type annotations and overloads if needed. |
The default board for a port is currently "hard-configured" in a dict in micropython-stubber I'll add : |
Signed-off-by: Jos Verlinde <[email protected]>
|
When I rebuild the stubs locally from the 'firmware' stubs I notice a class the "firmware-stubs" just show : # MCU: {'variant': '', 'build': '', 'arch': 'armv7emsp', 'port': 'mimxrt', 'board': 'MIMXRT1010_EVK', 'board_id': 'MIMXRT1010_EVK', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1011DAE5A', 'version': '1.26.1'}
# ...
STA_IF: Final[int] = 0
AP_IF: Final[int] = 1
def hostname(*args, **kwargs) -> Incomplete: ...
def route(*args, **kwargs) -> Incomplete: ...
def country(*args, **kwargs) -> Incomplete: ...so no actual network interfaces at all ( though it does include the network module - which makes no real-world sense to me , and could save some bytes - but that is a different verture. In the merged-stubs for the board I find: class LAN:
@overload
def active(self, /) -> bool:
"""
With a parameter, it sets the interface active if *state* is true, otherwise it
sets it inactive.
Without a parameter, it returns the state.
"""
@overload
def active(self, is_active: bool | int, /) -> None:
"""
With a parameter, it sets the interface active if *state* is true, otherwise it
sets it inactive.
Without a parameter, it returns the state.
"""that is not present in the Edit : The class it in the stubs you submitted - just located in a different part of the file. There is some inconsistency with regards to ordering of inserts across host platforms with libcst - i should report that upstream I think is is caused by the use of Sanity checks:
if so this is a missing feature in stubber, but the logic to handle a conditional merge based on the target port is rather tricky, and I need to finish migrating of some annotations I initially made using For now we can manually clean up the extraneous classes in the network module (each tie the subs are regenerated) , or just leave as is. |
|
Could run
( current process is not self-serve friendly I realize now) |
included frozen stubs in other mimxrt boards to improve type annotations. Signed-off-by: Jos Verlinde <[email protected]>
|
Thanks Andrew, I have published the current version to PyPI based on this branch. there are a few things that I noticed while reviewing that require additional thinking and some changed to stubber. I'm quite open to need a few .post versions with a new port or module, and never had complaints :-) |
Signed-off-by: Jos Verlinde <[email protected]>
Hello,
I've been starting to use mimxrt chips a bit more and was hoping to assist in creating stubs for them.
I generated these from the two boards I've got on hand after loading the official release builds and running stubber installed from directly from GitHub.
Is this an appropriate way to submit the generated files?
Is there a standard process for generating the generic package for a platform eg micropython-mimxrt-stubs as opposed to a board specific one? Is that something I can help with?