为了方便大家,在docker中创建新的容器,可以方便的编译源码。目前已经可以方便的编译 STM32、NRF、SAMD,其它型号将逐步加入。
在 docker 中新创建了 micropython 编译环境容器
- shaoziyang
- 帖子: 3967
- 注册时间: 2019年 10月 21日 13:48
Re: 在 docker 中新创建了 micropython 编译环境容器
Re: 在 docker 中新创建了 micropython 编译环境容器
大佬! 有教程吧,docker下的编译及修改源码教程?
- shaoziyang
- 帖子: 3967
- 注册时间: 2019年 10月 21日 13:48
Re: 在 docker 中新创建了 micropython 编译环境容器
不需要特别教程吧,都是按照相关说明操作就行。做成docker只是为了方便大家,不用重复在做一次。
Re: 在 docker 中新创建了 micropython 编译环境容器
编译报错
#
# cd /micropython
# ls
ACKNOWLEDGEMENTS CODEOFCONDUCT.md LICENSE docs examples lib mpy-cross py tests
CODECONVENTIONS.md CONTRIBUTING.md README.md drivers extmod logo ports shared tools
# make -C port/esp32
make: *** port/esp32: No such file or directory. Stop.
# make -C ports/esp32
make: Entering directory '/micropython/ports/esp32'
idf.py -D MICROPY_BOARD=GENERIC -B build-GENERIC build
make: idf.py: Command not found
make: *** [Makefile:34: all] Error 127
make: Leaving directory '/micropython/ports/esp32'
#
#
# cd /micropython
# ls
ACKNOWLEDGEMENTS CODEOFCONDUCT.md LICENSE docs examples lib mpy-cross py tests
CODECONVENTIONS.md CONTRIBUTING.md README.md drivers extmod logo ports shared tools
# make -C port/esp32
make: *** port/esp32: No such file or directory. Stop.
# make -C ports/esp32
make: Entering directory '/micropython/ports/esp32'
idf.py -D MICROPY_BOARD=GENERIC -B build-GENERIC build
make: idf.py: Command not found
make: *** [Makefile:34: all] Error 127
make: Leaving directory '/micropython/ports/esp32'
#
- shaoziyang
- 帖子: 3967
- 注册时间: 2019年 10月 21日 13:48
Re: 在 docker 中新创建了 micropython 编译环境容器
编译的目录不对,需要在micropython目录下编译,或者到port/esp32下编译
Re: 在 docker 中新创建了 micropython 编译环境容器
shaoziyang/micropython-builder - Docker Image | Docker Hub
按照上面提供的命令编译的,但是/micropython里没有 port 目录,只有ports目录,所以改用 make -C ports/esp32
报的错是 没有找到 idf.py
按照上面提供的命令编译的,但是/micropython里没有 port 目录,只有ports目录,所以改用 make -C ports/esp32
报的错是 没有找到 idf.py
Re: 在 docker 中新创建了 micropython 编译环境容器
重装了一下esp-idf,编译的时候还要写什么用户名密码
# make -C ports/esp32
make: Entering directory '/micropython/ports/esp32'
idf.py -D MICROPY_BOARD=GENERIC -B build-GENERIC build
Executing action: all (aliases: build)
Running cmake in directory /micropython/ports/esp32/build-GENERIC
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DMICROPY_BOARD=GENERIC -DCCACHE_ENABLE=0 /micropython/ports/esp32"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Initialising new submodule components/bt/controller/lib_esp32c3_family...
Submodule 'components/bt/controller/lib_esp32c3_family' (https://gitee.com/espressif/esp32c3-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c3_family'
Cloning into '/esp/esp-idf/components/bt/controller/lib_esp32c3_family'...
Username for 'https://gitee.com':
Password for 'https://gitee.com':
remote: [session-0945ecb7] Unauthorized
fatal: Authentication failed for 'https://gitee.com/espressif/esp32c3-bt-lib.git/'
fatal: clone of 'https://gitee.com/espressif/esp32c3-bt-lib.git' into submodule path '/esp/esp-idf/components/bt/controller/lib_esp32c3_family' failed
Failed to clone 'components/bt/controller/lib_esp32c3_family'. Retry scheduled
Cloning into '/esp/esp-idf/components/bt/controller/lib_esp32c3_family'...
Username for 'https://gitee.com':
Password for 'https://gitee.com':
remote: [session-f045cfa5] Unauthorized
fatal: Authentication failed for 'https://gitee.com/espressif/esp32c3-bt-lib.git/'
fatal: clone of 'https://gitee.com/espressif/esp32c3-bt-lib.git' into submodule path '/esp/esp-idf/components/bt/controller/lib_esp32c3_family' failed
Failed to clone 'components/bt/controller/lib_esp32c3_family' a second time, aborting
CMake Error at /esp/esp-idf/tools/cmake/git_submodules.cmake:48 (message):
Git submodule init failed for components/bt/controller/lib_esp32c3_family
Call Stack (most recent call first):
/esp/esp-idf/tools/cmake/build.cmake:80 (git_submodule_check)
/esp/esp-idf/tools/cmake/build.cmake:237 (__build_get_idf_git_revision)
/esp/esp-idf/tools/cmake/idf.cmake:53 (__build_init)
/esp/esp-idf/tools/cmake/project.cmake:12 (include)
CMakeLists.txt:22 (include)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /micropython/ports/esp32/build-GENERIC/log/idf_py_stderr_output_856 and /micropython/ports/esp32/build-GENERIC/log/idf_py_stdout_output_856
make: *** [Makefile:34: all] Error 2
make: Leaving directory '/micropython/ports/esp32'
#
# make -C ports/esp32
make: Entering directory '/micropython/ports/esp32'
idf.py -D MICROPY_BOARD=GENERIC -B build-GENERIC build
Executing action: all (aliases: build)
Running cmake in directory /micropython/ports/esp32/build-GENERIC
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DMICROPY_BOARD=GENERIC -DCCACHE_ENABLE=0 /micropython/ports/esp32"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Initialising new submodule components/bt/controller/lib_esp32c3_family...
Submodule 'components/bt/controller/lib_esp32c3_family' (https://gitee.com/espressif/esp32c3-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c3_family'
Cloning into '/esp/esp-idf/components/bt/controller/lib_esp32c3_family'...
Username for 'https://gitee.com':
Password for 'https://gitee.com':
remote: [session-0945ecb7] Unauthorized
fatal: Authentication failed for 'https://gitee.com/espressif/esp32c3-bt-lib.git/'
fatal: clone of 'https://gitee.com/espressif/esp32c3-bt-lib.git' into submodule path '/esp/esp-idf/components/bt/controller/lib_esp32c3_family' failed
Failed to clone 'components/bt/controller/lib_esp32c3_family'. Retry scheduled
Cloning into '/esp/esp-idf/components/bt/controller/lib_esp32c3_family'...
Username for 'https://gitee.com':
Password for 'https://gitee.com':
remote: [session-f045cfa5] Unauthorized
fatal: Authentication failed for 'https://gitee.com/espressif/esp32c3-bt-lib.git/'
fatal: clone of 'https://gitee.com/espressif/esp32c3-bt-lib.git' into submodule path '/esp/esp-idf/components/bt/controller/lib_esp32c3_family' failed
Failed to clone 'components/bt/controller/lib_esp32c3_family' a second time, aborting
CMake Error at /esp/esp-idf/tools/cmake/git_submodules.cmake:48 (message):
Git submodule init failed for components/bt/controller/lib_esp32c3_family
Call Stack (most recent call first):
/esp/esp-idf/tools/cmake/build.cmake:80 (git_submodule_check)
/esp/esp-idf/tools/cmake/build.cmake:237 (__build_get_idf_git_revision)
/esp/esp-idf/tools/cmake/idf.cmake:53 (__build_init)
/esp/esp-idf/tools/cmake/project.cmake:12 (include)
CMakeLists.txt:22 (include)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /micropython/ports/esp32/build-GENERIC/log/idf_py_stderr_output_856 and /micropython/ports/esp32/build-GENERIC/log/idf_py_stdout_output_856
make: *** [Makefile:34: all] Error 2
make: Leaving directory '/micropython/ports/esp32'
#
- shaoziyang
- 帖子: 3967
- 注册时间: 2019年 10月 21日 13:48
Re: 在 docker 中新创建了 micropython 编译环境容器
是ports,前面写错了。
esp32c3的编译还没有尝试,好像看到说有些地方稍有不同,等有空了试试。
esp32c3的编译还没有尝试,好像看到说有些地方稍有不同,等有空了试试。
-
- 随机主题
- 回复总数
- 阅读次数
- 最新文章
-
- 5回复总数
- 1973 阅读次数
- 最新文章 由 slotg
2020年 9月 16日 15:47
-
- 4回复总数
- 1856 阅读次数
- 最新文章 由 oyster
2021年 4月 19日 22:25
-
- 2回复总数
- 1315 阅读次数
- 最新文章 由 shaoziyang
2020年 9月 16日 19:32