cmake for GHS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

cmake for GHS

CMake mailing list

I want to compile c and c++ code in GHS compiler for renesas controller.

 

For Mingw compiler, My code is compiling successfully. But I want to compile for GHS.

 

I have compiler available at this path  "C:/ghs/comp_201255_RH850".

 

When generate, I gave option as “specify native compiler”.

C compiler : C:/ghs/comp_201255_RH850/ccrh850.exe

C++ compiler: C:/ghs/comp_201255_RH850/cxrh850.exe

 

 

I am getting the following error.

 

 

 

Green Hills MULTI: -A <arch> not specified; defaulting to "arm"

Green Hills MULTI: GHS_TARGET_PLATFORM not specified; defaulting to "integrity"

Green Hills MULTI: -T <toolset> not specified; defaulting to "C:/ghs/comp_201255_RH850"

The C compiler identification is GHS

The CXX compiler identification is GHS

Check for working C compiler: C:/ghs/comp_201255_RH850/ccrh850.exe

Check for working C compiler: C:/ghs/comp_201255_RH850/ccrh850.exe -- broken

CMake Error at D:/e-bike/cmake-3.14.3-win64-x64/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler

"C:/ghs/comp_201255_RH850/ccrh850.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/ghs/comp_201255_RH850/gbuild.exe -top CMAKE_TRY_COMPILE.top.gpj cmTC_d9171.gpj
Error: Could not read target file: arm_integrity.tgt


CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)

Configuring incomplete, errors occurred!

See also "D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeOutput.log".

See also "D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeError.log".

 

 

 

So How to configure GHS for CMAKE build. Please advice me in this, Thanks in advace

 

 

 

 

 

Best regards,

Muthusamy Deepan
RBEI/ESP6



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cmake for GHS

fdk17

On Thu, Aug 29, 2019, at 1:51 AM, Deepan Muthusamy (RBEI/ESP-IS44) via CMake wrote:

I want to compile c and c++ code in GHS compiler for renesas controller.

 

For Mingw compiler, My code is compiling successfully. But I want to compile for GHS.

 

I have compiler available at this path  "C:/ghs/comp_201255_RH850".

 

When generate, I gave option as “specify native compiler”.

C compiler : C:/ghs/comp_201255_RH850/ccrh850.exe

C++ compiler: C:/ghs/comp_201255_RH850/cxrh850.exe

 

 

I am getting the following error.

 

 

 

Green Hills MULTI: -A <arch> not specified; defaulting to "arm"

Green Hills MULTI: GHS_TARGET_PLATFORM not specified; defaulting to "integrity"

Green Hills MULTI: -T <toolset> not specified; defaulting to "C:/ghs/comp_201255_RH850"

The C compiler identification is GHS

The CXX compiler identification is GHS

Check for working C compiler: C:/ghs/comp_201255_RH850/ccrh850.exe

Check for working C compiler: C:/ghs/comp_201255_RH850/ccrh850.exe -- broken

CMake Error at D:/e-bike/cmake-3.14.3-win64-x64/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler

"C:/ghs/comp_201255_RH850/ccrh850.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/ghs/comp_201255_RH850/gbuild.exe -top CMAKE_TRY_COMPILE.top.gpj cmTC_d9171.gpj
Error: Could not read target file: arm_integrity.tgt


CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)

Configuring incomplete, errors occurred!

See also "D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeOutput.log".

See also "D:/e-bike/EbikeSource/src/Crc16/build/CMakeFiles/CMakeError.log".

 

 

 

So How to configure GHS for CMAKE build. Please advice me in this, Thanks in advace

 

 

 

 

 

Best regards,

Muthusamy Deepan
RBEI/ESP6



It sound's like you want to generate a GHS Multi project.
The "CMAKE_<LANG>_COMPILER" variables are not used for compiling GHS Multi projects.
The GHS build tool gbuild handles those kinds of details.

You do need to set GHS_TARGET_PLATFORM and specify the target architecture so that a correct GHS Multi project for your target can be built.

You can inspect the GHS example projects delivered to you as part of your GHS installation to determine those values.
Usually its something like "arm" and "integrity", which is one of the reasons those were chosen as the default.

I'd highly recommend reading the GHS manual and looking at the example projects to understand how a GHS Multi project works if you are not already familiar with it.

--
F


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake