configuring RTEMS target optimization levels

Mick Davis mickd at goanna.iinet.net.au
Wed Sep 12 13:07:02 UTC 2012


I can describe what I do and hope that it answers your question.

In the source tree c/src/lib/libbsp/<cpu>/<bsp>/make/custom/<bsp>.cfg I have

CPU_CFLAGS = -mcpu=arm926ej-s  -g

and

CFLAGS_OPTIMIZE_V = -O3

When the rtems libs are built they're optimised. There's no easy way I 
know of to get non-optimised rtems libs.

I build apps using as a template the rtems makefiles that get installed, 
eg installed as make/Templates/Makefile.leaf .

I use the ordinary 'make' to get an optimised app build, which uses the 
CFLAGS_OPTIMIZE_V flags.

Or I 'make debug' to get a non-optimised build, where CPU_CFLAGS are 
still used but CFLAGS_OPTIMIZE_V are not.

HTH

On 12/09/12 08:35, Hill, Jeff wrote:
> Hello All,
>
> Please forgive a nebie question.
>
> Currently I configure the rtems/rtems-bsp target build by
> manually setting the following variables. Is this the correct way
> to set the optimization level with the gnu build system; I was
> unable to find anything in the configure help, but wonder if
> the default optimization level shouldn't be configured based
> on the cpu architecture?
>
> export CXXFLAGS_FOR_TARGET="-g -O3 -mhw-mul -mhw-div"
> export CFLAGS_FOR_TARGET="-g -O3 -mhw-mul -mhw-div"
>
> I know now that the following options are for configuring
> the application build, and have nothing to do with
> the gnu rtems/rtems-bsp build.
>
> RTEMS_VARIANT=OPTIMIZE
> #RTEMS_VARIANT=PROFILE
> #RTEMS_VARIANT=DEBUG
>
> Furthermore I think I know now that the <BSP>/make/custom/<BSP>.cfg
> file configures the application build based on the above options, but
> has no impact whatsoever on the gnu rtems/rtems-bsp build.
>
> Jeff
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>

-- 

Mick Davis
Goanna Technologies Pty Ltd
+61 8 9444 2634



More information about the users mailing list