Command-line Options

The following are the compiler command-line options for CodeWarrior and GCC.

Table 1. Compiler Options
CodeWarrior GCC
-proc cortex-m4 -mcpu=cortex-m4
-proc cortex-m0 -mcpu=cortex-m0
-prefix file -include file
-char [un]signed -f[un]signed-char
-Cpp_exceptions on|off -f[no-]exceptions
-RTTI on|off -f[no-]rtti
-O0,O1,O2,O3 -O0,O1,O2,O3
-Os -Os
-big -mbig-endian
-little -mlittle-endian
-fp soft -msoft-float
-fp vfpv4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
-[no]interworking -m[no-]thumb-interwork
-thumb -mthumb
-g -g

The following are the linker command-line options for CodeWarrior and GCC.

Table 2. Linker Options
CodeWarrior GCC
-dead[strip] compiler: -ffunction-sections -fdata-sections / link: --gc-sections
-main symbol -e symbol
-map file -Map=file
{file.lcf} -T{file.ld}