Clone the repo
git clone https://pigweed.googlesource.com/pigweed/gonk
Source bootstrap.sh
to download all compilers and tooling into the environment
directory:
. ./bootstrap.sh
This should init all git submodules for you.
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
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 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
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"
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