Windows eclipse make wrapper

Baoshi
Posts: 23
Joined: Sun Nov 22, 2015 3:30 am

Windows eclipse make wrapper

Postby Baoshi » Fri Dec 30, 2016 3:25 pm

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Windows eclipse make wrapper

Postby ESP_Angus » Tue Jan 03, 2017 3:42 am

: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

Baoshi
Posts: 23
Joined: Sun Nov 22, 2015 3:30 am

Re: Windows eclipse make wrapper

Postby Baoshi » Tue Jan 03, 2017 2:17 pm

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

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 262 guests