This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stm32h753 heap in external sram causing hard faulter handler

Hello,

I am using stm32h753 micro and i'd like to save heap in my external ram (0xC0000000).

When I debug my project an hard faulter handler occurs invocating the __main function after systeminit().

I write here my startup.s and my .sct file

//--------------

Stack_Size EQU 0x400

AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp

; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>

Heap_Size EQU 0x00040000

AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit

//---------------------------------------

LR_IROM1 0x8000000 0x00200000
{ ; load region size_region
ER_IROM1 0x8000000
{ ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}

RW_IRAM1 0x24000000 0x00080000 ; 512KB
{
startup.o (STACK)
.ANY (+RW +ZI)
}

RW_IRAM2 0x30000000 0x00040000 ; 288KB
{
;startup.o (HEAP)
}
RW_IRAM3 0x38000000 0x0010000 ; 64KB
{

}

}

LR_ERAM 0xC0000000 0x2000000
{
ER_ERAM1 0xC0000000 0x00040000
{
startup.o (HEAP)
}

ER_ERAM2 0xC1F00000 0x00100000
{

}
}

any idea?

thanks in advance

Parents Reply Children