cancel
Showing results for 
Search instead for 
Did you mean: 

can't debug. Break at address "0x808a7c4" with no debug information available, or outside of program code.

idrissmc
Associate II

Hello,

when I'm trying to flash my program into the STM32 board, I get a message telling that no debug info.. and break at address "0x808a7c4"

this is the assembly code at that address: ldr   r0, [pc, #4]  ; (0x808a7cc)

can someone help me to solve this?

thanks

13 REPLIES 13

Very hard to diagnose with this level of detail

What's in the registers?

What's in the surrounding memory, dump it?

What does the .MAP file suggest is in this vicinity?

Is it within the code/data space of your application?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
idrissmc
Associate II
/* Entry Point */
ENTRY(Reset_Handler)
 
/* Highest address of the user mode stack */
 _estack = 0x2004FFFF;    /* end of AXIRAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200 ; /* required amount of heap  */
_Min_Stack_Size = 0x800 ; /* required amount of stack */
 
/* Specify the memory areas */
MEMORY
{
  ITCMRAM (xrw)   : ORIGIN = 0x20000000, LENGTH = 320K
  FLASH_BK1 (rxw)  : ORIGIN = 0x80000000, LENGTH = 1024K
  SDRAM (xrw)     : ORIGIN = 0xC0000000, LENGTH = 8M 
  QUADSPI (rw)    : ORIGIN = 0x90000000,  LENGTH = 16M
}
 
/* Define output sections */
SECTIONS
{
  /* The startup code for CM7 goes first into FLASH_BK1 */
  .isr_vector :
  {
    . = ALIGN(4);
    KEEP(*(.isr_vector)) /* Startup code */
    . = ALIGN(4);
  } >FLASH_BK1
 
   /* The startup code for CM4 goes into FLASH_BK2 */
  .isr_vector_m4 :
  {
    . = ALIGN(4);
    KEEP(*(.isr_vector_m4))
    . = ALIGN(4);
  } >FLASH_BK1
 
  /* Remaining .rodata goes into FLASH_BK2 */
  .rodata2 :
  {
    . = ALIGN(4);
    */fp_vision_display.o(.rodata)
    */fp_vision_display.o(.rodata*)
  } >FLASH_BK1
 
  /* 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_BK1
 
  /* Constant data goes into FLASH_BK1 */
  .rodata :
  {
    . = ALIGN(4);
    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
    . = ALIGN(4);
  } >FLASH_BK1
 
  .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH_BK1
  .ARM : {
    __exidx_start = .;
    *(.ARM.exidx*)
    __exidx_end = .;
  } >FLASH_BK1
 
  .preinit_array     :
  {
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array*))
    PROVIDE_HIDDEN (__preinit_array_end = .);
  } >FLASH_BK1
  .init_array :
  {
    PROVIDE_HIDDEN (__init_array_start = .);
    KEEP (*(SORT(.init_array.*)))
    KEEP (*(.init_array*))
    PROVIDE_HIDDEN (__init_array_end = .);
  } >FLASH_BK1
  .fini_array :
  {
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(SORT(.fini_array.*)))
    KEEP (*(.fini_array*))
    PROVIDE_HIDDEN (__fini_array_end = .);
  } >FLASH_BK1
 
  /* used by the startup to initialize data */
  _sidata = LOADADDR(.data);
 
  /* Initialized data sections goes into RAM, load LMA copy after code */
  .data : 
  {
    . = ALIGN(4);
    _sdata = .;        /* create a global symbol at data start */
    *(.data)           /* .data sections */
    *(.data*)          /* .data* sections */
 
    . = ALIGN(4);
    _edata = .;        /* define a global symbol at data end */
  } >ITCMRAM AT> FLASH_BK1
 
  
  /* Uninitialized data section */
  . = ALIGN(4);
  .bss :
  {
    /* This is used by the startup in order to initialize the .bss secion */
    _sbss = .;         /* define a global symbol at bss start */
    __bss_start__ = _sbss;
    *(.bss)
    *(.bss*)
    *(COMMON)
 
    . = ALIGN(4);
    _ebss = .;         /* define a global symbol at bss end */
    __bss_end__ = _ebss;
  } >FLASH_BK1
 
  /* User_heap_stack section, used to check that there is enough RAM left */
  ._user_heap_stack :
  {
    . = ALIGN(8);
    PROVIDE ( end = . );
    PROVIDE ( _end = . );
    . = . + _Min_Heap_Size;
    . = . + _Min_Stack_Size;
    . = ALIGN(8);
  } >ITCMRAM
 
  .axiram_section (NOLOAD):
  {
    . = ALIGN(32);
    *(.Vision_App_SingleOverlay)
    *(.Vision_App_SingleOverlay.*)
    . = ALIGN(4);
  } >ITCMRAM
 
  .sram_section (NOLOAD):
  {
    . = ALIGN(32);
    *(.uart_tx_buffer)
    *(.uart_tx_buffer.*)
    . = ALIGN(32);
    *(.uart_rx_buffer)
    *(.uart_rx_buffer.*)
    . = ALIGN(4);
  } >ITCMRAM
 
  .sdram_section (NOLOAD):
  {
    . = ALIGN(32);
    *(.Validation_image_buffer)
    *(.Validation_image_buffer*)
    . = ALIGN(32);
    *(.Lcd_Display)
    *(.Lcd_Display*)
    . = ALIGN(32);
    *(.Dump_output_buffer)
    *(.Dump_output_buffer*)
    . = ALIGN(32);
    *(.Validation_output_buffer)
    *(.Validation_output_buffer*)
    . = ALIGN(32);
    *(.dump_intermediate_data_ping_buffer)
    *(.dump_intermediate_data_ping_buffer*)
    . = ALIGN(32);
    *(.dump_intermediate_data_pong_buffer)
    *(.dump_intermediate_data_pong_buffer*)
    . = ALIGN(32);
    *(.execution_timings_buffer)
    *(.execution_timings_buffer*)
    . = ALIGN(4);
  } > SDRAM        /* here I put QUADSPI */
 
  /* Remove information from the standard libraries */
  /DISCARD/ :
  {
    libc.a ( * )
    libm.a ( * )
    libgcc.a ( * )
  }
 
  .ARM.attributes 0 : { *(.ARM.attributes) }
 
}

the above is the linker (I'm working on the STM32F746G), I'm sure the error is in that file because when I change some lines it started debugging but takes a long time then shows me an error, I put the contain of SDRAM in QSPI because the console shows me: "SDRAM region is overflowed by 4254112 bytes, and when I put QUADSPI it's ok but doesn't debug

The .MAP will tell you where things are placed by the linker, the .LD tell it where things can be put.

Need to look at the .MAP

You want to find the address it is complaining about, perhaps in a library function.

To understand what the processor is doing, you're going to have inspect the code it is actually executing, likely from the point it enters the Reset_Handler to the point it fails.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

There’s nothing about SDRAM in the .MAP file!

I want to change the .sdram_section with something else, but I don’t know in what can fit this section

TDK
Guru

> _estack = 0x2004FFFF

This should almost certainly be 0x20050000.

> There’s nothing about SDRAM in the .MAP file!

Why does it matter? The address 0x808a7cc is in FLASH. That's where you should be looking.

If you feel a post has answered your question, please click "Accept as Solution".

The @ of the SDRAM is 0xC0000000, the sdram_section isn’t in the flash? And if it would be in the flash I’ll get an error (overflow: doesn’t fit into it that’s why I added the QSPI, because at the beginning I started without the QSPI, at the end I got the overflowing error on the SDRAM and the RAM so I added the QSPI

Perhaps restate your question in a clearer manner. The original posts mentions the address 0x808a7c4, now you're asking about SDRAM. I am not following what you're asking anymore.

You're also placing data in ITCM, which is asking for trouble. You should be placing data in DTCM or SRAM (or an external RAM). Maybe that's what you're trying to do, it's hard to tell.

If you feel a post has answered your question, please click "Accept as Solution".

Oh, now I see that your "ITCMRAM" is actually DTCM + SRAM but is simply misnamed (why?).

If you feel a post has answered your question, please click "Accept as Solution".