Giter Site home page Giter Site logo

pico_projectbase's Introduction

使用方法

プロジェクトの取り込み

ビルドのみ実行

Ctrl + Shift + B でビルド実行

デバイスへの書き込み&デバッグ

  1. 書き込みデバイスの接続

    usbipd.exe wsl list 2>/dev/null | awk '{if($0 ~ /Picoprobe/){print $0}}'

    上のコマンドを実行すると行の先頭に 1-1 のような番号が振られる

    これが bus id となるので、<bus_id> と置き換える

    usbipd.exe wsl attach -b <bus_id>
  2. 左のサイドバーにあるデバッグボタンをクリック

開発環境準備

WSL セットアップ

ubuntu 22.04 を使用

sudo apt update
sudo apt upgrade

VScode セットアップ

C develop

  • ms-vscode.cpptools-extension-pack

wsl

  • ms-vscode-remote.vscode-remote-extensionpack

cmake

  • twxs.cmake
  • ms-vscode.cmake-tools

debug

  • marus25.cortex-debug
    • mcu-debug.memory-view
    • mcu-debug.peripheral-viewer
    • mcu-debug.rtos-views

git

  • mhutchie.git-graph
  • donjayamanne.githistory
  • eamodio.gitlens
  • waderyan.gitblame

build 環境

build 用 toolchain の install

$ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential

gdb 環境

gdb の install

$ sudo apt install gdb-multiarch

OpenOCD 環境

  1. OpenOCD の依存 package install

    $ sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config
  2. Raspberry pi pico 向け OpenOCD の download

    $ git clone https://github.com/raspberrypi/openocd.git --branch rp2040 --recursive --depth=1
  3. OpenOCD を picoprobe 向けに設定して build, install

    $ cd openocd
    
    #config
    $ ./bootstrap
    $ ./configure --enable-picoprobe
    
    #build
    $ make -j4
    
    # install
    $ sudo make install
  4. openocd/contrib/ 内の 60-openocd.rules/etc/udev/rules.d/ にコピー

    #copy rules file to /etc/udev/rules.d/
    $ sudo cp 60-openocd.rules /etc/udev/rules.d/
    
    #reload
    $ sudo udevadm control --reload

USBIP 設定

  • windows 10 側設定

https://github.com/dorssel/usbipd-win/releases

  • WSL 側設定
sudo apt install linux-tools-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20
  • 初回のみ管理者権限で手動接続(powershell)
usbipd wsl list
//picoprobe の busid 確認
usbipd wsl attach --busid <busid>
  • 接続を確認(wsl)
lsusb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.