SDK6根目录下的rule的文件里面改为了am335x_evm_uart1_config,
hardware.h里面的默认串口基地址也改了,
#define CONFIG_SERIAL2 1
#define CONFIG_CONS_INDEX 2
然后make u-boot
uboot生成的config.h里面有相应的改变,,但是串口1始终无输出
hua shaw:
uboot make时会调用mkconfig根据boards.cfg生成config.h,所以首先需要修改boards.cfg,修改板卡类型对应的行,如将uart0修改为uart5:
am335x_evm arm armv7 am335x ti am33xx am335x_evm:SERIAL6,CONS_INDEX=6
生成的对应板卡的config:
/* Automatically generated – do not edit */#define CONFIG_SERIAL6 1#define CONFIG_CONS_INDEX 6#define CONFIG_SYS_ARCH "arm"#define CONFIG_SYS_CPU "armv7"#define CONFIG_SYS_BOARD "am335x"#define CONFIG_SYS_VENDOR "ti"#define CONFIG_SYS_SOC "am33xx"#define CONFIG_BOARDDIR board/ti/am335x#include <config_cmd_defaults.h>#include <config_defaults.h>#include <configs/am335x_evm.h>#include <asm/config.h>#include <config_fallbacks.h>#include <config_uncmd_spl.h>
2.根据实际板卡的pin mux分配,修改mux.c;
3.修改hardware.h中的串口基地址,DEFAULT_UART_BASE:
#define UART5_BASE 0x481AA000
#define DEFAULT_UART_BASE UART5_BASE
4.如果想linux image也是用这个串口ude话。修改configs下的引导变量:
"console=ttyO5,115200n8\0" \