This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

embuild.exe optimization configuration

Hi Nordic,

i have a question regarding the emBuild.exe tool and the optimization level it will use during building a hex file. I'am using the following command combination for my built:

  emBuild.exe -config "Release" xxx.emProject -echo -verbose -rebuild

But i have no idea, if the emBuild.exe is really building an release? And if it does, on which level of optimization? After looking into the help of emBuild.exe there is no option, to configure this level? Any ideas, how to find out? Or does it always build with highest level 3 of optimization?

Thanks!

SJ

Parents Reply Children
  • You're right. With the echo command, you can also look at the "-O" parameter passed to the compiler:

    3>Compiling 'system_nrf52.c'
    3>/opt/segger/segger_embedded_studio_for_arm_4.50/gcc/arm-none-eabi/bin/cc1 -fmessage-length=0 -fno-diagnostics-show-caret -mcpu=cortex-m4 -mlittle-endian -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -mtp=soft -munaligned-access -nostdinc -isystem/opt/segger/segger_embedded_studio_for_arm_4.50/include -I../../../config -I../../../../../../components -I../../../../../../components/boards -I../../../../../../components/drivers_nrf/nrf_soc_nosd -I../../../../../../components/libraries/atomic -I../../../../../../components/libraries/balloc -I../../../../../../components/libraries/bsp -I../../../../../../components/libraries/delay -I../../../../../../components/libraries/experimental_section_vars -I../../../../../../components/libraries/log -I../../../../../../components/libraries/log/src -I../../../../../../components/libraries/memobj -I../../../../../../components/libraries/ringbuf -I../../../../../../components/libraries/strerror -I../../../../../../components/libraries/util -I../../../../../../components/toolchain/cmsis/include -I../../.. -I../../../../../../external/fprintf -I../../../../../../integration/nrfx -I../../../../../../modules/nrfx -I../../../../../../modules/nrfx/hal -I../../../../../../modules/nrfx/mdk -I../config -D__SIZEOF_WCHAR_T=4 -D__ARM_ARCH_7EM__ -D__SES_ARM -D__ARM_ARCH_FPV4_SP_D16__ -D__HEAP_SIZE__=8192 -D__SES_VERSION=45000 -D__GNU_LINKER -DNDEBUG -DBOARD_PCA10040 -DBSP_DEFINES_ONLY -DCONFIG_GPIO_AS_PINRESET -DFLOAT_ABI_HARD -DINITIALIZE_USER_SECTIONS -DNO_VTOR_CONFIG -DNRF52 -DNRF52832_XXAA -DNRF52_PAN_74 -MD /opt/nrf5_sdk16/examples/peripheral/blinky/pca10040/blank/ses/Output/blinky_pca10040 Release/Obj/system_nrf52.d -MQ Output/blinky_pca10040 Release/Obj/system_nrf52.o -quiet -std=gnu99 -g3 -gpubnames -fdebug-types-section -Os -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fshort-enums -fno-common /opt/nrf5_sdk16/modules/nrfx/mdk/system_nrf52.c -o /opt/nrf5_sdk16/examples/peripheral/blinky/pca10040/blank/ses/Output/blinky_pca10040 Release/Obj/system_nrf52.asm
    

    Really long line, but in my case it's "Os".

    Cheers,

    Håkon

Related