/* * ARMv7 build options for gcc */ CPU buildOptions { BUILDOPTIONS defaultBuildOptionsForARM7tdmi { /* * Common flags for C and C++ compiling */ COMMONFLAGS = "-g"; // Produce debugging information COMMONFLAGS = "-Wall"; // All warnings on COMMONFLAGS = "-pedantic"; COMMONFLAGS = "-Wformat"; COMMONFLAGS = "-std=c99"; COMMONFLAGS = "-mcpu=arm7tdmi-s"; // Compile for arm7tdmi COMMONFLAGS = "-Wmissing-field-initializers"; // Struct initialized with incorrect number of fiels COMMONFLAGS = "-mfloat-abi=soft"; // Floating point numbers are computed in software /* * C++ compiler flags */ CPPFLAGS = "-fno-rtti"; // No information for runtime (run time type information) - reduce exe size CPPFLAGS = "-felide-constructors"; // Optimization to omit creating temporary object when used to initialize another object CPPFLAGS = "-fno-threadsafe-statics"; // No thread safe init of local static variables - reduce code size CPPFLAGS = "-fno-use-cxa-get-exception-ptr"; // Don't use the __cxa_get_exception_ptr runtime routine (no exception anyway) CPPFLAGS = "-fno-enforce-eh-specs"; // Don't generate code to check for violation of exception specifications at runtime (no exception anyway) /* * Assembler flags */ ASFLAGS = "-g"; // Produce debugging information ASFLAGS = "-mcpu=arm7tdmi-s"; // Assemble for arm7tdmi ASFLAGS = "--fatal-warnings"; // A warning is an error ASFLAGS = "-mfloat-abi=soft"; // Floating point numbers are computed in software gcc-options-to-the-arm-mcu-fpu-datasheet LDFLAGS = "-g"; LDFLAGS = "--fatal-warnings"; // A warning is an error LDFLAGS = "--warn-common"; // Warn when a common symbol is combined with another common symbol LDFLAGS = "--no-undefined"; // Report unresolved symbol references /* LDFLAGS = "--gc-sections"; // Remove unused sections. Works with -ffunction-sections and -fdata-sections, see above*/ }; };