mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1275 fixes for ld scripts, fix for pios_delay timer setup. pios_sys
This commit is contained in:
parent
4d1e8cf5a7
commit
bb7d4aef04
@ -11,15 +11,20 @@ _irq_stack_size = 0x200;
|
||||
/* Section Definitions */
|
||||
SECTIONS
|
||||
{
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
pios_isr_vector_table_base = .;
|
||||
KEEP(*(.isr_vector)) /* Interrupt vectors */
|
||||
} >BL_FLASH
|
||||
.text :
|
||||
{
|
||||
PROVIDE (pios_isr_vector_table_base = .);
|
||||
KEEP(*(.isr_vector .isr_vector.*))
|
||||
. = ALIGN(4);
|
||||
*(.text .text.* .gnu.linkonce.t.*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||
} > BL_FLASH
|
||||
|
||||
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
@ -33,7 +38,8 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
_sidata = .;
|
||||
|
||||
.ram_vector_table(NOLOAD): {*(.ram_vector_table)} >VTRAM
|
||||
|
||||
.data : AT (_etext)
|
||||
{
|
||||
_sdata = .;
|
||||
@ -69,7 +75,7 @@ SECTIONS
|
||||
_init_stack_top = _irq_stack_top;
|
||||
. = ALIGN(4);
|
||||
} > SRAM
|
||||
|
||||
_estack = _init_stack_top;
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
|
||||
@ -80,6 +86,17 @@ SECTIONS
|
||||
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||
} > BD_INFO
|
||||
|
||||
|
||||
/* This can remove the debugging information from the standard libraries */
|
||||
/*
|
||||
DISCARD :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
@ -88,9 +105,11 @@ SECTIONS
|
||||
.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 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) }
|
||||
@ -112,5 +131,5 @@ SECTIONS
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
}
|
||||
|
@ -13,10 +13,15 @@ PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||
/* Section Definitions */
|
||||
SECTIONS
|
||||
{
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
pios_isr_vector_table_base = .;
|
||||
KEEP(*(.isr_vector)) /* Interrupt vectors */
|
||||
} > FLASH
|
||||
.text :
|
||||
{
|
||||
PROVIDE (pios_isr_vector_table_base = .);
|
||||
KEEP(*(.isr_vector .isr_vector.*))
|
||||
. = ALIGN(4);
|
||||
*(.text .text.* .gnu.linkonce.t.*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||
@ -44,8 +49,8 @@ SECTIONS
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
.ram_vector_table(NOLOAD): {*(.ram_vector_table)} >VTRAM
|
||||
_sidata = .;
|
||||
.ram_vector_table(NOLOAD): {*(.ram_vector_table)} >VTRAM
|
||||
|
||||
/*
|
||||
* This stack is used both as the initial sp during early init as well as ultimately
|
||||
@ -101,7 +106,7 @@ SECTIONS
|
||||
|
||||
_eram = ORIGIN(SRAM) + LENGTH(SRAM) ;
|
||||
_ebss = _eram ;
|
||||
|
||||
_estack = _init_stack_top;
|
||||
/* keep the heap section at the end of the SRAM
|
||||
* this will allow to claim the remaining bytes not used
|
||||
* at run time! (done by the reset vector).
|
||||
|
@ -51,11 +51,10 @@ int32_t PIOS_DELAY_Init(void)
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
|
||||
|
||||
const TIM_TimeBaseInitTypeDef timerInit = {
|
||||
.TIM_Prescaler = 8,
|
||||
.TIM_Prescaler = (48000000 / 1000000),
|
||||
.TIM_ClockDivision = TIM_CKD_DIV1,
|
||||
.TIM_CounterMode = TIM_CounterMode_Up,
|
||||
// period (1.25 uS per period
|
||||
.TIM_Period = 0,
|
||||
.TIM_Period = 0xFFFFFFFF,
|
||||
.TIM_RepetitionCounter = 0x0000,
|
||||
};
|
||||
// Stop timer
|
||||
|
@ -145,9 +145,7 @@ void PIOS_SYS_Init(void)
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
|
||||
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOE, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOF, &GPIO_InitStructure);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user