uboot 打开log 的 方法

uboot 版本

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

Author: Tom Rini <[email protected]>

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

Prepare v2024.10

Signed-off-by: Tom Rini <[email protected]>

开启的选项:

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

相关推荐
黄雪超15 分钟前
JVM——打开JVM后门的钥匙:反射机制
java·开发语言·jvm
有梦想的攻城狮23 分钟前
spring中的@RabbitListener注解详解
java·后端·spring·rabbitlistener
李斯维25 分钟前
循序渐进 Android Binder(二):传递自定义对象和 AIDL 回调
android·java·android studio
androidwork27 分钟前
OkHttp 3.0源码解析:从设计理念到核心实现
android·java·okhttp·kotlin
程序员岳焱28 分钟前
Java 程序员成长记(二):菜鸟入职之 MyBatis XML「陷阱」
java·后端·程序员
我命由我1234530 分钟前
Spring Boot 项目集成 Redis 问题:RedisTemplate 多余空格问题
java·开发语言·spring boot·redis·后端·java-ee·intellij-idea
用户8820932166730 分钟前
Vue组件通信全攻略:从父子传参到全局状态管理,一篇搞定!
前端
面朝大海,春不暖,花不开30 分钟前
Spring Boot消息系统开发指南
java·spring boot·后端
程序员岳焱32 分钟前
Java 程序员成长记(三):菜鸟入职之@Transactional「罢工」
java·后端·编程语言
Canmick33 分钟前
JavaScript 异步函数健身操
前端·javascript