add support to generate "debug" firmware ELFs;

usb-support 2023-03-03
Bryan Biedenkapp 3 years ago
parent b2250cb537
commit a61cee802e

@ -18,9 +18,6 @@ BINBIN_F1=dvm-firmware-hs_f1.bin
BINELF_F1BL=dvm-firmware-hs_f1bl.elf BINELF_F1BL=dvm-firmware-hs_f1bl.elf
BINHEX_F1BL=dvm-firmware-hs_f1bl.hex BINHEX_F1BL=dvm-firmware-hs_f1bl.hex
BINBIN_F1BL=dvm-firmware-hs_f1bl.bin BINBIN_F1BL=dvm-firmware-hs_f1bl.bin
BINELF_F1NOBL=dvm-firmware-hs_f1nobl.elf
BINHEX_F1NOBL=dvm-firmware-hs_f1nobl.hex
BINBIN_F1NOBL=dvm-firmware-hs_f1nobl.bin
BINELF_F4=dvm-firwmare-hs_f4.elf BINELF_F4=dvm-firwmare-hs_f4.elf
BINHEX_F4=dvm-firmware-hs_f4.hex BINHEX_F4=dvm-firmware-hs_f4.hex
BINBIN_F4=dvm-firmware-hs_f4.bin BINBIN_F4=dvm-firmware-hs_f4.bin
@ -105,17 +102,19 @@ CXXFLAGS_F1=-c $(MCFLAGS_F1) $(INCLUDES_F1)
CFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4) CFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4)
CXXFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4) CXXFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4)
# Linker flags # Linker flags
LDFLAGS_F1_N =-T normal.ld $(MCFLAGS_F1) $(INCLUDES_LIBS_F1) LDFLAGS_F1_N =-T stm32f10x_normal.ld $(MCFLAGS_F1) $(INCLUDES_LIBS_F1)
LDFLAGS_F1_BL =-T bootloader.ld $(MCFLAGS_F1) $(INCLUDES_LIBS_F1) LDFLAGS_F1_D =-T stm32f10x_debug.ld $(MCFLAGS_F1) $(INCLUDES_LIBS_F1)
LDFLAGS_F1_BL =-T stm32f10x_bootloader.ld $(MCFLAGS_F1) $(INCLUDES_LIBS_F1)
LDFLAGS_F4 =-T stm32f4xx_link.ld $(MCFLAGS_F4) $(INCLUDES_LIBS_F4) LDFLAGS_F4 =-T stm32f4xx_link.ld $(MCFLAGS_F4) $(INCLUDES_LIBS_F4)
LDFLAGS_F4_D =-T stm32f4xx_link_debug.ld $(MCFLAGS_F4) $(INCLUDES_LIBS_F4)
# Common flags # Common flags
CFLAGS=-Os -ffunction-sections -fdata-sections -fno-builtin -Wno-implicit -DCUSTOM_NEW -DNO_EXCEPTIONS CFLAGS=-Os -g -ffunction-sections -fdata-sections -fno-builtin -Wno-implicit -DCUSTOM_NEW -DNO_EXCEPTIONS
CXXFLAGS=-Os -fno-exceptions -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -DCUSTOM_NEW -DNO_EXCEPTIONS CXXFLAGS=-Os -g -fno-exceptions -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -DCUSTOM_NEW -DNO_EXCEPTIONS
LDFLAGS=-Os --specs=nano.specs --specs=nosys.specs LDFLAGS=-Os -g --specs=nano.specs --specs=nosys.specs
# Build Rules # Build Rules
.PHONY: all release_f1 release_f4 hs bl nobl pi-f4 f446 clean .PHONY: all release_f1 release_f4 hs bl pi-f4 f446 clean
all: hs all: hs
@ -148,9 +147,15 @@ lonestar-usb: bl
mmdvm-hs-hat: CFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST mmdvm-hs-hat: CFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST
mmdvm-hs-hat: CXXFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST mmdvm-hs-hat: CXXFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST
mmdvm-hs-hat: hs mmdvm-hs-hat: hs
mmdvm-hs-hat-debug: CFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST
mmdvm-hs-hat-debug: CXXFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USART1_HOST
mmdvm-hs-hat-debug: hs-debug
mmdvm-hs-hat-dual: CFLAGS+=-DDUPLEX mmdvm-hs-hat-dual: CFLAGS+=-DDUPLEX
mmdvm-hs-hat-dual: CXXFLAGS+=-DDUPLEX mmdvm-hs-hat-dual: CXXFLAGS+=-DDUPLEX
mmdvm-hs-hat-dual: mmdvm-hs-hat mmdvm-hs-hat-dual: mmdvm-hs-hat
mmdvm-hs-hat-dual-debug: CFLAGS+=-DDUPLEX
mmdvm-hs-hat-dual-debug: CXXFLAGS+=-DDUPLEX
mmdvm-hs-hat-dual-debug: mmdvm-hs-hat-debug
mmdvm-hs-hat-usb: CFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USB_HOST mmdvm-hs-hat-usb: CFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USB_HOST
mmdvm-hs-hat-usb: CXXFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USB_HOST mmdvm-hs-hat-usb: CXXFLAGS+=-DMMDVM_HS_HAT_REV12 -DSTM32_USB_HOST
mmdvm-hs-hat-usb: bl mmdvm-hs-hat-usb: bl
@ -163,16 +168,16 @@ hs: CXXFLAGS+=$(CXXFLAGS_F1) $(DEFS_F1_HS)
hs: LDFLAGS+=$(LDFLAGS_F1_N) hs: LDFLAGS+=$(LDFLAGS_F1_N)
hs: release_f1 hs: release_f1
hs-debug: CFLAGS+=$(CFLAGS_F1) $(DEFS_F1_HS)
hs-debug: CXXFLAGS+=$(CXXFLAGS_F1) $(DEFS_F1_HS)
hs-debug: LDFLAGS+=$(LDFLAGS_F1_D)
hs-debug: release_f1
bl: CFLAGS+=$(CFLAGS_F1) $(DEFS_F1_HS_BL) bl: CFLAGS+=$(CFLAGS_F1) $(DEFS_F1_HS_BL)
bl: CXXFLAGS+=$(CXXFLAGS_F1) $(DEFS_F1_HS_BL) bl: CXXFLAGS+=$(CXXFLAGS_F1) $(DEFS_F1_HS_BL)
bl: LDFLAGS+=$(LDFLAGS_F1_BL) bl: LDFLAGS+=$(LDFLAGS_F1_BL)
bl: release_f1bl bl: release_f1bl
nobl: CFLAGS+=$(CFLAGS_F1) $(DEFS_F1_HS)
nobl: CXXFLAGS+=$(CXXFLAGS_F1) $(DEFS_F1_HS)
nobl: LDFLAGS+=$(LDFLAGS_F1_N)
nobl: release_f1nobl
release_f1: $(BINDIR) release_f1: $(BINDIR)
release_f1: $(OBJDIR_F1) release_f1: $(OBJDIR_F1)
release_f1: $(BINDIR)/$(BINBIN_F1) release_f1: $(BINDIR)/$(BINBIN_F1)
@ -181,10 +186,6 @@ release_f1bl: $(BINDIR)
release_f1bl: $(OBJDIR_F1) release_f1bl: $(OBJDIR_F1)
release_f1bl: $(BINDIR)/$(BINBIN_F1BL) release_f1bl: $(BINDIR)/$(BINBIN_F1BL)
release_f1nobl: $(BINDIR)
release_f1nobl: $(OBJDIR_F1)
release_f1nobl: $(BINDIR)/$(BINBIN_F1NOBL)
release_f4: $(BINDIR) release_f4: $(BINDIR)
release_f4: $(OBJDIR_F4) release_f4: $(OBJDIR_F4)
release_f4: $(BINDIR)/$(BINBIN_F4) release_f4: $(BINDIR)/$(BINBIN_F4)
@ -208,12 +209,6 @@ $(BINDIR)/$(BINELF_F1BL): $(OBJ_F1BL)
$(CXX) $(OBJ_F1BL) $(LDFLAGS) -o $@ $(CXX) $(OBJ_F1BL) $(LDFLAGS) -o $@
$(SIZE) $(BINDIR)/$(BINELF_F1BL) $(SIZE) $(BINDIR)/$(BINELF_F1BL)
$(BINDIR)/$(BINBIN_F1NOBL): $(BINDIR)/$(BINELF_F1NOBL)
$(CP) -O binary $< $@
$(BINDIR)/$(BINELF_F1NOBL): $(OBJ_F1BL)
$(CXX) $(OBJ_F1BL) $(LDFLAGS) -o $@
$(SIZE) $(BINDIR)/$(BINELF_F1NOBL)
$(BINDIR)/$(BINBIN_F1): $(BINDIR)/$(BINELF_F1) $(BINDIR)/$(BINBIN_F1): $(BINDIR)/$(BINELF_F1)
$(CP) -O binary $< $@ $(CP) -O binary $< $@
$(BINDIR)/$(BINELF_F1): $(OBJ_F1) $(BINDIR)/$(BINELF_F1): $(OBJ_F1)

@ -0,0 +1,26 @@
/*
* Copyright (C) 2016-2018 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Memory areas */
MEMORY
{
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* FLASH */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K /* Main RAM */
}
INCLUDE stm32f10x_link_debug.ld

@ -0,0 +1,161 @@
/*
* Copyright (C) 2016 by Andy Uribe CA6JAU
* Copyright (C) 2023 by Bryan Biedenkapp N2PLL
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Required amount of heap and stack */
_min_heap_size = 0x1000;
_min_stack_size = 0x0800;
/* The entry point in the interrupt vector table */
ENTRY(Reset_Handler)
/* Stack start address (end of 20K RAM) */
_estack = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
.text :
{
/* The interrupt vector table */
. = ALIGN(4);
KEEP(*(.isr_vector .isr_vector.*))
/* The program code */
. = ALIGN(4);
*(.text .text*)
*(.rodata .rodata*)
/* ARM-Thumb code */
*(.glue_7) *(.glue_7t)
. = ALIGN(4);
KEEP(*(.init))
KEEP(*(.fini))
/* EABI C++ global constructors support */
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
__fini_array_end = .;
} > ROM
/* ARM sections containing exception unwinding information */
.ARM.extab : {
__extab_start = .;
*(.ARM.extab* .gnu.linkonce.armextab.*)
__extab_end = .;
} > ROM
/* ARM index entries for section unwinding */
.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} > ROM
/* Start address for the initialization values of the .data section */
_sidata = .;
/* The .data section (initialized data) */
.data : AT ( _sidata )
{
. = ALIGN(4);
_sdata = . ; /* Start address for the .data section */
*(.data .data*)
. = ALIGN(4);
_edata = . ; /* End address for the .data section */
} > RAM
/* The .bss section (uninitialized data) */
.bss :
{
. = ALIGN(4);
_sbss = .; /* Start address for the .bss section */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = . ; /* End address for the .bss section */
__bss_end__ = _ebss;
} > RAM
/* Space for heap and stack */
.heap_stack :
{
end = . ; /* 'end' symbol defines heap location */
_end = end ;
. = . + _min_heap_size; /* Additional space for heap and stack */
. = . + _min_stack_size;
} > RAM
/* Stabs debugging sections. */
.stab 0 : { *(.stab) } > ROM
.stabstr 0 : { *(.stabstr) } > ROM
.stab.excl 0 : { *(.stab.excl) } > ROM
.stab.exclstr 0 : { *(.stab.exclstr) } > ROM
.stab.index 0 : { *(.stab.index) } > ROM
.stab.indexstr 0 : { *(.stab.indexstr) } > ROM
.comment 0 : { *(.comment) } > ROM
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) } > ROM
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) } > ROM
.line 0 : { *(.line) } > ROM
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) } > ROM
.debug_sfnames 0 : { *(.debug_sfnames) } > ROM
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) } > ROM
.debug_pubnames 0 : { *(.debug_pubnames) } > ROM
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } > ROM
.debug_abbrev 0 : { *(.debug_abbrev) } > ROM
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } > ROM
.debug_frame 0 : { *(.debug_frame) } > ROM
.debug_str 0 : { *(.debug_str) } > ROM
.debug_loc 0 : { *(.debug_loc) } > ROM
.debug_macinfo 0 : { *(.debug_macinfo) } > ROM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
}

@ -0,0 +1,169 @@
/*
* Copyright (C) 2016 by Andy Uribe CA6JAU
* Copyright (C) 2023 by Bryan Biedenkapp N2PLL
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Required amount of heap and stack */
_min_heap_size = 0x1000;
_min_stack_size = 0x0800;
/* The entry point in the interrupt vector table */
ENTRY(Reset_Handler)
/* Memory areas */
MEMORY
{
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* FLASH */
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K /* Core Coupled Memory (CPU only access) */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K /* Main RAM (bus matrix)*/
}
/* Stack start address (end of 128K RAM) */
_estack = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
.text :
{
/* The interrupt vector table */
. = ALIGN(4);
KEEP(*(.isr_vector .isr_vector.*))
/* The program code */
. = ALIGN(4);
*(.text .text*)
*(.rodata .rodata*)
/* ARM-Thumb code */
*(.glue_7) *(.glue_7t)
. = ALIGN(4);
KEEP(*(.init))
KEEP(*(.fini))
/* EABI C++ global constructors support */
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
__fini_array_end = .;
} > ROM
/* ARM sections containing exception unwinding information */
.ARM.extab : {
__extab_start = .;
*(.ARM.extab* .gnu.linkonce.armextab.*)
__extab_end = .;
} > ROM
/* ARM index entries for section unwinding */
.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} > ROM
/* Start address for the initialization values of the .data section */
_sidata = .;
/* The .data section (initialized data) */
.data : AT ( _sidata )
{
. = ALIGN(4);
_sdata = . ; /* Start address for the .data section */
*(.data .data*)
. = ALIGN(4);
_edata = . ; /* End address for the .data section */
} > RAM
/* The .bss section (uninitialized data) */
.bss :
{
. = ALIGN(4);
_sbss = .; /* Start address for the .bss section */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = . ; /* End address for the .bss section */
__bss_end__ = _ebss;
} > RAM
/* Space for heap and stack */
.heap_stack :
{
end = . ; /* 'end' symbol defines heap location */
_end = end ;
. = . + _min_heap_size; /* Additional space for heap and stack */
. = . + _min_stack_size;
} > RAM
/* Stabs debugging sections. */
.stab 0 : { *(.stab) } > ROM
.stabstr 0 : { *(.stabstr) } > ROM
.stab.excl 0 : { *(.stab.excl) } > ROM
.stab.exclstr 0 : { *(.stab.exclstr) } > ROM
.stab.index 0 : { *(.stab.index) } > ROM
.stab.indexstr 0 : { *(.stab.indexstr) } > ROM
.comment 0 : { *(.comment) } > ROM
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) } > ROM
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) } > ROM
.line 0 : { *(.line) } > ROM
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) } > ROM
.debug_sfnames 0 : { *(.debug_sfnames) } > ROM
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) } > ROM
.debug_pubnames 0 : { *(.debug_pubnames) } > ROM
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } > ROM
.debug_abbrev 0 : { *(.debug_abbrev) } > ROM
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } > ROM
.debug_frame 0 : { *(.debug_frame) } > ROM
.debug_str 0 : { *(.debug_str) } > ROM
.debug_loc 0 : { *(.debug_loc) } > ROM
.debug_macinfo 0 : { *(.debug_macinfo) } > ROM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
}

@ -0,0 +1,168 @@
/*
* Copyright (C) 2017 by Andy Uribe CA6JAU
* Copyright (C) 2023 by Bryan Biedenkapp N2PLL
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Required amount of heap and stack */
_min_heap_size = 0x1000;
_min_stack_size = 0x0800;
/* The entry point in the interrupt vector table */
ENTRY(Reset_Handler)
/* Memory areas */
MEMORY
{
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* FLASH */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K /* Main RAM */
}
/* Stack start address (end of 512K RAM) */
_estack = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
.text :
{
/* The interrupt vector table */
. = ALIGN(4);
KEEP(*(.isr_vector .isr_vector.*))
/* The program code */
. = ALIGN(4);
*(.text .text*)
*(.rodata .rodata*)
/* ARM-Thumb code */
*(.glue_7) *(.glue_7t)
. = ALIGN(4);
KEEP(*(.init))
KEEP(*(.fini))
/* EABI C++ global constructors support */
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
/* EABI C++ global constructors support */
. = ALIGN(4);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
__fini_array_end = .;
} > ROM
/* ARM sections containing exception unwinding information */
.ARM.extab : {
__extab_start = .;
*(.ARM.extab* .gnu.linkonce.armextab.*)
__extab_end = .;
} > ROM
/* ARM index entries for section unwinding */
.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} > ROM
/* Start address for the initialization values of the .data section */
_sidata = .;
/* The .data section (initialized data) */
.data : AT ( _sidata )
{
. = ALIGN(4);
_sdata = . ; /* Start address for the .data section */
*(.data .data*)
. = ALIGN(4);
_edata = . ; /* End address for the .data section */
} > RAM
/* The .bss section (uninitialized data) */
.bss :
{
. = ALIGN(4);
_sbss = .; /* Start address for the .bss section */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = . ; /* End address for the .bss section */
__bss_end__ = _ebss;
} > RAM
/* Space for heap and stack */
.heap_stack :
{
end = . ; /* 'end' symbol defines heap location */
_end = end ;
. = . + _min_heap_size; /* Additional space for heap and stack */
. = . + _min_stack_size;
} > RAM
/* Stabs debugging sections. */
.stab 0 : { *(.stab) } > ROM
.stabstr 0 : { *(.stabstr) } > ROM
.stab.excl 0 : { *(.stab.excl) } > ROM
.stab.exclstr 0 : { *(.stab.exclstr) } > ROM
.stab.index 0 : { *(.stab.index) } > ROM
.stab.indexstr 0 : { *(.stab.indexstr) } > ROM
.comment 0 : { *(.comment) } > ROM
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) } > ROM
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) } > ROM
.line 0 : { *(.line) } > ROM
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) } > ROM
.debug_sfnames 0 : { *(.debug_sfnames) } > ROM
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) } > ROM
.debug_pubnames 0 : { *(.debug_pubnames) } > ROM
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } > ROM
.debug_abbrev 0 : { *(.debug_abbrev) } > ROM
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } > ROM
.debug_frame 0 : { *(.debug_frame) } > ROM
.debug_str 0 : { *(.debug_str) } > ROM
.debug_loc 0 : { *(.debug_loc) } > ROM
.debug_macinfo 0 : { *(.debug_macinfo) } > ROM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
}
Loading…
Cancel
Save

Powered by TurnKey Linux.