From 13f138284f04590d0248e8306add4566a5ad1d1c Mon Sep 17 00:00:00 2001 From: Marven Gilhespie <45208741+marvensilabs@users.noreply.github.com> Date: Mon, 28 Oct 2019 21:07:47 +0000 Subject: [PATCH] [efr32] move __START definition to Makefile-efr32mgxx makefiles (#4278) Allows external projects to use SDK library generated in OpenThread with constructors called at startup. --- examples/Makefile-efr32mg12 | 1 + examples/Makefile-efr32mg21 | 1 + examples/platforms/efr32mg12/Makefile.am | 2 -- examples/platforms/efr32mg21/Makefile.am | 2 -- third_party/silabs/Makefile.am | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/Makefile-efr32mg12 b/examples/Makefile-efr32mg12 index 1ae13174f..4298d0f12 100644 --- a/examples/Makefile-efr32mg12 +++ b/examples/Makefile-efr32mg12 @@ -112,6 +112,7 @@ COMMONCFLAGS := \ -Os \ -g \ -I$(HAL_CONF_DIR) \ + -D__START=main \ -D$(MCU) \ $(EFR32MG12_CONFIG_FILE_CPPFLAGS) \ $(NULL) diff --git a/examples/Makefile-efr32mg21 b/examples/Makefile-efr32mg21 index 5ff23a899..f50ef7f32 100644 --- a/examples/Makefile-efr32mg21 +++ b/examples/Makefile-efr32mg21 @@ -98,6 +98,7 @@ COMMONCFLAGS := \ -Os \ -g \ -I$(HAL_CONF_DIR) \ + -D__START=main \ -D$(MCU) \ $(EFR32MG21_CONFIG_FILE_CPPFLAGS) \ $(NULL) diff --git a/examples/platforms/efr32mg12/Makefile.am b/examples/platforms/efr32mg12/Makefile.am index 54b52da2b..023ff760a 100644 --- a/examples/platforms/efr32mg12/Makefile.am +++ b/examples/platforms/efr32mg12/Makefile.am @@ -43,8 +43,6 @@ EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a EFR32MG_SDK_SRCDIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.6 libopenthread_efr32mg12_a_CPPFLAGS = \ - -D__START=main \ - -D__STARTUP_CLEAR_BSS \ -DPLATFORM_HEADER=\"@top_builddir@/third_party/silabs/gecko_sdk_suite/v2.6/platform/base/hal/micro/cortexm3/compiler/gcc.h\" \ -DNVIC_CONFIG=\"platform/base/hal/micro/cortexm3/efm32/nvic-config.h\" \ -Wno-sign-compare \ diff --git a/examples/platforms/efr32mg21/Makefile.am b/examples/platforms/efr32mg21/Makefile.am index 1edd73f6c..75fa001ab 100644 --- a/examples/platforms/efr32mg21/Makefile.am +++ b/examples/platforms/efr32mg21/Makefile.am @@ -43,8 +43,6 @@ EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a EFR32MG_SDK_SRCDIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.6 libopenthread_efr32mg21_a_CPPFLAGS = \ - -D__START=main \ - -D__STARTUP_CLEAR_BSS \ -DPLATFORM_HEADER=\"@top_builddir@/third_party/silabs/gecko_sdk_suite/v2.6/platform/base/hal/micro/cortexm3/compiler/gcc.h\" \ -Wno-sign-compare \ -DCORTEXM3 \ diff --git a/third_party/silabs/Makefile.am b/third_party/silabs/Makefile.am index 93ef8a6e8..627e0cbc3 100644 --- a/third_party/silabs/Makefile.am +++ b/third_party/silabs/Makefile.am @@ -57,7 +57,6 @@ EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a-z EFR32MG_SDK_SRCDIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.6 COMMONCPPFLAGS = \ - -D__START=main \ -D__STARTUP_CLEAR_BSS \ -I$(srcdir) \ -I$(top_srcdir)/include \