uboot 打开log 的 方法

uboot 版本

commit f919c3a889f0ec7d63a48b5d0ed064386b0980bd (HEAD -> v2024.10, tag: v2024.10)

Author: Tom Rini <trini@konsulko.com>

Date: Mon Oct 7 08:54:35 2024 -0600

Prepare v2024.10

Signed-off-by: Tom Rini <trini@konsulko.com>

开启的选项:

CONFIG_DEBUG_UART=y

git diff include/log.h

diff --git a/include/log.h b/include/log.h

index fc0d598447..908f9c015f 100644

--- a/include/log.h

+++ b/include/log.h

@@ -184,6 +184,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,

#define log_io(_fmt...) log(LOG_CATEGORY, LOGL_DEBUG_IO, ##_fmt)

#define log_cont(_fmt...) log(LOGC_CONT, LOGL_CONT, ##_fmt)

+#define LOG_DEBUG

#ifdef LOG_DEBUG

#define _LOG_DEBUG LOGL_FORCE_DEBUG

#ifndef DEBUG

没有开启log时:

No serial driver found

resetting ...

reset not supported yet

ERROR ### Please RESET the board

开启log打印之后

spl_early_init

size=30, ptr=30, limit=4000: 801dc000

common/malloc_simple.c:26-alloc_simple() size=30, ptr=60, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc030

common/malloc_simple.c:26-alloc_simple() size=98, ptr=f8, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc060

drivers/core/lists.c:216-lists_bind_fdt() bind node chosen

drivers/core/lists.c:221-lists_bind_fdt() Device 'chosen' has no compatible string

common/malloc_simple.c:26-alloc_simple() size=30, ptr=128, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc0f8

No serial driver found

resetting ...

reset not supported yet

ERROR ### Please RESET the board

相关推荐
Knight_AL3 分钟前
如何解决 Jacob 与 Tomcat 类加载问题:深入分析 Tomcat 类加载机制与 JVM 双亲委派机制
java·jvm·tomcat
尘世中一位迷途小书童5 分钟前
从零搭建:pnpm + Turborepo 项目架构实战(含完整代码)
前端·架构
JarvanMo14 分钟前
Flutter 中的 ClipRRect | 每日 Flutter 组件
前端
某柚啊15 分钟前
iOS移动端H5键盘弹出时页面布局异常和滚动解决方案
前端·javascript·css·ios·html5
心.c16 分钟前
如何学习Lodash源码?
前端·javascript·学习
哲学七17 分钟前
Springboot3.5.x版本引入javaCv相关库版本问题以及精简引入包
java·ffmpeg
JamSlade22 分钟前
react 无限画布难点和实现
前端·react.js
im_AMBER28 分钟前
React 02
前端·笔记·学习·react.js·前端框架
浩男孩28 分钟前
🍀我实现了个摸鱼聊天室🚀
前端