对于uboot项目,我在防御配置中添加了CONFIG_DEBUG_UART_BASE=0x4000E000(usart2基本地址)
chosen { stdout-path = "serial0:115200n8"; }; aliases { ethernet0 = ðernet0; mmc0 = &sdmmc1; mmc1 = &sdmmc2; serial0 = &usart2; serial1 = &uart4; }; &pinctrl { usart2_pins_d: usart2-2 { pins1 { pinmux = <STM32_PINMUX('D', 5, AF7)>; /* USART2_TX */ bias-disable; drive-push-pull; slew-rate = <3>; }; pins2 { pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */ bias-disable; bias-pull-up; }; }; usart2_idle_pins_d: usart2-idle-2 { pins1 { pinmux = <STM32_PINMUX('D', 5, ANALOG)>; /* USART2_TX */ }; pins2 { pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */ bias-disable; }; }; usart2_sleep_pins_d: usart2-sleep-2 { pins { pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* USART2_TX */ <STM32_PINMUX('D', 6, ANALOG)>; /* USART2_RX */ }; }; }; &usart2 { pinctrl-names = "default", "sleep", "idle"; pinctrl-0 = <&usart2_pins_d>; pinctrl-1 = <&usart2_sleep_pins_d>; pinctrl-2 = <&usart2_idle_pins_d>; status = "okay"; }; in the .dts. 我还在tf-a项目的dts中添加了这部分。
然后我生成了fip文件文件。当闪烁时,我看到usart2上的立程序员日志。
|