进入不了 raw repl
-
- 帖子: 19
- 注册时间: 2023年 6月 3日 10:05
进入不了 raw repl
D:\mine_temp\hardware_wallet\micropython\micropython\tools>pyboard.py --device COM8 -c 'print(1+1)'
b'\r\n\x01: command not found.\r\nmsh >\x03\x03\r\n\x03\x03: command not found.\r\nmsh >\x01'
could not enter raw repl
使用pyboard.py输出打印的时候返回进入不了 raw repl。
b'\r\n\x01: command not found.\r\nmsh >\x03\x03\r\n\x03\x03: command not found.\r\nmsh >\x01'
could not enter raw repl
使用pyboard.py输出打印的时候返回进入不了 raw repl。
- shaoziyang
- 帖子: 3972
- 注册时间: 2019年 10月 21日 13:48
Re: 进入不了 raw repl
估计是你的python没有配置好,需要将python的目录添加到系统路径中(注意安装python时有个选项,可以选择添加python目录到系统路径),这样才能在任意位置执行。
- shaoziyang
- 帖子: 3972
- 注册时间: 2019年 10月 21日 13:48
Re: 进入不了 raw repl
另外也可以使用 mobaxterm,它在windows下模拟Linux的shell,很多时候用起来会更加方便省事,减少配置工作。
- shaoziyang
- 帖子: 3972
- 注册时间: 2019年 10月 21日 13:48
Re: 进入不了 raw repl
此外 pyboard 通常是在测试时使用,不适合调试程序,调试通常都是通过终端软件在REPL下进行,或者用 thonny、vscode等软件。
-
- 帖子: 19
- 注册时间: 2023年 6月 3日 10:05
Re: 进入不了 raw repl
@shaoziyang,我大概知道什么原因导致的。我现在是在RTTHREAD上移植的micropython,默认的进入了shell,而在shell进入python的状态需要在shell输入python才起效。
could not enter raw repl。
现在我shell对应的串口跟pyboard.py的串口是同一个串口,是不是不能设置为同一个串口了 ?
如果在cmd中运行pyboard.py的话,由于一直没进入python的状态,所以一直返回的b'\r\nmsh >\x03\x03\r\n\x03\x03: command not found.\r\nmsh >\x01'could not enter raw repl。
现在我shell对应的串口跟pyboard.py的串口是同一个串口,是不是不能设置为同一个串口了 ?
- shaoziyang
- 帖子: 3972
- 注册时间: 2019年 10月 21日 13:48
Re: 进入不了 raw repl
估计要先进入RT的repl后,退出终端软件才能运行pyboard。RT好像很久没有更新micropython了。
-
- 随机主题
- 回复总数
- 阅读次数
- 最新文章