Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb breakpoints for c-riscv-blink #8

Open
jogi91 opened this issue Jun 24, 2021 · 0 comments
Open

gdb breakpoints for c-riscv-blink #8

jogi91 opened this issue Jun 24, 2021 · 0 comments

Comments

@jogi91
Copy link

jogi91 commented Jun 24, 2021

I managed to build and set up the toolchain for the c-riscv-blink program. I also managed to connect a gdb server over the wishbone tool, which seems to work in principle. I can step through the program, display the value of variables, etc. However, when I try to set a breakpoint, the execution does not stop. Is it something I am doing wrong or does this not work? Where should I start to investigate?

Steps to reproduce:

  • Generate and flash soc with following command from the soc directory:
  • build and program binary from the c-riscv-blink directory:
    • make
    • make prog
  • connect terminal and gdb server from the soc directory:
    • wishbone-tool --uart /dev/ttyUSB1 -s terminal -s gdb --csr-csv build/csr.csv
  • attach debugger from c-riscv-blink directory:
    • riscv64-unknown-elf-gdb riscv-blink.elf -ex 'target remote localhost:3333'

If set a breakpoint or hardware breakpoint (gdb command b or hb respectively) for example on line 29 in main on the uart_rxtx_write call and continue execution, I can still type in the terminal, the characters are echoed back and the LEDs toggle without the breakpoint ever stopping the execution.

Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant