# These options are only for real kernel hackers who want to get their hands dirty. config DEBUG_LL bool"Kernel low-level debugging functions (read help!)" depends on DEBUG_KERNEL help Say Y here to include definitions of printascii, printch, printhex in the kernel. This is helpful if you are debugging code that executes before the console is initialized.
Note that selecting this option will limit the kernel to a single UART definition, as specified below. Attempting to boot the kernel image on a different platform *will not work*, so this option should not be enabled for kernels that are intended to be portable.
1 2 3 4 5 6 7 8 9 10 11 12 13
# 这些选项仅适用于想要亲自动手的真正内核黑客。 config DEBUG_LL bool"Kernel low-level debugging functions (read help!)" depends on DEBUG_KERNEL help 在此处说 Y 以包括 printascii、 printch、 printhex 的定义 在内核中。 如果您正在调试 在控制台初始化之前执行。
config STM32H7_DEBUG_UART bool"Use STM32H7 UART for low-level debug" depends on MACH_STM32H743 select DEBUG_STM32_UART help Say Y here if you want kernel low-level debugging support on STM32H7 based platforms, which default UART is wired on USART1, but another UART instance can be selected by modifying CONFIG_DEBUG_UART_PHYS.
If unsure, say N.
CONFIG_DEBUG_UART_PHYS和CONFIG_DEBUG_UART_VIRT
这两个在stm32中是一样的东西.实际上填写串口的寄存器地址既可.
具体的debug.s和stm32.s就不进行分析了.感兴趣自行观看源码既可.
这里说一下找到所需要的串口寄存器的方法
看芯片手册找到对应串口的寄存器地址既可.
或者可以反汇编dtb文件,找到所需要的串口的地址既可
最终效果
1 2 3 4 5
# Start of compressed kernel # End of compressed kernel # Start of kernel copy # End of kernel copy C:0xC0080060-0xC02151C0->0xC02E3000-0xC0478160