Hello,
after facing problem with ULINK2 with using Memory layout from Target Register of uVision, I have switched to Scatterfile with followed content:
; ************************************************************* ; *** Scatter-Loading Description File generated by uVision *** ; ************************************************************* LR_IROM1 0x08000000 0x00100000 { ; load region size_region ER_IROM1 0x08000000 0x00100000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) .ANY (+XO) } RW_SDRAM1 0xC0000000 0x00100000 { ; RW data stored in SDRAM (1M) .ANY (+RW +ZI) } RW_IRAM1 0x20000000 0x00040000 { .ANY (+RW +ZI) } RW_IRAM2 0x20040000 UNINIT 0x00010000 { EventRecorder.o (+ZI) } }
But now I can not start my Debugger, because I'm redirect to HardFault_Handler. If I stop the debugger and show Callee Code, it points to MemManage_Handler.
I'm trying to access in Compiler v5 (C99 mode) external SDRAM from CubeMX and self defined Viriable as followed:
__attribute__ ((at(0xC0050000))) uint32_t framebuffer[2];
Who knows the solution? Maybe the Scatter file is wrong for that situation?
Thanks for the answer, the crash is happening in followed routine (line 9)
Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT SystemInit IMPORT __main LDR R0, =SystemInit BLX R0 LDR R0, =__main BX R0 ENDP
Breakpoint is at the beginning of main is activated and til that breakpoint cames the execution not