Codelite with avr-gdb

CodeLite installation/troubleshooting forum
DrCelephicus
CodeLite Curious
Posts: 1
Joined: Tue Oct 24, 2023 2:23 am
Genuine User: Yes
IDE Question: C++
Contact:

Codelite with avr-gdb

Post by DrCelephicus »

Greetings,

I'm trying to use avr-gdb with Codelite. I've setup a Filesystem Workspace and got stuff building from a makefile, and I can run avr-gdb manually in the build dir and it loads and runs fine. But I cannot get codelite to work with the debugger. I can get it to connect and load my program, but it fails with 'Don't know how to run. Try "help target".', an error I've only seen when I forget to use the target command.

I have removed the python bit in .codelite-gdbinit as avr-gdb is old and doesn't understand it.

I enabled debugger logging and the result is below. Any pointers?

Using gdbinit file: /home/tomh/.codelite-gdbinit
Current working dir: /home/tomh/git/pico/ropemaker/fw/Blink
Launching gdb from : /home/tomh/git/pico/ropemaker/fw/Blink/build-nano-atmega328old
Starting debugger : /usr/bin/avr-gdb --command="/home/tomh/.codelite-gdbinit" --tty=/dev/pts/10 --interpreter=mi /home/tomh/git/pico/ropemaker/fw/Blink/build-nano-atmega328old/Blink.elf
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set print object on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set pagingation off
DEBUG>>set debuginfod enabled off
DEBUG>>set print elements 200
DEBUG>>00000144-enable-pretty-printing
DEBUG>>00000145-exec-arguments
DEBUG>>00000146-exec-run
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (GDB) 10.1.90.20210103-git\n"
GNU gdb (GDB) 10.1.90.20210103-git
DEBUG>>~"Copyright (C) 2021 Free Software Foundation, Inc.\n"
Copyright (C) 2021 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.
DEBUG>>~"\nType \"show copying\" and \"show warranty\" for details.\n"
\nType "show copying" and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"--host=x86_64-linux-gnu --target=avr\".\n"
This GDB was configured as "--host=x86_64-linux-gnu --target=avr".
DEBUG>>~"Type \"show configuration\" for configuration details.\n"
Type "show configuration" for configuration details.
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"https://www.gnu.org/software/gdb/bugs/.\n"
https://www.gnu.org/software/gdb/bugs/.
DEBUG>>~"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/."
Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/.
DEBUG>>~"\n\n"
\n
DEBUG>>~"For help, type \"help\".\n"
For help, type "help".
DEBUG>>~"Type \"apropos word\" to search for commands related to \"word\"...\n"
Type "apropos word" to search for commands related to "word"...
DEBUG>>=cmd-param-changed,param="auto-load safe-path",value="/"
=cmd-param-changed,param="auto-load safe-path",value="/"
DEBUG>>~"Reading symbols from /home/tomh/git/pico/ropemaker/fw/Blink/build-nano-atmega328old/Blink
.elf...\n"
Reading symbols from /home/tomh/git/pico/ropemaker/fw/Blink/build-nano-atmega328old/Blink_.elf...

Debuggee process ID: 42000
DEBUG>>=thread-group-started,id="i1",pid="42000"
=thread-group-started,id="i1",pid="42000"
DEBUG>>=thread-created,id="1",group-id="i1"
=thread-created,id="1",group-id="i1"
DEBUG>>~"0x00000000 in __vectors ()\n"
0x00000000 in vectors ()
DEBUG>>*stopped,frame={addr="0x00000000",func="
vectors",args=[],arch="avr:5"},thread-id="1",stopped-threads="all"
DEBUG>>00000147-file-list-exec-source-file
DEBUG>>00000148-break-list
DEBUG>>=cmd-param-changed,param="listsize",value="2147483647"
=cmd-param-changed,param="listsize",value="2147483647"
DEBUG>>+download,{section=".text",section-size="1126",total-size="8636"}
+download,{section=".text",section-size="1126",total-size="8636"}
DEBUG>>+download,{section=".text",section-sent="1126",section-size="1126",total-sent="1126",total-size="8636"}
+download,{section=".text",section-sent="1126",section-size="1126",total-sent="1126",total-size="8636"}
DEBUG>>&"\"/home/tomh/.codelite-gdbinit\": No such file or directory.\n"
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>=cmd-param-changed,param="unwindonsignal",value="on"
=cmd-param-changed,param="unwindonsignal",value="on"
DEBUG>>done,address="0x00000000",load-size="1126",transfer-rate="3416",write-rate="1126"
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>=cmd-param-changed,param="breakpoint pending",value="on"
=cmd-param-changed,param="breakpoint pending",value="on"
DEBUG>>done
DEBUG>>&"set print object on\n"
DEBUG>>=cmd-param-changed,param="print object",value="on"
=cmd-param-changed,param="print object",value="on"
DEBUG>>done
DEBUG>>&"set width 0\n"
DEBUG>>=cmd-param-changed,param="width",value="4294967295"
=cmd-param-changed,param="width",value="4294967295"
DEBUG>>done
DEBUG>>&"set height 0\n"
DEBUG>>=cmd-param-changed,param="height",value="4294967295"
=cmd-param-changed,param="height",value="4294967295"
DEBUG>>done
DEBUG>>&"set pagingation off\n"
DEBUG>>&"No symbol \"pagingation\" in current context.\n"
DEBUG>>error,msg="No symbol \"pagingation\" in current context."
error,msg="No symbol \"pagingation\" in current context."
DEBUG>>&"set debuginfod enabled off\n"
DEBUG>>&"No symbol \"debuginfod\" in current context.\n"
DEBUG>>error,msg="No symbol \"debuginfod\" in current context."
error,msg="No symbol \"debuginfod\" in current context."
DEBUG>>&"set print elements 200\n"
DEBUG>>done
DEBUG>>00000144done
DEBUG>>00000145done
DEBUG>>00000146error,msg="Don't know how to run. Try \"help target\"."
DEBUG>>00000147done,line="1",file="/usr/share/arduino/hardware/arduino/avr/cores/arduino/main.cpp",fullname="/usr/share/arduino/hardware/arduino/avr/cores/arduino/main.cpp",macro-info="0"
DEBUG>>00000148done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
Don't know how to run. Try "help target".