Page 1 of 1

Windows eclipse make wrapper

Posted: Fri Dec 30, 2016 3:25 pm
by Baoshi
Under esp-idf\tools\windows, there is a nice Windows eclipse make wrapper, which replaces building command as

Code: Select all

make $@ V=1 | sed -E "s@ /([a-z])/(.+)/@ \1:/\2/@g" | sed -E "s@-I/([a-z])/(.+)/@-I\1:/\2/@g" | sed -E "s@-L/([a-z])/(.+)/@-L\1:/\2/@g" 
I understand the purpose is to replace something like

Code: Select all

-I /c/ESP32/esp-idf/components/bt/bluedroid/bta/sys/include
to

Code: Select all

-I c:/ESP32/esp-idf/components/bt/bluedroid/bta/sys/include
such that eclipse gcc output parser can locate the correct directory.

However I found this script is only able to catch first path, i.e., if the output is like

Code: Select all

-I /c/ESP32/esp-idf/components/bt/bluedroid/bta/sys/include -I /c/ESP32/esp-idf/components/bt/bluedroid/btcore/include
the output will be

Code: Select all

-I c:/ESP32/esp-idf/components/bt/bluedroid/bta/sys/include -I /c/ESP32/esp-idf/components/bt/bluedroid/btcore/include
the second and following path are ignored.

Is there a way to fix this?

Thanks

Re: Windows eclipse make wrapper

Posted: Tue Jan 03, 2017 3:42 am
by ESP_Angus
:oops: Thanks for this baoshi, I can't believe I didn't notice the regular expression wasn't working correctly.

With this fixed, Eclipse for Windows seems to find all include paths without needing any manual intervention.

I've pushed a branch for testing here, can you try it out and tell me if you have any problems:
https://github.com/espressif/esp-idf/tr ... dows_paths

It should be possible to make Eclipse translate the paths itself, by running "cygpath". I tried again today but I still can't make it trigger this, I'll need to run Eclipse CDT in a debugger and look at exactly what it's doing.


Angus

Re: Windows eclipse make wrapper

Posted: Tue Jan 03, 2017 2:17 pm
by Baoshi
Hello Angus,

Yes this works perfectly now. Thanks for the patch.
I'm not aware of CDT builtin support for cygpath, maybe it is time to dig into it.

Baoshi