Go to file
Rob Mohr 2cc32ecdfb Move env_setup to pw_env_setup
Bug: 67
Change-Id: I285e917968b2e24e0851753ea4802cef1fbe2d67
2020-02-05 19:07:01 +00:00
docs pw_minimal_cpp_stdlib: Extremely limited C++ lib 2020-01-29 16:05:18 -08:00
env_setup Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
pw_base64 GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_bloat GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_boot_armv7m pw_boot_armv7m: rename INTERRUPT_VECTOR_TABLE 2020-01-17 22:05:39 +00:00
pw_build python_runner: GN Windows path workaround 2020-01-31 16:07:53 -08:00
pw_checksum pw_checksum: CCITT CRC16 functions 2020-01-22 10:12:09 -08:00
pw_cli Disable cargo setup by default 2020-01-30 18:26:18 -08:00
pw_cpu_exception pw_build: Expand facade template 2020-01-17 23:37:29 +00:00
pw_cpu_exception_armv7m GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_docgen Add pw_input_group GN template 2019-12-14 00:11:34 +00:00
pw_doctor Add output and run doctor in env setup 2020-01-28 15:01:03 -08:00
pw_dumb_io pw_build: Expand facade template 2020-01-17 23:37:29 +00:00
pw_dumb_io_baremetal_stm32f429 pw_boot_armv7m: Initial commit 2020-01-16 23:30:48 +00:00
pw_dumb_io_stdio GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_env_setup Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
pw_kvs pw_kvs: Implement initialized, naming cleanup 2020-02-05 10:01:42 -08:00
pw_log Bazel and CMake build updates 2020-01-24 15:10:07 -08:00
pw_log_basic pw_kvs: Implement KVS load from flash 2020-02-03 23:21:15 +00:00
pw_minimal_cpp_stdlib pw_minimal_cpp_stdlib: Add move, remove strncat 2020-02-03 19:27:24 +00:00
pw_module pw_module documentation update 2020-01-23 19:33:11 +00:00
pw_polyfill pw_polyfill: Provide the static_assert macro in C 2020-01-24 23:06:23 +00:00
pw_preprocessor GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_presubmit Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
pw_protobuf GN build: Override built-in targets 2020-01-16 11:41:15 -08:00
pw_protobuf_compiler Various small docs fixes 2020-01-11 01:03:51 +00:00
pw_span Make span and varint C++11 compatible 2020-01-17 15:04:43 -08:00
pw_status pw_kvs: Initial commit of new KVS design 2020-01-31 14:38:37 -08:00
pw_string pw_string: Remove problematic test 2020-01-24 18:16:08 -08:00
pw_target_runner pw_build: Expand facade template 2020-01-17 23:37:29 +00:00
pw_tokenizer pw_tokenizer: Support archive files in elf_reader 2020-01-23 10:46:22 -08:00
pw_toolchain Initial Windows GN build 2020-01-22 13:54:15 -08:00
pw_unit_test pw_unit_test: Support ASSERT/EXPECT in test ctor 2020-02-04 12:10:43 -08:00
pw_varint Make span and varint C++11 compatible 2020-01-17 15:04:43 -08:00
pw_watch pw_watch: Support specifying build targets 2020-01-31 18:21:48 +00:00
targets Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
.clang-format Add preprocessor and unit_test modules 2019-11-04 16:07:34 -08:00
.gitignore Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
.gn Expand Windows environment setup 2020-01-23 20:29:41 +00:00
.pylintrc pw_tokenizer: Python package 2020-01-09 23:18:10 +00:00
AUTHORS
BUILD Remove SUBDIRS from BUILD. (Apparently unused.) 2019-11-19 18:28:54 +00:00
BUILD.gn Temporarily disable pw_kvs on Windows 2020-01-31 20:31:52 +00:00
BUILDCONFIG.gn Build with -g by default 2020-01-28 01:52:44 +00:00
CMakeLists.txt pw_minimal_cpp_stdlib: Extremely limited C++ lib 2020-01-29 16:05:18 -08:00
CODE_OF_CONDUCT.md Update Pigweed README and add CODE OF CONDUCT 2020-01-23 19:18:23 +00:00
CONTRIBUTING.md Fix copyright notices 2019-11-27 22:34:02 +00:00
LICENSE
modules.gni pw_minimal_cpp_stdlib: Extremely limited C++ lib 2020-01-29 16:05:18 -08:00
pw_vars_default.gni pw_unit_test: pw_log unit test event handler 2020-01-17 23:02:29 +00:00
README.md Move env_setup to pw_env_setup 2020-02-05 19:07:01 +00:00
WORKSPACE Add bazel build system files. 2019-11-14 07:16:44 -08:00

Pigweed

Pigweed is a collection of embedded-focused libraries, called “modules”. These modules are designed for small-footprint MMU-less microcontrollers like the ST Micro STM32L452 or the Nordic NRF82832. The modules are designed to facilitate easy integration into existing codebases.

Some Pigweed modules have been used in the development of Googles first-party devices, including the Stadia Controller and Pixel Buds.

Pigweed is in the early stages of development, and should be considered experimental. Were continuing to evolve the platform and add new modules. We value developer feedback along the way.

Pigweed is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

Getting Started

$ git clone sso://pigweed.googlesource.com/pigweed/pigweed ~/pigweed
$ cd ~/pigweed
# Only need to run auth-login once per machine.
$ pw_env_setup/py/pw_env_setup/cipd_setup/wrapper.py auth-login
$ . pw_env_setup/bootstrap.sh

You can use . pw_env_setup/setup.sh in place of . pw_env_setup/bootstrap.sh. Both should work every time, but bootstrap.sh tends to remove and reinstall things at the expense of time whereas setup.sh assumes things have already been installed and only sets environment variables.

If you're using Homebrew and you get an error saying module 'http.client' has no attribute 'HTTPSConnection' then your Homebrew Python was not set up to support SSL. Ensure it's installed with brew install openssl and then run brew uninstall python && brew install python. After that things should work.

The environment setup script will pull down the versions of tools necessary to build Pigweed and add them to your environment. You can then build with GN, CMake, or Bazel. You can also confirm you're getting the right versions of tools—they should be installed under .cipd/.

Build for the host with GN

$ which gn
~/pigweed/.cipd/pigweed.ensure/gn
$ gn gen out/host
$ ninja -C out/host

Build for the host with CMake

$ which cmake
~/pigweed/.cipd/pigweed.ensure/bin/cmake
$ cmake -B out/cmake-host -S . -G Ninja
$ ninja -C out/cmake-host

Build for the host with Bazel

$ which bazel
~/pigweed/.cipd/pigweed.ensure/bazel
$ bazel test //...

Build for the STM32F429 Discovery board

$ gn gen --args='pw_target_config = "//targets/stm32f429i-disc1/target_config.gni"' out/disco
$ ninja -C out/disco
$ pw test --root out/disco/ --runner stm32f429i_disc1_unit_test_runner

The CMake and Bazel builds do not yet support building for hardware.

To flash firmware to an STM32 Discovery development board (and run pw test) from macOS, you need to install OpenOCD. Install Homebrew using the latest instructions at https://brew.sh/, then install OpenOCD with brew install openocd.

If any of this doesn't work please file a bug.