S5P4418 uboot阶段去掉调试串口

ThanksView 2023-01-05 15:58:45
实验板子:友善Smart4418
uboot版本:2021.09
cpu:S5PV4418


具体修改如下
文件目录  drivers/serial/serial.c
 void serial_putc(const char c)
 {
+#ifndef CONFIG_NO_INFO_CONSOLE
    get_current()->putc(c);

  +#endif

}

 
 void serial_puts (const char *s)
 {
+#ifndef CONFIG_NO_INFO_CONSOLE
    get_current()->putc(s);
+#endif
  }

 int serial_getc(void)
 {

+#ifdef CONFIG_NO_INFO_CONSOLE

       return 0;

+#endif

        return get_current()->getc();
 }
 
 int serial_tstc(void)
 {

+#ifdef CONFIG_NO_INFO_CONSOLE

       return 0;

+#endif

        return get_current()->tstc();

 }
 
 void serial_setbrg (void)
 {
+#ifndef CONFIG_NO_INFO_CONSOLE
          get_current()-> setbrg();   
+#endif
}

文件目录  /include/configs/ s5p4418_nanopi2.h
+#define CONFIG_NO_INFO_CONSOLE


回帖列表
4111111111111111 2025-03-30 09:38:22
1
4111111111111111 2025-03-30 09:38:22
1
4111111111111111 2025-03-30 09:38:21
1
4111111111111111 2025-03-30 09:38:21
1
4111111111111111 2025-03-30 09:38:15
1
4111111111111111 2025-03-30 09:38:15
1
4111111111111111 2025-03-30 09:38:15
1
4111111111111111 2025-03-30 09:38:15
1
4111111111111111 2025-03-30 09:38:04
1
4111111111111111 2025-03-30 09:38:03
1
上拉显示下一页
1/ 3
粤ICP备18089419号