Commit Graph

2441 Commits

Author SHA1 Message Date
Wyatt Hepler
2253040d12 pw_transfer: Python & C++ integration test
Basic tests for transmitting data between a Python client and a C++
server using pw_transfer.

Change-Id: I75c361ec100b055e0d6afb0091e64cc9d773c568
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54707
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2021-08-04 19:11:54 +00:00
Wyatt Hepler
e04d468794 pw_rpc: Python client & C++ server integration test
- Create utilties for interacting with a host binary running a pw_rpc
  server using HDLC over a socket.
- Write a test that runs commands in a Python client on a C++ server.

Change-Id: I1da75c9d4e989112b392c77c82bdab82a2ea60d3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54665
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-08-04 05:50:32 +00:00
Ewout van Bekkum
2a5f4da1be pw_bytes: add helper user defined literals
Adds helper literals including _B, _KiB, _MiB, _GiB, _TiB, _PiB,
and _EiB to define a number of bytes.

Change-Id: I8aa5eae85eb84dd2f071ff1e24e630b9c35f1418
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55682
Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-04 04:28:52 +00:00
Ewout van Bekkum
e758c5cfbf pw_cpu_exception_cortex_m: Add Snapshot support
Adds the ability to capture CPU state and the main stack thread
state for snapshots.

Change-Id: If1669861a73ce1f95c041ce1cf4d409bc6d98451
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54441
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
2021-08-04 04:16:52 +00:00
Anthony DiGirolamo
802f599582 pw_console: Copy paste functions
- Add the pyperclip package to facilitate copy/paste from the host
  machine's clipboard.
- Remove unused ipdb dep
- Add a ctrl-c binding to copy the currently visible log lines in any
  log window.
- Add a ctrl-v binding to paste text into the Python repl. This will
  bypass ptpython's auto-formatter.
- Add a ctrl-alt-c binding to copy the python output text when the
  repl is in focus.
- Above functions added as clickable buttons to all toolbars
- Edit menu added with:
  - Copy visible lines from active window
  - Paste to Python Input
- Python Output Changes:
  - Output is now focusable
  - Text can be selected with shift+arrows or mouse drag
  - Selected text can be copied with Ctrl-C
  - Line wrapping disabled since it breakes mouse wheel scrolling.
    Horizontal scrolling is possible my moving the cursor when the
    output is focused.

Test: Copy/Paste tested on: Linux
Test: Copy Paste Steps 1-9
Change-Id: Ifc44d2a4f2ba13146669dd63278fbae17a644c37
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55080
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-08-04 00:15:13 +00:00
Anthony DiGirolamo
54db765cd2 pw_console: WindowList class and pane movement
- Refactor WindowManager.active_panes into it's own WindowList class.
- Add move window pane left and right feature that will move panes into
  a new vertically split column of windows. This is a simplified verison
  of i3 style window movement.
- Vertical columns can be viewed as a horizontally split stack or a
  tabbed view.
- Add move and resize pane+splits to the [View] menu.

Test: Window Management Steps 1-15
Change-Id: I32e138bc802eea97577bf034f360462c7dd4713d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55021
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-08-04 00:12:42 +00:00
Anthony DiGirolamo
21fd9bbf7f pw_console: Move window pane up and down
Replace the rotate window order option with move window up and
down. Rotate windows was very confusing and made positionining a
specific window impossible.

Test: Window Management Steps 1-12
Change-Id: Iaff75ccf240f540d3c292284b136c8b64b509957
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55020
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-08-03 23:33:02 +00:00
Anthony DiGirolamo
fcf278d913 pw_console: WindowManager class
Refactor window management functions out of ConsoleApp.
This CL is just a move of the existing fuctions, no new
features or additional refactoring.

Test: Manual Window Management 1-9
Change-Id: I8f133e0c7d18921b54b88c6e8d2e51d195f41829
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54960
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-08-03 23:27:02 +00:00
Rob Mohr
6499688f79 pw_presubmit: Simplify adding only pylint and mypy
Simplify adding only the pylint and mypy checks to downstream projects
and not adding test_python_packages.

Change-Id: Ib94f19dec61ea90937eb35445e4ea341697f5601
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55982
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-08-03 22:49:43 +00:00
Adam MacBeth
518f7c16df pw_result: Add dereference operators
Change-Id: I61a912c10377872b475f770d1e45f0c35afd0257
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55304
Commit-Queue: Adam MacBeth <amacbeth@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-08-03 22:20:26 +00:00
Jared Weinstein
daed5a96e0 docs: getting_started add note about package install location for macOS
Google typically recommends installing brew packages to ~/homebrew/opt/.
Pigweed, however, expects packages in the default brew location
/usr/local/opt. Added a note to clarify.

Change-Id: I2d927e922f17bd07fa47774a5538c9aca545f9b1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55305
Pigweed-Auto-Submit: Jared Weinstein <jaredweinstein@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-03 22:18:30 +00:00
Ewout van Bekkum
278ba0ff46 pw_thread: improve error if join() is called when not enabled
Change-Id: I818d44f1a6ef1fe9175b5b79784e3f588f0cc70a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55840
Reviewed-by: Joe Ethier <jethier@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-08-03 20:22:38 +00:00
Armando Montanez
9f3708c3a1 pw_protobuf: Update to final names
Updates all pw_protobuf encoder names to the final naming scheme.

Fixed: 384
Change-Id: I3492042b8dacc7e9c891df727eb5f9d4ccff4934
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46623
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-08-03 16:53:10 +00:00
Anthony DiGirolamo
3c54e88ddc pw_console: Allow for custom word completion
- Optionally add a custom sentence completions before embedding
  pw_console.
- Create an rpc command flattener in console_tools.
- Update rpc_console to add flattened rpc completions.

No-Docs-Update-Reason: Docstrings included in RSTs updated.
Change-Id: Ic4856114210066778260e0bc5a712f2e89479baa
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55320
Pigweed-Auto-Submit: Anthony DiGirolamo <tonymd@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-08-03 05:15:22 +00:00
Anthony DiGirolamo
bf5682a9ac pw_console: Refactor embed free function
- Add the PwConsoleEmbed class for future customization of the embedded
  environment before actually running it.
- Set repl start and stop logs to debug level.

Testing: No UI code changes.
Change-Id: Ifd8407b6b51a046f1139ca535cb998ad0b82d3ca
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55860
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
2021-08-03 04:14:51 +00:00
Wyatt Hepler
b472896bb1 pw_rpc: Expand pw_rpc callback_client unit tests
Change-Id: Icfac4ca6921d78762daae6e9846ec7482b8f0b10
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55023
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-03 01:41:48 +00:00
Wyatt Hepler
9b54e5ea63 pw_stream: Log in SocketStream; configure port in host RPC server
- Log erros when errors occur while creating / configuring the socket.
- Use UNKNOWN status instead of INTERNAL for errors. INTERNAL is used
  for serious internal errors (e.g. an invariant has been violated).
- Make the port used by the host system_rpc_server configurable.
- CHECK that socket setup succeeds in the host system_rpc_server.
- In the system_rpc_server, print logs to stderr in addition to the
  HDLC channel. Otherwise, it's not possible to see logs from before the
  socket it setup.

Change-Id: I3475676ff7bb1461b3b72f603a27638f292f87eb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55505
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-03 01:09:58 +00:00
Alexei Frolov
32a875ddb0 pw_transfer: Fix start logic
Don't set a transfer context's handler (activating the transfer) if its
Prepare function fails.

Change-Id: Id91a042a54aef14f12a153b00fba30060de02a13
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55509
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
2021-08-03 00:35:23 +00:00
Armando Montanez
5fbfd88c58 pw_protobuf: Remove codegen.h
Removes the no-longer needed codegen.h file.

Change-Id: I7fd04f2fc40bdbd3541a44f9f943b489df177ced
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55508
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
2021-08-02 21:51:21 +00:00
Rob Mohr
671d135320 pw_transfer: Run buildifier
Change-Id: I2f09e8a56f04ec675b05cdc83fd19ac3ba5660a6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55507
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2021-08-02 21:44:33 +00:00
Wyatt Hepler
3d80922b40 pw_assert: Prevent double evaluation in PW_CHECK_OK
- Previously, the PW_CHECK_OK expression was evaluated twice: once in
  the if statement, and, when the CHECK failed, again in
  pw_StatusString. Now the status is stored in a variable before it is
  checked.
- Update the multi-evaluation tests to avoid using global state.
- Switch from #if PW_ASSERT_ENABLE_DEBUG to a constant to avoid
  duplication and the risk of code rot.
- Add multi-evaluation tests for PW_CHECK_OK and PW_DCHECK_OK.

Change-Id: Ic6895eff2daf4a06eda833dba9a0d61a0c2922fa
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55504
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-02 20:45:53 +00:00
Armando Montanez
6c65a17f69 pw_snapshot: Add ElfMatcher
Adds an argument to pw_snapshot's process_snapshot() that allows users
to pass a function that provides a matching ELF file for a given
Snapshot.

Change-Id: Ic0a67ed26cde9682db09775c94c86b8f7486a165
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55054
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-02 19:44:53 +00:00
Armando Montanez
c3113a58b5 pw_thread: Integrate symbolizer
Sets up pw_thread to use pw_symbolizer to symbolize backtraces.

Change-Id: Ic2a7c3c9ed3c9039b8fb1f2e75043d7910ed94f5
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55053
Commit-Queue: Armando Montanez <amontanez@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
2021-08-02 19:35:43 +00:00
Armando Montanez
a095fc20b3 pw_protobuf: Remove old Encoder
Completely removes the old pw::ProtobufEncoder. Also removes the unsafe,
unbounded string writing codegen.

Bugs: 384
Change-Id: Iaa1872a24886d253363536eba089d32903cd0199
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46622
Commit-Queue: Armando Montanez <amontanez@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2021-08-02 19:05:44 +00:00
Armando Montanez
10f3bebe0a pw_symbolizer: Add module
Introduces pw_symbolizer, a python module that simplifies address
symbolization.

Change-Id: I62d9209acf14f964ee50f85b3a76fba76fe57925
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/28300
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
2021-08-02 18:16:50 +00:00
pigweed-roller
d6c7c452a8 roll: go
From: version:2@1.16.5
To: version:2@1.16.6

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8839990216939291024
Cq-Cl-Tag: roller-builder:go-roller
Cq-Cl-Tag: roller-bid:8839990216939291024
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ibde0b3009f20013a0c88d1b6ffeb28a7aa5d093f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53600
Reviewed-by: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-08-02 17:32:42 +00:00
Nathaniel Brough
06478336d7 pw_presubmit: Adds Bazel to presubmit check
Adds Bazel test to the quick build checks, and disables modules that no
longer work with Bazel.

No-Docs-Update-Reason: Only config changes.
Change-Id: Ied82269a3564739f5289c345edee172a53028709
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55480
Reviewed-by: Akira Baruah <akirabaruah@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
2021-08-02 16:17:52 +00:00
pigweed-roller
2bfd43f10c roll: host_tools
From: git_revision:4d604694ae78abf2d57b8aa9f89084d95db86e51
To: git_revision:1810f9b652248ee7e165c611b33f13fc1f02598f

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8840023735750856480
Cq-Cl-Tag: roller-builder:host-tools-roller
Cq-Cl-Tag: roller-bid:8840023735750856480
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I66fdfb2f54430342bdf2646b76cc915d7bdfd8ea
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55500
Reviewed-by: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-08-02 09:06:04 +00:00
pigweed-roller
33fd1859a5 roll: gn
From: git_revision:b2d77ab1373192d1532af94b68fb8bab727b0e5b
To: git_revision:eea3906f0e2a8d3622080127d2005ff214d51383

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8840059598178438880
Cq-Cl-Tag: roller-builder:gn-roller
Cq-Cl-Tag: roller-bid:8840059598178438880
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I8b0448635c85dd315214bdcd93b166115b7de823
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55440
Reviewed-by: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-08-01 23:37:20 +00:00
pigweed-roller
18ac0c4759 roll: rbe-client
From: git_revision:4a0a3bdfde6c19d6ef433d21a2d70e4bf9f93ac6
To: git_revision:c3845b14c6d5b6b2ce4c1d537e0da6d20b5916a8

CQ-Do-Not-Cancel-Tryjobs: true
Roller-URL: https://ci.chromium.org/b/8840161141670459184
Cq-Cl-Tag: roller-builder:rbe-client-roller
Cq-Cl-Tag: roller-bid:8840161141670459184
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I8ee70389059ddd217d552d245d70ce8c40a8bed4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55400
Reviewed-by: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed.google.com.iam.gserviceaccount.com>
2021-07-31 20:42:42 +00:00
Ali Zhang
3acfd0fae2 pw_presubmit: Add gn_crypto_boringssl_build
Test: `pw presubmit --step gn_crypto_boringssl_build`

No-Docs-Update-Reason: N/A

Change-Id: I32133ecee66f2b4f8928d11c7d32440bf29c55e4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53862
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
2021-07-31 04:59:21 +00:00
Ali Zhang
dd1cbe70cc pw_crypto: Add SHA256 backed by BoringSSL
Change-Id: I33b36bbc8a293379c1d9f6da7dfe80f12fc3f91e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53880
Reviewed-by: Darren Krahn <dkrahn@google.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
2021-07-31 04:56:10 +00:00
Ali Zhang
2c44c22c24 pw_crypto: Rename sha256::Digest() to sha256::Hash()
Renames the function name sha256::Digest() to sha256::Hash() since
"digest" is more commonly used to denote the output of hashing.

Change-Id: I1463b61504757c744d4610ba453098579066de4d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53780
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Darren Krahn <dkrahn@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-07-31 04:49:30 +00:00
Ali Zhang
442e487808 pw_crypto: Suggest Mbed TLS configurations
Since multiple modules depend on the Mbed TLS library, each requiring
different configurations in order to achieve optimal code size and
performance, it is eventually a product responsibility to configure the
Mbed TLS library per the exact set of modules selected. To facilitate
that process, we document the specific Mbed TLS options needed for each
module that depend on Mbed TLS.

Change-Id: I7e491f7b6510359f83f5a40fed870147ca9bcff7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53741
Reviewed-by: Darren Krahn <dkrahn@google.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-07-31 04:40:40 +00:00
Ali Zhang
472287f573 pw_crypto: Use mbedtls_sha256_* directly
Use the mbedtls_sha256_* APIs instead of the more general mbedtls_md_*
for an immediate reduction in code size -- 19KiB --> 2.8KiB. This avoids
the need to configure Mbed TLS to remove unused hashing algorithms
supported by mbedtls_md_*.

No-Docs-Update-Reason: no behavioral changes.
Change-Id: I7d450e6cb102aa395daabc20a98d1f0ca56360c0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53540
Reviewed-by: Darren Krahn <dkrahn@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
2021-07-31 01:11:12 +00:00
Wyatt Hepler
4947e7781d pw_build: Remove build directory prefix from paths
Since the build directory can be set to anything in gn gen, remap
absolute paths to it to "out" using -ffile-prefix-map.

The build directory is often nested under //, so it should be removed
first. However, GCC and Clang apply -ffile-prefix-map options in
opposite order, so apply this option first and last to handle both
compilers.

Change-Id: Iba135ba23048b7b0bf8b682397ddabb53dee4360
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/52381
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2021-07-30 23:16:30 +00:00
Alexei Frolov
36b1ff9ad9 pw_transfer: Python transfer client fixes
- Standardize finishing transfers through a finish function and call it
  on all exit paths.
- Handle RPC-level errors in the transfer client.
- Temporarily disable stream closing on transfer completion as it runs
  into issues.

Change-Id: I545e0f635d73b61092d980d9c9a06278d01c3e8a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54902
Commit-Queue: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-07-30 18:29:42 +00:00
Rob Mohr
3e7180db31 pw_env_setup: Allow setting gn args for venv setup
Change-Id: Ic7e86e2746cb0a7143e463366ffaac068d348156
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55262
Reviewed-by: Joe Ethier <jethier@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
2021-07-30 18:20:00 +00:00
Alexei Frolov
f93cb26bee pw_transfer: Initial C++ service
This starts the RPC transfer service in C++. Initially, only simple read
transfers are supported, where all read data is sent synchronously in
response to parameter requests from the client.

Change-Id: I8ca76702ea8795ed07f702227d84afdf99874205
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53140
Commit-Queue: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-07-30 17:31:29 +00:00
Adam MacBeth
b2489f336e docs: Update command to fix SSL errors
Change-Id: I9013a10ff30ad9896b93d97fbbd71f35d89eb911
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55200
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Adam MacBeth <amacbeth@google.com>
2021-07-30 15:09:28 +00:00
Wyatt Hepler
31b16ea415 pw_rpc: Add the benchmark service
Add the first two RPCs in the pw.rpc.Benchmark service.

Change-Id: Icb45736936620e8e78e2e983808db55f62ac7941
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54664
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2021-07-30 05:31:49 +00:00
Jared Weinstein
7c658f6468 pw_hdlc: Add a TypeScript encoder implementation
Performance shouldn't be a primary concern since this will be running on
the user's machine rather than on-device.

Passes all unit tests from the python HDLC library.

Change-Id: Ib683dd870199b947a6e1828c0f19b785fddb67e3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53663
Pigweed-Auto-Submit: Jared Weinstein <jaredweinstein@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-07-30 04:23:25 +00:00
Ewout van Bekkum
1810f9b652 pw_sync_threadx: add bss comment for ISL's state enum
Change-Id: I34f4e7eb3cf26afed83d52141977873a120b9e07
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55060
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-07-29 23:12:02 +00:00
Nathaniel Brough
f91e76363d workspace: Updates Bazel build files to work in CI
No-Docs-Update-Reason: Fixes build files.
Change-Id: I596ba5b567cbe6625d378695e0c59a15db974578
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54680
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Akira Baruah <akirabaruah@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
2021-07-29 20:17:52 +00:00
Armando Montanez
3c86dc95dc pw_snapshot: Integrate thread state processor
Integrates pw_thread's thread state processor into the snapshot
processor utility.

Change-Id: I0b025b46300ed62a78f0e096cb88283fb005ad36
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55002
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
2021-07-29 18:03:42 +00:00
Varun Sharma
dac4f524fd stm32cube: Fix H7 build
Ignores two more warnings to get H7 to build.
Verified by building and running binary on H7 board.

Change-Id: Ibc3ad4819dd78efadc579fcfddb32c49436de0ed
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55048
Reviewed-by: Ali Zhang <alizhang@google.com>
Commit-Queue: Varun Sharma <vars@google.com>
2021-07-29 17:38:25 +00:00
Rob Mohr
063a9f7ff6 pw_presubmit: Don't repeat checks
Don't repeat checks that got added to a program multiple times.

Change-Id: I4dfac23e6d6c16b28d1014184538ff449b252f67
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54700
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-07-29 17:02:52 +00:00
Armando Montanez
8931430150 pw_thread: Add thread state proto processing
Adds a python library for processing Thread protos to provide additional
information that can be inferred from the captured data.

Change-Id: Ic1d7adb628e6486f733f41c3f6406f30e9a4452a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55001
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-07-29 16:33:17 +00:00
Ewout van Bekkum
e4ed1011d2 pw_sync_threadx: Adjust ISL enum to make it bss eligible
Adjusts an enum's values to ensure that a value of 0 is used in the
constexpr constructor to ensure that the object is bss eligible
instead of requiring placement in data.

Change-Id: Ied32426852661b5b534b6e4682a0e52fa28a57ae
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55027
Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-07-29 01:57:27 +00:00
Nathaniel Brough
68ef2a59c2 pw_env_setup: Adds CIPD deps to Bazel workspace
This adds a set of repository rules to generate a set of Bazel macros
that configure pigweeds CIPD deps.

Change-Id: I4c4dccf5522abfbb875569a05c8854c94aa40621
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53480
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
2021-07-29 01:04:37 +00:00