espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.37k stars 7.21k forks source link

[TW#23303] setting up tool chain on eclipse using windows #2019

Closed ahmedawais closed 5 years ago

ahmedawais commented 6 years ago

i followed all the instruction as per https://esp-idf.readthedocs.io/en/latest/get-started/eclipse-setup-windows.html#project-properties

but in eclipse it shows error although i set up the environment and path according to instruction Description Resource Path Location Type Program "g++" not found in PATH firstesp Project Properties, C++ Preprocessor Include.../Providers, [CDT Cross GCC Built-in Compiler Settings] options C/C++ Scanner Discovery Problem

Description Resource Path Location Type Program "gcc" not found in PATH firstesp Project Properties, C++ Preprocessor Include.../Providers, [CDT Cross GCC Built-in Compiler Settings] options C/C++ Scanner Discovery Problem

Please help me

PhilColbert commented 6 years ago

Are you sure you have changed the compiler to Cygwin GCC and added the correct path ?

FayeY commented 6 years ago

Hi @ahmedawais , did the above suggestion help you resolve the issue?

ahmedawais commented 6 years ago

yes i have added the complier as Cygwin GCC and configured the path as described in espressif official guide

projectgus commented 6 years ago

HI @ahmedawais ,

It seem unusual that the error mentions "CDT Cross GCC" if compiler type is set to Cygwin.

Can you please attach your .project and .cproject files to this issue?

Angus

projectgus commented 6 years ago

@ahmedawais Another note on this:

Program "g++" not found in PATH Program "gcc" not found in PATH

These errors suggest you need to check the toolchain setting under Project Properties -> "Preprocessor Include Paths" -> "Providers" -> "CDT GCC Built-In Compiler Settings Cygwin" and change the "Command to Get Compiler Specs" to xtensa-esp32-elf-gcc ${FLAGS} -E -P -v -dD "${INPUTS}" (see Windows Eclipse Setup Guide for the same steps).

Does this help fix the problem?

ahmedawais commented 6 years ago

no still i am having the same problem

On Tue, Jun 26, 2018 at 5:51 AM, Angus Gratton notifications@github.com wrote:

@ahmedawais https://github.com/ahmedawais Another note on this:

Program "g++" not found in PATH Program "gcc" not found in PATH

These errors suggest you need to check the toolchain setting under Project Properties -> "Preprocessor Include Paths" -> "Providers" -> "CDT GCC Built-In Compiler Settings Cygwin" and change the "Command to Get Compiler Specs" to xtensa-esp32-elf-gcc ${FLAGS} -E -P -v -dD "${INPUTS}" (see Windows Eclipse Setup Guide for the same steps).

Does this help fix the problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/espressif/esp-idf/issues/2019#issuecomment-400169396, or mute the thread https://github.com/notifications/unsubscribe-auth/AgrhuWFEsPB5zv1Vkw1FaSHfB8YgJ3t8ks5uAa-8gaJpZM4UVeW9 .

dsptech commented 6 years ago

Hi @ahmedawais, I experienced a similar issue some time ago. If the issue is still on, you could create a batch file "checkEnvironment.bat" (see the bottom of this message) and save it in your project directory.

After that, change the command inside CDT GCC Built-In Compiler Settings Cygwin by writing: ' checkEnvironment.bat xtensa-esp32-elf-gcc ${FLAGS} -E -P -v -dD "${INPUTS}" '

After the final click on "Apply and close" the batch will be called from eclipse (any error from the console must be ignored) The log of the batch file (placed in the project directory) could help you to check if the shell is receiving the correct environment (paths, commans, etc...). Note: you could find a double log because the batch will be called two times (one call for c scan and one call for c++ scan)

regards.

--- checkEnvironment.bat ----------

@echo off set _logFile=checkEnvironment.log echo ---------------------------------------------------------------------------- >>%_logFile% echo checkEnvironment STARTED: "%DATE%" "%TIME%" >>%_logFile% echo . >>%_logFile% echo RECEIVED COMMAND LINE (9PARs): %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 >>%_logFile% echo . >>%_logFile% echo CURRENT DIR : %cd% >>%_logFile% echo . >>%_logFile% echo CURRENT PATH: %PATH% >>%_logFile% echo . >>%_logFile% echo CURRENT TEMP: %TEMP% >>%_logFile%

--- end of checkEnvironment.bat ----------

projectgus commented 5 years ago

Closing due to a lack of updates and no project files.

Also, the Eclipse setup guide has changed a bit. If following the new guide still does not work then please open a new issue with the details.