打印
[应用相关]

STM32F4编译MicroPython源码报错求助

[复制链接]
905|9
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
本帖最后由 caizhiwei 于 2021-2-19 09:41 编辑

#申请原创# 开发环境:Win10+ WSLMicropython源码,不是githuu上拉的,是官方网站发布的稳定版本:
MicroPython - Python for microcontrollers http://micropython.org/download/

第一步,安装gcc-arm-gnueabi


2. 打开/mnt/c/Users/Administrator/Desktop/MicroPython/micropython-1.14/ports/stm32$ 路径下:
执行编译指令:
make BOARD=NUCLEO_F412ZG 


一开始还很顺利,到后面就报错了。
casy@amd-pc:/mnt/c/Users/Administrator/Desktop/MicroPython/micropython-1.14/ports/stm32$ make BOARD=NUCLEO_F412ZG
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
mkdir -p build-NUCLEO_F412ZG/genhdr
GEN build-NUCLEO_F412ZG/genhdr/pins.h
GEN stmconst build-NUCLEO_F412ZG/modstm_qstr.h
GEN build-NUCLEO_F412ZG/genhdr/mpversion.h
GEN build-NUCLEO_F412ZG/genhdr/moduledefs.h
GEN build-NUCLEO_F412ZG/genhdr/pybcdc.inf
GEN build-NUCLEO_F412ZG/genhdr/pybcdc_inf.h
GEN build-NUCLEO_F412ZG/genhdr/pllfreqtable.h
GEN build-NUCLEO_F412ZG/genhdr/qstr.i.last
GEN build-NUCLEO_F412ZG/genhdr/qstr.split
GEN build-NUCLEO_F412ZG/genhdr/qstrdefs.collected.h
QSTR updated
GEN build-NUCLEO_F412ZG/genhdr/qstrdefs.generated.h
GEN build-NUCLEO_F412ZG/genhdr/compressed.split
GEN build-NUCLEO_F412ZG/genhdr/compressed.collected
Compressed data updated
GEN build-NUCLEO_F412ZG/genhdr/compressed.data.h
mkdir -p build-NUCLEO_F412ZG/build-NUCLEO_F412ZG/
mkdir -p build-NUCLEO_F412ZG/drivers/bus/
mkdir -p build-NUCLEO_F412ZG/drivers/dht/
mkdir -p build-NUCLEO_F412ZG/drivers/memory/
mkdir -p build-NUCLEO_F412ZG/extmod/
mkdir -p build-NUCLEO_F412ZG/lib/embed/
mkdir -p build-NUCLEO_F412ZG/lib/libc/
mkdir -p build-NUCLEO_F412ZG/lib/libm/
mkdir -p build-NUCLEO_F412ZG/lib/mp-readline/
mkdir -p build-NUCLEO_F412ZG/lib/netutils/
mkdir -p build-NUCLEO_F412ZG/lib/oofatfs/
mkdir -p build-NUCLEO_F412ZG/lib/stm32lib/CMSIS/STM32F4xx/Source/Templates/
mkdir -p build-NUCLEO_F412ZG/lib/stm32lib/CMSIS/STM32F4xx/Source/Templates/gcc/
mkdir -p build-NUCLEO_F412ZG/lib/stm32lib/STM32F4xx_HAL_Driver/Src/
mkdir -p build-NUCLEO_F412ZG/lib/timeutils/
mkdir -p build-NUCLEO_F412ZG/lib/utils/
mkdir -p build-NUCLEO_F412ZG/py/
mkdir -p build-NUCLEO_F412ZG/usbdev/class/src/
mkdir -p build-NUCLEO_F412ZG/usbdev/core/src/
CC ../../py/mpstate.c
CC ../../py/nlr.c
CC ../../py/nlrx86.c
CC ../../py/nlrx64.c
CC ../../py/nlrthumb.c
CC ../../py/nlrpowerpc.c
CC ../../py/nlrxtensa.c
CC ../../py/nlrsetjmp.c
CC ../../py/malloc.c
CC ../../py/gc.c
CC ../../py/pystack.c
CC ../../py/qstr.c
CC ../../py/vstr.c
CC ../../py/mpprint.c

CC ../../py/unicode.c
CC ../../py/mpz.c
CC ../../py/reader.c
CC ../../py/lexer.c
CC ../../py/parse.c
CC ../../py/scope.c
CC ../../py/compile.c
CC ../../py/emitcommon.c
CC ../../py/emitbc.c
CC ../../py/asmbase.c
CC ../../py/asmx64.c
CC ../../py/emitnx64.c
CC ../../py/asmx86.c
CC ../../py/emitnx86.c
CC ../../py/asmthumb.c
CC ../../py/emitnthumb.c
CC ../../py/emitinlinethumb.c
CC ../../py/asmarm.c
CC ../../py/emitnarm.c
CC ../../py/asmxtensa.c
CC ../../py/emitnxtensa.c
CC ../../py/emitinlinextensa.c
CC ../../py/emitnxtensawin.c
CC ../../py/formatfloat.c
CC ../../py/parsenumbase.c
CC ../../py/parsenum.c
CC ../../py/emitglue.c
CC ../../py/persistentcode.c
CC ../../py/runtime.c
CC ../../py/runtime_utils.c
CC ../../py/scheduler.c
CC ../../py/nativeglue.c
CC ../../py/pairheap.c
CC ../../py/ringbuf.c
CC ../../py/stackctrl.c
CC ../../py/argcheck.c
CC ../../py/warning.c
CC ../../py/profile.c
CC ../../py/map.c
CC ../../py/obj.c
CC ../../py/objarray.c
CC ../../py/objattrtuple.c
CC ../../py/objbool.c
CC ../../py/objboundmeth.c
CC ../../py/objcell.c
CC ../../py/objclosure.c
CC ../../py/objcomplex.c
CC ../../py/objdeque.c
CC ../../py/objdict.c
CC ../../py/objenumerate.c
CC ../../py/objexcept.c
CC ../../py/objfilter.c
CC ../../py/objfloat.c
CC ../../py/objfun.c
CC ../../py/objgenerator.c
CC ../../py/objgetitemiter.c
CC ../../py/objint.c
CC ../../py/objint_longlong.c
CC ../../py/objint_mpz.c
CC ../../py/objlist.c
CC ../../py/objmap.c
CC ../../py/objmodule.c
CC ../../py/objobject.c
CC ../../py/objpolyiter.c
CC ../../py/objproperty.c
CC ../../py/objnone.c
CC ../../py/objnamedtuple.c
CC ../../py/objrange.c
CC ../../py/objreversed.c
CC ../../py/objset.c
CC ../../py/objsingleton.c
CC ../../py/objslice.c
CC ../../py/objstr.c
CC ../../py/objstrunicode.c
CC ../../py/objstringio.c
CC ../../py/objtuple.c
CC ../../py/objtype.c
CC ../../py/objzip.c
CC ../../py/opmethods.c
CC ../../py/sequence.c
CC ../../py/stream.c
CC ../../py/binary.c
CC ../../py/builtinimport.c

CC ../../py/builtinevex.c
CC ../../py/builtinhelp.c
CC ../../py/modarray.c
CC ../../py/modbuiltins.c
CC ../../py/modcollections.c
CC ../../py/modgc.c
CC ../../py/modio.c
CC ../../py/modmath.c
CC ../../py/modcmath.c
CC ../../py/modmicropython.c
CC ../../py/modstruct.c
CC ../../py/modsys.c
CC ../../py/moduerrno.c
CC ../../py/modthread.c
CC ../../py/vm.c
CC ../../py/bc.c
CC ../../py/showbc.c
CC ../../py/repl.c
CC ../../py/smallint.c
CC ../../py/frozenmod.c
CC ../../extmod/moduasyncio.c
CC ../../extmod/moductypes.c
CC ../../extmod/modujson.c
CC ../../extmod/modure.c
CC ../../extmod/moduzlib.c
CC ../../extmod/moduheapq.c
CC ../../extmod/modutimeq.c
CC ../../extmod/moduhashlib.c
CC ../../extmod/moducryptolib.c
CC ../../extmod/modubinascii.c
CC ../../extmod/virtpin.c
CC ../../extmod/machine_mem.c
CC ../../extmod/machine_pinbase.c
CC ../../extmod/machine_signal.c
CC ../../extmod/machine_pulse.c
CC ../../extmod/machine_i2c.c
CC ../../extmod/machine_spi.c
CC ../../extmod/modbluetooth.c
CC ../../extmod/modussl_axtls.c
CC ../../extmod/modussl_mbedtls.c
CC ../../extmod/modurandom.c
CC ../../extmod/moduselect.c
CC ../../extmod/moduwebsocket.c
CC ../../extmod/modwebrepl.c
CC ../../extmod/modframebuf.c
CC ../../extmod/vfs.c
CC ../../extmod/vfs_blockdev.c
CC ../../extmod/vfs_reader.c
CC ../../extmod/vfs_posix.c
CC ../../extmod/vfs_posix_file.c
CC ../../extmod/vfs_fat.c
CC ../../extmod/vfs_fat_diskio.c
CC ../../extmod/vfs_fat_file.c
CC ../../extmod/vfs_lfs.c
CC ../../extmod/utime_mphal.c
CC ../../extmod/uos_dupterm.c
CC ../../lib/embed/abort_.c
CC ../../lib/utils/printf.c
mpy-cross not found at /mnt/c/Users/Administrator/Desktop/MicroPython/micropython-1.14/mpy-cross/mpy-cross, please build it first
../../py/mkrules.mk:142: recipe for target 'build-NUCLEO_F412ZG/frozen_content.c' failed
make: *** [build-NUCLEO_F412ZG/frozen_content.c] Error 1
casy@amd-pc:/mnt/c/Users/Administrator/Desktop/MicroPython/micropython-1.14/ports/stm32$



使用特权

评论回复
沙发
caizhiwei|  楼主 | 2021-2-16 21:26 | 只看该作者
在Linux下编译micropython源码的方法(包括win10的ubuntu子系统) - 灰信网(软件开发博客聚合) https://www.freesion.com/article/1270212647/

使用特权

评论回复
板凳
caizhiwei|  楼主 | 2021-2-16 21:26 | 只看该作者
原来缺少一个东西没有编译。

使用特权

评论回复
地板
zengyi703| | 2021-2-17 09:57 | 只看该作者
先到micropython/mpy-cross/目录,make一下,再回到ports/stm32  编译

使用特权

评论回复
5
caizhiwei|  楼主 | 2021-2-19 09:25 | 只看该作者
zengyi703 发表于 2021-2-17 09:57
先到micropython/mpy-cross/目录,make一下,再回到ports/stm32  编译

对的,感谢~

使用特权

评论回复
6
labasi| | 2021-3-3 07:38 | 只看该作者
这是另外一种语言吗

使用特权

评论回复
7
paotangsan| | 2021-3-3 07:40 | 只看该作者
不会用这个 学习一下

使用特权

评论回复
8
wakayi| | 2021-3-3 07:43 | 只看该作者
使用什么工具进行编译啊

使用特权

评论回复
9
renzheshengui| | 2021-3-3 07:45 | 只看该作者
需要打开目录下的文件是吗

使用特权

评论回复
10
wowu| | 2021-3-3 07:47 | 只看该作者
原来是这样解决的  非常好啊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

100

主题

857

帖子

14

粉丝