Skip to content

Commit 5328029

Browse files
committed
Merge pull request #1092 from stevew817/master
Silicon Labs - Add the no-rtti C++ compilation flag required for linking libmbed.
2 parents 16156f5 + 74f1dc1 commit 5328029

File tree

10 files changed

+28
-14
lines changed

10 files changed

+28
-14
lines changed

libraries/mbed/targets/cmsis/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32ZG_STK3200/TOOLCHAIN_ARM_MICRO/startup_efm32zg.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
3030
; </h>
3131

32-
Stack_Size EQU 0x00000400
32+
Stack_Size EQU 0x00000200
3333

3434
AREA STACK, NOINIT, READWRITE, ALIGN=3
3535
Stack_Mem SPACE Stack_Size

libraries/mbed/targets/cmsis/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32ZG_STK3200/TOOLCHAIN_GCC_ARM/startup_efm32zg.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#ifdef __STACK_SIZE
3838
.equ Stack_Size, __STACK_SIZE
3939
#else
40-
.equ Stack_Size, 0x400
40+
.equ Stack_Size, 0x200
4141
#endif
4242
.globl __StackTop
4343
.globl __StackLimit

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32HG_STK3400/device.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050

5151
#define DEVICE_LOWPOWERTIMER 1
5252

53+
// Redefine OPEN_MAX from sys_limits.h to save on RAM.
54+
// Effect: maximum amount of file handlers = OPEN_MAX
55+
// This is not going to have an impact, since this is a RAM-limited part anyway.
56+
#define OPEN_MAX 24
57+
5358
#include "objects.h"
5459
#include "Modules.h"
5560
#include "device_peripherals.h"

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32ZG_STK3200/device.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050

5151
#define DEVICE_LOWPOWERTIMER 1
5252

53+
// Redefine OPEN_MAX from sys_limits.h to save on RAM.
54+
// Effect: maximum amount of file handlers = OPEN_MAX
55+
// This is not going to have an impact, since this is a RAM-limited part anyway.
56+
#define OPEN_MAX 8
57+
5358
#include "objects.h"
5459
#include "Modules.h"
5560
#include "device_peripherals.h"

workspace_tools/export/gcc_arm_efm32gg_stk3700.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
2323
SIZE = $(GCC_BIN)arm-none-eabi-size
2424

2525
CPU = -mcpu=cortex-m3 -mthumb
26-
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
26+
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-common -fomit-frame-pointer
2727
CC_FLAGS += -MMD -MP
2828

2929
ifeq ($(DEBUG), 1)
@@ -53,7 +53,7 @@ clean:
5353
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
5454

5555
.cpp.o:
56-
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
56+
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -fno-rtti -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
5757

5858

5959
$(OBJ_FOLDER)$(PROJECT).axf: $(OBJECTS) $(SYS_OBJECTS)

workspace_tools/export/gcc_arm_efm32hg_stk3400.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
2323
SIZE = $(GCC_BIN)arm-none-eabi-size
2424

2525
CPU = -mcpu=cortex-m0plus -mthumb
26-
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
26+
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-common -fomit-frame-pointer
2727
CC_FLAGS += -MMD -MP
2828

2929
ifeq ($(DEBUG), 1)
@@ -53,7 +53,7 @@ clean:
5353
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
5454

5555
.cpp.o:
56-
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
56+
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -fno-rtti -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
5757

5858

5959
$(OBJ_FOLDER)$(PROJECT).axf: $(OBJECTS) $(SYS_OBJECTS)

workspace_tools/export/gcc_arm_efm32lg_stk3600.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
2323
SIZE = $(GCC_BIN)arm-none-eabi-size
2424

2525
CPU = -mcpu=cortex-m3 -mthumb
26-
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
26+
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-common -fomit-frame-pointer
2727
CC_FLAGS += -MMD -MP
2828

2929
ifeq ($(DEBUG), 1)
@@ -53,7 +53,7 @@ clean:
5353
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
5454

5555
.cpp.o:
56-
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
56+
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -fno-rtti -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
5757

5858

5959
$(OBJ_FOLDER)$(PROJECT).axf: $(OBJECTS) $(SYS_OBJECTS)

workspace_tools/export/gcc_arm_efm32wg_stk3800.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
2323
SIZE = $(GCC_BIN)arm-none-eabi-size
2424

2525
CPU = -mcpu=cortex-m3 -mthumb
26-
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
26+
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-common -fomit-frame-pointer
2727
CC_FLAGS += -MMD -MP
2828

2929
ifeq ($(DEBUG), 1)
@@ -53,7 +53,7 @@ clean:
5353
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
5454

5555
.cpp.o:
56-
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
56+
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -fno-rtti -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
5757

5858

5959
$(OBJ_FOLDER)$(PROJECT).axf: $(OBJECTS) $(SYS_OBJECTS)

workspace_tools/export/gcc_arm_efm32zg_stk3200.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
2323
SIZE = $(GCC_BIN)arm-none-eabi-size
2424

2525
CPU = -mcpu=cortex-m0plus -mthumb
26-
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
26+
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-common -fomit-frame-pointer
2727
CC_FLAGS += -MMD -MP
2828

2929
ifeq ($(DEBUG), 1)
@@ -53,7 +53,7 @@ clean:
5353
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
5454

5555
.cpp.o:
56-
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
56+
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -fno-rtti -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
5757

5858

5959
$(OBJ_FOLDER)$(PROJECT).axf: $(OBJECTS) $(SYS_OBJECTS)

workspace_tools/export/simplicityv3_slsproj.tmpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@
6262
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.base" optionId="gnu.c.link.option.ldflags" value="-Wl,--wrap=main"/>
6363
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.flags" value="-Wl,--wrap=main"/>
6464
{# For debug build, don't apply optimizations #}
65+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.none"/>
66+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-rtti -fno-exceptions -fno-common -fomit-frame-pointer"/>
6567
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none"/>
66-
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 "/>
68+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -fno-rtti -fno-exceptions -fno-common -fomit-frame-pointer"/>
6769
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect" value="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect.default"/>
6870
</configuration>
6971
<configuration name="com.silabs.ide.si32.gcc.release#com.silabs.ide.si32.gcc:4.8.3.20131129" label="GNU ARM v4.8.3 - Release" stockConfigCompatibility="com.silabs.ide.toolchain.core.release">
@@ -105,8 +107,10 @@
105107
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.linker.base" optionId="gnu.c.link.option.ldflags" value="-Wl,--wrap=main"/>
106108
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.linker.base" optionId="gnu.cpp.link.option.flags" value="-Wl,--wrap=main"/>
107109
{# Use optimize for size on release build #}
110+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.size"/>
111+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base" optionId="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-rtti -fno-exceptions -fno-common -fomit-frame-pointer"/>
108112
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.size"/>
109-
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 "/>
113+
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -fno-rtti -fno-exceptions -fno-common -fomit-frame-pointer"/>
110114
<toolOption toolId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.base" optionId="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect" value="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.cpp.compiler.misc.dialect.default"/>
111115
</configuration>
112116
</project>

0 commit comments

Comments
 (0)