Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Breakpoints/debug inside assembler source files
#1
How to enable debug/breakpoints inside assembler source files (*.S)?
I can set the breakpoint by F9, but if I run the debug session by Ctrl+F5, these breakpoints are removed.
Reply
#2
I can't reproduce this, it works here like it should.

Are you sure that that source file is part of your active target?
Reply
#3
I fixed it.
In my case, I use some sections of flash.

Exsample:

  .syntax unified
  .arch armv7-m
  .thumb
  .thumb_func
//  .section .fixedcode
//---------------------------------
// mcpy
//---------------------------------
  .align  4
  .globl  mcpy
  .type    mcpy, %function

mcpy:
  cmp  R2,#4
  blo  mcpy_last_bytes
  ldr  R3,[R1],#4
  str  R3,[R0],#4
  subs  R2,#4
  b    mcpy
mcpy_last_bytes:
  cbz  R2,mcpy_finish
  ldrb  R3,[R1],#1
  strb  R3,[R0],#1
  subs  R2,#1
  b    mcpy_last_bytes
mcpy_finish:
  bx    lr

If uncomment the line //  .section .fixedcode the debug not work in this source file

linker script:

SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
KEEP(*(.fixedcode))
. = 0x4000;
KEEP(*(.calltable))
. = 0x4100;
*(.text*)
*(.rodata*)
} > ROM
...
Reply
#4
Ah, non debuggable code.
Yes, if GDB gives an error back that it can't set the breakpoint at that particular location, EB will remove it.
You can check this in the debugger log windows.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)