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

stubber: get_frozen fails for ARDUINO boards that depend on arduino_lib #591

Open
Josverl opened this issue Jun 25, 2024 · 1 comment
Open
Assignees
Labels
CI/CD Frozen Stubs Low-Prio do other things first stubber MicroPython-stubber CLI

Comments

@Josverl
Copy link
Owner

Josverl commented Jun 25, 2024

Freeze error with ARDUINO boards.

Both for 1.23.0 & preview

08:15:20 | INFO | repos - repos/micropython v1.24.0-preview
08:15:20 | INFO | repos - repos/micropython-lib v1.23.0-10-g98f8a7e

08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-ARDUINO_PORTENTA_H7
08:15:21 | ERROR    | freeze_manifest_2  - freeze error executing "/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py": Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py: Package 'cmwx1' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/$(ARDUINO_LIB_DIR)).
08:15:21 | ERROR    | get_frozen         - Error processing manifest /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py : Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py: Package 'cmwx1' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_PORTENTA_H7/$(ARDUINO_LIB_DIR)).
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_F767ZI
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-GARATRONIC_PYBSTICK26_F411
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-LEGO_HUB_NO6
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-PYBD_SF2
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-STM32F7DISC
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-ARDUINO_NICLA_VISION
08:15:21 | ERROR    | freeze_manifest_2  - freeze error executing "/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/manifest.py": Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/manifest.py: Package 'msgpackrpc' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/$(ARDUINO_LIB_DIR)).
08:15:21 | ERROR    | get_frozen         - Error processing manifest /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/manifest.py : Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/manifest.py: Package 'msgpackrpc' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_NICLA_VISION/$(ARDUINO_LIB_DIR)).
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-OLIMEX_E407
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_F746ZG
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_F439ZI
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_H723ZG
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-LEGO_HUB_NO7
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_F429ZI
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-PYBV10
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-NUCLEO_F756ZG
08:15:21 | INFO     | freeze_manifest_2  - port-board: stm32-ARDUINO_GIGA
08:15:21 | ERROR    | freeze_manifest_2  - freeze error executing "/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/manifest.py": Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/manifest.py: Package 'msgpackrpc' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/$(ARDUINO_LIB_DIR)).
08:15:21 | ERROR    | get_frozen         - Error processing manifest /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/manifest.py : Error in manifest file: /home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/manifest.py: Package 'msgpackrpc' not found in external library 'arduino-lib' (/home/runner/work/micropython-stubs/micropython-stubs/repos/micropython/ports/stm32/boards/ARDUINO_GIGA/$(ARDUINO_LIB_DIR)).

https://github.com/Josverl/micropython-stubs/actions/runs/9658848304/job/26640919863

@Josverl Josverl added stubber MicroPython-stubber CLI Frozen Stubs CI/CD labels Jun 25, 2024
@Josverl
Copy link
Owner Author

Josverl commented Jun 30, 2024

The root error is :
ValueError("Package 'cmwx1' not found in external library 'arduino-lib' (D:\mypython\micropython-stubber\repos\micropython\ports\renesas-ra\boards\ARDUINO_PORTENTA_C33\$(ARDUINO_LIB_DIR)).")

and that is caused by the arduino-lib submodule not being added/cloned to the micropython/lib/arduino-lib folder.

During build this is doen by the make submodules

a quick workaround it to

  1. clone this manually:
...\repos\micropython> git submodule update --init lib/arduino-lib
Submodule 'lib/arduino-lib' (https://github.com/arduino/arduino-lib-mpy.git) registered for path 'lib/arduino-lib'
Cloning into 'D:/mypython/micropython-stubber/repos/micropython/lib/arduino-lib'...
Submodule path 'lib/arduino-lib': checked out '89424753e18ed58b7d8041085c9d2e1d162f09ca'
  1. Adjust ARDUINO_LIB_DIR in the environment? allow to find the arduino-lib to repos\micropython\lib\arduino-lib\lib\cmwx1\cmwx1.py

Josverl added a commit that referenced this issue Jun 30, 2024
… manifest imports for some of the ARDUINO boards

fixes #591

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
@Josverl Josverl self-assigned this Jun 30, 2024
@Josverl Josverl changed the title stubber stubber: get_frozen fails for ARDUINO boards that depend on arduino_lib Jun 30, 2024
@Josverl Josverl added the Low-Prio do other things first label Jun 30, 2024
Josverl added a commit that referenced this issue Jul 8, 2024
… manifest imports for some of the ARDUINO boards

fixes #591

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Frozen Stubs Low-Prio do other things first stubber MicroPython-stubber CLI
Projects
None yet
Development

No branches or pull requests

1 participant