Forums - gcc and g++ not found in the PATH

6 posts / 0 new
Last post
gcc and g++ not found in the PATH
nelson.kon
Join Date: 20 Apr 15
Posts: 33
Posted: Mon, 2018-08-27 18:24

Hi,

I have set up the Eclipse for QCA4020 project.  

At the Problems tab, I still see these 2 errors

Program "g++" not found in PATH

Program "gcc" not found in PATH

At the Location column it says

Project Properties, C++ Preprocessor Include.../Providers, [CDT Cross GCC Built-in Compiler Settings] options

At the Type column is says

C/C++ Scanner Discovery Problem

When I tried to build, at the console tab I got this...

08:44:16 **** Incremental Build of configuration Default for project Onboard_demo ****
build.bat t t 4020 cdb 
awsiot
Online demo build script help:
build.bat [RTOS (FreeRTOS = f, ThreadX = t)] [chipset variant (4020, 4024)] [Onboarding mode] [Radio] [Supported mode] [board variant (CDB = cdb)]
 Select the options for Onboarding mode, Radio, Supported Mode as below
 Onboarding mode:   1.BLE 2.WIFI
 Radio:   1.ZIGBEE 2.THREAD
 Thread Supported mode:   1.JOINER ROUTER 2.JOINER
 Zigbee Supported mode:   1.COORDINATOR 2.ENDDEVICE
Example: build.bat t 4020 1 1 1 cdb
 
08:44:19 Build Finished (took 3s.325ms)
 
This means it is not built successfully, right?  I can't find any output folder.
 

What should I do to solve this?

Hope to hear from you soon.

Regards,

Nelson

 

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Tue, 2018-08-28 11:51

Build instructions are different in case of onboard demo.
Online demo build script help:
build.bat [RTOS (FreeRTOS = f, ThreadX = t)] [chipset variant (4020, 4024)] [Onboarding mode] [Radio] [Supported mode] [board variant (CDB = cdb)]
Select the options for Onboarding mode, Radio, Supported Mode as below
Onboarding mode: 1.BLE 2.WIFI
Radio: 1.ZIGBEE 2.THREAD
Thread Supported mode: 1.JOINER ROUTER 2.JOINER
Zigbee Supported mode: 1.COORDINATOR 2.ENDDEVICE
Example: build.bat t 4020 1 1 1 cdb

You also need to add extra path to libraries while building onboard demo,
Example: If ARM GNU toolchain is installed under C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\, set path as follows.
TOOLLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\lib\gcc\arm-none-eabi\6.2.1\thumb\v7e-m
NEWLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\arm-none-eabi\lib\thumb\v7e-m

Make sure you have modified the C/C++ Build settings as below:
Builder Settings: Build command: build.bat
Build Behavior: Build(Incremental Build) t 4020 1 1 cdb

Under C/C++ Build Environment Settings:
add the following environment variables to set path to libraries.
If ARM GNU toolchain is installed under C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\, set path as follows.
TOOLLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\lib\gcc\arm-none-eabi\6.2.1\thumb\v7e-m
NEWLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\arm-none-eabi\lib\thumb\v7e-m

  • Up0
  • Down0
nelson.kon
Join Date: 20 Apr 15
Posts: 33
Posted: Tue, 2018-08-28 19:32

Hi Raja,

Thanks for coming back.

I have tried your suggestion.  Still I can't build and there's nothing generated in the \target\quartz\demo\Onboard_demo\build\gcc folder.

Any other thing I can do?

Regards,

Nelson

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Wed, 2018-08-29 10:55

Please verify, if you are able to build HelloWorld Demo.
If yes, then the setup is working and we need to check issues with onboard Demo.
If no, i assume some issues with the eclipse setup. Need to follow the instructions from document and recehck every step.

  • Up0
  • Down0
nelson.kon
Join Date: 20 Apr 15
Posts: 33
Posted: Wed, 2018-08-29 19:09

Hi Raja,

I am able to build Onboard_demo already after I did this...

the C/C++ Build settings as below:
Builder Settings: Build command: build.bat
Build Behavior: Build(Incremental Build) t 4020 2 1 2 cdb
 
As for the gcc and g++ not found issue, I installed MinGW.  Then I used MinGW's Installation Manager to install the Basic Setup.  Then I added the PATH with this C:\MinGW\bin
 
My question is that do I use the correct gcc and g++, the MinGW?  Or for Qualcomm, you have a specific one?  It's because I don't see MinGW mentioned in the document (80-ya121-140-qca402xcdb2x_development_kit_user_guide.pdf).
 
Hope to hear from you soon.
 
Regards,
Nelson
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2018-08-30 10:48

Good to hear that you are able to build the onboard demo.
You can modify the build behaviour to build with either Zigbee/Thread and Co-ordinator/End Device

Build Behavior: Build(Incremental Build) t 4020 2 1 1 cdb     // Build with Wifi and Zigbee as Co-ordinator.
 

> I used MinGW's Installation Manager to install the Basic Setup.
We haven't seen this issue, by default the gcc and g++ are included in ARM toolchain and we have included the ARM toolchain bin path in our setup.
Try including  ARM TOOLCHAIN PATH   "C:\Program Files\6 2017-q2-update\bin\"

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.