diff --git a/docs/build_system.rst b/docs/build_system.rst index 43055a478..4df65b1b5 100644 --- a/docs/build_system.rst +++ b/docs/build_system.rst @@ -193,10 +193,13 @@ Because components usually live under the project directory (although they can also reside in an other folder), the path to this may be something like /home/myuser/projects/myprojects/components/httpd . +Components can have any name (unique to the project) but the name +cannot contain spaces (esp-idf does not support spaces in paths). + One of the things that most components will have is a component.mk makefile, containing instructions on how to build the component. Because the build environment tries to set reasonable defaults that will work most -of the time, component.mk can be very small. +of the time, component.mk can be very small. Simplest component.mk ===================== diff --git a/docs/linux-setup.rst b/docs/linux-setup.rst index ee9765156..13e1b3a9c 100644 --- a/docs/linux-setup.rst +++ b/docs/linux-setup.rst @@ -108,6 +108,7 @@ Note the ``--recursive`` option! If you have already cloned ESP-IDF without this cd ~/esp/esp-idf git submodule update --init +**IMPORTANT:** The esp-idf build system does not support spaces in paths to esp-idf or to projects. Step 3: Starting a project ========================== diff --git a/docs/macos-setup.rst b/docs/macos-setup.rst index d3869f426..8178a17ad 100644 --- a/docs/macos-setup.rst +++ b/docs/macos-setup.rst @@ -122,6 +122,7 @@ The easiest way to start a project is to download the template project from GitH This will download ``esp-idf-template`` project into ``~/esp/myapp`` directory. +**IMPORTANT:** The esp-idf build system does not support spaces in paths to esp-idf or to projects. Step 4: Building and flashing the application ============================================= diff --git a/docs/windows-setup.rst b/docs/windows-setup.rst index 89b134181..baea1ac40 100644 --- a/docs/windows-setup.rst +++ b/docs/windows-setup.rst @@ -50,6 +50,8 @@ Change to the directory you want to clone the SDK into by typing a command like If you'd rather use a Windows UI tool to manage your git repositories, this is also possible. A wide range are available. +*NOTE*: While cloning submodules, the ``git clone`` command may print some output starting ``': not a valid identifier...``. This is a `known issue`_ but the git clone still succeeds without any problems. + Step 3: Starting a project ========================== @@ -59,6 +61,8 @@ The easiest way to start a project is to download the Getting Started project fr The process is the same as for checking out the ESP-IDF from github. Change to the parent directory and run ``git clone https://github.com/espressif/esp-idf-template.git``. +**IMPORTANT:** The esp-idf build system does not support spaces in paths to esp-idf or to projects. + Step 4: Configuring the project =============================== @@ -74,3 +78,4 @@ If you'd like to use the Eclipse IDE instead of running ``make``, check out the .. _Eclipse: eclipse-setup.rst .. _MSYS2: https://msys2.github.io/ .. _github: https://github.com/espressif/esp-idf-template +.. _known issue: https://github.com/espressif/esp-idf/issues/11 diff --git a/make/test_build_system.sh b/make/test_build_system.sh index cb42356f0..5be1504e3 100755 --- a/make/test_build_system.sh +++ b/make/test_build_system.sh @@ -80,6 +80,22 @@ function run_tests() failure "Files weren't cleaned: ${ALL_BUILD_FILES}" fi + print_status "Can still clean build if all text files are CRLFs" + make clean + find . -exec unix2dos {} \; # CRLFify template dir + # make a copy of esp-idf and CRLFify it + CRLF_ESPIDF=${TESTDIR}/esp-idf-crlf + mkdir -p ${CRLF_ESPIDF} + cp -rv ${IDF_PATH}/* ${CRLF_ESPIDF} + # don't CRLFify executable files, as Linux will fail to execute them + find ${CRLF_ESPIDF} -type f ! -perm 755 -exec unix2dos {} \; + make IDF_PATH=${CRLF_ESPIDF} + # do the same checks we do for the clean build + assert_built ${APP_BINS} ${BOOTLOADER_BINS} partitions_singleapp.bin + [ -f ${BUILD}/partition*.bin ] || failure "A partition table should have been built in CRLF mode" + + # NOTE: If adding new tests, add them above this CRLF test... + print_status "All tests completed" if [ -n "${FAILURES}" ]; then echo "Some failures were detected:" diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index 2df04f3f2..65b236d34 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -301,7 +301,8 @@ zconf.lex.c: zconf.l flex -L -P zconf -o zconf.lex.c zconf.l zconf.hash.c: zconf.gperf - gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$$' -p -t zconf.gperf +# strip CRs on Windows systems where gperf will otherwise barf on them + sed -E "s/\r//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$$' -p -t zconf.tab.c: zconf.y bison -t -l -p zconf -o zconf.tab.c zconf.y diff --git a/tools/kconfig/zconf.l b/tools/kconfig/zconf.l index 8c787b509..f0b65608f 100644 --- a/tools/kconfig/zconf.l +++ b/tools/kconfig/zconf.l @@ -114,8 +114,8 @@ n [A-Za-z0-9_-] zconflval.string = text; return T_WORD; } - . warn_ignored_character(*yytext); - \n { + [^\r\n] warn_ignored_character(*yytext); + \r?\n { BEGIN(INITIAL); current_file->lineno++; return T_EOL; @@ -139,7 +139,7 @@ n [A-Za-z0-9_-] new_string(); BEGIN(STRING); } - \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; + \r?\n BEGIN(INITIAL); current_file->lineno++; return T_EOL; ({n}|[/.])+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { @@ -184,7 +184,7 @@ n [A-Za-z0-9_-] } else append_string(yytext, 1); } - \n { + \r?\n { printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); current_file->lineno++; BEGIN(INITIAL); @@ -218,16 +218,16 @@ n [A-Za-z0-9_-] append_string(" ", ts); } } - [ \t]*\n/[^ \t\n] { + [ \t]*\r?\n/[^ \t\r\n] { current_file->lineno++; zconf_endhelp(); return T_HELPTEXT; } - [ \t]*\n { + [ \t]*\r?\n { current_file->lineno++; append_string("\n", 1); } - [^ \t\n].* { + [^ \t\r?\n].* { while (yyleng) { if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) break;