先说明下环境确实不如linux好用,各种坑,虽然可以编译成功。
1.clone仓库.
由于有http://github.com/micropython/mi ... tm32/modules/dht.py等symbolic link
直接在windows clone下来会变样(用的msys2自带的git)
所以:
- admin@admin-PC MINGW64 ~/test
- $ git clone -c core.symlinks=true http://github.com/micropython/micropython --branch v1.9.4 --depth=1
- Cloning into 'micropython'...
- remote: Counting objects: 2846, done.
- remote: Compressing objects: 100% (2478/2478), done.
- remote: Total 2846 (delta 460), reused 1426 (delta 181), pack-reused 0
- Receiving objects: 100% (2846/2846), 5.01 MiB | 681.00 KiB/s, done.
- Resolving deltas: 100% (460/460), done.
- Note: checking out '421b84af9968e582f324899934f52b3df60381ee'.
- You are in 'detached HEAD' state. You can look around, make experimental
- changes and commit them, and you can discard any commits you make in this
- state without impacting any branches by performing another checkout.
- If you want to create a new branch to retain commits you create, you may
- do so (now or later) by using -b with the checkout command again. Example:
- git checkout -b <new-branch-name>
- error: unable to create symlink examples/embedding/mpconfigport.h: No such file or directory
- error: unable to create symlink ports/esp32/modules/ds18x20.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/ntptime.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/onewire.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/upip.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/upip_utarfile.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/upysh.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/urequests.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/webrepl.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/webrepl_setup.py: No such file or directory
- error: unable to create symlink ports/esp32/modules/websocket_helper.py: No such file or directory
- error: unable to create symlink ports/esp8266/modules/upip.py: No such file or directory
- error: unable to create symlink ports/esp8266/modules/upip_utarfile.py: No such file or directory
- error: unable to create symlink ports/unix/modules/upip.py: No such file or directory
- error: unable to create symlink ports/unix/modules/upip_utarfile.py: No such file or directory
- error: unable to create symlink tests/pyboard.py: No such file or directory
- Checking out files: 100% (2698/2698), done.
- fatal: unable to checkout working tree
- warning: Clone succeeded, but checkout failed.
- You can inspect what was checked out with 'git status'
- and retry the checkout with 'git checkout -f HEAD'
复制代码 还是报错。。
如果不待-c core.symlinks=true参数,可能出现
- MPY modules/dht.py
- Traceback (most recent call last):
- File "modules/dht.py", line 1
- SyntaxError: invalid syntax
- make: *** [../../py/mkrules.mk:114: build-NUCLEO_L476RG/frozen_mpy/dht.mpy] Error 1
复制代码 原因在于modules/dht.py 已经不是它该有的样子了。。
将链接指向的文件copy过去覆盖也是可以的(这样可能就不需要step2了)
2.clone stm32lib
make 时按理会自动clone,但是报错了,先手动.
[可能上面的错误导致的]
- admin@admin-PC MINGW64 ~/test
- $ cd micropython/
复制代码- admin@admin-PC MINGW64 ~/test/micropython
- $ git clone http://github.com/micropython/stm32lib ./lib/stm32lib
- Cloning into './lib/stm32lib'...
- remote: Counting objects: 1958, done.
- remote: Total 1958 (delta 0), reused 0 (delta 0), pack-reused 1958
- Receiving objects: 100% (1958/1958), 7.46 MiB | 905.00 KiB/s, done.
- Resolving deltas: 100% (1508/1508), done.
- Checking out files: 100% (776/776), done.
复制代码 3.下面可以编译了。
以上仅供参考.
|