roll: third_party/pigweed 29 commits

f81694520583467 roll: 310, 311
8bb5fb62c3b4ced pw_bluetooth_sapphire: Fix all available lint erro
d20ce7ca399f68e pw_bluetooth_sapphire: Move LinkKey simple constru
0d077d76e35744a pw_bluetooth_sapphire: Add operator!= for LinkKey
b75a73c8dac6843 pw_bluetooth_sapphire: Add extra diagnostics
e54ffe5e5124ad4 pw_bluetooth_sapphire: Improve management of adver
d9547e6a1b97d8e pw_bluetooth_sapphire: Add Bazel rules for socket
a12f93925d8d184 pw_bluetooth_sapphire: Update LowEnergyAdvertiser
f150ac17e8fde07 pw_bluetooth_sapphire: Add more values to LEEventM
b216eb7fb3a472d pw_bluetooth_sapphire: Pass hci::AdvertisingInterv
505638596e1ea63 pw_bluetooth_sapphire: Shorten pw::bluetooth::embo
071670f2a8e7309 pw_bluetooth_sapphire: Pass extended_pdu booleans
351c9a45b2099b6 pw_bluetooth_sapphire: Update AdvertisingHandleMap
443ea9303c2f1d0 pw_bluetooth_sapphire: Update missing header
de05f2bf9d0c5e9 pw_bluetooth_sapphire: Add the credit-based flow c
c0649cb6ff1798a pw_bluetooth_sapphire: Prevent protected member ac
aab0781bccb8d26 pw_bluetooth_sapphire: Add Bazel tests
97bdfeb645a92f7 pw_bluetooth_sapphire: Fix conversions from iterat
2a5f339c40c1236 pw_bluetooth_sapphire: Add bt-host Bazel tests
fb0067fff348563 pw_bluetooth_sapphire: Low energy advertiser gener
d55ec9627e60afd pw_bluetooth_sapphire: Use using aliases for Embos
dea5d4d8115fcd6 pw_bluetooth_sapphire: Add Bazel build files
8e469505d647384 pw_system: Add synchronization to pw::System alloc
a27a7371c69cb58 docs: Update changelog
990ed9bb2f16bec pw_unit_test: Introduce googtest_platform
e15bd2067e7a244 pw_sync: Document that CV should not be used
707473a3602a6ab bazel: Run tests with asan in CQ
115be90c532836b pw_toolchain: Add ubsan support for host builds
833b2d5514dc453 pw_env_setup: Add luci-cv to environment

https://pigweed.googlesource.com/pigweed/pigweed
third_party/pigweed Rolled-Commits: b71abe8012cb8ce..f81694520583467
Roller-URL: https://ci.chromium.org/b/8742358508380841201
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ide803ede991dd402c152e9889c1738afe1c3a805
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/kudzu/+/223052
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
1 file changed
tree: bb42085bc6b71abe29f5961945a4b43ae7eb9529
  1. applications/
  2. build_overrides/
  3. lib/
  4. pcb/
  5. targets/
  6. third_party/
  7. tools/
  8. .bazelignore
  9. .bazelrc
  10. .bazelversion
  11. .gitignore
  12. .gitmodules
  13. .gn
  14. activate.bat
  15. banner.txt
  16. bootstrap.bat
  17. bootstrap.fish
  18. bootstrap.sh
  19. BUILD.gn
  20. BUILDCONFIG.gn
  21. OWNERS
  22. pigweed.json
  23. README.md
  24. WORKSPACE
README.md

Kudzu

Getting Started

Make sure you've set up Pigweed's prerequisites.

If you're on Windows, you can automate the initial setup by downloading the first-time setup script from cmd.exe:

curl https://pigweed.googlesource.com/pigweed/sample_project/+/main/tools/setup_windows_prerequisites.bat?format=TEXT > setup_pigweed_prerequisites.b64 && certutil -decode -f setup_pigweed_prerequisites.b64 setup_pigweed_prerequisites.bat && del setup_pigweed_prerequisites.b64

Then you can run the script with the following command in cmd.exe:

setup_pigweed_prerequisites.bat

Note: You may see a few UAC prompts as the script installs Git, Python, and enables developer mode.

Once that is done, you can clone this project with the following command:

git clone https://pigweed.googlesource.com/pigweed/kudzu

Environment setup

Pigweed uses a local development environment for most of its tools. This means tools are not installed to your machine, and are instead stored in a directory inside your project (Note: git ignores this directory). The tools are temporarily added to the PATH of the current shell session.

To make sure the latest tooling has been fetched and set up, run the bootstrap command for your operating system:

Windows

bootstrap.bat

Linux & Mac

source ./bootstrap.sh

After tooling updates, you might need to run bootstrap again to ensure the latest tools.

After the initial bootstrap, you can use use the activate scripts to configure the current shell for development without doing a full update.

Windows

activate.bat

Linux & Mac

source ./activate.sh

Device tools setup

Install the pico SDK and tool to flash the device.

pw package install pico_sdk
pw package install picotool

These packages will be built and added to the path automatically. There is no need to add these to the gn arguments.

Linux Setup

GLFW Dependency:

Install the GLFW OpenGL library

sudo apt install libglfw3-dev libglfw3

Udev Rules:

Put the following into /usr/lib/udev/rules.d/49-picoprobe.rules

# Pico app mode
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000a", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000a", MODE:="0666", SYMLINK+="rp2040"

# RP2 Boot
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE:="0666", SYMLINK+="rp2040"

# Picoprobe
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0004", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0004", MODE:="0666", SYMLINK+="picoprobe"

This will also symlink /dev/picoprobe and /dev/rp2040 to the respective vendor and product ids.

Apply the above rules with:

sudo udevadm control --reload-rules
sudo udevadm trigger

Compile:

pw build

Run:

Host

Run the host app and connect to it via pw console:

./out/gn/host_device_simulator.speed_optimized/obj/applications/badge/bin/badge & \
  pw console --socket-addr default ; \
  killall badge

Kudzu

export ELF=./out/gn/rp2040.size_optimized/obj/applications/badge/bin/badge.elf

picotool reboot -f -u && \
  sleep 3 && \
  picotool load -x $ELF

Connect with pw console:

pw console --verbose \
  --baudrate 115200 \
  --token-databases ./out/gn/rp2040.size_optimized/obj/applications/badge/bin/badge.elf \
  --device /dev/rp2040

From Python Repl window you can issue RPCs interactively:

>>> device.rpcs.kudzu.rpc.Kudzu.PackageTemp()
(Status.OK, kudzu.rpc.PackageTempResponse(temp=27.60657501220703))