Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STM32F30x + AC6, stack inicijalizacija
#1
Zdravo svima,

Pokusavam da podesim linker skript tj konkretno sekciju za inicijalizaciju steka ali izgleda da ne znam kako. Ovo su trenutne i zeljene vrednosti:

Quote:/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = 0x2000A000;    /* end of RAM */ <- Ovo zelim da promenim u 0x2001A000

/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200;      /* required amount of heap  */
_Min_Stack_Size = 0x400; /* required amount of stack */

/* Specify the memory areas */
MEMORY
{
FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 256K
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 40K <- Ovo zelim da promenim u 0x20010000
CCMRAM (rw)      : ORIGIN = 0x10000000, LENGTH = 8K
}

/* Define output sections */
SECTIONS
{
  /* The startup code goes first into FLASH */
  .isr_vector :
  {
    . = ALIGN(4);
    KEEP(*(.isr_vector)) /* Startup code */
    . = ALIGN(4);
  } >FLASH

  /* The program code and other data goes into FLASH */
  .text :
  {
    . = ALIGN(4);
    *(.text)           /* .text sections (code) */
    *(.text*)          /* .text* sections (code) */
    *(.glue_7)         /* glue arm to thumb code */
    *(.glue_7t)        /* glue thumb to arm code */
    *(.eh_frame)

    KEEP (*(.init))
    KEEP (*(.fini))

    . = ALIGN(4);
    _etext = .;        /* define a global symbols at end of code */
  } >FLASH

Pretpostavio sam da Reset_Handler nije dobar i probao sam svasta sa njim (ldr r0/r1/sp, =_estack) ali bezuspesno. 

Quote:Reset_Handler:

/* Copy the data segment initializers from flash to SRAM */
  movs r1, #0
  b LoopCopyDataInit

Kao sto stoji u naslovu koristim AC6 System Workbench i STM32F303VCTx sa StdPeriph FW v1.1.0.
Da li imate neki savet kako ovo da resim?

Hvala,
Ivan
“If you think you are too small to make a difference, try sleeping with a mosquito.” - Dalai Lama XIV
Reply


Messages In This Thread
STM32F30x + AC6, stack inicijalizacija - by 1van - 05-23-2018, 08:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)