Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译问题 麻烦更新下最新的子模块 #1

Open
Kevincoooool opened this issue Dec 22, 2021 · 2 comments
Open

编译问题 麻烦更新下最新的子模块 #1

Kevincoooool opened this issue Dec 22, 2021 · 2 comments

Comments

@Kevincoooool
Copy link

您好,现在正在编译您这个工程,我使用idf 4.4时,用官方micropython是可以正常编译出mpy固件来的,当用您这个子模块的mpy时,总是提示错误:
能麻烦您更新一下readme里的子模块commit id吗,感谢!

kevin@computer:~/esp32/esp32_mpy/project/aitest$ make 
main/copy_leftmodules.sh
current directory /home/kevin/esp32/esp32_mpy/project/aitest
rm -rf build-GENERIC_S3/frozen_content.c && idf.py -D MICROPY_BOARD=GENERIC_S3 -D MICROPY_PY_LVGL=1 -B build-GENERIC_S3  build
Executing action: all (aliases: build)
Running cmake in directory /home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DMICROPY_BOARD=GENERIC_S3 -DMICROPY_PY_LVGL=1 -DCCACHE_ENABLE=0 /home/kevin/esp32/esp32_mpy/project/aitest"...
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- Component directory /home/kevin/esp32/esp32_mpy/project/aitest/components/lv_bindings does not contain a CMakeLists.txt file. No component will be added
-- Component directory /home/kevin/esp32/esp32_mpy/project/aitest/components/lvgl_esp32_drivers does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc
-- Check for working C compiler: /home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc
-- Check for working C compiler: /home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++
-- Check for working CXX compiler: /home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
Solving dependencies requirements
CMake Error at /home/kevin/esp32/esp-idf/tools/cmake/build.cmake:455 (message):
  Traceback (most recent call last):

    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/git_client.py", line 115, in run
      stderr=subprocess.STDOUT,
    File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.7/subprocess.py", line 512, in run
      output=stdout, stderr=stderr)

  subprocess.CalledProcessError: Command '['git', 'fetch', 'origin']'
  returned non-zero exit status 128.

  

  During handling of the above exception, another exception occurred:

  

  Traceback (most recent call last):

    File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/prepare_components/__main__.py", line 3, in <module>
      main()
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/prepare_components/prepare.py", line 110, in main
      args.func(args)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/prepare_components/prepare.py", line 40, in prepare_dep_dirs
      local_components_list_file=args.local_components_list_file,
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/core.py", line 317, in prepare_dep_dirs
      project_requirements, self.lock_path, self.managed_components_path)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/dependencies.py", line 36, in download_project_dependencies
      solution = solver.solve()
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/version_solver/version_solver.py", line 29, in solve
      self.solve_manifest(manifest)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/version_solver/version_solver.py", line 46, in solve_manifest
      self.solve_component(requirement)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_manager/version_solver/version_solver.py", line 50, in solve_component
      name=requirement.name, spec=requirement.version_spec, target=self.requirements.target)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/sources/git.py", line 94, in versions
      commit_id = self._checkout_git_source(version)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/sources/git.py", line 40, in _checkout_git_source
      return self._client.prepare_ref(repo=self.git_repo, path=self.cache_path(), ref=version, with_submodules=True)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/git_client.py", line 36, in wrapper
      return func(self, *args, **kwargs)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/git_client.py", line 76, in prepare_ref
      self.run(['fetch', 'origin'], cwd=path)
    File "/home/kevin/.espressif/python_env/idf5.0_py3.7_env/lib/python3.7/site-packages/idf_component_tools/git_client.py", line 119, in run
      "'git %s' failed with exit code %d \n%s" % (' '.join(args), e.returncode, e.output.decode('utf-8')))

  idf_component_tools.git_client.GitCommandError: 'git fetch origin' failed
  with exit code 128

  fatal: unable to access 'https://github.com/iot-components/tinyusb.git/':
  gnutls_handshake() failed: Error in the pull function.

  

Call Stack (most recent call first):
  /home/kevin/esp32/esp-idf/tools/cmake/project.cmake:378 (idf_build_process)
  CMakeLists.txt:36 (project)


-- Configuring incomplete, errors occurred!
See also "/home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
Makefile:32: recipe for target 'all' failed
make: *** [all] Error 2


@Kevincoooool
Copy link
Author

当我下载完所有子模块编译后出现了这个错:

                from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/portable.h:51,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/FreeRTOS.h:63,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/mpconfigport.h:328,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpconfig.h:62,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpstate.h:31,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/runtime.h:29,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/src/adapter/machine_hw_spi.c:31:
/home/kevin/esp32/esp-idf/components/soc/esp32s3/include/soc/cpu.h:25: warning: "WSR" redefined
 #define WSR(reg, newval)  asm volatile ("wsr %0, " #reg : : "r" (newval));
 
In file included from /home/kevin/esp32/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:41,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/portable.h:51,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/FreeRTOS.h:63,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/mpconfigport.h:328,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpconfig.h:62,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpstate.h:31,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/runtime.h:29,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/src/adapter/machine_hw_spi.c:31:
/home/kevin/esp32/esp-idf/components/xtensa/include/xt_instr_macros.h:18: note: this is the location of the previous definition
 #define WSR(reg, at)         asm volatile ("wsr %0, %1" : : "r" (at), "i" (reg))
 
In file included from /home/kevin/esp32/esp-idf/components/esp_hw_support/include/soc/spinlock.h:11,
                 from /home/kevin/esp32/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:42,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/portable.h:51,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/FreeRTOS.h:63,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/mpconfigport.h:328,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpconfig.h:62,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpstate.h:31,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/runtime.h:29,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/src/adapter/machine_hw_spi.c:31:
/home/kevin/esp32/esp-idf/components/soc/esp32s3/include/soc/cpu.h:26: warning: "XSR" redefined
 #define XSR(reg, swapval) asm volatile ("xsr %0, " #reg : "+r" (swapval));
 
In file included from /home/kevin/esp32/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:41,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/portable.h:51,
                 from /home/kevin/esp32/esp-idf/components/freertos/include/freertos/FreeRTOS.h:63,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/mpconfigport.h:328,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpconfig.h:62,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/mpstate.h:31,
                 from /home/kevin/esp32/esp32_mpy/submodule/micropython/py/runtime.h:29,
                 from /home/kevin/esp32/esp32_mpy/project/aitest/src/adapter/machine_hw_spi.c:31:
/home/kevin/esp32/esp-idf/components/xtensa/include/xt_instr_macros.h:19: note: this is the location of the previous definition
 #define XSR(reg, at)         asm volatile ("xsr %0, %1" : "+r" (at) : "i" (reg))
 
Traceback (most recent call last):
  File "/home/kevin/esp32/esp32_mpy/submodule/micropython/py/makeqstrdefs.py", line 188, in <module>
    preprocess()
  File "/home/kevin/esp32/esp32_mpy/submodule/micropython/py/makeqstrdefs.py", line 62, in preprocess
    for output in p.imap(pp(flags), chunks):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 868, in next
    raise value
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/kevin/esp32/esp32_mpy/submodule/micropython/py/makeqstrdefs.py", line 46, in run
    return subprocess.check_output(args.pp + flags + files)
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/kevin/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc', '-E', '-I/home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/config', '-I/home/kevin/esp32/esp32_mpy/submodule/micropython', '-I/home/kevin/esp32/esp32_mpy/submodule/micro

是在这一步之后出现的:

[94/101] Linking C static library esp-idf/spi_flash/libspi_flash.a
[95/101] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
[96/101] Linking C static library esp-idf/soc/libsoc.a
[97/101] Linking C static library esp-idf/hal/libhal.a
[98/101] Linking C static library esp-idf/main/libmain.a
[99/101] Linking C executable bootloader.elf
[100/101] Generating binary image from built executable
esptool.py v3.2-dev
Merged 1 ELF section
Generated /home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/bootloader/bootloader.bin
[101/101] cd /home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/bootloader/esp-idf/esptool_py && /home/kevin/.espressif/python_env/idf5.0_py3.7_env/bin/python /home/kevin/esp32/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/bootloader/bootloader.bin
Bootloader binary size 0x4e80 bytes. 0x3180 bytes (39%) free.
[1090/1594] Generating ../../genhdr/mpversion.h
GEN /home/kevin/esp32/esp32_mpy/project/aitest/build-GENERIC_S3/genhdr/mpversion.h
[1094/1594] Generating ../../genhdr/qstr.i.last

@Kevincoooool
Copy link
Author

啊对不起 提错仓库了 ,应该在esp32_mpy这个仓库下的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant