[BUG] RP2040/RP2350 with configNUMBER_OF_CORES=1 hang in debug mode

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

Maintainer thường phản hồi trong vòng 3 ngày

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
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c

Hướng nghiên cứu

The report concerns RP2040/RP2350 behaviour when configNUMBER_OF_CORES is 1 under a debugger (pyocd), where TIMER0 is paused by DBGPAUSE and execution hangs in timer_busy_wait_until() during USB init. Start from the configNUMBER_OF_CORES handling in the port and the reporter's main() example, and reproduce with the linked yapicoprobe project. Done means the target behaves the same with and without the debugger, but the reporter is unsure whether the fix belongs in the kernel or the SDK, so confirm that scope with maintainers first.

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

Mô tả

bug

Describe the bug
If one compiles a program for RP2040/RP2350 in single core mode and tries to debug with pyocd, TIMER0 (and perhaps TIMER1 on RP2350) is not running because DBGPAUSE=7 which required both cores to be active.

In my case execution hangs in timer_busy_wait_until() which is called during USB initialization.

Target

  • Development board: Pico2, RP2350
  • Instruction Set Architecture: ARM
  • IDE and version: Eclipse
  • Toolchain and version: PicoSDK 2.2.0

Host

  • Host OS: Linux
  • Version: Debian testing

To Reproduce

Expected behavior
I would expect that the target behaves the same with and without debugger. But as said, TIMER0 is not running in debug mode.

Solution

In single core mode invoke multicore_reset_core1() on startup. My actual fix:

int main(void)
{
#if configNUMBER_OF_CORES != 2
    // this is actually just for debugging the probe firmware running with just one core (good for pyocd)
    // allow to run TIMER0 even in debug pause which would otherwise be inhibited because TIMER0.DBGPAUSE=7
    multicore_reset_core1();
#endif

But I think this fix belongs into FreeRTOS and not every user application.

But honestly I'm not sure if this is an SDK issue.

Ngôn ngữ chính
C
Star
4.6k
Fork
1.6k
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
4

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

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 FreeRTOS/FreeRTOS-Kernel

Tất cả issue của FreeRTOS/FreeRTOS-Kernel

Issue tương tự

Thêm issue về C

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.