[third_party/pigweed] Roll 19 commits

303f354624ee666 docs: Fix build command typo
b582d48bcdb6928 pw_trace: Use unit test framework
bfa9f248eba0b1d pw_{bytes,varint}: Use unit test framework
bdbad9cc5e918a3 pw_unit_test: Use unit test framework
a425af30b054abc pw_{thread,tls_client}: Use unit test framework
ab2aa2d26954924 pw_snapshot: Use unit test framework
d173a4e9ac16a30 pw_{random,result}: Use unit test framework
a2d8b43a331b194 pw_{perf_test}: Use unit test framework
855dfd6d1eb8d03 pw_{malloc,metric}: Use unit test framework
2430362ed54963d pw_{kvs,libc,log}: Use unit test framework
9586deb24b1f3f2 pw_{hdlc,hex_dump,i2c}: Use unit test framework
c51a9bc8a8a139d SEED-0001: Update number selection guidance
7953c9df29abda9 pw_{digital_io,file}: Use unit test framework
2b7c5107304c148 pw_docgen: Add new docs server
e07df935bae480f pw_{checksum,chrono}: Use unit test framework
c75a06be1f6326d pw_{base64,blob_store}: Use unit test framework
7db269ec0ad29cd pw_{allocator,analog}: Use unit test framework
17e3417a74749bc pw_unit_test: Create facade's header
70b05788999ebb5 pw_web: Add Mocha and Jest global vars to ESLint

https://pigweed.googlesource.com/pigweed/pigweed
third_party/pigweed Rolled-Commits: 65e429cf96e79e1..303f354624ee666
Roller-URL: https://ci.chromium.org/b/8762378867924863073
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Idc30a4017d28d18a25a2cc391314103367e422a5
Reviewed-on: https://pigweed-review.googlesource.com/c/gonk/+/184254
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
1 file changed
tree: 26b4feef6f8b33fbeef832fea2c156e46401ef41
  1. applications/
  2. build_overrides/
  3. scripts/
  4. targets/
  5. third_party/
  6. tools/
  7. .gitignore
  8. .gitmodules
  9. .gn
  10. banner.txt
  11. bootstrap.sh
  12. BUILD.gn
  13. BUILDCONFIG.gn
  14. OWNERS
  15. pigweed.json
  16. README.md
README.md

Gonk

Getting Started

  1. Clone the repo

    git clone https://pigweed.googlesource.com/pigweed/gonk
    
  2. Source bootstrap.sh to download all compilers and tooling into the environment directory:

    . ./bootstrap.sh
    

    This should init all git submodules for you.

  3. From here on the Pigweed environment is activated. You can activate the environment in a new shell without re-running bootstrap by sourcing activate.sh

    . ./activate.sh
    

Compile:

Build for the host and device by running:

pw build

This is mostly a shortcut with nice output for running gn gen out/gn and ninja -C out/gn.

The build commands are defined in: //tools/gonk_tools/build_project.py.

Run:

Host

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

./out/gn/host_device_simulator.speed_optimized/obj/applications/system_example/bin/system_example & \
  pw-system-console --socket-addr default \
    --proto-globs third_party/pigweed/pw_rpc/echo.proto ; \
  killall system_example

On device

Flashing

openocd -s $PW_PIGWEED_CIPD_INSTALL_DIR/share/openocd/scripts \
  -f $GONK_ROOT/targets/stm32f769i_disc0_stm32cube/openocd_stm32f7xx.cfg \
  -c "program out/gn/stm32f769i_disc0_stm32cube.size_optimized/obj/applications/system_example/bin/system_example.elf reset exit"

Updating STM32Cube

Checkout the desired commits in each of these submodules:

third_party/stm32cube_f7/cmsis_core
third_party/stm32cube_f7/cmsis_device
third_party/stm32cube_f7/hal_driver

Then run from Gonk root:

python -m pw_stm32cube_build gen_file_list third_party/stm32cube_f7