From 1cde3b38779610b42a30a96fef178154ef947e55 Mon Sep 17 00:00:00 2001 From: ohagendorf Date: Sat, 15 Nov 2014 21:35:48 +0100 Subject: [PATCH] [EXPORT][GCC_ARM] additional linker option for wrap main Most makefile templates didn't use the -Wl,--wrap,main so that __wrap_main was not called. --- workspace_tools/export/gcc_arm_arch_max.tmpl | 2 +- workspace_tools/export/gcc_arm_arch_pro.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_f051r8.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_f100rb.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_f334c8.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_f407vg.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_f429zi.tmpl | 2 +- workspace_tools/export/gcc_arm_disco_l053c8.tmpl | 2 +- workspace_tools/export/gcc_arm_k20d50m.tmpl | 2 +- workspace_tools/export/gcc_arm_k22f.tmpl | 2 +- workspace_tools/export/gcc_arm_k64f.tmpl | 2 +- workspace_tools/export/gcc_arm_kl05z.tmpl | 2 +- workspace_tools/export/gcc_arm_kl25z.tmpl | 2 +- workspace_tools/export/gcc_arm_kl43z.tmpl | 2 +- workspace_tools/export/gcc_arm_kl46z.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc1114.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc11u24.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc11u35_401.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc11u35_501.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc1549.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc1768.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc2368.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc4088.tmpl | 2 +- workspace_tools/export/gcc_arm_lpc4330_m4.tmpl | 2 +- workspace_tools/export/gcc_arm_lpccappuccino.tmpl | 2 +- workspace_tools/export/gcc_arm_mts_gambit.tmpl | 2 +- workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl | 2 +- workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl | 2 +- workspace_tools/export/gcc_arm_nucleo_f401re.tmpl | 2 +- workspace_tools/export/gcc_arm_nucleo_f411re.tmpl | 2 +- workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl | 2 +- workspace_tools/export/gcc_arm_stm32f407.tmpl | 2 +- workspace_tools/export/gcc_arm_ublox_c027.tmpl | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/workspace_tools/export/gcc_arm_arch_max.tmpl b/workspace_tools/export/gcc_arm_arch_max.tmpl index b94a95825d..cebeca9dc5 100644 --- a/workspace_tools/export/gcc_arm_arch_max.tmpl +++ b/workspace_tools/export/gcc_arm_arch_max.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_arch_pro.tmpl b/workspace_tools/export/gcc_arm_arch_pro.tmpl index f18be4dee5..bbee7bbb92 100644 --- a/workspace_tools/export/gcc_arm_arch_pro.tmpl +++ b/workspace_tools/export/gcc_arm_arch_pro.tmpl @@ -22,7 +22,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_disco_f051r8.tmpl b/workspace_tools/export/gcc_arm_disco_f051r8.tmpl index 04cc26da73..19f827d9e7 100644 --- a/workspace_tools/export/gcc_arm_disco_f051r8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f051r8.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main #LD_FLAGS += -u _printf_float -u _scanf_float LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_disco_f100rb.tmpl b/workspace_tools/export/gcc_arm_disco_f100rb.tmpl index ad145df8d9..682e9506f5 100644 --- a/workspace_tools/export/gcc_arm_disco_f100rb.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f100rb.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_disco_f334c8.tmpl b/workspace_tools/export/gcc_arm_disco_f334c8.tmpl index d76a2645ff..6cd9497c11 100644 --- a/workspace_tools/export/gcc_arm_disco_f334c8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f334c8.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_disco_f407vg.tmpl b/workspace_tools/export/gcc_arm_disco_f407vg.tmpl index b94a95825d..cebeca9dc5 100644 --- a/workspace_tools/export/gcc_arm_disco_f407vg.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f407vg.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_disco_f429zi.tmpl b/workspace_tools/export/gcc_arm_disco_f429zi.tmpl index b94a95825d..cebeca9dc5 100644 --- a/workspace_tools/export/gcc_arm_disco_f429zi.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f429zi.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_disco_l053c8.tmpl b/workspace_tools/export/gcc_arm_disco_l053c8.tmpl index 9cde1a1487..aa5343f189 100644 --- a/workspace_tools/export/gcc_arm_disco_l053c8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_l053c8.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main #LD_FLAGS += -u _printf_float -u _scanf_float LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_k20d50m.tmpl b/workspace_tools/export/gcc_arm_k20d50m.tmpl index 75e4b9ba6c..7e6407773d 100644 --- a/workspace_tools/export/gcc_arm_k20d50m.tmpl +++ b/workspace_tools/export/gcc_arm_k20d50m.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_k22f.tmpl b/workspace_tools/export/gcc_arm_k22f.tmpl index 9d863de9e4..97d93bec40 100644 --- a/workspace_tools/export/gcc_arm_k22f.tmpl +++ b/workspace_tools/export/gcc_arm_k22f.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_k64f.tmpl b/workspace_tools/export/gcc_arm_k64f.tmpl index 9d863de9e4..97d93bec40 100644 --- a/workspace_tools/export/gcc_arm_k64f.tmpl +++ b/workspace_tools/export/gcc_arm_k64f.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_kl05z.tmpl b/workspace_tools/export/gcc_arm_kl05z.tmpl index c09cf78cfe..daef3de836 100644 --- a/workspace_tools/export/gcc_arm_kl05z.tmpl +++ b/workspace_tools/export/gcc_arm_kl05z.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m0plus -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_kl25z.tmpl b/workspace_tools/export/gcc_arm_kl25z.tmpl index c09cf78cfe..daef3de836 100644 --- a/workspace_tools/export/gcc_arm_kl25z.tmpl +++ b/workspace_tools/export/gcc_arm_kl25z.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m0plus -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_kl43z.tmpl b/workspace_tools/export/gcc_arm_kl43z.tmpl index 10c6f99131..d03c22d12c 100644 --- a/workspace_tools/export/gcc_arm_kl43z.tmpl +++ b/workspace_tools/export/gcc_arm_kl43z.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m0plus -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_kl46z.tmpl b/workspace_tools/export/gcc_arm_kl46z.tmpl index c09cf78cfe..daef3de836 100644 --- a/workspace_tools/export/gcc_arm_kl46z.tmpl +++ b/workspace_tools/export/gcc_arm_kl46z.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m0plus -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpc1114.tmpl b/workspace_tools/export/gcc_arm_lpc1114.tmpl index ae9f74f4d4..91042ea47a 100644 --- a/workspace_tools/export/gcc_arm_lpc1114.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1114.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_lpc11u24.tmpl b/workspace_tools/export/gcc_arm_lpc11u24.tmpl index 3727febcfa..70f45e651b 100644 --- a/workspace_tools/export/gcc_arm_lpc11u24.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u24.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m0 -mthumb CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl b/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl index ae9f74f4d4..91042ea47a 100644 --- a/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl b/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl index ae9f74f4d4..91042ea47a 100644 --- a/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_lpc1549.tmpl b/workspace_tools/export/gcc_arm_lpc1549.tmpl index f18be4dee5..bbee7bbb92 100644 --- a/workspace_tools/export/gcc_arm_lpc1549.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1549.tmpl @@ -22,7 +22,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpc1768.tmpl b/workspace_tools/export/gcc_arm_lpc1768.tmpl index f18be4dee5..69211a76a6 100644 --- a/workspace_tools/export/gcc_arm_lpc1768.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1768.tmpl @@ -22,7 +22,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpc2368.tmpl b/workspace_tools/export/gcc_arm_lpc2368.tmpl index 0125ed8a95..8f02c82d54 100644 --- a/workspace_tools/export/gcc_arm_lpc2368.tmpl +++ b/workspace_tools/export/gcc_arm_lpc2368.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,--entry=_start LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_lpc4088.tmpl b/workspace_tools/export/gcc_arm_lpc4088.tmpl index 44fece7dc2..e40c756277 100644 --- a/workspace_tools/export/gcc_arm_lpc4088.tmpl +++ b/workspace_tools/export/gcc_arm_lpc4088.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl b/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl index d2900262ee..e8d16808dd 100644 --- a/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl +++ b/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_lpccappuccino.tmpl b/workspace_tools/export/gcc_arm_lpccappuccino.tmpl index ae9f74f4d4..91042ea47a 100644 --- a/workspace_tools/export/gcc_arm_lpccappuccino.tmpl +++ b/workspace_tools/export/gcc_arm_lpccappuccino.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_mts_gambit.tmpl b/workspace_tools/export/gcc_arm_mts_gambit.tmpl index 4cd283c4dd..ad4cb71bf7 100644 --- a/workspace_tools/export/gcc_arm_mts_gambit.tmpl +++ b/workspace_tools/export/gcc_arm_mts_gambit.tmpl @@ -21,7 +21,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) diff --git a/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl b/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl index d76a2645ff..6cd9497c11 100644 --- a/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl +++ b/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl index d76a2645ff..6cd9497c11 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl index d76a2645ff..6cd9497c11 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl index d76a2645ff..6cd9497c11 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl index 9cde1a1487..aa5343f189 100644 --- a/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl @@ -24,7 +24,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs +LD_FLAGS = -mcpu=cortex-m0plus -mthumb -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main #LD_FLAGS += -u _printf_float -u _scanf_float LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_stm32f407.tmpl b/workspace_tools/export/gcc_arm_stm32f407.tmpl index a4e6ad5799..c025b0e3c5 100644 --- a/workspace_tools/export/gcc_arm_stm32f407.tmpl +++ b/workspace_tools/export/gcc_arm_stm32f407.tmpl @@ -23,7 +23,7 @@ CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys diff --git a/workspace_tools/export/gcc_arm_ublox_c027.tmpl b/workspace_tools/export/gcc_arm_ublox_c027.tmpl index f18be4dee5..bbee7bbb92 100644 --- a/workspace_tools/export/gcc_arm_ublox_c027.tmpl +++ b/workspace_tools/export/gcc_arm_ublox_c027.tmpl @@ -22,7 +22,7 @@ CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ff CC_FLAGS += -MMD -MP CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float +LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1)