[SOLVED] Eclipse SDK cannot find certain files when building.

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

[SOLVED] Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Tue Nov 07, 2017 9:28 pm

I'm trying to set up eclipse to use the esp-IDF make platform, but whenever I build, after a clean I get the following output:

Code: Select all

15:12:50 **** Incremental Build of configuration Default for project esp-idf-template ****
python C:/espIDF/esp-idf/tools/windows/eclipse_make.py all 
Makefile:8: /c/espIDF/esp-idf/make/project.mk: No such file or directory
make: *** No rule to make target '/c/espIDF/esp-idf/make/project.mk'.  Stop.
Running make in 'C:/espIDF/esp-idf-template'

15:12:50 Build Finished (took 146ms)

I should note that the equivalent of that does exist. Here are my project properties:

Build command: "python C:/espIDF/esp-idf/tools/windows/eclipse_make.py"
variable BATCH_BUILD: '1'
variable IDF_PATH:'/c/espIDF/esp-idf'
variable PATH:

Code: Select all

'
C:/Program Files/Java/jre1.8.0_131/bin/server;
C:/Program Files/Java/jre1.8.0_131/bin;
C:/Program Files/Java/jre1.8.0_131/lib/amd64;
C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\x64;
C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\x86;
C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\Pin;
C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\GTPin;
C:\ProgramData\Oracle\Java\javapath;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
C:\Program Files\nodejs\;
C:\Program Files\WorldPainter;
C:\Program Files (x86)\Skype\Phone\;
C:\Program Files\Git\cmd;
C:\WINDOWS\system32\config\systemprofile\.dnx\bin;
C:\Program Files\Microsoft DNX\Dnvm\;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;
C:\MinGw\bin;C:\Program Files (x86)\Windows Live\Shared;
C:\Users\Brice\AppData\Local\Microsoft\WindowsApps;
C:\Users\Brice\AppData\Roaming\npm;
C:\Program Files (x86)\Nmap;
C:\Users\Brice\apache-maven-3.5.0\bin;
C:\MinGW\bin;
C:\msys32;
C:\Python27;
C:\msys32\usr\bin;
C:\msys32\mingw32\bin;
C:\msys32\opt\xtensa-esp32-elf\bin;
C:\Users\Brice\AppData\Local\GitHubDesktop\bin;
C:\WINDOWS\system32'
toolchain: CrossGCC
CDT GCC Build Output Parser: 'xtensa-esp32-elf-(g?cc)|([gc]\+\+)|(clang)'
CDT Cross GCC Builtin settings: 'xtensa-esp32-elf-gcc ${FLAGS} -E -P -v -dD "${INPUTS}"'

I'm not entirely sure what the problem is, as the path exists to a valid make file, and when I try the same settings with eclipse set to cygwin GCC, the build almost succeeds. Any insight as to what could be going wrong?

Here is my thoughts: the python script uses windows style pathing, so when I change the IDF_PATH to 'C:/espIDF/esp-idf', I get the error

Code: Select all

15:52:06 **** Build of configuration Default for project esp-idf-template ****
python C:/espIDF/esp-idf/tools/windows/eclipse_make.py all 
C:/espIDF/esp-idf/make/project.mk:49: esp-idf build system only supports GNU Make versions 3.81 or newer. You may see unexpected results with other Makes.
C:/espIDF/esp-idf/make/project.mk:96: *** IDF_PATH cannot contain colons. If overriding IDF_PATH on Windows, use MSYS Unix-style /c/dir instead of C:/dir.  Stop.
Running make in 'C:/espIDF/esp-idf-template'

15:52:06 Build Finished (took 144ms)
Because the python script CAN find the make file, but the make engine CANNOT use the pathing. The obvious solution is to use two variables, or use linux because paths are consistent and don't use colons often. If possible, I'd like a fix in windows so I don't have to use a VMBox.
Last edited by tuskiomi on Tue Dec 05, 2017 12:53 am, edited 1 time in total.

f.h-f.s.
Posts: 208
Joined: Thu Dec 08, 2016 2:53 pm

Re: Eclipse SDK cannot find certain files when building.

Postby f.h-f.s. » Wed Nov 08, 2017 9:44 am

What happens if you add variable IDF_PATH:'/c/espIDF/esp-idf' to your windows environment variables?
Also i see "C:\MinGW\bin;" added to your path, does this contain a make.exe? The build should use the make program from the "/usr/bin/" folder relative to your msys2 toolchain folder (e.g. /c/msys2/usr/bin/make.exe)

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

Re: Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Wed Nov 08, 2017 2:41 pm

I just tried alternating every combo of "/c/espIDF/esp-idf" and "C:/espIDF/esp-idf" between windows and eclipse variables, after I removed 2 items from my PATH.. my new path looks like:

Image

The output only seems to depend on eclipse's variable.

f.h-f.s.
Posts: 208
Joined: Thu Dec 08, 2016 2:53 pm

Re: Eclipse SDK cannot find certain files when building.

Postby f.h-f.s. » Thu Nov 09, 2017 8:48 am

Could you try using the python2.7.exe included in msys2?
From the windows commandline I can build by executing: "C:\Path\To\Project>C:\msys2\usr\bin\python2.7.exe esp-idf\tools\windows\eclipse_make.py"
windows commandline current working directory is your project. "C:\Path\To\Project>"
explicit path to python2.7.exe in msys2 "C:\msys2\usr\bin\python2.7.exe"
the path to the eclipse_make.py "esp-idf\tools\windows\eclipse_make.py"

I included IDF_PATH in my windows env variables, when it is not there I get:
C:\IoT\BEASTv3>set IDF_PATH=/c/

C:\IoT\BEASTv3>C:\msys32\usr\bin\python2.7.exe esp-idf\tools\windows\eclipse_make.py
Running make in 'C:/IoT/BEASTv3'
Makefile:10: /c//make/project.mk: No such file or directory
make: *** No rule to make target '/c//make/project.mk'. Stop.

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

Re: Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Fri Nov 10, 2017 4:00 am

i have just tried both the python.exe and python2.7.exe with both the C:/ style IDF_PATH and the /c/ style IDF_PATH. the error looks simmilar....
21:55:59 **** Build of configuration Default for project esp-idf-template ****
python2.7 C:/espIDF/esp-idf/tools/windows/eclipse_make.py all
Makefile:8: /c/espIDF/esp-idf/make/project.mk: No such file or directory
make: *** No rule to make target '/c/espIDF/esp-idf/make/project.mk'. Stop.
Running make in 'C:/espIDF/esp-idf-template'

21:55:59 Build Finished (took 136ms)

f.h-f.s.
Posts: 208
Joined: Thu Dec 08, 2016 2:53 pm

Re: Eclipse SDK cannot find certain files when building.

Postby f.h-f.s. » Fri Nov 10, 2017 9:56 am

You are able to build using the msys2 terminal?

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

Re: Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Fri Nov 10, 2017 3:10 pm

apparently so. here is the Msys2 output:

Code: Select all

$ make build
/c/espIDF/esp-idf/make/project.mk:54: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
make[1]: Entering directory '/c/espIDF/esp-idf/tools/kconfig'
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:256: warning, -s option given but default rule can be matched
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/checklist.o lxdialog/checklist.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/util.o lxdialog/util.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/textbox.o lxdialog/textbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/yesno.o lxdialog/yesno.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -MD   -c -o conf.o conf.c
cc -o conf conf.o  zconf.tab.o -lncursesw -lintl
make[1]: Leaving directory '/c/espIDF/esp-idf/tools/kconfig'
GENCONFIG

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

Re: Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Mon Nov 27, 2017 7:29 pm

still having the issue. Does anyone know if the above is the correct build output?

user4_esp32
Posts: 18
Joined: Sun Nov 26, 2017 4:48 pm

Re: Eclipse SDK cannot find certain files when building.

Postby user4_esp32 » Sat Dec 02, 2017 2:08 pm

Hello tuskiomi,

I had an issue with python versions on Windows for running eclipse_make.py in which python v3 on my machine would throw an error like this:

Code: Select all

07:04:00 **** Incremental Build of configuration Default for project wakespy ****
py -3 D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py all 
Traceback (most recent call last):
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 36, in <module>
    main()
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 28, in main
    print("Running make in '%s'" % check_path(os.getcwd()))
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 23, in check_path
    winpath = winpath.replace("\\", "/")  # make consistent with forward-slashes used elsewhere
TypeError: a bytes-like object is required, not 'str'

07:04:00 Build Finished (took 187ms)
Then I switched over to python v2, and initially received an eclipse error stating that the IDF_PATH was not allowed to have colons.

So I edited my PATH variable and put the following three variables at the beginning of the list:

D:\ESP32_Projects\msys32\usr\bin;
D:\ESP32_Projects\msys32\mingw32\bin;
D:\ESP32_Projects\msys32\opt\xtensa-esp32-elf\bin;

and now I can build with eclipse on Windows. Hopefully that will help you as well.

tuskiomi
Posts: 22
Joined: Mon Aug 28, 2017 8:21 pm

Re: Eclipse SDK cannot find certain files when building.

Postby tuskiomi » Tue Dec 05, 2017 12:51 am

user4_esp32 wrote:Hello tuskiomi,

I had an issue with python versions on Windows for running eclipse_make.py in which python v3 on my machine would throw an error like this:

Code: Select all

07:04:00 **** Incremental Build of configuration Default for project wakespy ****
py -3 D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py all 
Traceback (most recent call last):
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 36, in <module>
    main()
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 28, in main
    print("Running make in '%s'" % check_path(os.getcwd()))
  File "D:/ESP32_Projects/ESP32-IDF/esp-idf/tools/windows/eclipse_make.py", line 23, in check_path
    winpath = winpath.replace("\\", "/")  # make consistent with forward-slashes used elsewhere
TypeError: a bytes-like object is required, not 'str'

07:04:00 Build Finished (took 187ms)
Then I switched over to python v2, and initially received an eclipse error stating that the IDF_PATH was not allowed to have colons.

So I edited my PATH variable and put the following three variables at the beginning of the list:

D:\ESP32_Projects\msys32\usr\bin;
D:\ESP32_Projects\msys32\mingw32\bin;
D:\ESP32_Projects\msys32\opt\xtensa-esp32-elf\bin;

and now I can build with eclipse on Windows. Hopefully that will help you as well.
This has solved my problem! The order of the items in the PATH is important!

Who is online

Users browsing this forum: Bing [Bot] and 21 guests