Skip to content

Add Raspberry Pi Pico #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2022
Merged

Add Raspberry Pi Pico #13

merged 1 commit into from
May 7, 2022

Conversation

tnishinaga
Copy link
Contributor

@tnishinaga tnishinaga commented May 4, 2022

やりたいこと

  • rust-dapの対応ボードにRaspberry Pi Picoを追加したい

やったこと

  • boards/rpi_pico を追加(中身はxiao_rp2040と同じ)

動作確認方法

  1. Raspberry Pi Picoを2台用意する

  2. 片方(デバッガ用)ともう片方(デバッグ対象)のpinを以下のようにつなぎ、USBを接続する

    • GPIO2 -> SWDCLK
    • GPIO4 -> SWDIO
    • GND -> GND
  3. 片方(デバッガ用)に boards/rpi_pico のバイナリを書き込む

    • cd boards/rpi_pico && cargo run
  4. openocdを動かし、DPが見つかるのを確認する

    openocd -f interface/cmsis-dap.cfg \
    -c 'transport select swd' \
    -c 'adapter speed 1000' \
    -c 'swd newdap rp2040.core0 cpu -dp-id 0x01002927 -instance-id 0' \
    -c 'dap create rp2040_0.dap -chain-position rp2040.core0.cpu'
    
    Info : Using CMSIS-DAPv2 interface with VID:PID=0x6666:0x4444, serial=test
    Info : CMSIS-DAP: SWD supported
    Info : CMSIS-DAP: FW Version = 2.00
    Info : CMSIS-DAP: Serial# = Piyo
    Info : CMSIS-DAP: Interface Initialised (SWD)
    Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
    Info : CMSIS-DAP: Interface ready
    Info : clock speed 1000 kHz
    Info : SWD DPIDR 0x10212927
    

@tnishinaga
Copy link
Contributor Author

#14 の回答が来るまでdraftのままにします

@tnishinaga tnishinaga marked this pull request as ready for review May 6, 2022 06:09
@tnishinaga
Copy link
Contributor Author

#14 (comment) の回答を頂いたので、PR openしました。

@ciniml
Copy link
Owner

ciniml commented May 7, 2022

ビルドして、書いてある手順でDPIDR読み出しまで行けるの確認しました。マージします。

@ciniml ciniml merged commit 76331ed into ciniml:main May 7, 2022
@tnishinaga tnishinaga deleted the add_rpi_pico branch July 12, 2022 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants