SerialUSB test port problem

Đang mở
#52 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
arduino, cpp
Lĩnh vực
embedded-iot, testing-qa

Hướng nghiên cứu

Bắt đầu với unity_config.h và unity_config.cpp được cung cấp, sau đó kiểm tra cách SerialUSB được khởi tạo và so sánh với đường dẫn Serial1 đang hoạt động. Issue được giải quyết khi log và kết quả kiểm thử Unity hiển thị qua kết nối nối tiếp USB của RP2040.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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


Ngôn ngữ chính
Python
Star
96
Fork
142
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của platformio/platform-raspberrypi

Tất cả issue của platformio/platform-raspberrypi

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.