使用串口访问设备[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]使用USB TypeC 连接线连接开发板 USB转串口 的接口,安装串口驱动程序:[color=var(--md-typeset-a-color)]CH341SER.EXE [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]到设备管理器找到需要的串口,这里是 COM8 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]使用串口访问工具 PuTTY 打开串口,这里是 COM8,波特率 115200。 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]打开之后回车即可访问控制台。 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]可以输入 help 命令查看支持的命令。 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] 查看三个核心运行频率[color=rgba(0, 0, 0, 0.87)]连接开发板的时候可以点击 RESET 按钮重置 CPU,查看输出。 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)][color=rgba(0, 0, 0, 0.87)]这里可以看到 M33 核心运行频率 192MHz,DSP 运行频率 400MHz,C906 运行频率 480MHz [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] 系统调试命令help code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">help[color=rgba(0, 0, 0, 0.87)]获取系统支持的终端命令 [color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] backtrace[color=rgba(0, 0, 0, 0.87)]查看指定任务堆栈回溯信息 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">backtrace [taskname | tasknumber][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] top[color=rgba(0, 0, 0, 0.87)]查看系统任务状态 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">top [‑d 2][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] ts[color=rgba(0, 0, 0, 0.87)]展示所有FreeRTOS任务的状态 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">ts[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] list_irq[color=rgba(0, 0, 0, 0.87)]列出所有支持的中断及其状态 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">list_irq[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] free[color=rgba(0, 0, 0, 0.87)]查看系统堆的内存 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">free[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] p[color=rgba(0, 0, 0, 0.87)]读取地址 reg_start_addr 对应长度 len 的内容 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">p [reg_start_addr] [len][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] m[color=rgba(0, 0, 0, 0.87)]向地址 reg_address 写值 reg_value code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">m [reg_address] [reg_value][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] forkarg[color=rgba(0, 0, 0, 0.87)]修改fork命令参数,可设置fork命令创建的任务的优先级及其栈大小 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">forkarg [‑p priority] [‑s size][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] fork[color=rgba(0, 0, 0, 0.87)]不占用控制台任务,在后台运行命令 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">fork command [arg1 ...][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] 文件系统命令df[color=rgba(0, 0, 0, 0.87)]查看文件系统剩余空间 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">df [path][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] ls[color=rgba(0, 0, 0, 0.87)]列出指定文件或者目录信息 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">ls [‑h] [‑l] [‑k] [file1][color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] cat[color=rgba(0, 0, 0, 0.87)]以ACSII码的形式,读取指定的文件 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">cat <file>[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] hexdump[color=rgba(0, 0, 0, 0.87)]查看二进制文件内容 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">hexdump [‑n num] [‑C] file[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] 跨核心控制台[color=rgba(0, 0, 0, 0.87)]由于 R128 同时运行三个独立的 RTOS,有些时候需要操作其他核心的 RTOS,每次都要在SDK切换控制台比较麻烦,所以可以使用跨核心控制台操作其他核心的 RTOS 命令: code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli [arm|dsp|rv] commandname [arg0 ...]例子 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli arm help[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli arm free[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)]注意:PANIC 后控制台将无法操作 code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli arm panic[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli dsp help[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli dsp free[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)] code" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; font-size: inherit; font-family: inherit; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 0px; border-style: initial; border-color: initial; position: absolute; top: 0.5em; right: 0.5em; z-index: 1; width: 1.5em; height: 1.5em; border-radius: 0.1rem; outline: none; outline-offset: 0.1rem; cursor: pointer; transition: color 0.25s ease 0s;">rpccli dsp panic[color=rgba(0, 0, 0, 0.87)] [color=var(--md-typeset-a-color)]
|