• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

build_overrides/23-Nov-2023-2118

docker/23-Nov-2023-11496

docs/23-Nov-2023-3,0522,332

pw_allocator/23-Nov-2023-2,5651,609

pw_arduino_build/23-Nov-2023-3,8382,707

pw_assert/23-Nov-2023-2,7761,818

pw_assert_basic/23-Nov-2023-600418

pw_assert_log/23-Nov-2023-277184

pw_base64/23-Nov-2023-978695

pw_bloat/23-Nov-2023-1,4371,003

pw_blob_store/23-Nov-2023-2,4881,587

pw_boot_armv7m/23-Nov-2023-790487

pw_build/23-Nov-2023-6,7275,295

pw_bytes/23-Nov-2023-2,4791,758

pw_checksum/23-Nov-2023-797498

pw_chrono/23-Nov-2023-902490

pw_chrono_embos/23-Nov-2023-356204

pw_chrono_freertos/23-Nov-2023-337200

pw_chrono_stl/23-Nov-2023-253150

pw_chrono_threadx/23-Nov-2023-356211

pw_cli/23-Nov-2023-2,3201,556

pw_containers/23-Nov-2023-2,5931,806

pw_cpu_exception/23-Nov-2023-458262

pw_cpu_exception_cortex_m/23-Nov-2023-2,4681,635

pw_docgen/23-Nov-2023-537405

pw_doctor/23-Nov-2023-496360

pw_env_setup/23-Nov-2023-4,5933,250

pw_fuzzer/23-Nov-2023-731512

pw_hdlc/23-Nov-2023-3,6202,466

pw_hex_dump/23-Nov-2023-1,056703

pw_i2c/23-Nov-2023-482244

pw_interrupt/23-Nov-2023-13796

pw_interrupt_cortex_m/23-Nov-2023-206144

pw_kvs/23-Nov-2023-12,0708,196

pw_log/23-Nov-2023-1,327861

pw_log_basic/23-Nov-2023-494307

pw_log_multisink/23-Nov-2023-649434

pw_log_null/23-Nov-2023-321205

pw_log_rpc/23-Nov-2023-370238

pw_log_sink/23-Nov-2023-608371

pw_log_tokenized/23-Nov-2023-741470

pw_malloc/23-Nov-2023-178138

pw_malloc_freelist/23-Nov-2023-304209

pw_metric/23-Nov-2023-2,7011,756

pw_minimal_cpp_stdlib/23-Nov-2023-3,3902,362

pw_module/23-Nov-2023-478307

pw_multisink/23-Nov-2023-566312

pw_package/23-Nov-2023-708467

pw_persistent_ram/23-Nov-2023-1,337872

pw_polyfill/23-Nov-2023-1,282851

pw_preprocessor/23-Nov-2023-1,594925

pw_presubmit/23-Nov-2023-3,5132,439

pw_protobuf/23-Nov-2023-5,3303,551

pw_protobuf_compiler/23-Nov-2023-2,6242,009

pw_random/23-Nov-2023-459308

pw_result/23-Nov-2023-761520

pw_ring_buffer/23-Nov-2023-1,8091,182

pw_router/23-Nov-2023-858546

pw_rpc/23-Nov-2023-14,2629,655

pw_span/23-Nov-2023-2,3321,739

pw_status/23-Nov-2023-1,8011,229

pw_stream/23-Nov-2023-1,266812

pw_string/23-Nov-2023-3,9062,626

pw_sync/23-Nov-2023-3,5322,203

pw_sync_baremetal/23-Nov-2023-216130

pw_sync_embos/23-Nov-2023-1,046584

pw_sync_freertos/23-Nov-2023-1,173690

pw_sync_stl/23-Nov-2023-893493

pw_sync_threadx/23-Nov-2023-1,136653

pw_sys_io/23-Nov-2023-343195

pw_sys_io_arduino/23-Nov-2023-200127

pw_sys_io_baremetal_lm3s6965evb/23-Nov-2023-233145

pw_sys_io_baremetal_stm32f429/23-Nov-2023-380235

pw_sys_io_stdio/23-Nov-2023-183134

pw_target_runner/23-Nov-2023-1,187813

pw_thread/23-Nov-2023-1,486818

pw_thread_embos/23-Nov-2023-463275

pw_thread_freertos/23-Nov-2023-1,412834

pw_thread_stl/23-Nov-2023-622328

pw_thread_threadx/23-Nov-2023-1,362768

pw_tokenizer/23-Nov-2023-18,50813,734

pw_tool/23-Nov-2023-234155

pw_toolchain/23-Nov-2023-2,0121,696

pw_trace/23-Nov-2023-2,9011,827

pw_trace_tokenized/23-Nov-2023-3,8912,678

pw_unit_test/23-Nov-2023-3,4072,312

pw_varint/23-Nov-2023-1,6821,275

pw_watch/23-Nov-2023-1,165807

pw_web_ui/23-Nov-2023-1,032699

targets/23-Nov-2023-3,3422,398

third_party/23-Nov-2023-736664

.bazelignoreD23-Nov-202342 54

.bazelrcD23-Nov-202351 11

.clang-formatD23-Nov-2023202 87

.dockerignoreD23-Nov-2023746 6556

.eslintrc.jsonD23-Nov-20231.1 KiB4947

.gitattributesD23-Nov-202367 43

.gitignoreD23-Nov-2023746 6556

.gnD23-Nov-2023618 1614

.prettierrc.jsD23-Nov-2023652 161

.pylintrcD23-Nov-202315.8 KiB516370

AUTHORSD23-Nov-2023296 86

BUILDD23-Nov-2023698 1715

BUILD.gnD23-Nov-20239.6 KiB314279

BUILDCONFIG.gnD23-Nov-20231.3 KiB2925

CMakeLists.txtD23-Nov-20232.8 KiB7264

CODE_OF_CONDUCT.mdD23-Nov-20234.4 KiB9473

CONTRIBUTING.mdD23-Nov-20238.6 KiB212167

LICENSED23-Nov-202311.1 KiB203169

METADATAD23-Nov-2023483 1513

MODULE_LICENSE_APACHE2D23-Nov-20230

NOTICED23-Nov-20238 21

OWNERSD23-Nov-2023148 98

PW_PLUGINSD23-Nov-2023724 1917

README.mdD23-Nov-20236.8 KiB143108

WORKSPACED23-Nov-20233.2 KiB132103

activate.batD23-Nov-20231.2 KiB3330

activate.shD23-Nov-20233.9 KiB10555

bootstrap.batD23-Nov-20234.5 KiB131111

bootstrap.shD23-Nov-20233.9 KiB10555

modules.gniD23-Nov-20236.2 KiB111109

package.jsonD23-Nov-20231.2 KiB4544

tsconfig.jsonD23-Nov-2023913 3432

yarn.lockD23-Nov-2023183.5 KiB4,3663,746

README.md

1# Pigweed
2
3Pigweed is an open source collection of embedded-targeted libraries--or as we
4like to call them, modules. These modules are building blocks and infrastructure
5that enable faster and more reliable development on small-footprint MMU-less
632-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic
7nRF52832.
8
9Pigweed is in the early stages of development, **and should be considered
10experimental**. We’re continuing to evolve the platform and add new modules. We
11value developer feedback along the way.
12
13# Quick links
14
15 - [Getting started guide](docs/getting_started.md)
16 - [Documentation](https://pigweed.dev)
17 - [Source code](https://cs.opensource.google/pigweed/pigweed)
18 - [Code reviews](https://pigweed-review.googlesource.com/)
19 - [Issue tracker](https://bugs.pigweed.dev/)
20 - [Mailing list](https://groups.google.com/forum/#!forum/pigweed)
21 - [Chat room (Discord)](https://discord.gg/M9NSeTA)
22 - [Open Source blog post](https://opensource.googleblog.com/2020/03/pigweed-collection-of-embedded-libraries.html)
23
24Get the code: `git clone https://pigweed.googlesource.com/pigweed/pigweed` (or
25[fork us on GitHub](https://github.com/google/pigweed)).
26
27# Getting Started
28
29If you'd like to get set up with Pigweed, please visit the
30[getting started guide](docs/getting_started.md).
31
32# What does Pigweed offer?
33
34There are many modules in Pigweed, and this section only showcases a small
35selection that happen to produce visual output. For more information about the
36different Pigweed module offerings, refer to "Module Guides" section in the full
37documentation.
38
39## `pw_watch` - Build, flash, run, & test on save
40
41In the web development space, file system watchers are prevalent. These watchers
42trigger a web server reload on source change, making development much faster. In
43the embedded space, file system watchers are less prevalent; however, they are
44no less useful! The Pigweed watcher module makes it easy to instantly compile,
45flash, and run tests upon save. Combined with the GN-based build which expresses
46the full dependency tree, only the exact tests affected by a file change are run
47on saves.
48
49The demo below shows `pw_watch` building for a STMicroelectronics
50STM32F429I-DISC1 development board, flashing the board with the affected test,
51and verifying the test runs as expected. Once this is set up, you can attach
52multiple devices to run tests in a distributed manner to reduce the time it
53takes to run tests.
54
55![pw watch running on-device tests](docs/images/pw_watch_on_device_demo.gif)
56
57## `pw_presubmit` - Vacuum code lint on every commit
58
59Presubmit checks are essential tools, but they take work to set up, and projects
60don’t always get around to it. The `pw_presubmit` module provides tools for
61setting up high quality presubmit checks for any project. We use this framework
62to run Pigweed’s presubmit on our workstations and in our automated building
63tools.
64
65The `pw_presubmit` module includes `pw format` command, a tool that provides a
66unified interface for automatically formatting code in a variety of languages.
67With `pw format`, you can format C, C++, Python, GN, and Go code according to
68configurations defined by your project. `pw format` leverages existing tools
69like `clang-format`, and it’s simple to add support for new languages.
70
71![pw presubmit demo](pw_presubmit/docs/pw_presubmit_demo.gif)
72
73## `pw_env_setup` - Cross platform embedded compiler setup
74
75A classic problem in the embedded space is reducing the time from git clone to
76having a binary executing on a device. The issue is that an entire suite of
77tools is needed for non-trivial production embedded projects. For example:
78
79 - A C++ compiler for your target device, and also for your host
80 - A build system or three; for example, GN, Ninja, CMake, Bazel
81 - A code formatting program like clang-format
82 - A debugger like OpenOCD to flash and debug your embedded device
83 - A known Python version with known modules installed for scripting
84 - A Go compiler for the Go-based command line tools
85 - ... and so on
86
87In the server space, container solutions like Docker or Podman solve this;
88however, in our experience container solutions are a mixed bag for embedded
89systems development where one frequently needs access to native system resources
90like USB devices, or must operate on Windows.
91
92`pw_env_setup` is our compromise solution for this problem that works on Mac,
93Windows, and Linux. It leverages the Chrome packaging system CIPD to bootstrap a
94Python installation, which in turn inflates a virtual environment. The tooling
95is installed into your workspace, and makes no changes to your system. This
96tooling is designed to be reused by any project.
97
98![pw environment setup demo](docs/images/pw_env_setup_demo.gif)
99
100## `pw_unit_test` - Embedded testing for MCUs
101
102Unit testing is important, and Pigweed offers a portable library that’s broadly
103compatible with [Google Test](https://github.com/google/googletest). Unlike
104Google Test, `pw_unit_test` is built on top of embedded friendly primitives; for
105example, it does not use dynamic memory allocation. Additionally, it is easy to
106port to new target platforms by implementing the
107[test event handler interface](https://pigweed.googlesource.com/pigweed/pigweed/+/refs/heads/master/pw_unit_test/public/pw_unit_test/event_handler.h).
108
109Like other modules in Pigweed, `pw_unit_test` is designed for use in
110established codebases with their own build system, without the rest of Pigweed
111or the Pigweed integrated GN build. However, when combined with Pigweed's
112build, the result is a flexible and powerful setup that enables easily
113developing code on your desktop (with tests), then running the same tests
114on-device.
115
116![pw_status test run natively on host](docs/images/pw_status_test.png)
117
118## And more!
119
120See the "Module Guides" in the documentation for the complete list and
121documentation for each, but is a selection of some others:
122
123 - `pw_cpu_exception_cortex_m`: Robust low level hardware fault handler for ARM
124   Cortex-M; the handler even has unit tests written in assembly to verify
125   nested-hardware-fault handling!
126
127 - `pw_polyfill`: Similar to JavaScript “polyfill” libraries, this module
128   provides selected C++17 standard library components that are compatible with
129   C++11 and C++14.
130
131 - `pw_tokenizer`: Replace string literals from log statements with 32-bit
132   tokens, to reduce flash use, reduce logging bandwidth, and save formatting
133   cycles from log statements at runtime.
134
135 - `pw_kvs`: A key-value-store implementation for flash-backed persistent
136   storage with integrated wear levelling. This is a lightweight alternative to
137   a file system for embedded devices.
138
139 - `pw_protobuf`: An early preview of our wire-format-oriented protocol buffer
140   implementation. This protobuf compiler makes a different set of
141   implementation tradeoffs than the most popular protocol buffer library in
142   this space, nanopb.
143