After relocation with "add-symbol-file" command to relocate the symbol with the code offset = gd->relocaddr:.Before relocation with "symbol-file" command:.If you connect GDB on running target, you can load the debug symbols: With U-Boot relocation, symbols are more difficult to load, see doc/README.arm-relocation for details. start execution with the "continue" command.load the symbols of the binary to be debugged with commands available in next chapter:.reset with attach the target with the gdb "monitor reset halt" command:Įxecution is stopped in ROM code or at the beginning of FSBL execution.get the elf files for U-Boot = u-boot available in the build directory.Or for manual GDB connection, you need to: With OpenSTLinux, you can directly use GDB script Setup.gdb: This function needs to be adapted for your board. adapt the function board_debug_uart_init(): that configures the required resources (pad, clock) before initialization by the U-Boot driver.add in defconfig of U-Boot configuration.If U-Boot fails before the console configuration (in the first stage of U-Boot execution), trace is not available. To turn on this debug logging just in one file, you can define LOG_DEBUG and DEBUG for this file When the traces are present in U-Boot, you can change the default trace level with CONFIG_LOG_DEFAULT_LEVEL or you can use the log command (CONFIG_CMD_LOG) to dynamically configure and filter the output:ġ.1 Activate debug trace on one file set CONFIG_LOG_MAX_LEVEL to LOGL_DEBUG by adding in your defconfig file the line: To enable all the debug traces in U-Boot you need to increase the max logging level with a major impact on U-Boot size e.g. No debug information in log messages by default. CONFIG_LOGF_FILE, CONFIG_LOGF_LINE, CONFIG_LOGF_FUNC are not activated.The 'debug' macros used by U-Boot (log_debug(), debug(), pr_debug().) are removed in the U-Boot binary. CONFIG_LOG_DEFAULT_LEVEL = CONFIG_LOG_MAX_LEVEL = LOGL_INFO = 6. The ST boards use the default logging configuration: See page How to configure U-Boot for your board for configuration details. See U-Boot Documentation or doc/develop/logging.rst for U-Boot logging details.īy default, traces are available on the U-Boot console which use stdout-path defined in the chosen node of the Linux kernel device tree as described in the Linux kernel binding.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |