<div dir="ltr"><div>In fact, while looking at a "project" file, i found the following:<br></div><div><br></div><div><span style="font-size:10pt;font-family:"Malgun Gothic",sans-serif">#!gbuild<br>
primaryTarget=arm_standalone.tgt<br>
#component top_level_project<br>
[Project]<br><b>
 -bsp generic<br></b>
 -object_dir=objs<br> <b>-cpu=cortexa7</b><br>
<br>
</span></div><div><div>And when specifying the GHS_BSP_NAME, GHS generator ends-up adding the -bsp line into the generated project file.</div><div>So i was somehow assuming that same behavior was needed for the -cpu flag<br><br></div><div>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.</div><div><br></div><div>Thanks for your support ;)</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 20 Jul 2019 at 02:13, frodak17 <<a href="mailto:frodak17@gmail.com">frodak17@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 19, 2019 at 2:52 PM Geoffroy J <<a href="mailto:geoffroy.jabouley@gmail.com" target="_blank">geoffroy.jabouley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello<div><br><div>i have tried today to build a library using CMake Green Hills MULTI generator.</div><div><br></div><div>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".</div><div><br></div><div>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?<br></div><div><br></div><div><div>Do you know how to achieve this? Would using CFLAGS/LDFLAGS a viable solution?</div><br class="gmail-m_7804791785429516026gmail-m_624417429666209678gmail-Apple-interchange-newline"></div><div>Thanks in advance for your answer</div><div>Regards</div><div><br></div></div></div></blockquote><div><br></div><div>I see -cpu as an option for armcc not for gbuild.</div><div><br></div><div>You should be able to pass the -cpu option per target like any other compiler option.</div><div>So try using target_compile_options().</div><div>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().</div><div><br></div><div>However my experience has been that is handled by the BSP .bld files for the particular target / platform.<br></div><div>If the BSP target file has the wrong cpu in it then it probably could just get updated and then it should "just work".</div><div>For example some of the .bld files contain a ":arm_cputype=cortexa8".</div><div></div><div>But I couldn't tell you exactly which files would need to be updated.<br></div><div><br></div><div>--</div><div>F<br></div><div> <br></div></div></div>
</blockquote></div>