buildroot
Table of Contents
Buildroot
Buildroot SDK
It is the host
directory generated in the output
directory of Buildroot.
It contains absolute paths of where it has been generated, so cannot be shared directly.
To replace all absolute paths at once by the ones you are going to install the SDK to, execute:
find . -type f -name "*cmake*" -exec sed -i 's/</orig/absolute/path/to/output/host>/</new/absolute/path/to/output/host>/g' {} +
Remote debug
- enable
gdbserver
in your Buildroot configuration (BR2_PACKAGE_GDB_SERVER
), rebuild your config and flash it to your target (note: you can also just transfer thegdbserver
binary to your target throughssh
) - on your target, launch your executable with
gdbserver
:# gdbserver <your_executable> [its_arguments]
- on your host PC, from your buildroot's config
output
directory, run thegdb
of your toolchain:$ host/bin/<toolchain_prefix>-gdb # (e.g. host/bin/aarch64-linux-gnu-gdb)
- load the debug symbols from your
staging
environment:(gdb) set sysroot staging
- connect
gdb
togdbserver
over the network:(gdb) target remote <target_ip>:3000 (3000 is the default port)
- start the execution of your executable:
(gdb) cont
From gdb
you can execute step-by-step if you want, but the most interesting is probably that you can retrieve the stacktrace after a segfault, using
(gdb) bt
You can also connect to gdbserver from you IDE, if necessary.
buildroot.txt · Last modified: 2022/02/24 11:48 by damien