SerialUSB test port problem
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- arduino, cpp
调研方向
先从提供的 unity_config.h 和 unity_config.cpp 入手,然后检查 SerialUSB 的初始化方式,并将其与正常工作的 Serial1 路径进行比较。当 Unity 测试日志和结果能够通过 RP2040 USB 串行连接显示时,该 Issue 即得到解决。
由索引模型根据 Issue 内容生成。
描述
Hi,
I am developing a project with the rp2040 with arduino framework, and I have a problem with unity config and the USB serial logs for Unity tests. I cannot see the logs/results from my tests with USB, but I can monitor the SerialUSB logs in my main function.
Any advice?
I had the same problem in another project, but is working with a pio serial tx that I created, and here, it's working if I use Serial1 (gpio 0-1).
unity_config.h
#ifndef NATIVE
#ifndef UNITY_CONFIG_H
#define UNITY_CONFIG_H
#ifndef NULL
#ifndef __cplusplus
#define NULL (void *)0
#else
#define NULL 0
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
void unityOutputStart();
void unityOutputChar(char);
void unityOutputFlush();
void unityOutputComplete();
#define UNITY_OUTPUT_START() unityOutputStart()
#define UNITY_OUTPUT_CHAR(a) unityOutputChar(a)
#define UNITY_OUTPUT_FLUSH() unityOutputFlush()
#define UNITY_OUTPUT_COMPLETE() unityOutputComplete()
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif /* UNITY_CONFIG_H */
#endif
unity_config.cpp
#ifndef NATIVE
#include "unity_config.h"
#include <Arduino.h>
void unityOutputStart() { SerialUSB.begin(115200); }
void unityOutputChar(char c) { SerialUSB.write(c); }
void unityOutputFlush() { SerialUSB.flush(); }
void unityOutputComplete() {}
#endif
- 主要语言
- Python
- 星标
- 96
- 派生
- 142
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
platformio/platform-raspberrypi 的其他 Issue
-
Pico 2 and 2w未关闭board request
难度 3/5 1-2 天 新手友好度 55/100
-
board request
难度 4/5 3-5 天 新手友好度 45/100
-
board request
难度 4/5 3-5 天 新手友好度 35/100
-
feature
难度 4/5 3-5 天 新手友好度 30/100
platformio/platform-raspberrypi#86 · 1 个 reaction ·
-
board request
难度 5/5 一周以上 新手友好度 25/100
platformio/platform-raspberrypi#87 · 2 个 reaction ·
查看 platformio/platform-raspberrypi 的全部 Issue
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭available documentation good first issue
难度 1/5 1-3 小时 新手友好度 95/100
Nixitov/Riptide-Native#944 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
JTHCode/secretguard#24 ·
维护者通常 1 天内回复
-
area: middleware documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 ·
维护者通常 1 天内回复