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

オープン
#1,374 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
18/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C
スター
4.6k
フォーク
1.6k
平均マージ
2日 22時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FreeRTOS/FreeRTOS-Kernel のほかの issue

FreeRTOS/FreeRTOS-Kernel の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。