git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@404 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
01afd268a5
commit
65baafa9e6
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -114,6 +117,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -125,10 +132,14 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -114,6 +117,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -125,10 +132,14 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -45,11 +45,16 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.text);
|
||||
KEEP(*(.startup))
|
||||
*(.text)
|
||||
*(.text.*);
|
||||
*(.rodata);
|
||||
*(.rodata*);
|
||||
*(.rodata.*);
|
||||
*(.glue_7t);
|
||||
*(.glue_7);
|
||||
*(.gcc*);
|
||||
*(.ctors);
|
||||
*(.dtors);
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} > flash
|
||||
|
@ -58,9 +63,12 @@ SECTIONS
|
|||
|
||||
.data :
|
||||
{
|
||||
_data = .;
|
||||
_data = .;
|
||||
*(.data)
|
||||
. = ALIGN(4);
|
||||
*(.data.*)
|
||||
. = ALIGN(4);
|
||||
*(.ramtext)
|
||||
. = ALIGN(4);
|
||||
_edata = .;
|
||||
|
@ -71,6 +79,8 @@ SECTIONS
|
|||
_bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
*(.bss.*)
|
||||
. = ALIGN(4);
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_bss_end = .;
|
||||
|
|
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -127,6 +130,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -138,10 +145,15 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -128,6 +131,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -139,10 +146,15 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -45,11 +45,16 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.text);
|
||||
KEEP(*(.startup))
|
||||
*(.text)
|
||||
*(.text.*);
|
||||
*(.rodata);
|
||||
*(.rodata*);
|
||||
*(.rodata.*);
|
||||
*(.glue_7t);
|
||||
*(.glue_7);
|
||||
*(.gcc*);
|
||||
*(.ctors);
|
||||
*(.dtors);
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} > flash
|
||||
|
@ -58,9 +63,12 @@ SECTIONS
|
|||
|
||||
.data :
|
||||
{
|
||||
_data = .;
|
||||
_data = .;
|
||||
*(.data)
|
||||
. = ALIGN(4);
|
||||
*(.data.*)
|
||||
. = ALIGN(4);
|
||||
*(.ramtext)
|
||||
. = ALIGN(4);
|
||||
_edata = .;
|
||||
|
@ -71,6 +79,8 @@ SECTIONS
|
|||
_bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
*(.bss.*)
|
||||
. = ALIGN(4);
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_bss_end = .;
|
||||
|
|
|
@ -32,6 +32,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -129,6 +132,10 @@ WARN = -Wall
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -145,11 +152,15 @@ OBJS = $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(WARN) -Wa,-alms=$(<:.cpp=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -32,6 +32,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -129,6 +132,10 @@ WARN = -Wall
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -145,11 +152,15 @@ OBJS = $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(WARN) -Wa,-alms=$(<:.cpp=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -25,7 +25,7 @@ __abt_stack_size__ = 0x0004;
|
|||
__fiq_stack_size__ = 0x0010;
|
||||
__irq_stack_size__ = 0x0080;
|
||||
__svc_stack_size__ = 0x0004;
|
||||
__sys_stack_size__ = 0x0400;
|
||||
__sys_stack_size__ = 0x0100;
|
||||
__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
|
||||
|
||||
MEMORY
|
||||
|
@ -48,7 +48,8 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.text);
|
||||
KEEP(*(.startup))
|
||||
*(.text)
|
||||
*(.text.*);
|
||||
*(.rodata);
|
||||
*(.rodata.*);
|
||||
|
|
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -111,6 +114,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -122,10 +129,14 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -26,6 +26,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = arm7tdmi
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -111,6 +114,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -122,10 +129,14 @@ ASMOBJS = $(ASMSRC:.s=.o)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU)
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Thumb interwork enabled only if needed because it kills performance.
|
||||
ifneq ($(TSRC),)
|
||||
|
|
|
@ -48,11 +48,16 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.text);
|
||||
KEEP(*(.startup))
|
||||
*(.text)
|
||||
*(.text.*);
|
||||
*(.rodata);
|
||||
*(.rodata*);
|
||||
*(.rodata.*);
|
||||
*(.glue_7t);
|
||||
*(.glue_7);
|
||||
*(.gcc*);
|
||||
*(.ctors);
|
||||
*(.dtors);
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} > flash
|
||||
|
@ -64,6 +69,8 @@ SECTIONS
|
|||
_data = .;
|
||||
*(.data)
|
||||
. = ALIGN(4);
|
||||
*(.data.*)
|
||||
. = ALIGN(4);
|
||||
*(.ramtext)
|
||||
. = ALIGN(4);
|
||||
_edata = .;
|
||||
|
@ -74,6 +81,8 @@ SECTIONS
|
|||
_bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
*(.bss.*)
|
||||
. = ALIGN(4);
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_bss_end = .;
|
||||
|
|
|
@ -111,10 +111,6 @@ OPT = -O2 -ggdb -fomit-frame-pointer -mabi=apcs-gnu
|
|||
#OPT += -ffixed-r7
|
||||
OPT += -falign-functions=16
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
# Define warning options here
|
||||
WARN = -Wall -Wstrict-prototypes
|
||||
|
||||
|
@ -122,6 +118,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
|
|
@ -111,10 +111,6 @@ OPT = -Os -ggdb -fomit-frame-pointer -mabi=apcs-gnu
|
|||
#OPT += -ffixed-r7
|
||||
OPT += -falign-functions=16
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
# Define warning options here
|
||||
WARN = -Wall -Wstrict-prototypes
|
||||
|
||||
|
@ -122,6 +118,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
|
|
@ -27,6 +27,9 @@ BIN = $(CP) -O binary
|
|||
|
||||
MCU = cortex-m3
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
LINK_GC = yes
|
||||
|
||||
# List all default C defines here, like -D_DEBUG=1
|
||||
DDEFS =
|
||||
|
||||
|
@ -103,6 +106,10 @@ WARN = -Wall -Wstrict-prototypes
|
|||
# End of user defines
|
||||
##############################################################################################
|
||||
|
||||
ifeq ($(LINK_GC),yes)
|
||||
OPT += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
|
||||
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
|
||||
DEFS = $(DDEFS) $(UDEFS)
|
||||
|
@ -113,10 +120,14 @@ OBJS = $(ASMOBJS) $(COBJS)
|
|||
LIBS = $(DLIBS) $(ULIBS)
|
||||
MCFLAGS = -mcpu=$(MCU) -mthumb
|
||||
|
||||
ODFLAGS = -x --syms
|
||||
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ODFLAGS = -x --syms
|
||||
ifeq ($(LINK_GC),yes)
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LIBDIR)
|
||||
else
|
||||
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
endif
|
||||
|
||||
# Generate dependency information
|
||||
CPFLAGS += -MD -MP -MF .dep/$(@F).d
|
||||
|
|
|
@ -41,12 +41,16 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(INTVEC);
|
||||
*(.text);
|
||||
KEEP(*(INTVEC));
|
||||
*(.text)
|
||||
*(.text.*);
|
||||
*(.rodata);
|
||||
*(.rodata*);
|
||||
*(.rodata.*);
|
||||
*(.glue_7t);
|
||||
*(.glue_7);
|
||||
*(.gcc*);
|
||||
*(.ctors);
|
||||
*(.dtors);
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} > flash
|
||||
|
@ -58,6 +62,8 @@ SECTIONS
|
|||
_data = .;
|
||||
*(.data)
|
||||
. = ALIGN(4);
|
||||
*(.data.*)
|
||||
. = ALIGN(4);
|
||||
*(.ramtext)
|
||||
. = ALIGN(4);
|
||||
_edata = .;
|
||||
|
@ -68,6 +74,8 @@ SECTIONS
|
|||
_bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
*(.bss.*)
|
||||
. = ALIGN(4);
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_bss_end = .;
|
||||
|
|
|
@ -46,7 +46,8 @@ __attribute__((naked, weak))
|
|||
void chSysHalt(void) {
|
||||
|
||||
#ifdef THUMB
|
||||
asm("b _halt16");
|
||||
asm volatile ("ldr r0, =_halt16");
|
||||
asm volatile ("bx r0");
|
||||
#else
|
||||
asm("b _halt32");
|
||||
#endif
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
.equ I_BIT, 0x80
|
||||
.equ F_BIT, 0x40
|
||||
|
||||
.text
|
||||
.section .startup
|
||||
.code 32
|
||||
.balign 4
|
||||
/*
|
||||
|
@ -66,6 +66,7 @@ _fiq:
|
|||
/*
|
||||
* Reset handler.
|
||||
*/
|
||||
.text
|
||||
ResetHandler:
|
||||
/*
|
||||
* Stack pointers initialization.
|
||||
|
|
|
@ -46,8 +46,9 @@ __attribute__((naked, weak))
|
|||
void chSysHalt(void) {
|
||||
|
||||
#ifdef THUMB
|
||||
asm("b _halt16");
|
||||
asm volatile ("ldr r0, =_halt16");
|
||||
asm volatile ("bx r0");
|
||||
#else
|
||||
asm("b _halt32");
|
||||
asm volatile ("b _halt32");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
.equ I_BIT, 0x80
|
||||
.equ F_BIT, 0x40
|
||||
|
||||
.text
|
||||
.section .startup
|
||||
.code 32
|
||||
.balign 4
|
||||
/*
|
||||
|
@ -66,6 +66,7 @@ _fiq:
|
|||
/*
|
||||
* Reset handler.
|
||||
*/
|
||||
.text
|
||||
ResetHandler:
|
||||
/*
|
||||
* Stack pointers initialization.
|
||||
|
|
|
@ -83,6 +83,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
|
|||
the makefile options makes the chSysLock() and chSysUnlock() become
|
||||
reentrant. The code becomes a bit larger and slower, use it only if your
|
||||
application really needs to invoke system API under lock.
|
||||
- NEW: Added an option to the ARM7 and CM3 makefiles to strip any unused code
|
||||
and data from the binary file (the default is on).
|
||||
|
||||
*** 0.6.9 ***
|
||||
- NEW: Added an option to exclude the support for the round robin scheduling,
|
||||
|
|
Loading…
Reference in New Issue