2 Replies Latest reply on Feb 21, 2019 7:40 PM by nobuhiro.masaoka.zs_3617641

    How to add/modify extra compile options.

    nobuhiro.masaoka.zs_3617641

      Hi,

      Please tell me how to add/modify extra compile options.

      For example, suppress some warnings, customize optimization and so on.

      Regards,

      Nobuhiro

        • 1. Re: How to add/modify extra compile options.
          siba_3185206

          Under tools/makefiles directory you will see some makefiles as below:

           

          ...

          wiced_config.mk

          ...

          wiced_toolchain_ARM_GNU.mk

          wiced_toolchain_GCC.mk

          wiced_toolchain_IAR.mk

          wiced_toolchain_Win32_MIPS.mk

          wiced_toolchain_common.mk

          wiced_toolchain_x86_GNU.mk

           

          The wiced_config.mk file has the toolchain type set to either gcc or iar.

          By default the gcc toolchain is used in the WICED build.

           

          So, as per the toolchain defined in the wiced_config.mk file, you can change the respective toolchain makefile under tools/makefiles directory.

          In this case where gcc toolchain is used, you can edit the wiced_toolchain_GCC.mk file which will in turn does not contain any build parameters but includes the wiced_toolchain_ARM_GNU.mk makefile, so you need to edit the wiced_toolchain_ARM_GNU.mk file finally.

           

           

          Similarly you can edit other makefile(s) too.

           

          Following is the build macro in the makefile that has the compiler optimization flag:

          COMPILER_SPECIFIC_OPTIMIZED_CFLAGS

           

          If you want to suppress some warnings then you can modify the below macro:

          COMPILER_SPECIFIC_STANDARD_CFLAGS

          COMPILER_SPECIFIC_PEDANTIC_CFLAGS

           

           

          First take a BACKUP of the file you are going to modify.

          1 of 1 people found this helpful
          • 2. Re: How to add/modify extra compile options.
            nobuhiro.masaoka.zs_3617641

            Thanks for your reply.

            This is what I want to know.