mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
REVONANO - Allows per board linker scripts
This commit is contained in:
parent
3eef68c017
commit
b59408863a
@ -6,13 +6,13 @@
|
|||||||
PIOS_DEVLIB := $(dir $(lastword $(MAKEFILE_LIST)))
|
PIOS_DEVLIB := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
|
|
||||||
# Hardcoded linker script names for now
|
# Hardcoded linker script names for now
|
||||||
LINKER_SCRIPTS_APP = $(PIOS_DEVLIB)link_stm32f4xx_fw_memory.ld \
|
LINKER_SCRIPTS_APP = $(PIOS_DEVLIB)link_$(BOARD)_fw_memory.ld \
|
||||||
$(PIOS_DEVLIB)link_stm32f4xx_sections.ld
|
$(PIOS_DEVLIB)link_$(BOARD)_sections.ld
|
||||||
LINKER_SCRIPTS_BL = $(PIOS_DEVLIB)link_stm32f4xx_bl_memory.ld \
|
LINKER_SCRIPTS_BL = $(PIOS_DEVLIB)link_$(BOARD)_bl_memory.ld \
|
||||||
$(PIOS_DEVLIB)link_stm32f4xx_sections.ld
|
$(PIOS_DEVLIB)link_$(BOARD)_sections.ld
|
||||||
# _compat linker script are aimed at bootloader updater to guarantee to be compatible with earlier bootloaders.
|
# _compat linker script are aimed at bootloader updater to guarantee to be compatible with earlier bootloaders.
|
||||||
LINKER_SCRIPTS_COMPAT = $(PIOS_DEVLIB)link_stm32f4xx_fw_memory.ld \
|
LINKER_SCRIPTS_COMPAT = $(PIOS_DEVLIB)link_$(BOARD)_fw_memory.ld \
|
||||||
$(PIOS_DEVLIB)link_stm32f4xx_sections_compat.ld
|
$(PIOS_DEVLIB)link_$(BOARD)_sections_compat.ld
|
||||||
|
|
||||||
# Compiler options implied by the F4xx
|
# Compiler options implied by the F4xx
|
||||||
CDEFS += -DSTM32F4XX
|
CDEFS += -DSTM32F4XX
|
||||||
@ -20,7 +20,11 @@ CDEFS += -DSYSCLK_FREQ=$(SYSCLK_FREQ)
|
|||||||
CDEFS += -DHSE_VALUE=$(OSCILLATOR_FREQ)
|
CDEFS += -DHSE_VALUE=$(OSCILLATOR_FREQ)
|
||||||
CDEFS += -DUSE_STDPERIPH_DRIVER
|
CDEFS += -DUSE_STDPERIPH_DRIVER
|
||||||
CDEFS += -DARM_MATH_CM4 -D__FPU_PRESENT=1
|
CDEFS += -DARM_MATH_CM4 -D__FPU_PRESENT=1
|
||||||
|
ifneq ($(NOCCSRAM),YES)
|
||||||
CDEFS += -DPIOS_TARGET_PROVIDES_FAST_HEAP
|
CDEFS += -DPIOS_TARGET_PROVIDES_FAST_HEAP
|
||||||
|
else
|
||||||
|
$(error NOCCSRAM)
|
||||||
|
endif
|
||||||
ARCHFLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
ARCHFLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
|
|
||||||
# PIOS device library source and includes
|
# PIOS device library source and includes
|
||||||
|
7
flight/pios/stm32f4xx/link_STM32F4xx_OSD_bl_memory.ld
Normal file
7
flight/pios/stm32f4xx/link_STM32F4xx_OSD_bl_memory.ld
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x008000 - 0x000080
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
8
flight/pios/stm32f4xx/link_STM32F4xx_OSD_fw_memory.ld
Normal file
8
flight/pios/stm32f4xx/link_STM32F4xx_OSD_fw_memory.ld
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
RSVD (rx) : ORIGIN = 0x08008000, LENGTH = 0x020000 - 0x008000
|
||||||
|
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 0x0e0000
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
193
flight/pios/stm32f4xx/link_STM32F4xx_OSD_sections.ld
Normal file
193
flight/pios/stm32f4xx/link_STM32F4xx_OSD_sections.ld
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
.fastheap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sfastheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.fastheap)
|
||||||
|
|
||||||
|
/* extend the fastheap up to the top of CCSRAM */
|
||||||
|
. = ORIGIN(CCSRAM) + LENGTH(CCSRAM) - ABSOLUTE(_sfastheap);
|
||||||
|
_efastheap = .;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
176
flight/pios/stm32f4xx/link_STM32F4xx_OSD_sections_compat.ld
Normal file
176
flight/pios/stm32f4xx/link_STM32F4xx_OSD_sections_compat.ld
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
7
flight/pios/stm32f4xx/link_STM32F4xx_RM_bl_memory.ld
Normal file
7
flight/pios/stm32f4xx/link_STM32F4xx_RM_bl_memory.ld
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x008000 - 0x000080
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
8
flight/pios/stm32f4xx/link_STM32F4xx_RM_fw_memory.ld
Normal file
8
flight/pios/stm32f4xx/link_STM32F4xx_RM_fw_memory.ld
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
RSVD (rx) : ORIGIN = 0x08008000, LENGTH = 0x020000 - 0x008000
|
||||||
|
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 0x0e0000
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
193
flight/pios/stm32f4xx/link_STM32F4xx_RM_sections.ld
Normal file
193
flight/pios/stm32f4xx/link_STM32F4xx_RM_sections.ld
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
.fastheap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sfastheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.fastheap)
|
||||||
|
|
||||||
|
/* extend the fastheap up to the top of CCSRAM */
|
||||||
|
. = ORIGIN(CCSRAM) + LENGTH(CCSRAM) - ABSOLUTE(_sfastheap);
|
||||||
|
_efastheap = .;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
176
flight/pios/stm32f4xx/link_STM32F4xx_RM_sections_compat.ld
Normal file
176
flight/pios/stm32f4xx/link_STM32F4xx_RM_sections_compat.ld
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
7
flight/pios/stm32f4xx/link_STM32F4xx_RP_bl_memory.ld
Normal file
7
flight/pios/stm32f4xx/link_STM32F4xx_RP_bl_memory.ld
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x008000 - 0x000080
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
8
flight/pios/stm32f4xx/link_STM32F4xx_RP_fw_memory.ld
Normal file
8
flight/pios/stm32f4xx/link_STM32F4xx_RP_fw_memory.ld
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||||
|
RSVD (rx) : ORIGIN = 0x08008000, LENGTH = 0x020000 - 0x008000
|
||||||
|
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 0x0e0000
|
||||||
|
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x020000
|
||||||
|
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||||
|
}
|
193
flight/pios/stm32f4xx/link_STM32F4xx_RP_sections.ld
Normal file
193
flight/pios/stm32f4xx/link_STM32F4xx_RP_sections.ld
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
.fastheap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sfastheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.fastheap)
|
||||||
|
|
||||||
|
/* extend the fastheap up to the top of CCSRAM */
|
||||||
|
. = ORIGIN(CCSRAM) + LENGTH(CCSRAM) - ABSOLUTE(_sfastheap);
|
||||||
|
_efastheap = .;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
176
flight/pios/stm32f4xx/link_STM32F4xx_RP_sections_compat.ld
Normal file
176
flight/pios/stm32f4xx/link_STM32F4xx_RP_sections_compat.ld
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
|
||||||
|
/* Section Definitions */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Vectors, code and constant data.
|
||||||
|
*/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (pios_isr_vector_table_base = .);
|
||||||
|
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||||
|
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||||
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
|
*(.glue_7t) *(.glue_7)
|
||||||
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init section for UAVObjects.
|
||||||
|
*/
|
||||||
|
.initcalluavobj.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_start = .;
|
||||||
|
KEEP(*(.initcalluavobj.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__uavobj_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module init section section
|
||||||
|
*/
|
||||||
|
.initcallmodule.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_start = .;
|
||||||
|
KEEP(*(.initcallmodule.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__module_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* C++ exception handling.
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Markers for the end of the 'text' section and the in-flash start of
|
||||||
|
* non-constant data
|
||||||
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
|
_etext = .;
|
||||||
|
_sidata = .;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board info structure, normally only generated by the bootloader but can
|
||||||
|
* be read by the application.
|
||||||
|
*/
|
||||||
|
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||||
|
.boardinfo :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.boardinfo))
|
||||||
|
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||||
|
} > BD_INFO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||||
|
* results in a hard fault.
|
||||||
|
*/
|
||||||
|
.istack (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_irq_stack_end = . ;
|
||||||
|
*(.irqstack)
|
||||||
|
_irq_stack_top = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Non-const initialised data.
|
||||||
|
*/
|
||||||
|
.data : AT (_sidata)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sdata = .;
|
||||||
|
*(.data .data.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = . ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uninitialised data (BSS + commons).
|
||||||
|
*/
|
||||||
|
.bss (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sbss = . ;
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = . ;
|
||||||
|
PROVIDE ( _end = _ebss ) ;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The heap consumes the remainder of the SRAM.
|
||||||
|
*/
|
||||||
|
.heap (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sheap = . ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This allows us to declare an object or objects up to the minimum acceptable
|
||||||
|
* heap size and receive a linker error if the space available for the heap is
|
||||||
|
* not sufficient.
|
||||||
|
*/
|
||||||
|
*(.heap)
|
||||||
|
|
||||||
|
/* extend the heap up to the top of SRAM */
|
||||||
|
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||||
|
_eheap = .;
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Fast' memory goes in the CCM SRAM
|
||||||
|
*/
|
||||||
|
.fast (NOLOAD) :
|
||||||
|
{
|
||||||
|
_sfast = . ;
|
||||||
|
*(.fast)
|
||||||
|
_efast = . ;
|
||||||
|
} > CCSRAM
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* 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) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
}
|
@ -5,7 +5,7 @@ HW_TYPE := 0x00
|
|||||||
|
|
||||||
MCU := cortex-m4
|
MCU := cortex-m4
|
||||||
CHIP := STM32F405RGT
|
CHIP := STM32F405RGT
|
||||||
BOARD := STM32F4xx_OP
|
BOARD := STM32F4xx_RP
|
||||||
MODEL := HD
|
MODEL := HD
|
||||||
MODEL_SUFFIX :=
|
MODEL_SUFFIX :=
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user