efabless / caravel_board

32 stars 41 forks source link

ValueError: incompatible .mpy file #20

Closed ayushman22git closed 1 year ago

ayushman22git commented 1 year ago

Getting the following error when do make run. ayushman_ubuntu@UbuntuLTS:~/caravel_board/firmware_vex/nucleo$ make run mpremote connect /dev/ttyACM0 exec "import machine; machine.reset()" Traceback (most recent call last): File "main.py", line 2, in File "io_config.py", line 1, in File "nucleo_api.py", line 3, in ValueError: incompatible .mpy file MicroPython v1.19.1-616-g5987130af-dirty on 2022-11-20; NUCLEO-F746ZG with STM32F746

Type "help()" for more information.

@msaligane

proppy commented 1 year ago

Maybe an outdated version of the mpy files on the device?

Did you try:

mpremote ls
ayushman22git commented 1 year ago

This is the response I get with mpremote ls

image
proppy commented 1 year ago

@ayushman22git can you give more details on how you connected the board to the host computer?

proppy commented 1 year ago

@ayushman22git did you also run:

make compile
make copy
ayushman22git commented 1 year ago

@proppy I connected using the CN1 connector on Nucleo to my USB host. Utilized mpremote. I had not run these 2 commands. However I have now run these commands. the following is the output

image

Copy is not proceeding beyond this point. However, after several iterations the copy operation halted as in figure 2.

image

Not proceeding beyond this point. When interrupt this at times I see mostly the following output. It seems to hang. In some trials, see earlier error message with make run as well.

image
proppy commented 1 year ago

another possible workaround is not not compile mpy file and simply copy py file around: https://github.com/proppy/caravel_board/commit/d19877f864fbc368b3874f8979909bdc99b4f162

proppy commented 1 year ago

@ayushman22git one gotcha that @mattvenn figured out during his recent demonstration, is that a more reliable copy is possible by:

jeffdi commented 1 year ago

proppy instructions are correct and are now included to the README