This is my first post, so please be gentle. I've been searching and struggling for a week, so please forgive if the answer is available and simple.
I've recently learned C, writing programs using VScode on a rpi 5 to be run on a Pico w. I'm now trying to bring C functions into micropython, following the fact example at https://docs.micropython.org/en/latest/ ... atmod.html and the factfib example from https://picockpit.com/raspberry-pi/c-ex ... ment-34002. I've tried hints from viewtopic.php?f=146&t=305744#p1880732 but can't get the initial make command to produce a mpy file. The older example (https://picockpit.com/raspberry-pi/c-ex ... ment-34002) includes modifying the dynruntime.mk tool because the armv6m wasn't supported. I think it is now supported, but I get the same error with or without those modifications.
So I made a folder factfib, cloned in micropython, created the factfib.c and makefile files, installed pyelftools>=0.25 but when I type "make" in a terminal in the factfib folder I get this error:
pi@raspberrypi:~/C/factfib $ make
LINK build/factfib.o
Traceback (most recent call last):
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1512, in <module>
main()
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1508, in main
do_link(args)
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1447, in do_link
with open(args.qstrs) as f:
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'build/factfib.config.h'
make: *** [micropython/py/dynruntime.mk:211: build/factfib.native.mpy] Error 1
Any suggestions would be most welcome...
I've recently learned C, writing programs using VScode on a rpi 5 to be run on a Pico w. I'm now trying to bring C functions into micropython, following the fact example at https://docs.micropython.org/en/latest/ ... atmod.html and the factfib example from https://picockpit.com/raspberry-pi/c-ex ... ment-34002. I've tried hints from viewtopic.php?f=146&t=305744#p1880732 but can't get the initial make command to produce a mpy file. The older example (https://picockpit.com/raspberry-pi/c-ex ... ment-34002) includes modifying the dynruntime.mk tool because the armv6m wasn't supported. I think it is now supported, but I get the same error with or without those modifications.
So I made a folder factfib, cloned in micropython, created the factfib.c and makefile files, installed pyelftools>=0.25 but when I type "make" in a terminal in the factfib folder I get this error:
pi@raspberrypi:~/C/factfib $ make
LINK build/factfib.o
Traceback (most recent call last):
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1512, in <module>
main()
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1508, in main
do_link(args)
File "/home/pi/C/factfib/micropython/tools/mpy_ld.py", line 1447, in do_link
with open(args.qstrs) as f:
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'build/factfib.config.h'
make: *** [micropython/py/dynruntime.mk:211: build/factfib.native.mpy] Error 1
Any suggestions would be most welcome...
Statistics: Posted by Old School — Sat Mar 22, 2025 6:12 pm