In fact, while looking at a "project" file, i found the following:

#!gbuild
primaryTarget=arm_standalone.tgt
#component top_level_project
[Project]

*  -bsp generic*  -object_dir=objs
 *-cpu=cortexa7*

And when specifying the GHS_BSP_NAME, GHS generator ends-up adding the -bsp
line into the generated project file.
So i was somehow assuming that same behavior was needed for the -cpu flag

Anyway, i changed the approach to just ask CMake to generate plain
makefiles using a toolchain file listing all the required options for
cxarm/ar.

Thanks for your support ;)



On Sat, 20 Jul 2019 at 02:13, frodak17 <[email protected]> wrote:

>
> On Fri, Jul 19, 2019 at 2:52 PM Geoffroy J <[email protected]>
> wrote:
>
>> Hello
>>
>> i have tried today to build a library using CMake Green Hills MULTI
>> generator.
>>
>> It seemed to work quite well, but i end up not being able to configure
>> the "-cpu" option for gbuild, which i need to set to "cortexa7".
>>
>> I've went through the CMake code, i think something similar to
>> variable GHS_BSP_NAME would work, but does not seems available at the
>> moment. Does it means it cannot be done at the moment?
>>
>> Do you know how to achieve this? Would using CFLAGS/LDFLAGS a viable
>> solution?
>>
>> Thanks in advance for your answer
>> Regards
>>
>>
> I see -cpu as an option for armcc not for gbuild.
>
> You should be able to pass the -cpu option per target like any other
> compiler option.
> So try using target_compile_options().
> Some options are builder options so they don't start with a dash but with
> a colon but it still should work with target_compile_options().
>
> However my experience has been that is handled by the BSP .bld files for
> the particular target / platform.
> If the BSP target file has the wrong cpu in it then it probably could just
> get updated and then it should "just work".
> For example some of the .bld files contain a ":arm_cputype=cortexa8".
> But I couldn't tell you exactly which files would need to be updated.
>
> --
> 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

Reply via email to