8000 esp32: build error on windows with sed expression · Issue #9281 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

esp32: build error on windows with sed expression #9281

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

Open
sgyuri2003 opened this issue Sep 12, 2022 · 2 comments
Open

esp32: build error on windows with sed expression #9281

sgyuri2003 opened this issue Sep 12, 2022 · 2 comments

Comments

@sgyuri2003
Copy link
sgyuri2003 commented Sep 12, 2022

ESP32 Build error!
Windows : String in ESP-IDF Cmd windows

C:\micropython\ports\esp32>make USER_C_MODULES=../../../examples/usercmodule/micropython.cmake

[1152/1386] Generating ../../genhdr/qstrdefs.preprocessed.h
FAILED: genhdr/qstrdefs.preprocessed.h C:/micropython/ports/esp32/build-generic/genhdr/qstrdefs.preprocessed.h
esp-idf\main\CMakeFiles\qstrdefs.preprocessed.h-0fb6a53.bat 5964d331c9989f35
sed: -e expression #1, char 10: unterminated `s' command
'"/"' is not recognized as an internal or external command,
operable program or batch file.
[1154/1386] Generating ../../genhdr/root_pointers.h

@sgyuri2003 sgyuri2003 added the bug label Sep 12, 2022
@dpgeorge dpgeorge changed the title Hi! esp32: build error on windows with sed expression Sep 12, 2022
@GeorgeCGV
Copy link
8000
GeorgeCGV commented Sep 28, 2022

Tried to build Zephyr port on Windows

west build -b nucleo_h743zi -s modules/micropython/ports/zephyr -- -DCONF_FILE=prj_minimal.conf

result is a similar error:

<redacted> | sed "s/^\\\"\(Q(.*)\)\\\"/\1/" > <redacted>/build/genhdr/qstrdefs.preprocessed.h"

sed: -e expression #1, char 10: unterminated `s' command
cat: write error: No space left on device
'\"/"' is not recognized as an internal or external command,
operable program or batch file.

ninja: build stopped: subcommand failed.

FATAL ERROR: command exited with status 1: 'C:\cmake\bin\cmake.EXE' --build '<redacted>\build'

Probably related to:

COMMAND cat ${MICROPY_QSTRDEFS_PY} ${MICROPY_QSTRDEFS_PORT} ${MICROPY_QSTRDEFS_COLLECTED} | sed "s/^Q(.*)/\"&\"/" | ${CMAKE_C_COMPILER} -E ${MICROPY_CPP_FLAGS} - | sed "s/^\\\"\\(Q(.*)\\)\\\"/\\1/" > ${MICROPY_QSTRDEFS_PREPROCESSED}

Environment(s)

  • shell: CMD Microsoft Windows [Version 10.0.19044.2006], tried Git-Bash (MINGW64, Git for Windows v2.37.3) as well
  • ninja: 1.10.2
  • cmake: version 3.23.0-rc1
  • sed: (GNU sed) 4.4 (Packaged by Cygwin (4.4-1))

PS

When sed commands are correctly escaped for win there are other issues.

For example, path slash and backslash within pipes:
cmd.exe /C "echo a | C:\tc\gnu-tools-for-stm32.10.3-2021.10\bin\arm-none-eabi-gcc.exe"
works, but
cmd.exe /C "echo a | C:/tc/gnu-tools-for-stm32.10.3-2021.10/bin/arm-none-eabi-gcc.exe"
results in an error:
'C:' is not recognized as an internal or external command, operable program or batch file.

Absolute include path of the FFCONF_H, but that one can be corrected with modifications of the Zephyr's port cmake.

@GeorgeCGV
Copy link

@sgyuri2003 could you test if #9451 fixes the issue for you?

tannewt pushed a commit to tannewt/circuitpython that referenced this issue May 31, 2024
Add support for AutosportLabs ESP32-CAN-X2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0