Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Drag & Drop Files, Choose Files to Upload 您最多可以上传 2 个文件。
  • 简体中文
    Eng
    简体中文
  • 第 4 课 – 向控制台打印消息和日志记录

    概览

    在新的软件开发环境中,最先学习的内容之一就是如何在控制台上打印像流行的 “Hello World!” 这样的消息。在上一课中,我们简要了解了 printk() 如何在控制台上打印简单的消息。在本课中,我们将学习更多关于日志记录的知识,包括使用 printk() 这种简单方法以及使用高级日志模块的复杂方法。

    在本课的练习部分,我们将首先练习使用用户友好的 printk() 函数向控制台打印字符串字面量和格式化字符串。在练习 2 中,我们将介绍如何启用/配置功能丰富的日志模块,以打印字符串字面量、格式化字符串和 十六进制转储 变量。最后,在练习 3 中,我们将更深入地研究日志模块的功能。

    目标

    • 学习如何使用 打印字符串和格式化字符串到控制台 printk()
    • 认识 的局限性 printk()
    • 学习如何使用日志模块向控制台打印字符串和格式化字符串
    • 学习如何使用日志模块对变量进行十六进制转储
    • 探索日志模块的功能
    • 通过启用/配置软件模块的动手练习进行实践

    Switch language?

    Progress is tracked separately for each language. Switching will continue from your progress in that language or start fresh if you haven't begun.

    Your current progress is saved, and you can switch back anytime.

    Register an account
    Already have an account? Log in
    (All fields are required unless specified optional)

    • 8 or more characters
    • Upper and lower case letters
    • At least one number or special character

    Forgot your password?
    Enter the email associated with your account, and we will send you a link to reset your password.